This commit is contained in:
aozhiwei 2022-12-28 19:31:48 +08:00
parent 557d9cc102
commit b42efa4edb
3 changed files with 8 additions and 1 deletions

View File

@ -131,7 +131,7 @@ void Buff::InternalTimerAddBuff()
auto caster_state = std::make_shared<SkillCasterState>();
caster_.Get()->FillSkillCasterState(caster_state.get());
const mt::Skill* skill = caster_.Get()->CurrentSkill() ? caster_.Get()->CurrentSkill()->meta : nullptr;
const mt::Skill* skill = caster_.Get()->CurrentSkillMeta();
auto timer_func =
[this, caster_state, skill] (int event, const a8::Args* args)
{

View File

@ -1148,6 +1148,12 @@ Skill* Creature::CurrentSkill()
return curr_skill_;
}
const mt::Skill* Creature::CurrentSkillMeta()
{
const mt::Skill* skill_meta = CurrentSkill() ? CurrentSkill()->meta : nullptr;
return skill_meta;
}
void Creature::ActiveAllSkill()
{
for (auto& pair : skill_hash_) {

View File

@ -178,6 +178,7 @@ class Creature : public MoveableEntity
);
void ResetSkill();
Skill* CurrentSkill();
const mt::Skill* CurrentSkillMeta();
void ActiveAllSkill();
const mt::SkillPhase* GetCurrSkillPhase();
bool CanSee(const Creature* c) const;