Fixes #420 fixed out-of-range group member's position update, which broken after 7014f421c8
--HG-- branch : trunk
This commit is contained in:
+8
-13
@@ -5987,22 +5987,17 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
|
||||
// mover->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TURNING);
|
||||
//AURA_INTERRUPT_FLAG_JUMP not sure
|
||||
|
||||
bool move2d = (teleport || GetPositionX() != x || GetPositionY() != y);
|
||||
// group update
|
||||
if (GetGroup())
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||
|
||||
if (move2d || GetPositionZ() != z)
|
||||
{
|
||||
// group update
|
||||
if (move2d && GetGroup())
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||
// code block for underwater state update
|
||||
UpdateUnderwaterState(GetMap(), x, y, z);
|
||||
|
||||
// code block for underwater state update
|
||||
UpdateUnderwaterState(GetMap(), x, y, z);
|
||||
if(GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
|
||||
GetSession()->SendCancelTrade();
|
||||
|
||||
if(GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
|
||||
GetSession()->SendCancelTrade();
|
||||
|
||||
CheckExploreSystem();
|
||||
}
|
||||
CheckExploreSystem();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -15943,7 +15943,7 @@ bool Unit::SetPosition(float x, float y, float z, float orientation, bool telepo
|
||||
if ((relocated || turn) && IsVehicle())
|
||||
GetVehicleKit()->RelocatePassengers(x,y,z,orientation);
|
||||
|
||||
return true;
|
||||
return (relocated || turn);
|
||||
}
|
||||
|
||||
void Unit::SendThreatListUpdate()
|
||||
|
||||
@@ -1426,6 +1426,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
|
||||
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);
|
||||
// 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); }
|
||||
|
||||
void KnockbackFrom(float x, float y, float speedXY, float speedZ);
|
||||
|
||||
Reference in New Issue
Block a user