mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 11:21:58 +01:00
Script/BlackrockDepths: fix Ironhand Guardian's Gout of Flame spell cast. (#21816)
(cherry picked from commit 4529a94e0d)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName`="", `ScriptName`="npc_ironhand_guardian" WHERE `entry`=8982;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=8982 AND `source_type`=0;
|
||||
@@ -3870,6 +3870,7 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
});
|
||||
|
||||
ApplySpellFix({
|
||||
15538, // Gout of Flame
|
||||
42490, // Energized!
|
||||
42492, // Cast Energized
|
||||
43115 // Plague Vial
|
||||
|
||||
@@ -54,6 +54,8 @@ class boss_magmus : public CreatureScript
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
instance->SetData(TYPE_IRON_HALL, IN_PROGRESS);
|
||||
_events.SetPhase(PHASE_ONE);
|
||||
_events.ScheduleEvent(EVENT_FIERY_BURST, 5s);
|
||||
}
|
||||
@@ -97,7 +99,10 @@ class boss_magmus : public CreatureScript
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
{
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_THRONE_DOOR), true);
|
||||
instance->SetData(TYPE_IRON_HALL, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -110,7 +115,67 @@ class boss_magmus : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
enum IronhandGuardian
|
||||
{
|
||||
EVENT_GOUTOFFLAME = 1,
|
||||
SPELL_GOUTOFFLAME = 15529
|
||||
};
|
||||
|
||||
class npc_ironhand_guardian : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_ironhand_guardian() : CreatureScript("npc_ironhand_guardian") { }
|
||||
|
||||
struct npc_ironhand_guardianAI : public ScriptedAI
|
||||
{
|
||||
npc_ironhand_guardianAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = me->GetInstanceScript();
|
||||
_active = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!_active)
|
||||
{
|
||||
if (_instance->GetData(TYPE_IRON_HALL) == NOT_STARTED)
|
||||
return;
|
||||
// Once the boss is engaged, the guardians will stay activated until the next instance reset
|
||||
_events.ScheduleEvent(EVENT_GOUTOFFLAME, 0s);
|
||||
_active = true;
|
||||
}
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
if (eventId == EVENT_GOUTOFFLAME)
|
||||
{
|
||||
DoCastAOE(SPELL_GOUTOFFLAME);
|
||||
_events.Repeat(16s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
bool _active;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetBlackrockDepthsAI<npc_ironhand_guardianAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_magmus()
|
||||
{
|
||||
new boss_magmus();
|
||||
new npc_ironhand_guardian();
|
||||
}
|
||||
|
||||
@@ -30,18 +30,18 @@
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_EMPEROR = 9019,
|
||||
NPC_PHALANX = 9502,
|
||||
NPC_ANGERREL = 9035,
|
||||
NPC_DOPEREL = 9040,
|
||||
NPC_HATEREL = 9034,
|
||||
NPC_VILEREL = 9036,
|
||||
NPC_SEETHREL = 9038,
|
||||
NPC_GLOOMREL = 9037,
|
||||
NPC_DOOMREL = 9039,
|
||||
NPC_MAGMUS = 9938,
|
||||
NPC_MOIRA = 8929,
|
||||
NPC_COREN = 23872
|
||||
NPC_EMPEROR = 9019,
|
||||
NPC_PHALANX = 9502,
|
||||
NPC_ANGERREL = 9035,
|
||||
NPC_DOPEREL = 9040,
|
||||
NPC_HATEREL = 9034,
|
||||
NPC_VILEREL = 9036,
|
||||
NPC_SEETHREL = 9038,
|
||||
NPC_GLOOMREL = 9037,
|
||||
NPC_DOOMREL = 9039,
|
||||
NPC_MAGMUS = 9938,
|
||||
NPC_MOIRA = 8929,
|
||||
NPC_COREN = 23872,
|
||||
};
|
||||
|
||||
enum GameObjects
|
||||
|
||||
Reference in New Issue
Block a user