aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Loot/Loot.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-01-11 20:56:24 +0100
committerShauren <shauren.trinity@gmail.com>2024-01-11 20:56:24 +0100
commit0b5406dd882c6d96bc1be6fd0a78375c3b316415 (patch)
tree095fe9c5ebd20ae4163784b925f1dcd83b45f407 /src/server/game/Loot/Loot.cpp
parent913d769b80bb2a5187c6df562ec013db540bf8ea (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.cpp6
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;
}