[9918] Fixed player's tapped creature loot access by group in diff cases

* If player tap creature in group and leave then group will have access to creature loot if not disbanded
* If player tap creature and after join to group then creature loot will accesable only by player
* Also RewardPlayerAndGroupAtKill divided to simgle player and group reward versions used for group tap
  and single player tap cases.
This commit is contained in:
VladimirMangos 2010-05-17 08:58:54 +04:00
parent 96d50bf55a
commit 696a4b6db0
13 changed files with 223 additions and 135 deletions

View file

@ -436,10 +436,9 @@ void WorldSession::DoLootRelease(ObjectGuid lguid)
loot = &pCreature->loot;
// update next looter
if(Player *recipient = pCreature->GetLootRecipient())
if(Group* group = recipient->GetGroup())
if (group->GetLooterGuid() == player->GetGUID())
group->UpdateLooterGuid(pCreature);
if(Group* group = pCreature->GetGroupLootRecipient())
if (group->GetLooterGuid() == player->GetGUID())
group->UpdateLooterGuid(pCreature);
if (loot->isLooted())
{