Core/Creatures: Allow disabling loot for creatures

Port From (https://github.com/TrinityCore/TrinityCore/commit/ebf799c0f696ec88be66795d4ad0a20fa5ce5e92)
This commit is contained in:
hondacrx
2023-03-14 04:17:18 -04:00
parent 8bb67e69c5
commit 40009792c4
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -1034,7 +1034,7 @@ namespace Game.Spells
if (targetCreature == null)
return SpellCastResult.BadTargets;
if (!Loots.LootStorage.Pickpocketing.HaveLootFor(targetCreature.GetCreatureTemplate().PickPocketId))
if (!targetCreature.CanHaveLoot() || !Loots.LootStorage.Pickpocketing.HaveLootFor(targetCreature.GetCreatureTemplate().PickPocketId))
return SpellCastResult.TargetNoPockets;
}