Core/Spells: Implement SPELL_EFFECT_TELEPORT_TO_RETURN_POINT

Port From (https://github.com/TrinityCore/TrinityCore/commit/1c852af7f2c820e429eaf8389822e8c910f961a1)
This commit is contained in:
hondacrx
2021-03-29 16:36:05 -04:00
parent 369e36819d
commit 047a6babfc
11 changed files with 208 additions and 7 deletions
+14
View File
@@ -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)
{