TrinityCore
LootMgr.cpp File Reference
#include "LootMgr.h"
#include "Containers.h"
#include "DatabaseEnv.h"
#include "DB2Stores.h"
#include "ItemBonusMgr.h"
#include "ItemTemplate.h"
#include "Log.h"
#include "Loot.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 Rates const 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)
 

Function Documentation

◆ GenerateDungeonEncounterPersonalLoot()

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 914 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTables()

void LoadLootTables ( )

Definition at line 1337 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Creature()

void LoadLootTemplates_Creature ( )

Definition at line 949 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Disenchant()

void LoadLootTemplates_Disenchant ( )

Definition at line 989 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Fishing()

void LoadLootTemplates_Fishing ( )

Definition at line 1019 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Gameobject()

void LoadLootTemplates_Gameobject ( )

Definition at line 1042 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Item()

void LoadLootTemplates_Item ( )

Definition at line 1088 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Mail()

void LoadLootTemplates_Mail ( )

Definition at line 1207 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Milling()

void LoadLootTemplates_Milling ( )

Definition at line 1112 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Pickpocketing()

void LoadLootTemplates_Pickpocketing ( )

Definition at line 1141 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Prospecting()

void LoadLootTemplates_Prospecting ( )

Definition at line 1178 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Reference()

void LoadLootTemplates_Reference ( )

Definition at line 1309 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Skinning()

void LoadLootTemplates_Skinning ( )

Definition at line 1231 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLootTemplates_Spell()

void LoadLootTemplates_Spell ( )

Definition at line 1268 of file LootMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ LootTemplates_Creature

LootStore LootTemplates_Creature("creature_loot_template", "creature entry", true) ( "creature_loot_template"  ,
"creature entry"  ,
true   
)

◆ LootTemplates_Disenchant

LootStore LootTemplates_Disenchant("disenchant_loot_template", "item disenchant id", true) ( "disenchant_loot_template"  ,
"item disenchant id"  ,
true   
)

◆ LootTemplates_Fishing

LootStore LootTemplates_Fishing("fishing_loot_template", "area id", true) ( "fishing_loot_template"  ,
"area id"  ,
true   
)

◆ LootTemplates_Gameobject

LootStore LootTemplates_Gameobject("gameobject_loot_template", "gameobject entry", true) ( "gameobject_loot_template"  ,
"gameobject entry"  ,
true   
)

◆ LootTemplates_Item

LootStore LootTemplates_Item("item_loot_template", "item entry", true) ( "item_loot_template"  ,
"item entry"  ,
true   
)

◆ LootTemplates_Mail

LootStore LootTemplates_Mail("mail_loot_template", "mail template id", false) ( "mail_loot_template"  ,
"mail template id"  ,
false   
)

◆ LootTemplates_Milling

LootStore LootTemplates_Milling("milling_loot_template", "item entry (herb)", true) ( "milling_loot_template"  ,
"item entry (herb)"  ,
true   
)

◆ LootTemplates_Pickpocketing

LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true) ( "pickpocketing_loot_template"  ,
"creature pickpocket lootid"  ,
true   
)

◆ LootTemplates_Prospecting

LootStore LootTemplates_Prospecting("prospecting_loot_template", "item entry (ore)", true) ( "prospecting_loot_template"  ,
"item entry (ore)"  ,
true   
)

◆ LootTemplates_Reference

LootStore LootTemplates_Reference("reference_loot_template", "reference id", false) ( "reference_loot_template"  ,
"reference id"  ,
false   
)

◆ LootTemplates_Skinning

LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true) ( "skinning_loot_template"  ,
"creature skinning id"  ,
true   
)

◆ LootTemplates_Spell

LootStore LootTemplates_Spell("spell_loot_template", "spell id (random item creating)", false) ( "spell_loot_template"  ,
"spell id (random item creating)"  ,
false   
)

◆ qualityToRate

Rates const qualityToRate[MAX_ITEM_QUALITY]
static
Initial value:
=
{
}
@ RATE_DROP_ITEM_RARE
Definition: World.h:476
@ RATE_DROP_ITEM_LEGENDARY
Definition: World.h:478
@ RATE_DROP_ITEM_POOR
Definition: World.h:473
@ RATE_DROP_ITEM_UNCOMMON
Definition: World.h:475
@ RATE_DROP_ITEM_EPIC
Definition: World.h:477
@ RATE_DROP_ITEM_ARTIFACT
Definition: World.h:479
@ RATE_DROP_ITEM_NORMAL
Definition: World.h:474

Definition at line 33 of file LootMgr.cpp.