![]() |
TrinityCore
|
#include <LootMgr.h>
Classes | |
| class | LootGroup |
Public Member Functions | |
| LootTemplate () | |
| LootTemplate (LootTemplate const &)=delete | |
| LootTemplate (LootTemplate &&) noexcept | |
| LootTemplate & | operator= (LootTemplate const &)=delete |
| LootTemplate & | operator= (LootTemplate &&) noexcept |
| ~LootTemplate () | |
| void | AddEntry (LootStoreItem *item) |
| 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 (LootItem *li) const |
| bool | HasDropForPlayer (Player const *player, uint8 groupId=0, bool strictUsabilityCheck=false) const |
| bool | HasQuestDrop (uint8 groupId=0) const |
| bool | HasQuestDropForPlayer (Player const *player, uint8 groupId=0) const |
| void | Verify (LootStore const &store, uint32 Id) const |
| void | CheckLootRefs (LootTemplateMap const &store, LootIdSet *ref_set) const |
| bool | LinkConditions (ConditionId const &id, ConditionsReference reference) |
Private Types | |
| typedef std::vector< std::unique_ptr< LootGroup > > | LootGroups |
Private Attributes | |
| LootStoreItemList | Entries |
| LootGroups | Groups |
|
private |
|
default |
|
delete |
|
defaultnoexcept |
|
default |
| void LootTemplate::AddEntry | ( | LootStoreItem * | item | ) |
Definition at line 593 of file LootMgr.cpp.
References Trinity::Containers::EnsureWritableVectorIndex(), Groups, and LootStoreItem::Reference.
| void LootTemplate::CheckLootRefs | ( | LootTemplateMap const & | store, |
| LootIdSet * | ref_set | ||
| ) | const |
Definition at line 967 of file LootMgr.cpp.
References Entries, LootStore::GetLootFor(), Groups, LootTemplates_Reference, LootStoreItem::Reference, and LootStore::ReportNonExistingId().
| void LootTemplate::CopyConditions | ( | LootItem * | li | ) | const |
Definition at line 607 of file LootMgr.cpp.
References LootItem::conditions, Currency, LootStoreItem::Currency, Entries, Item, LootStoreItem::Item, LootItem::itemid, LootStoreItem::Reference, TrackingQuest, LootStoreItem::TrackingQuest, and LootItem::type.
| bool LootTemplate::HasDropForPlayer | ( | Player const * | player, |
| uint8 | groupId = 0, |
||
| bool | strictUsabilityCheck = false |
||
| ) | const |
Definition at line 816 of file LootMgr.cpp.
References LootItem::AllowedForPlayer(), LootStoreItem::Currency, Entries, LootStore::GetLootFor(), Groups, HasDropForPlayer(), LootStoreItem::Item, LootTemplates_Reference, LootStoreItem::Reference, and LootStoreItem::TrackingQuest.
Referenced by HasDropForPlayer(), and ProcessPersonalLoot().
| bool LootTemplate::HasQuestDrop | ( | uint8 | groupId = 0 | ) | const |
Definition at line 863 of file LootMgr.cpp.
References LootStoreItem::Currency, Entries, LootStore::GetLootFor(), Groups, HasQuestDrop(), LootStoreItem::Item, LootTemplates_Reference, and LootStoreItem::Reference.
Referenced by HasQuestDrop().
Definition at line 908 of file LootMgr.cpp.
References LootStoreItem::Currency, Entries, LootStore::GetLootFor(), Groups, HasQuestDropForPlayer(), Player::HasQuestForCurrency(), Player::HasQuestForItem(), LootStoreItem::Item, LootTemplates_Reference, and LootStoreItem::Reference.
Referenced by HasQuestDropForPlayer().
| bool LootTemplate::LinkConditions | ( | ConditionId const & | id, |
| ConditionsReference | reference | ||
| ) |
Definition at line 985 of file LootMgr.cpp.
References Entries, and Groups.
Referenced by ConditionMgr::addToLootTemplate().
|
defaultnoexcept |
|
delete |
| void LootTemplate::Process | ( | Loot & | loot, |
| bool | rate, | ||
| uint16 | lootMode, | ||
| uint8 | groupId, | ||
| Player const * | personalLooter = nullptr |
||
| ) | const |
Definition at line 641 of file LootMgr.cpp.
References Loot::AddItem(), LootItem::AllowedForPlayer(), LootStoreItem::Currency, Entries, LootStore::GetLootFor(), Groups, LootStoreItem::Item, LootTemplates_Reference, Process(), RATE_DROP_ITEM_REFERENCED_AMOUNT, LootStoreItem::Reference, sWorld, and LootStoreItem::TrackingQuest.
Referenced by Loot::FillLoot(), Process(), and ProcessPersonalLoot().
| void LootTemplate::ProcessPersonalLoot | ( | std::unordered_map< Player *, std::unique_ptr< Loot > > & | personalLoot, |
| bool | rate, | ||
| uint16 | lootMode | ||
| ) | const |
Definition at line 698 of file LootMgr.cpp.
References LootItem::AllowedForPlayer(), LootStoreItem::Currency, Entries, LootStore::GetLootFor(), Groups, HasDropForPlayer(), LootStoreItem::Item, LootTemplates_Reference, Process(), RATE_DROP_ITEM_REFERENCED_AMOUNT, LootStoreItem::Reference, Trinity::Containers::SelectRandomContainerElement(), sWorld, and LootStoreItem::TrackingQuest.
|
private |
Definition at line 147 of file LootMgr.h.
Referenced by CheckLootRefs(), CopyConditions(), HasDropForPlayer(), HasQuestDrop(), HasQuestDropForPlayer(), LinkConditions(), Process(), and ProcessPersonalLoot().
|
private |
Definition at line 148 of file LootMgr.h.
Referenced by AddEntry(), CheckLootRefs(), HasDropForPlayer(), HasQuestDrop(), HasQuestDropForPlayer(), LinkConditions(), Process(), ProcessPersonalLoot(), and Verify().