Core/Spells: Fix custom load screen for SPELL_EFFECT_TELEPORT_UNITS
Port From (https://github.com/TrinityCore/TrinityCore/commit/29202810705804c1c5ac126195ab7bd60f56849f)
This commit is contained in:
@@ -621,11 +621,12 @@ namespace Game.Spells
|
||||
// Custom loading screen
|
||||
uint customLoadingScreenId = (uint)effectInfo.MiscValue;
|
||||
if (customLoadingScreenId != 0)
|
||||
player.SendPacket(new CustomLoadScreen(m_spellInfo.Id, customLoadingScreenId));
|
||||
if (targetDest.GetMapId() != unitTarget.GetMapId() || !unitTarget.IsInDist2d(targetDest, PlayerConst.TeleportMinLoadScreenDistance))
|
||||
player.SendPacket(new CustomLoadScreen(m_spellInfo.Id, customLoadingScreenId));
|
||||
|
||||
TeleportToOptions options = GetTeleportOptions(m_caster, unitTarget, m_destTargets[effectInfo.EffectIndex]);
|
||||
|
||||
player.TeleportTo(targetDest, options);
|
||||
player.TeleportTo(targetDest, options, null, m_spellInfo.Id);
|
||||
}
|
||||
else if (targetDest.GetMapId() == unitTarget.GetMapId())
|
||||
unitTarget.NearTeleportTo(targetDest, unitTarget == m_caster);
|
||||
|
||||
Reference in New Issue
Block a user