Rename "SetPosition" to "UpdatePosition".

Replace CreatureRelocation in scripts with new Creature::SetPosition.
This commit is contained in:
megamage
2011-10-10 17:08:01 -04:00
parent 76c9c30c2b
commit d156e066cf
33 changed files with 74 additions and 59 deletions
+3 -3
View File
@@ -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;
}
+2 -2
View File
@@ -1600,9 +1600,9 @@ class Unit : public WorldObject
void SendSpellDamageImmune(Unit* target, uint32 spellId);
void NearTeleportTo(float x, float y, float z, float orientation, bool casting = false);
virtual bool SetPosition(float x, float y, float z, float ang, bool teleport = false);
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport = false);
// returns true if unit's position really changed
bool SetPosition(const Position &pos, bool teleport = false) { return SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
void KnockbackFrom(float x, float y, float speedXY, float speedZ);
void JumpTo(float speedXY, float speedZ, bool forward = true);