[10616] Simplified trade distance checks, GROUP_UPDATE_FLAG_POSITION flag handling moved out of Map

note: need avoid Map::PlayerRelocation calls now and use Player::SetPosition instead
This commit is contained in:
SilverIce 2010-10-17 19:19:47 +03:00
parent 608815855f
commit c4ddbead04
6 changed files with 6 additions and 26 deletions

View file

@ -6055,8 +6055,11 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
z = GetPositionZ();
// group update
if(GetGroup() && (old_x != x || old_y != y))
if (GetGroup() && (old_x != x || old_y != y))
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
if (GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
GetSession()->SendCancelTrade(); // will clode both side trade windows
}
// code block for underwater state update