[11949] Check group id of group loot timer when timer is started. Close pull request #39

Also fix a small possible bug with loot shared to players at similar position on a different map

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
stfx 2012-04-02 19:18:41 +03:00 committed by Schmoozerd
parent 31e46daaf8
commit e79b80727d
3 changed files with 6 additions and 7 deletions

View file

@ -761,7 +761,7 @@ void Group::StartLootRool(WorldObject* lootTarget, LootMethod method, Loot* loot
if (lootItem.AllowedForPlayer(playerToRoll))
{
if (playerToRoll->IsWithinDist(lootTarget, sWorld.getConfig(CONFIG_FLOAT_GROUP_XP_DISTANCE), false))
if (playerToRoll->IsWithinDistInMap(lootTarget, sWorld.getConfig(CONFIG_FLOAT_GROUP_XP_DISTANCE), false))
{
r->playerVote[playerToRoll->GetObjectGuid()] = ROLL_NOT_EMITED_YET;
++r->totalPlayersRolling;