Skip to content

Commit

Permalink
fix(Scripts/Hyjal): initialize/reset local private variables in Reset…
Browse files Browse the repository at this point in the history
… function (azerothcore#18932)

initial
  • Loading branch information
elthehablo authored May 22, 2024
1 parent f8e584a commit 7f42ec0
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,19 @@ struct boss_kazrogal : public BossAI
public:
boss_kazrogal(Creature* creature) : BossAI(creature, DATA_KAZROGAL)
{
_recentlySpoken = false;
_markCounter = 0;
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}

void Reset() override
{
_recentlySpoken = false;
_markCounter = 0;
BossAI::Reset();
}

void JustEngagedWith(Unit * who) override
{
BossAI::JustEngagedWith(who);
Expand Down

0 comments on commit 7f42ec0

Please sign in to comment.