Core/Spells: fix wrong distance calculations in AoE spells
Port From (https://github.com/TrinityCore/TrinityCore/commit/5d076cfe291980bc5be9d44ffbae887e3dd5ad59)
This commit is contained in:
@@ -724,7 +724,7 @@ namespace Game.Chat
|
||||
return false;
|
||||
|
||||
float x, y, z, o = handler.GetSession().GetPlayer().GetOrientation();
|
||||
handler.GetSession().GetPlayer().GetClosePoint(out x, out y, out z, handler.GetSession().GetPlayer().GetObjectSize());
|
||||
handler.GetSession().GetPlayer().GetClosePoint(out x, out y, out z, handler.GetSession().GetPlayer().GetCombatReach());
|
||||
|
||||
uint id = args.NextUInt32();
|
||||
if (id == 0)
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Game.Chat
|
||||
|
||||
// before GM
|
||||
float x, y, z;
|
||||
gmPlayer.GetClosePoint(out x, out y, out z, player.GetObjectSize());
|
||||
gmPlayer.GetClosePoint(out x, out y, out z, player.GetCombatReach());
|
||||
player.TeleportTo(gmPlayer.GetMapId(), x, y, z, player.GetOrientation());
|
||||
}
|
||||
|
||||
|
||||
@@ -712,7 +712,7 @@ namespace Game.Chat
|
||||
|
||||
// before GM
|
||||
float x, y, z;
|
||||
handler.GetSession().GetPlayer().GetClosePoint(out x, out y, out z, target.GetObjectSize());
|
||||
handler.GetSession().GetPlayer().GetClosePoint(out x, out y, out z, target.GetCombatReach());
|
||||
target.TeleportTo(handler.GetSession().GetPlayer().GetMapId(), x, y, z, target.GetOrientation());
|
||||
PhasingHandler.InheritPhaseShift(target, handler.GetSession().GetPlayer());
|
||||
target.UpdateObjectVisibility();
|
||||
|
||||
@@ -392,7 +392,7 @@ namespace Game.Chat
|
||||
|
||||
// place pet before player
|
||||
float x, y, z;
|
||||
player.GetClosePoint(out x, out y, out z, creatureTarget.GetObjectSize(), SharedConst.ContactDistance);
|
||||
player.GetClosePoint(out x, out y, out z, creatureTarget.GetCombatReach(), SharedConst.ContactDistance);
|
||||
pet.Relocate(x, y, z, MathFunctions.PI - player.GetOrientation());
|
||||
|
||||
// set pet to defensive mode by default (some classes can't control controlled pets in fact).
|
||||
|
||||
Reference in New Issue
Block a user