diff options
| author | Shauren <shauren.trinity@gmail.com> | 2024-01-11 20:56:24 +0100 |
|---|---|---|
| committer | funjoker <funjoker109@gmail.com> | 2024-01-14 19:53:38 +0100 |
| commit | ce5c1ad40973fe0730f3d82dd54ee3888afcadcf (patch) | |
| tree | c7435b59c9abd2268ade6fd13d2ae89ddf2d4b1a /src/server/game/Loot/Loot.cpp | |
| parent | c740c695378673036b2e925925029e797fee815a (diff) | |
Core/Conditions: Refactor ConditionMgr internals to get rid of separate containers for some condition source types
(cherry picked from commit 0b5406dd882c6d96bc1be6fd0a78375c3b316415)
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 c19a2a1c36c..eb19f3eb42f 100644 --- a/src/server/game/Loot/Loot.cpp +++ b/src/server/game/Loot/Loot.cpp @@ -74,10 +74,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); @@ -954,7 +954,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; } |
