fix(Scripts/SunwellPlateau): Don't replay Felmyst intro after wipes (#21398)

Felmyst into no longer relays after a wipe.
This commit is contained in:
Andrew 2025-02-11 09:30:34 -03:00 committed by GitHub
parent 2f6097f15e
commit c070e4bddf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,10 +104,21 @@ struct boss_felmyst : public BossAI
void InitializeAI() override
{
me->SetStandState(UNIT_STAND_STATE_SLEEP);
me->SetReactState(REACT_PASSIVE);
me->SetImmuneToPC(true);
StartIntro();
if (instance->GetBossState(DATA_FELMYST) == TO_BE_DECIDED)
{
me->SetStandState(UNIT_STAND_STATE_SLEEP);
me->SetImmuneToPC(true);
StartIntro();
}
else
{
me->SetCanFly(true);
me->SetDisableGravity(true);
me->SendMovementFlagUpdate();
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
}
}
void Reset() override
@ -115,9 +126,6 @@ struct boss_felmyst : public BossAI
BossAI::Reset();
me->m_Events.KillAllEvents(false);
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_FOG_OF_CORRUPTION_CHARM);
me->SetCanFly(true);
me->SetDisableGravity(true);
me->SendMovementFlagUpdate();
}
void JustEngagedWith(Unit* who) override
@ -128,7 +136,13 @@ struct boss_felmyst : public BossAI
Talk(YELL_BERSERK);
DoCastSelf(SPELL_BERSERK, true);
}, 10min);
me->GetMotionMaster()->MovePoint(POINT_GROUND, who->GetPosition(), false, true);
me->GetMotionMaster()->Clear();
Position landPos = who->GetPosition();
me->m_Events.AddEventAtOffset([&, landPos] {
me->GetMotionMaster()->MovePoint(POINT_GROUND, landPos, false, true);
}, 2s);
}
void KilledUnit(Unit* victim) override