1
This commit is contained in:
parent
3b6771554f
commit
5a39f74711
@ -3288,3 +3288,13 @@ void Creature::AdjustPos()
|
||||
GetMutablePos().SetZ(0);
|
||||
}
|
||||
}
|
||||
|
||||
Skill* Creature::GetMainSkill()
|
||||
{
|
||||
for (auto& pair : skill_hash_) {
|
||||
if (pair.second->IsMainSkill()) {
|
||||
return pair.second.get();
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -190,6 +190,7 @@ class Creature : public MoveableEntity
|
||||
void ClearBuffList();
|
||||
void TriggerBuff(Skill* skill, std::set<Creature*>& target_list, BuffTriggerType_e trigger_type);
|
||||
Skill* GetSkill(int skill_id);
|
||||
Skill* GetMainSkill();
|
||||
int GetSkillTargetId() { return skill_target_id_; };
|
||||
void AddSkill(int skill_id);
|
||||
void ClearSkill();
|
||||
|
@ -492,3 +492,8 @@ void Skill::CancelMinorMode()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Skill::IsMainSkill()
|
||||
{
|
||||
return owner->GetBattleContext()->IsMainSkill(this);
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ class Skill
|
||||
void CancelMinorMode();
|
||||
void ProcSkillPhase(const mt::SkillPhase* phase);
|
||||
bool Actived() { return actived_; }
|
||||
bool IsMainSkill();
|
||||
|
||||
private:
|
||||
void InitActiveSkill();
|
||||
|
Loading…
x
Reference in New Issue
Block a user