![]() |
TrinityCore
|
#include <LootItemStorage.h>
Public Member Functions | |
| void | LoadStorageFromDB () |
| bool | LoadStoredLoot (Item *item, Player *player) |
| void | RemoveStoredMoneyForContainer (uint32 containerId) |
| void | RemoveStoredLootForContainer (uint32 containerId) |
| void | RemoveStoredLootItemForContainer (uint32 containerId, uint32 itemId, uint32 count, uint32 itemIndex) |
| void | AddNewStoredLoot (Loot *loot, Player *player) |
Static Public Member Functions | |
| static LootItemStorage * | instance () |
| static std::shared_mutex * | GetLock () |
Private Member Functions | |
| LootItemStorage () | |
| ~LootItemStorage () | |
Definition at line 72 of file LootItemStorage.h.
|
inlineprivate |
Definition at line 86 of file LootItemStorage.h.
|
inlineprivate |
Definition at line 87 of file LootItemStorage.h.
Definition at line 234 of file LootItemStorage.cpp.
References StoredLootContainer::AddLootItem(), StoredLootContainer::AddMoney(), CHAR_DEL_ITEMCONTAINER_ITEMS, CharacterDatabase, Loot::containerID, Object::GetGUID(), GetLock(), Loot::gold, ItemTemplate::IsCurrencyToken(), Loot::isLooted(), Loot::items, Loot::lootOwnerGUID, PreparedStatementBase::setUInt32(), sObjectMgr, TC_LOG_ERROR, and ObjectGuid::ToString().
|
static |
Definition at line 47 of file LootItemStorage.cpp.
Referenced by AddNewStoredLoot(), LoadStoredLoot(), RemoveStoredLootForContainer(), RemoveStoredLootItemForContainer(), and RemoveStoredMoneyForContainer().
|
static |
| void LootItemStorage::LoadStorageFromDB | ( | ) |
Definition at line 53 of file LootItemStorage.cpp.
References StoredLootContainer::AddLootItem(), StoredLootContainer::AddMoney(), ASSERT, CHAR_SEL_ITEMCONTAINER_ITEMS, CHAR_SEL_ITEMCONTAINER_MONEY, CharacterDatabase, LootItem::count, LootItem::follow_loot_rules, LootItem::freeforall, Field::GetBool(), Field::GetInt32(), getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt32(), LootItem::is_blocked, LootItem::is_counted, LootItem::is_underthreshold, LootItem::itemid, LootItem::itemIndex, LootItem::needs_quest, LootItem::randomPropertyId, LootItem::randomPropertySeed, and TC_LOG_INFO.
Definition at line 134 of file LootItemStorage.cpp.
References LootItem::AddAllowedLooter(), Loot::containerID, LootItem::count, LootItem::follow_loot_rules, LootItem::freeforall, Item::GetBagSlot(), Object::GetEntry(), GetLock(), LootStore::GetLootFor(), StoredLootContainer::GetLootItems(), StoredLootContainer::GetMoney(), Loot::gold, LootItem::is_blocked, LootItem::is_counted, LootItem::is_underthreshold, LootItem::itemid, LootItem::itemIndex, Loot::items, Item::loot, LootTemplates_Item, Item::m_lootGenerated, LootItem::needs_quest, LootItem::randomPropertyId, LootItem::randomPropertySeed, and Loot::unlootedCount.
| void LootItemStorage::RemoveStoredLootForContainer | ( | uint32 | containerId | ) |
Definition at line 202 of file LootItemStorage.cpp.
References CHAR_DEL_ITEMCONTAINER_ITEMS, CHAR_DEL_ITEMCONTAINER_MONEY, CharacterDatabase, GetLock(), and PreparedStatementBase::setUInt32().
| void LootItemStorage::RemoveStoredLootItemForContainer | ( | uint32 | containerId, |
| uint32 | itemId, | ||
| uint32 | count, | ||
| uint32 | itemIndex | ||
| ) |
Definition at line 222 of file LootItemStorage.cpp.
References GetLock().
| void LootItemStorage::RemoveStoredMoneyForContainer | ( | uint32 | containerId | ) |
Definition at line 190 of file LootItemStorage.cpp.
References GetLock().