Core/Loot: Prevent looting bosses by players that have already completed that encounter

Port From (https://github.com/TrinityCore/TrinityCore/commit/9ce47e6809eecc891904e272b368596fdc55e6a4)
This commit is contained in:
hondacrx
2022-10-06 20:50:10 -04:00
parent 2bba8aeb99
commit 39e9e73277
6 changed files with 57 additions and 14 deletions
+2 -1
View File
@@ -3130,7 +3130,8 @@ namespace Game.Entities
Loot loot = creature.GetLootForPlayer(this);
if (loot == null || loot.IsLooted()) // nothing to loot or everything looted.
return false;
if (!loot.HasItemForAll() && !loot.HasItemFor(this)) // no loot in creature for this player
if (!loot.HasAllowedLooter(GetGUID()) || (!loot.HasItemForAll() && !loot.HasItemFor(this))) // no loot in creature for this player
return false;
if (loot.loot_type == LootType.Skinning)