diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-01-11 20:56:24 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-01-11 20:56:24 +0100 |
commit | 0b5406dd882c6d96bc1be6fd0a78375c3b316415 (patch) | |
tree | 095fe9c5ebd20ae4163784b925f1dcd83b45f407 /src/server/game/Loot/Loot.cpp | |
parent | 913d769b80bb2a5187c6df562ec013db540bf8ea (diff) |
Core/Conditions: Refactor ConditionMgr internals to get rid of separate containers for some condition source types
Diffstat (limited to 'src/server/game/Loot/Loot.cpp')
-rw-r--r-- | src/server/game/Loot/Loot.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Loot/Loot.cpp b/src/server/game/Loot/Loot.cpp index 2cd94891236..050f205eb8c 100644 --- a/src/server/game/Loot/Loot.cpp +++ b/src/server/game/Loot/Loot.cpp @@ -75,10 +75,10 @@ bool LootItem::AllowedForPlayer(Player const* player, Loot const* loot) const } bool LootItem::AllowedForPlayer(Player const* player, Loot const* loot, uint32 itemid, bool needs_quest, bool follow_loot_rules, bool strictUsabilityCheck, - ConditionContainer const& conditions) + ConditionsReference const& conditions) { // DB conditions check - if (!sConditionMgr->IsObjectMeetToConditions(player, conditions)) + if (!conditions.Meets(player)) return false; ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemid); @@ -956,7 +956,7 @@ bool Loot::hasItemForAll() const return true; for (LootItem const& item : items) - if (!item.is_looted && item.follow_loot_rules && !item.freeforall && item.conditions.empty()) + if (!item.is_looted && item.follow_loot_rules && !item.freeforall && item.conditions.IsEmpty()) return true; return false; } |