fix(Scripts/Misc): Fix bosses not reseting after the despawn update (#15507)

* fix bosses not reseting

* fix lk

* fix tirion not respawning

* up
This commit is contained in:
Skjalf
2023-03-21 15:05:04 -03:00
committed by GitHub
parent 80ac0c958d
commit 9aee5c41e2
3 changed files with 22 additions and 25 deletions

View File

@@ -277,6 +277,9 @@ public:
if (IsAnyPlayerValid())
return;
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_HALION_CONTROLLER)))
controller->AI()->DoAction(ACTION_RESET_ENCOUNTER);
BossAI::EnterEvadeMode(why);
}
@@ -286,14 +289,6 @@ public:
BossAI::AttackStart(who);
}
void JustReachedHome() override
{
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_HALION_CONTROLLER)))
controller->AI()->DoAction(ACTION_RESET_ENCOUNTER);
BossAI::JustReachedHome();
}
void JustEngagedWith(Unit* who) override
{
BossAI::JustEngagedWith(who);