fix(Script/Gundrak): Moorabi timing and hard reset (#23079)

This commit is contained in:
blinkysc
2025-10-11 16:50:19 -05:00
committed by GitHub
parent c50688c702
commit 757de7a983
2 changed files with 56 additions and 24 deletions

View File

@@ -0,0 +1,2 @@
-- Moorabi hard reset
UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 2147483648 WHERE `entry` IN (29305, 30530);

View File

@@ -92,12 +92,18 @@ public:
BossAI::JustEngagedWith(who);
me->CastSpell(me, SPELL_MOJO_FRENZY, true);
events.ScheduleEvent(EVENT_GROUND_TREMOR, 18s);
events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 10s);
events.ScheduleEvent(EVENT_GROUND_TREMOR, 13s, 30s);
events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 8s, 38s);
events.ScheduleEvent(EVENT_DETERMINED_STAB, 20s);
events.ScheduleEvent(EVENT_TRANSFORMATION, 12s);
}
void EnterEvadeMode(EvadeReason why) override
{
summons.DespawnAll();
BossAI::EnterEvadeMode(why);
}
void SpellHitTarget(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TRANSFORMATION)
@@ -113,6 +119,7 @@ public:
{
Talk(SAY_DEATH);
Talk(EMOTE_ALTAR);
BossAI::JustDied(killer);
}
@@ -144,29 +151,52 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch (events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_GROUND_TREMOR:
if (roll_chance_i(50))
Talk(SAY_QUAKE);
me->CastSpell(me, me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_QUAKE : SPELL_GROUND_TREMOR, false);
events.ScheduleEvent(EVENT_GROUND_TREMOR, 10s);
break;
if (me->GetDisplayId() != me->GetNativeDisplayId())
{
me->CastSpell(me, SPELL_QUAKE, false);
events.ScheduleEvent(EVENT_GROUND_TREMOR, 16s, 63s);
}
else
{
me->CastSpell(me, SPELL_GROUND_TREMOR, false);
events.ScheduleEvent(EVENT_GROUND_TREMOR, 13s, 27s);
}
return;
case EVENT_NUMBLING_SHOUT:
me->CastSpell(me, me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_NUMBING_ROAR : SPELL_NUMBING_SHOUT, false);
events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 10s);
break;
if (me->GetDisplayId() != me->GetNativeDisplayId())
{
me->CastSpell(me, SPELL_NUMBING_ROAR, false);
events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 8s, 54s);
}
else
{
me->CastSpell(me, SPELL_NUMBING_SHOUT, false);
events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 6s, 27s);
}
return;
case EVENT_DETERMINED_STAB:
me->CastSpell(me->GetVictim(), me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_DETERMINED_GORE : SPELL_DETERMINED_STAB, false);
events.ScheduleEvent(EVENT_DETERMINED_STAB, 8s);
break;
return;
case EVENT_TRANSFORMATION:
Talk(EMOTE_TRANSFORM);
Talk(SAY_TRANSFORM);
me->CastSpell(me, SPELL_TRANSFORMATION, false);
me->CastSpell(me, SPELL_SUMMON_PHANTOM_TRANSFORM, true);
events.ScheduleEvent(EVENT_TRANSFORMATION, 10s);
break;
return;
}
}
DoMeleeAttackIfReady();