@@ -256,16 +256,24 @@ struct npc_minigob_manabonk : public ScriptedAI
256256 EventMap events;
257257};
258258
259+ enum TeleportToDalaran
260+ {
261+ SPELL_TELEPORT_TO_DALARAN = 53360
262+ };
263+
259264// 54620 - Teleport Crystal: Teleport to Dalaran AICast Script
260265class spell_dalaran_teleport_to_dalaran : public SpellScript
261266{
262267 PrepareSpellScript (spell_dalaran_teleport_to_dalaran);
263268
269+ bool Validate (SpellInfo const * /* spellInfo*/ ) override
270+ {
271+ return ValidateSpellInfo ({ SPELL_TELEPORT_TO_DALARAN });
272+ }
273+
264274 void HandleScript (SpellEffIndex /* effIndex*/ )
265275 {
266- // / @todo: replace this with spell
267- if (Player* target = GetHitUnit ()->ToPlayer ())
268- target->TeleportTo (571 , 5807 .75f , 588 .063f , 660 .939f , 1 .64659f );
276+ GetHitUnit ()->CastSpell (GetHitUnit (), SPELL_TELEPORT_TO_DALARAN);
269277 }
270278
271279 void Register () override
@@ -274,16 +282,24 @@ class spell_dalaran_teleport_to_dalaran : public SpellScript
274282 }
275283};
276284
285+ enum TeleportToLakeWintergrasp
286+ {
287+ SPELL_TELEPORT_TO_LAKE_WINTERGRASP = 58681
288+ };
289+
277290// 58622 - Teleport to Lake Wintergrasp
278291class spell_dalaran_teleport_to_lake_wintergrasp : public SpellScript
279292{
280293 PrepareSpellScript (spell_dalaran_teleport_to_lake_wintergrasp);
281294
295+ bool Validate (SpellInfo const * /* spellInfo*/ ) override
296+ {
297+ return ValidateSpellInfo ({ SPELL_TELEPORT_TO_LAKE_WINTERGRASP });
298+ }
299+
282300 void HandleScript (SpellEffIndex /* effIndex*/ )
283301 {
284- // / @todo: replace this with spell
285- if (Player* target = GetHitUnit ()->ToPlayer ())
286- target->TeleportTo (571 , 5386 .05f , 2840 .97f , 418 .675f , 3 .14159f );
302+ GetHitUnit ()->CastSpell (GetHitUnit (), SPELL_TELEPORT_TO_LAKE_WINTERGRASP);
287303 }
288304
289305 void Register () override
0 commit comments