diff --git a/Source/Game/Chat/Commands/NPCCommands.cs b/Source/Game/Chat/Commands/NPCCommands.cs index 61ff6dcc7..8c5e63da3 100644 --- a/Source/Game/Chat/Commands/NPCCommands.cs +++ b/Source/Game/Chat/Commands/NPCCommands.cs @@ -162,7 +162,7 @@ namespace Game.Chat data.posZ = z; data.orientation = o; } - creature.SetPosition(x, y, z, o); + creature.UpdatePosition(x, y, z, o); creature.GetMotionMaster().Initialize(); if (creature.IsAlive()) // dead creature will reset movement generator at respawn { diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index cfe5aa122..9931bd5ec 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -2616,20 +2616,6 @@ namespace Game.Entities } bool CanNotReachTarget() { return m_cannotReachTarget; } - public void SetPosition(float x, float y, float z, float o) - { - // prevent crash when a bad coord is sent by the client - if (!GridDefines.IsValidMapCoord(x, y, z, o)) - { - Log.outDebug(LogFilter.Unit, "Creature.SetPosition({0}, {1}, {2}) .. bad coordinates!", x, y, z); - return; - } - - GetMap().CreatureRelocation(ToCreature(), x, y, z, o); - if (IsVehicle()) - GetVehicleKit().RelocatePassengers(); - } - public float GetAggroRange(Unit target) { // Determines the aggro range for creatures (usually pets), used mainly for aggressive pet target selection. diff --git a/Source/Scripts/Northrend/IcecrownCitadel/IcecrownCitadel.cs b/Source/Scripts/Northrend/IcecrownCitadel/IcecrownCitadel.cs index ffa5d543f..cd55cfa24 100644 --- a/Source/Scripts/Northrend/IcecrownCitadel/IcecrownCitadel.cs +++ b/Source/Scripts/Northrend/IcecrownCitadel/IcecrownCitadel.cs @@ -96,7 +96,7 @@ namespace Scripts.Northrend.IcecrownCitadel CreatureData data = creature.GetCreatureData(); if (data != null) - creature.SetPosition(data.posX, data.posY, data.posZ, data.orientation); + creature.UpdatePosition(data.posX, data.posY, data.posZ, data.orientation); creature.DespawnOrUnsummon(); creature.SetCorpseDelay(corpseDelay); diff --git a/Source/Scripts/Northrend/Ulduar/FlameLeviathan.cs b/Source/Scripts/Northrend/Ulduar/FlameLeviathan.cs index b6553baf5..4513df335 100644 --- a/Source/Scripts/Northrend/Ulduar/FlameLeviathan.cs +++ b/Source/Scripts/Northrend/Ulduar/FlameLeviathan.cs @@ -722,7 +722,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan me.GetPosition(out x, out y, out z); z = me.GetMap().GetHeight(me.GetPhaseShift(), x, y, z); me.GetMotionMaster().MovePoint(0, x, y, z); - me.SetPosition(x, y, z, 0); + me.UpdatePosition(x, y, z, 0); } public override void UpdateAI(uint diff)