fix(Scripts/Ulduar): fix teleporters not activating after boss kills (#24860)

Co-authored-by: Vincent-Michael <Vincent_Michael@gmx.de>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Keader <keader.android@gmail.com>
This commit is contained in:
Andrew
2026-02-24 22:25:16 -03:00
committed by GitHub
parent 25ff0c9ef4
commit b31a9379b8
3 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
--
UPDATE `conditions` SET `ConditionValue3` = 2 WHERE `SourceGroup` = 10389 AND `SourceEntry` IN (0, 1, 2, 3, 4, 5, 6, 8) AND `SourceTypeOrReferenceId` = 15;

View File

@@ -0,0 +1,14 @@
DELETE FROM `smart_scripts` WHERE `entryorguid` = 194569 AND `source_type` = 1 AND `id` IN (0, 1, 2);
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceGroup` = 2 AND `SourceEntry` = 194569 AND `SourceId` = 1;
DELETE FROM `spell_script_names` WHERE `spell_id` IN (64014, 64024, 64025, 64028, 64029, 64030, 64031, 64032, 65042);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(64014, 'spell_ulduar_teleporter'),
(64024, 'spell_ulduar_teleporter'),
(64025, 'spell_ulduar_teleporter'),
(64028, 'spell_ulduar_teleporter'),
(64029, 'spell_ulduar_teleporter'),
(64030, 'spell_ulduar_teleporter'),
(64031, 'spell_ulduar_teleporter'),
(64032, 'spell_ulduar_teleporter'),
(65042, 'spell_ulduar_teleporter');

View File

@@ -23,6 +23,7 @@
#include "Player.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "Spell.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
@@ -544,9 +545,44 @@ struct npc_salvaged_siege_engine : public VehicleAI
}
};
// 64014 - Expedition Base Camp Teleport
// 64024 - Conservatory of Life Teleport
// 64025 - Halls of Invention Teleport
// 64028 - Colossal Forge Teleport
// 64029 - Shattered Walkway Teleport
// 64030 - Antechamber of Ulduar Teleport
// 64031 - Scrapyard Teleport
// 64032 - Formation Grounds Teleport
// 65042 - Prison of Yogg-Saron Teleport
class spell_ulduar_teleporter : public SpellScript
{
PrepareSpellScript(spell_ulduar_teleporter);
SpellCastResult CheckRequirement()
{
Unit* target = GetExplTargetUnit();
if (!target || !target->IsPlayer())
return SPELL_FAILED_DONT_REPORT;
if (target->IsInCombat())
{
Spell::SendCastResult(target->ToPlayer(), GetSpellInfo(), 0, SPELL_FAILED_AFFECTING_COMBAT);
return SPELL_FAILED_AFFECTING_COMBAT;
}
return SPELL_CAST_OK;
}
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_ulduar_teleporter::CheckRequirement);
}
};
void AddSC_ulduar()
{
new npc_ulduar_keeper();
RegisterSpellScript(spell_ulduar_teleporter);
RegisterSpellScript(spell_ulduar_energy_sap_aura);
RegisterUlduarCreatureAI(npc_ulduar_snow_mound);
RegisterUlduarCreatureAI(npc_ulduar_storm_tempered_keeper);