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/LootMgr.h | |
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/LootMgr.h')
-rw-r--r-- | src/server/game/Loot/LootMgr.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h index c481f4009ea..3dcb2ee1ddc 100644 --- a/src/server/game/Loot/LootMgr.h +++ b/src/server/game/Loot/LootMgr.h @@ -46,7 +46,7 @@ struct TC_GAME_API LootStoreItem uint8 groupid; uint8 mincount; // mincount for drop items uint8 maxcount; // max drop count for the item mincount or Ref multiplicator - ConditionContainer conditions; // additional loot condition + ConditionsReference conditions; // additional loot condition // Constructor // displayid is filled in IsValid() which must be called after @@ -85,7 +85,6 @@ class TC_GAME_API LootStore bool HaveQuestLootForPlayer(uint32 loot_id, Player const* player) const; LootTemplate const* GetLootFor(uint32 loot_id) const; - void ResetConditions(); LootTemplate* GetLootForConditionFill(uint32 loot_id); char const* GetName() const { return m_name; } @@ -115,7 +114,6 @@ class TC_GAME_API LootTemplate // Rolls for every item in the template and adds the rolled items the the loot void Process(Loot& loot, bool rate, uint16 lootMode, uint8 groupId, Player const* personalLooter = nullptr) const; void ProcessPersonalLoot(std::unordered_map<Player*, std::unique_ptr<Loot>>& personalLoot, bool rate, uint16 lootMode) const; - void CopyConditions(ConditionContainer const& conditions); void CopyConditions(LootItem* li) const; // True if template includes at least 1 drop for the player @@ -128,7 +126,7 @@ class TC_GAME_API LootTemplate // Checks integrity of the template void Verify(LootStore const& store, uint32 Id) const; void CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const; - bool addConditionItem(Condition* cond); + bool LinkConditions(ConditionId const& id, ConditionsReference reference); bool isReference(uint32 id); private: |