Core/Creature: drop method SetPosition
Port From (https://github.com/TrinityCore/TrinityCore/commit/55576d20d837a9b4575c11a73940c29c0e8e605b)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user