fix(Scripts/Hyjal): initialize/reset local private variables in Reset function (#18932)

initial
This commit is contained in:
Dan
2024-05-22 21:15:13 +02:00
committed by GitHub
parent f8e584a450
commit 7f42ec0371
@@ -48,14 +48,19 @@ struct boss_kazrogal : public BossAI
public: public:
boss_kazrogal(Creature* creature) : BossAI(creature, DATA_KAZROGAL) boss_kazrogal(Creature* creature) : BossAI(creature, DATA_KAZROGAL)
{ {
_recentlySpoken = false;
_markCounter = 0;
scheduler.SetValidator([this] scheduler.SetValidator([this]
{ {
return !me->HasUnitState(UNIT_STATE_CASTING); return !me->HasUnitState(UNIT_STATE_CASTING);
}); });
} }
void Reset() override
{
_recentlySpoken = false;
_markCounter = 0;
BossAI::Reset();
}
void JustEngagedWith(Unit * who) override void JustEngagedWith(Unit * who) override
{ {
BossAI::JustEngagedWith(who); BossAI::JustEngagedWith(who);