![]() |
TrinityCore
|
#include "LootMgr.h"#include "Containers.h"#include "DB2Stores.h"#include "DatabaseEnv.h"#include "ItemBonusMgr.h"#include "ItemTemplate.h"#include "Log.h"#include "Loot.h"#include "MapUtils.h"#include "ObjectMgr.h"#include "Player.h"#include "Random.h"#include "SpellInfo.h"#include "SpellMgr.h"#include "World.h"
Include dependency graph for LootMgr.cpp:Go to the source code of this file.
Classes | |
| struct | LootGroupInvalidSelector |
| class | LootTemplate::LootGroup |
Functions | |
| std::unordered_map< ObjectGuid, std::unique_ptr< Loot > > | GenerateDungeonEncounterPersonalLoot (uint32 dungeonEncounterId, uint32 lootId, LootStore const &store, LootType type, WorldObject const *lootOwner, uint32 minMoney, uint32 maxMoney, uint16 lootMode, MapDifficultyEntry const *mapDifficulty, std::vector< Player * > const &tappers) |
| void | LoadLootTemplates_Creature () |
| void | LoadLootTemplates_Disenchant () |
| void | LoadLootTemplates_Fishing () |
| void | LoadLootTemplates_Gameobject () |
| void | LoadLootTemplates_Item () |
| void | LoadLootTemplates_Milling () |
| void | LoadLootTemplates_Pickpocketing () |
| void | LoadLootTemplates_Prospecting () |
| void | LoadLootTemplates_Mail () |
| void | LoadLootTemplates_Skinning () |
| void | LoadLootTemplates_Spell () |
| void | LoadLootTemplates_Reference () |
| void | LoadLootTables () |
Variables | |
| static constexpr Rates | QualityToRate [MAX_ITEM_QUALITY] |
| LootStore | LootTemplates_Creature ("creature_loot_template", "creature entry", true) |
| LootStore | LootTemplates_Disenchant ("disenchant_loot_template", "item disenchant id", true) |
| LootStore | LootTemplates_Fishing ("fishing_loot_template", "area id", true) |
| LootStore | LootTemplates_Gameobject ("gameobject_loot_template", "gameobject entry", true) |
| LootStore | LootTemplates_Item ("item_loot_template", "item entry", true) |
| LootStore | LootTemplates_Mail ("mail_loot_template", "mail template id", false) |
| LootStore | LootTemplates_Milling ("milling_loot_template", "item entry (herb)", true) |
| LootStore | LootTemplates_Pickpocketing ("pickpocketing_loot_template", "creature pickpocket lootid", true) |
| LootStore | LootTemplates_Prospecting ("prospecting_loot_template", "item entry (ore)", true) |
| LootStore | LootTemplates_Reference ("reference_loot_template", "reference id", false) |
| LootStore | LootTemplates_Skinning ("skinning_loot_template", "creature skinning id", true) |
| LootStore | LootTemplates_Spell ("spell_loot_template", "spell id (random item creating)", false) |
| std::unordered_map< ObjectGuid, std::unique_ptr< Loot > > GenerateDungeonEncounterPersonalLoot | ( | uint32 | dungeonEncounterId, |
| uint32 | lootId, | ||
| LootStore const & | store, | ||
| LootType | type, | ||
| WorldObject const * | lootOwner, | ||
| uint32 | minMoney, | ||
| uint32 | maxMoney, | ||
| uint16 | lootMode, | ||
| MapDifficultyEntry const * | mapDifficulty, | ||
| std::vector< Player * > const & | tappers | ||
| ) |
Definition at line 1036 of file LootMgr.cpp.
References ItemBonusMgr::GetContextForPlayer(), BaseEntity::GetGUID(), LootStore::GetLootFor(), WorldObject::GetMap(), and LootStore::IsRatesAllowed().
Referenced by Unit::Kill(), and GameObject::Use().
| void LoadLootTables | ( | ) |
Definition at line 1460 of file LootMgr.cpp.
References LoadLootTemplates_Creature(), LoadLootTemplates_Disenchant(), LoadLootTemplates_Fishing(), LoadLootTemplates_Gameobject(), LoadLootTemplates_Item(), LoadLootTemplates_Mail(), LoadLootTemplates_Milling(), LoadLootTemplates_Pickpocketing(), LoadLootTemplates_Prospecting(), LoadLootTemplates_Reference(), LoadLootTemplates_Skinning(), and LoadLootTemplates_Spell().
Referenced by reload_commandscript::HandleReloadAllLootCommand(), and World::SetInitialWorldSettings().
| void LoadLootTemplates_Creature | ( | ) |
Definition at line 1071 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), LootStore::LoadAndCollectLootIds(), LootTemplates_Creature, PLAYER_CORPSE_LOOT_ENTRY, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), sObjectMgr, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesCreatureCommand(), and LoadLootTables().
| void LoadLootTemplates_Disenchant | ( | ) |
Definition at line 1111 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), ITEM_BONUS_DISENCHANT_LOOT_ID, LootStore::LoadAndCollectLootIds(), LootTemplates_Disenchant, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), sItemBonusStore, sItemDisenchantLootStore, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesDisenchantCommand(), and LoadLootTables().
| void LoadLootTemplates_Fishing | ( | ) |
Definition at line 1153 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), LootStore::LoadAndCollectLootIds(), LootTemplates_Fishing, LootStore::ReportUnusedIds(), sAreaTableStore, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesFishingCommand(), and LoadLootTables().
| void LoadLootTemplates_Gameobject | ( | ) |
Definition at line 1175 of file LootMgr.cpp.
References GAMEOBJECT_TYPE_CHEST, getMSTime(), GetMSTimeDiffToNow(), LootStore::LoadAndCollectLootIds(), LootTemplates_Gameobject, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), sObjectMgr, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesGameobjectCommand(), and LoadLootTables().
| void LoadLootTemplates_Item | ( | ) |
Definition at line 1221 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), ITEM_FLAG_HAS_LOOT, LootStore::LoadAndCollectLootIds(), LootTemplates_Item, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), sObjectMgr, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesItemCommand(), and LoadLootTables().
| void LoadLootTemplates_Mail | ( | ) |
Definition at line 1333 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), LootStore::LoadAndCollectLootIds(), LootTemplates_Mail, LootStore::ReportUnusedIds(), sMailTemplateStore, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesMailCommand(), and LoadLootTables().
| void LoadLootTemplates_Milling | ( | ) |
Definition at line 1246 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), ITEM_FLAG_IS_MILLABLE, LootStore::LoadAndCollectLootIds(), LootTemplates_Milling, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), sObjectMgr, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesMillingCommand(), and LoadLootTables().
| void LoadLootTemplates_Pickpocketing | ( | ) |
Definition at line 1271 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), LootStore::LoadAndCollectLootIds(), LootTemplates_Pickpocketing, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), sObjectMgr, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesPickpocketingCommand(), and LoadLootTables().
| void LoadLootTemplates_Prospecting | ( | ) |
Definition at line 1308 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), ITEM_FLAG_IS_PROSPECTABLE, LootStore::LoadAndCollectLootIds(), LootTemplates_Prospecting, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), sObjectMgr, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesProspectingCommand(), and LoadLootTables().
| void LoadLootTemplates_Reference | ( | ) |
Definition at line 1432 of file LootMgr.cpp.
References LootStore::CheckLootRefs(), getMSTime(), GetMSTimeDiffToNow(), LootStore::LoadAndCollectLootIds(), LootTemplates_Creature, LootTemplates_Disenchant, LootTemplates_Fishing, LootTemplates_Gameobject, LootTemplates_Item, LootTemplates_Mail, LootTemplates_Milling, LootTemplates_Pickpocketing, LootTemplates_Prospecting, LootTemplates_Reference, LootTemplates_Skinning, LootStore::ReportUnusedIds(), and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesReferenceCommand(), and LoadLootTables().
| void LoadLootTemplates_Skinning | ( | ) |
Definition at line 1355 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), LootStore::LoadAndCollectLootIds(), LootTemplates_Skinning, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), sObjectMgr, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesSkinningCommand(), and LoadLootTables().
| void LoadLootTemplates_Spell | ( | ) |
Definition at line 1392 of file LootMgr.cpp.
References getMSTime(), GetMSTimeDiffToNow(), SpellInfo::HasAttribute(), SpellInfo::Id, SpellInfo::IsLootCrafting(), LootStore::LoadAndCollectLootIds(), LootTemplates_Spell, LootStore::ReportNonExistingId(), LootStore::ReportUnusedIds(), SPELL_ATTR0_IS_TRADESKILL, SPELL_ATTR0_NOT_SHAPESHIFTED, sSpellMgr, and TC_LOG_INFO.
Referenced by reload_commandscript::HandleReloadLootTemplatesSpellCommand(), and LoadLootTables().
| LootStore LootTemplates_Creature("creature_loot_template", "creature entry", true) | ( | "creature_loot_template" | , |
| "creature entry" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Disenchant("disenchant_loot_template", "item disenchant id", true) | ( | "disenchant_loot_template" | , |
| "item disenchant id" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Fishing("fishing_loot_template", "area id", true) | ( | "fishing_loot_template" | , |
| "area id" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Gameobject("gameobject_loot_template", "gameobject entry", true) | ( | "gameobject_loot_template" | , |
| "gameobject entry" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Item("item_loot_template", "item entry", true) | ( | "item_loot_template" | , |
| "item entry" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Mail("mail_loot_template", "mail template id", false) | ( | "mail_loot_template" | , |
| "mail template id" | , | ||
| false | |||
| ) |
| LootStore LootTemplates_Milling("milling_loot_template", "item entry (herb)", true) | ( | "milling_loot_template" | , |
| "item entry (herb)" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true) | ( | "pickpocketing_loot_template" | , |
| "creature pickpocket lootid" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Prospecting("prospecting_loot_template", "item entry (ore)", true) | ( | "prospecting_loot_template" | , |
| "item entry (ore)" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Reference("reference_loot_template", "reference id", false) | ( | "reference_loot_template" | , |
| "reference id" | , | ||
| false | |||
| ) |
Referenced by ConditionMgr::isSourceTypeValid(), and ConditionMgr::LoadConditions().
| LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true) | ( | "skinning_loot_template" | , |
| "creature skinning id" | , | ||
| true | |||
| ) |
| LootStore LootTemplates_Spell("spell_loot_template", "spell id (random item creating)", false) | ( | "spell_loot_template" | , |
| "spell id (random item creating)" | , | ||
| false | |||
| ) |
|
staticconstexpr |