Rename "SetPosition" to "UpdatePosition".
Replace CreatureRelocation in scripts with new Creature::SetPosition.
This commit is contained in:
@@ -6727,9 +6727,9 @@ ActionButton const* Player::GetActionButton(uint8 button)
|
||||
return &buttonItr->second;
|
||||
}
|
||||
|
||||
bool Player::SetPosition(float x, float y, float z, float orientation, bool teleport)
|
||||
bool Player::UpdatePosition(float x, float y, float z, float orientation, bool teleport)
|
||||
{
|
||||
if (!Unit::SetPosition(x, y, z, orientation, teleport))
|
||||
if (!Unit::UpdatePosition(x, y, z, orientation, teleport))
|
||||
return false;
|
||||
|
||||
//if (movementInfo.flags & MOVEMENTFLAG_MOVING)
|
||||
@@ -6743,7 +6743,7 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||
|
||||
// code block for underwater state update
|
||||
// Unit::SetPosition() checks for validity and updates our coordinates
|
||||
// Unit::UpdatePosition() checks for validity and updates our coordinates
|
||||
// so we re-fetch them instead of using "raw" coordinates from function params
|
||||
UpdateUnderwaterState(GetMap(), GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
|
||||
|
||||
@@ -1937,8 +1937,8 @@ class Player : public Unit, public GridObject<Player>
|
||||
void SendResetInstanceFailed(uint32 reason, uint32 MapId);
|
||||
void SendResetFailedNotify(uint32 mapid);
|
||||
|
||||
virtual bool SetPosition(float x, float y, float z, float orientation, bool teleport = false);
|
||||
bool SetPosition(const Position &pos, bool teleport = false) { return SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
|
||||
virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false);
|
||||
bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
|
||||
void UpdateUnderwaterState(Map* m, float x, float y, float z);
|
||||
|
||||
void SendMessageToSet(WorldPacket* data, bool self) {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
|
||||
|
||||
Reference in New Issue
Block a user