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
@@ -1270,6 +1270,10 @@ namespace Game.Entities
public void SetTapList(HashSet<ObjectGuid> tapList) { m_tapList = tapList; }
public bool HasLootRecipient() { return !m_tapList.Empty(); }
public bool CanHaveLoot() { return !_staticFlags.HasFlag(CreatureStaticFlags.NoLoot); }
public void SetCanHaveLoot(bool canHaveLoot) { _staticFlags.ApplyFlag(CreatureStaticFlags.NoLoot, !canHaveLoot); }
public void SaveToDB()
{
// this should only be used when the creature has already been loaded