Skip to content

Commit

Permalink
fix(Scripts/SSC): play emerge animation on the Lurker Below and make …
Browse files Browse the repository at this point in the history
…sure whirl doesn't happen during spout (azerothcore#18009)

* initial

* forgor register hook
  • Loading branch information
elthehablo authored Dec 12, 2023
1 parent 41c1df7 commit 4d40b03
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ struct boss_the_lurker_below : public BossAI
{
if (action == ACTION_START_EVENT)
{
me->SetStandState(UNIT_STAND_STATE_SUBMERGED);
me->SetReactState(REACT_AGGRESSIVE);
me->setAttackTimer(BASE_ATTACK, 6000);
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_STAND);
me->SetInCombatWithZone();
me->SetStandState(UNIT_STAND_STATE_STAND);
}
}

Expand Down Expand Up @@ -135,7 +136,7 @@ struct boss_the_lurker_below : public BossAI
me->SetFacingToObject(me->GetVictim());
me->SetTarget();
scheduler.RescheduleGroup(GROUP_GEYSER, 25s);
scheduler.RescheduleGroup(GROUP_WHIRL, 18s);
scheduler.RescheduleGroup(GROUP_WHIRL, 20s);
scheduler.Schedule(3s, [this](TaskContext)
{
me->InterruptNonMeleeSpells(false);
Expand Down Expand Up @@ -243,6 +244,11 @@ class spell_lurker_below_spout : public AuraScript
SetDuration(16000);
}

void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& /*isPeriodic*/, int32& amplitude)
{
amplitude = 250;
}

void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Creature* creature = GetUnitOwner()->ToCreature())
Expand All @@ -265,6 +271,7 @@ class spell_lurker_below_spout : public AuraScript

void Register() override
{
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_lurker_below_spout::CalcPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectApply += AuraEffectApplyFn(spell_lurker_below_spout::HandleEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_lurker_below_spout::HandleEffectRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_lurker_below_spout::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
Expand Down

0 comments on commit 4d40b03

Please sign in to comment.