aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Loot/LootMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
-rw-r--r--src/server/game/Loot/LootMgr.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index ebdeb4016dd..9c468e9f9f1 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -786,6 +786,15 @@ uint32 Loot::GetMaxSlotInLootFor(Player* player) const
return items.size() + (itr != PlayerQuestItems.end() ? itr->second->size() : 0);
}
+// return true if there is any item that is lootable for any player (not quest item, FFA or conditional)
+bool Loot::hasItemForAll() const
+{
+ for (LootItem const& item : items)
+ if (!item.is_looted && !item.freeforall && item.conditions.empty())
+ return true;
+ return false;
+}
+
// return true if there is any FFA, quest or conditional item for the player.
bool Loot::hasItemFor(Player* player) const
{