Scripts/Dalaran: Replace TeleportTo function with spells (#30965)

(cherry picked from commit 8c5863596e428916aa5b9d2c5fa4c31ef67317e7)
This commit is contained in:
offl
2026-06-23 22:44:09 +02:00
committed by Shauren
parent 299c3231c7
commit 0a35c5ab4b
+22 -6
View File
@@ -254,14 +254,22 @@ private:
EventMap events;
};
enum TeleportToDalaran
{
SPELL_TELEPORT_TO_DALARAN = 53360
};
// 54620 - Teleport Crystal: Teleport to Dalaran AICast Script
class spell_dalaran_teleport_to_dalaran : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_TELEPORT_TO_DALARAN });
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
/// @todo: replace this with spell
if (Player* target = GetHitUnit()->ToPlayer())
target->TeleportTo(571, 5807.75f, 588.063f, 660.939f, 1.64659f);
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_TELEPORT_TO_DALARAN);
}
void Register() override
@@ -270,14 +278,22 @@ class spell_dalaran_teleport_to_dalaran : public SpellScript
}
};
enum TeleportToLakeWintergrasp
{
SPELL_TELEPORT_TO_LAKE_WINTERGRASP = 58681
};
// 58622 - Teleport to Lake Wintergrasp
class spell_dalaran_teleport_to_lake_wintergrasp : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_TELEPORT_TO_LAKE_WINTERGRASP });
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
/// @todo: replace this with spell
if (Player* target = GetHitUnit()->ToPlayer())
target->TeleportTo(571, 5386.05f, 2840.97f, 418.675f, 3.14159f);
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_TELEPORT_TO_LAKE_WINTERGRASP);
}
void Register() override