![]() |
TrinityCore
|
#include <LootItemStorage.h>
Public Member Functions | |
| LootItemStorage (LootItemStorage const &)=delete | |
| LootItemStorage (LootItemStorage &&)=delete | |
| LootItemStorage & | operator= (LootItemStorage const &)=delete |
| LootItemStorage & | operator= (LootItemStorage &&)=delete |
| void | LoadStorageFromDB () |
| bool | LoadStoredLoot (Item *item, Player *player) |
| void | RemoveStoredMoneyForContainer (uint64 containerId) |
| void | RemoveStoredLootForContainer (uint64 containerId) |
| void | RemoveStoredLootItemForContainer (uint64 containerId, LootItemType type, uint32 itemId, uint32 count, uint32 itemIndex) |
| void | AddNewStoredLoot (uint64 containerId, Loot *loot, Player *player) |
Static Public Member Functions | |
| static LootItemStorage * | instance () |
| static std::shared_mutex * | GetLock () |
Private Member Functions | |
| LootItemStorage ()=default | |
| ~LootItemStorage ()=default | |
Definition at line 77 of file LootItemStorage.h.
|
delete |
|
delete |
|
privatedefault |
|
privatedefault |
Definition at line 243 of file LootItemStorage.cpp.
References StoredLootContainer::AddLootItem(), StoredLootContainer::AddMoney(), CHAR_DEL_ITEMCONTAINER_ITEMS, CharacterDatabase, BaseEntity::GetGUID(), GetLock(), Loot::gold, ItemTemplate::IsCurrencyToken(), Loot::isLooted(), Loot::items, PreparedStatementBase::setUInt64(), sObjectMgr, TC_LOG_ERROR, and ObjectGuid::ToString().
|
static |
Definition at line 49 of file LootItemStorage.cpp.
Referenced by AddNewStoredLoot(), LoadStoredLoot(), RemoveStoredLootForContainer(), RemoveStoredLootItemForContainer(), and RemoveStoredMoneyForContainer().
|
static |
| void LootItemStorage::LoadStorageFromDB | ( | ) |
Definition at line 55 of file LootItemStorage.cpp.
References StoredLootContainer::AddLootItem(), StoredLootContainer::AddMoney(), LootItem::BonusListIDs, CHAR_SEL_ITEMCONTAINER_ITEMS, CHAR_SEL_ITEMCONTAINER_MONEY, CharacterDatabase, LootItem::context, LootItem::count, LootItem::follow_loot_rules, LootItem::freeforall, Field::GetBool(), Field::GetInt8(), getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt32(), Field::GetUInt64(), LootItem::is_blocked, LootItem::is_counted, LootItem::is_underthreshold, LootItem::itemid, LootItem::LootListId, LootItem::needs_quest, LootItem::randomBonusListId, TC_LOG_INFO, Trinity::Tokenize(), and LootItem::type.
Definition at line 122 of file LootItemStorage.cpp.
References LootItem::AddAllowedLooter(), LootItem::BonusListIDs, LootItem::context, LootItem::count, LootItem::follow_loot_rules, LootItem::freeforall, Item::GetBagSlot(), ObjectGuid::GetCounter(), Object::GetEntry(), BaseEntity::GetGUID(), GetLock(), LootStore::GetLootFor(), StoredLootContainer::GetLootItems(), WorldObject::GetMap(), StoredLootContainer::GetMoney(), Loot::gold, LootItem::is_blocked, LootItem::is_counted, LootItem::is_underthreshold, LootItem::itemid, Loot::items, LOOT_ITEM, LootItem::LootListId, LootTemplates_Item, Item::m_loot, Item::m_lootGenerated, LootItem::needs_quest, LootItem::randomBonusListId, and Loot::unlootedCount.
|
delete |
|
delete |
| void LootItemStorage::RemoveStoredLootForContainer | ( | uint64 | containerId | ) |
Definition at line 211 of file LootItemStorage.cpp.
References CHAR_DEL_ITEMCONTAINER_ITEMS, CHAR_DEL_ITEMCONTAINER_MONEY, CharacterDatabase, GetLock(), and PreparedStatementBase::setUInt64().
| void LootItemStorage::RemoveStoredLootItemForContainer | ( | uint64 | containerId, |
| LootItemType | type, | ||
| uint32 | itemId, | ||
| uint32 | count, | ||
| uint32 | itemIndex | ||
| ) |
Definition at line 231 of file LootItemStorage.cpp.
References GetLock().
| void LootItemStorage::RemoveStoredMoneyForContainer | ( | uint64 | containerId | ) |
Definition at line 199 of file LootItemStorage.cpp.
References GetLock().