mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Script/Gundrak): Moorabi timing and hard reset (#23079)
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
-- Moorabi hard reset
|
||||||
|
UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 2147483648 WHERE `entry` IN (29305, 30530);
|
||||||
@@ -92,12 +92,18 @@ public:
|
|||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
me->CastSpell(me, SPELL_MOJO_FRENZY, true);
|
me->CastSpell(me, SPELL_MOJO_FRENZY, true);
|
||||||
|
|
||||||
events.ScheduleEvent(EVENT_GROUND_TREMOR, 18s);
|
events.ScheduleEvent(EVENT_GROUND_TREMOR, 13s, 30s);
|
||||||
events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 10s);
|
events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 8s, 38s);
|
||||||
events.ScheduleEvent(EVENT_DETERMINED_STAB, 20s);
|
events.ScheduleEvent(EVENT_DETERMINED_STAB, 20s);
|
||||||
events.ScheduleEvent(EVENT_TRANSFORMATION, 12s);
|
events.ScheduleEvent(EVENT_TRANSFORMATION, 12s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
|
{
|
||||||
|
summons.DespawnAll();
|
||||||
|
BossAI::EnterEvadeMode(why);
|
||||||
|
}
|
||||||
|
|
||||||
void SpellHitTarget(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
void SpellHitTarget(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||||
{
|
{
|
||||||
if (spellInfo->Id == SPELL_TRANSFORMATION)
|
if (spellInfo->Id == SPELL_TRANSFORMATION)
|
||||||
@@ -113,6 +119,7 @@ public:
|
|||||||
{
|
{
|
||||||
Talk(SAY_DEATH);
|
Talk(SAY_DEATH);
|
||||||
Talk(EMOTE_ALTAR);
|
Talk(EMOTE_ALTAR);
|
||||||
|
|
||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,29 +151,52 @@ public:
|
|||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (events.ExecuteEvent())
|
while (uint32 eventId = events.ExecuteEvent())
|
||||||
{
|
{
|
||||||
case EVENT_GROUND_TREMOR:
|
switch (eventId)
|
||||||
if (roll_chance_i(50))
|
{
|
||||||
Talk(SAY_QUAKE);
|
case EVENT_GROUND_TREMOR:
|
||||||
me->CastSpell(me, me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_QUAKE : SPELL_GROUND_TREMOR, false);
|
if (roll_chance_i(50))
|
||||||
events.ScheduleEvent(EVENT_GROUND_TREMOR, 10s);
|
Talk(SAY_QUAKE);
|
||||||
break;
|
|
||||||
case EVENT_NUMBLING_SHOUT:
|
if (me->GetDisplayId() != me->GetNativeDisplayId())
|
||||||
me->CastSpell(me, me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_NUMBING_ROAR : SPELL_NUMBING_SHOUT, false);
|
{
|
||||||
events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 10s);
|
me->CastSpell(me, SPELL_QUAKE, false);
|
||||||
break;
|
events.ScheduleEvent(EVENT_GROUND_TREMOR, 16s, 63s);
|
||||||
case EVENT_DETERMINED_STAB:
|
}
|
||||||
me->CastSpell(me->GetVictim(), me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_DETERMINED_GORE : SPELL_DETERMINED_STAB, false);
|
else
|
||||||
events.ScheduleEvent(EVENT_DETERMINED_STAB, 8s);
|
{
|
||||||
break;
|
me->CastSpell(me, SPELL_GROUND_TREMOR, false);
|
||||||
case EVENT_TRANSFORMATION:
|
events.ScheduleEvent(EVENT_GROUND_TREMOR, 13s, 27s);
|
||||||
Talk(EMOTE_TRANSFORM);
|
}
|
||||||
Talk(SAY_TRANSFORM);
|
return;
|
||||||
me->CastSpell(me, SPELL_TRANSFORMATION, false);
|
|
||||||
me->CastSpell(me, SPELL_SUMMON_PHANTOM_TRANSFORM, true);
|
case EVENT_NUMBLING_SHOUT:
|
||||||
events.ScheduleEvent(EVENT_TRANSFORMATION, 10s);
|
if (me->GetDisplayId() != me->GetNativeDisplayId())
|
||||||
break;
|
{
|
||||||
|
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);
|
||||||
|
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);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
|
|||||||
Reference in New Issue
Block a user