fix(Scripts/SunwellPlateau): Eredar Twins blaze trap delay (#22253)

This commit is contained in:
Jelle Meeus
2025-05-31 02:41:07 +02:00
committed by GitHub
parent bd756a542a
commit 08cbd4f328
3 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
--
UPDATE `gameobject_template` SET `ScriptName` = 'go_eredar_twins_blaze' WHERE (`entry` = 187366);

View File

@@ -5116,8 +5116,6 @@ void SpellMgr::LoadSpellInfoCorrections()
43444, // Explosive Trap (Hex Lord Malacrass)
43447, // Freezing Trap (Hex Lord Malacrass)
43449, // Snake Trap (Hex Lord Malacrass)
45236, // Blaze
50745 // Blaze
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].Effect = SPELL_EFFECT_SUMMON_OBJECT_SLOT1;

View File

@@ -17,6 +17,8 @@
#include "AreaTriggerScript.h"
#include "CreatureScript.h"
#include "GameObjectAI.h"
#include "GameObjectScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
@@ -488,6 +490,22 @@ public:
}
};
struct go_eredar_twins_blaze : GameObjectAI
{
explicit go_eredar_twins_blaze(GameObject *object) : GameObjectAI(object) { };
void InitializeAI() override
{
// required for the trap to apply its startDelay
if (InstanceScript* instance = me->GetInstanceScript())
if (ObjectGuid creatureGUID = instance->GetGuidData(DATA_ALYTHESS))
{
me->SetOwnerGUID(creatureGUID);
me->SetLootState(GO_NOT_READY);
}
}
};
void AddSC_boss_eredar_twins()
{
RegisterSunwellPlateauCreatureAI(boss_sacrolash);
@@ -501,4 +519,5 @@ void AddSC_boss_eredar_twins()
RegisterSpellScriptWithArgs(spell_eredar_twins_handle_touch_periodic, "spell_eredar_twins_handle_flame_touched_periodic", SPELL_FLAME_TOUCHED, EFFECT_2, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
RegisterSpellScriptWithArgs(spell_eredar_twins_handle_touch_periodic, "spell_eredar_twins_handle_flame_touched_flame_sear", SPELL_FLAME_TOUCHED, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE);
new at_sunwell_eredar_twins();
RegisterGameObjectAI(go_eredar_twins_blaze);
}