Skip to content

Commit

Permalink
fix(Scripts/SunwellPlateau): Don't replay Felmyst intro after wipes (a…
Browse files Browse the repository at this point in the history
…zerothcore#21398)

Felmyst into no longer relays after a wipe.
  • Loading branch information
Nyeriah authored Feb 11, 2025
1 parent 2f6097f commit c070e4b
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,28 @@ 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
{
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
Expand All @@ -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
Expand Down

0 comments on commit c070e4b

Please sign in to comment.