Rename "SetPosition" to "UpdatePosition".
Replace CreatureRelocation in scripts with new Creature::SetPosition.
This commit is contained in:
1 parent
76c9c30c2b
commit
d156e066cf
33 files changed
+74
-59
No files matched your search
@@ -17151,16 +17151,16 @@ void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool cas
|
||||
{
|
||||
// FIXME: this interrupts spell visual
|
||||
DestroyForNearbyPlayers();
|
||||
SetPosition(x, y, z, orientation, true);
|
||||
UpdatePosition(x, y, z, orientation, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool Unit::SetPosition(float x, float y, float z, float orientation, bool teleport)
|
||||
bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool teleport)
|
||||
{
|
||||
// prevent crash when a bad coord is sent by the client
|
||||
if (!Trinity::IsValidMapCoord(x, y, z, orientation))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Unit::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Unit::UpdatePosition(%f, %f, %f) .. bad coordinates!", x, y, z);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user