[9012] fix crash when achievement is completed and player isn't in world

also don't divide money loot for players who are not inside the
same map..
and player shouldn't be able to reclaim his corpse if it isn't in same map

and some other related cleanups
This commit is contained in:
balrok 2009-12-17 12:00:11 +01:00
parent 6057be2656
commit 7c4acf31e2
8 changed files with 26 additions and 24 deletions

View file

@ -221,7 +221,7 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
Player* playerGroup = itr->getSource();
if(!playerGroup)
continue;
if (player->IsWithinDist(playerGroup,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
if (player->IsWithinDistInMap(playerGroup,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
playersNear.push_back(playerGroup);
}