fix(Scripts/Hyjal): initialize/reset local private variables in Reset function (#18932)
initial
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user