Core/Spells: Implement SPELL_EFFECT_TELEPORT_TO_RETURN_POINT
Port From (https://github.com/TrinityCore/TrinityCore/commit/1c852af7f2c820e429eaf8389822e8c910f961a1)
This commit is contained in:
@@ -5139,6 +5139,20 @@ namespace Game.Spells
|
||||
player.SendPacket(packet);
|
||||
}
|
||||
|
||||
void EffectTeleportToReturnPoint(uint effIndex)
|
||||
{
|
||||
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
|
||||
return;
|
||||
|
||||
Player player = unitTarget.ToPlayer();
|
||||
if (player != null)
|
||||
{
|
||||
WorldLocation dest = player.GetStoredAuraTeleportLocation((uint)effectInfo.MiscValue);
|
||||
if (dest != null)
|
||||
player.TeleportTo(dest, unitTarget == m_caster ? TeleportToOptions.Spell | TeleportToOptions.NotLeaveCombat : 0);
|
||||
}
|
||||
}
|
||||
|
||||
[SpellEffectHandler(SpellEffectName.SummonRafFriend)]
|
||||
void EffectSummonRaFFriend(uint effIndex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user