1
This commit is contained in:
parent
ed9c40349a
commit
5005b6dbda
@ -147,6 +147,11 @@ void CallFuncBuff::Activate()
|
|||||||
ClearSummonObstacle();
|
ClearSummonObstacle();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case BuffCallFunc_e::kResetSkillCd:
|
||||||
|
{
|
||||||
|
ResetSkillCd();
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -775,3 +780,12 @@ void CallFuncBuff::ClearSummonObstacle()
|
|||||||
float num = meta->GetBuffParam3(this);
|
float num = meta->GetBuffParam3(this);
|
||||||
owner->RemoveSurplusObstacle(id, num);
|
owner->RemoveSurplusObstacle(id, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CallFuncBuff::ResetSkillCd()
|
||||||
|
{
|
||||||
|
int skill_id = meta->_int_buff_param2;
|
||||||
|
Skill* skill = owner->GetSkill(skill_id);
|
||||||
|
if (skill) {
|
||||||
|
skill->ResetSkillCd();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -24,6 +24,7 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int,
|
|||||||
kSummonObstacleSepcPoint = 24,
|
kSummonObstacleSepcPoint = 24,
|
||||||
kSummonObstacleSpecDistance = 25,
|
kSummonObstacleSpecDistance = 25,
|
||||||
kClearSummonObstacle = 26,
|
kClearSummonObstacle = 26,
|
||||||
|
kResetSkillCd = 27
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -51,6 +52,7 @@ class CallFuncBuff : public Buff
|
|||||||
void SummonObstacleSpecPoint();
|
void SummonObstacleSpecPoint();
|
||||||
void SummonObstacleSpecDistance();
|
void SummonObstacleSpecDistance();
|
||||||
void ClearSummonObstacle();
|
void ClearSummonObstacle();
|
||||||
|
void ResetSkillCd();
|
||||||
|
|
||||||
float hold_param2_ = 0.0;
|
float hold_param2_ = 0.0;
|
||||||
};
|
};
|
||||||
|
@ -13,9 +13,11 @@ GridCell::GridCell()
|
|||||||
{
|
{
|
||||||
entitys_.reserve(MAX_ROOM_IDX);
|
entitys_.reserve(MAX_ROOM_IDX);
|
||||||
creatures_.reserve(MAX_ROOM_IDX);
|
creatures_.reserve(MAX_ROOM_IDX);
|
||||||
|
obstacles_.reserve(MAX_ROOM_IDX);
|
||||||
for (int i = 0; i < MAX_ROOM_IDX; ++i) {
|
for (int i = 0; i < MAX_ROOM_IDX; ++i) {
|
||||||
entitys_.push_back(std::set<Entity*>());
|
entitys_.push_back(std::set<Entity*>());
|
||||||
creatures_.push_back(std::set<Creature*>());
|
creatures_.push_back(std::set<Creature*>());
|
||||||
|
obstacles_.push_back(std::set<Obstacle*>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,6 +26,7 @@ void GridCell::ClearRoomData(Room* room)
|
|||||||
{
|
{
|
||||||
entitys_[room->GetRoomIdx()].clear();
|
entitys_[room->GetRoomIdx()].clear();
|
||||||
creatures_[room->GetRoomIdx()].clear();
|
creatures_[room->GetRoomIdx()].clear();
|
||||||
|
obstacles_[room->GetRoomIdx()].clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridCell::TraverseHumanList(std::function<void (Human*, bool&)> func,
|
void GridCell::TraverseHumanList(std::function<void (Human*, bool&)> func,
|
||||||
|
@ -529,6 +529,7 @@ void MapInstance::MarkMapAreaPolys()
|
|||||||
int ext_flag = 0;
|
int ext_flag = 0;
|
||||||
dtPoly* poly = &tile->polys[i];
|
dtPoly* poly = &tile->polys[i];
|
||||||
if ((poly->flags & SAMPLE_POLYFLAGS_SWIM) == SAMPLE_POLYFLAGS_SWIM) {
|
if ((poly->flags & SAMPLE_POLYFLAGS_SWIM) == SAMPLE_POLYFLAGS_SWIM) {
|
||||||
|
#if 0
|
||||||
const mt::MapArea* last_area_meta = nullptr;
|
const mt::MapArea* last_area_meta = nullptr;
|
||||||
for (int ii = 0; ii < poly->vertCount; ++ii) {
|
for (int ii = 0; ii < poly->vertCount; ++ii) {
|
||||||
const float* vc = &tile->verts[poly->verts[ii]*3];
|
const float* vc = &tile->verts[poly->verts[ii]*3];
|
||||||
@ -573,6 +574,7 @@ void MapInstance::MarkMapAreaPolys()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else if ((poly->flags & SAMPLE_POLYFLAGS_GLASS) == SAMPLE_POLYFLAGS_GLASS) {
|
} else if ((poly->flags & SAMPLE_POLYFLAGS_GLASS) == SAMPLE_POLYFLAGS_GLASS) {
|
||||||
for (int ii = 0; ii < poly->vertCount; ++ii) {
|
for (int ii = 0; ii < poly->vertCount; ++ii) {
|
||||||
const float* vc = &tile->verts[poly->verts[ii]*3];
|
const float* vc = &tile->verts[poly->verts[ii]*3];
|
||||||
|
@ -976,7 +976,7 @@ float BattleDataContext::GetBrainLifePct()
|
|||||||
|
|
||||||
float BattleDataContext::GetSkillCdPct()
|
float BattleDataContext::GetSkillCdPct()
|
||||||
{
|
{
|
||||||
return hero_ability_->GetSkillCdPct();
|
return hero_ability_->GetSkillCdPct() + owner_.Get()->GetAbility()->GetAttrAddition(kHAT_SkillTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
float BattleDataContext::GetRescueTimePct()
|
float BattleDataContext::GetRescueTimePct()
|
||||||
|
@ -58,7 +58,7 @@ int Skill::GetCd()
|
|||||||
meta->skill_type() == kPassiveSkill) {
|
meta->skill_type() == kPassiveSkill) {
|
||||||
return meta->skill_cd() * 1000;
|
return meta->skill_cd() * 1000;
|
||||||
} else {
|
} else {
|
||||||
return meta->skill_cd() * 1000 * (1 + owner->GetBattleContext()->GetSkillCdPct());
|
return meta->skill_cd() * 1000 * (1 - owner->GetBattleContext()->GetSkillCdPct());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user