fix(Core/Loot): Set skinnable flag only after all loot was taken. Source: TrinityCore. (#9573)

Fixes #9318
This commit is contained in:
UltraNix
2021-12-12 14:31:00 +01:00
committed by GitHub
parent 4e93671b3c
commit b1303e0e96
3 changed files with 35 additions and 21 deletions

View File

@@ -5667,6 +5667,9 @@ bool Player::isAllowedToLoot(const Creature* creature)
if (!loot->hasItemForAll() && !loot->hasItemFor(this)) // no loot in creature for this player
return false;
if (loot->loot_type == LOOT_SKINNING)
return creature->GetLootRecipientGUID() == GetGUID();
Group* thisGroup = GetGroup();
if (!thisGroup)
return this == creature->GetLootRecipient();