diff options
author | Treeston <treeston.mmoc@gmail.com> | 2016-06-17 12:46:13 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-01-29 21:51:04 +0100 |
commit | d8911a9dd6c4458d05e3a806f95170d6400726ee (patch) | |
tree | f65ff095bcabb475d5106b35e6ca1bf65d3e0480 /src/server/game/Loot/LootMgr.cpp | |
parent | a95ff3a93109f8095cb843bff9113b95100a8681 (diff) |
Creature/Loot: Do not display "lootable" sparkles for player even if others in the group still have quest items to be looted from creature. (#16265)
(cherry picked from commit a49544cc187d3a156b4615907d6b82057364fcc4)
# Conflicts:
# src/server/game/Handlers/LootHandler.cpp
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
-rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 35d8278a417..637315ee747 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -813,6 +813,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 { |