TrinityCore
Loading...
Searching...
No Matches
LootTemplate::LootGroup Class Reference

Public Member Functions

 LootGroup ()
 
 ~LootGroup ()
 
void AddEntry (LootStoreItem *item)
 
bool HasQuestDrop () const
 
bool HasQuestDropForPlayer (Player const *player) const
 
void Process (Loot &loot, uint16 lootMode) const
 
float RawTotalChance () const
 
float TotalChance () const
 
void Verify (LootStore const &lootstore, uint32 id, uint8 group_id) const
 
void CheckLootRefs (LootTemplateMap const &store, LootIdSet *ref_set) const
 
LootStoreItemList * GetExplicitlyChancedItemList ()
 
LootStoreItemList * GetEqualChancedItemList ()
 
void CopyConditions (ConditionContainer conditions)
 

Private Member Functions

LootStoreItem const * Roll (Loot &loot, uint16 lootMode) const
 
 LootGroup (LootGroup const &)=delete
 
LootGroup & operator= (LootGroup const &)=delete
 

Private Attributes

LootStoreItemList ExplicitlyChanced
 
LootStoreItemList EqualChanced
 

Detailed Description

Definition at line 81 of file LootMgr.cpp.

Constructor & Destructor Documentation

◆ LootGroup() [1/2]

LootTemplate::LootGroup::LootGroup ( )
inline

Definition at line 84 of file LootMgr.cpp.

◆ ~LootGroup()

LootTemplate::LootGroup::~LootGroup ( )

Definition at line 350 of file LootMgr.cpp.

References EqualChanced, and ExplicitlyChanced.

◆ LootGroup() [2/2]

LootTemplate::LootGroup::LootGroup ( LootGroup const &  )
privatedelete

Member Function Documentation

◆ AddEntry()

void LootTemplate::LootGroup::AddEntry ( LootStoreItem *  item)

Definition at line 366 of file LootMgr.cpp.

References LootStoreItem::chance.

◆ CheckLootRefs()

void LootTemplate::LootGroup::CheckLootRefs ( LootTemplateMap const &  store,
LootIdSet *  ref_set 
) const

◆ CopyConditions()

void LootTemplate::LootGroup::CopyConditions ( ConditionContainer  conditions)

Definition at line 432 of file LootMgr.cpp.

References LootStoreItem::conditions.

◆ GetEqualChancedItemList()

LootStoreItemList * LootTemplate::LootGroup::GetEqualChancedItemList ( )
inline

Definition at line 98 of file LootMgr.cpp.

References EqualChanced.

Referenced by LootTemplate::addConditionItem().

◆ GetExplicitlyChancedItemList()

LootStoreItemList * LootTemplate::LootGroup::GetExplicitlyChancedItemList ( )
inline

Definition at line 97 of file LootMgr.cpp.

References ExplicitlyChanced.

Referenced by LootTemplate::addConditionItem().

◆ HasQuestDrop()

bool LootTemplate::LootGroup::HasQuestDrop ( ) const

Definition at line 405 of file LootMgr.cpp.

◆ HasQuestDropForPlayer()

bool LootTemplate::LootGroup::HasQuestDropForPlayer ( Player const *  player) const

Definition at line 419 of file LootMgr.cpp.

References Player::HasQuestForItem().

◆ operator=()

LootGroup & LootTemplate::LootGroup::operator= ( LootGroup const &  )
privatedelete

◆ Process()

void LootTemplate::LootGroup::Process ( Loot &  loot,
uint16  lootMode 
) const

Definition at line 442 of file LootMgr.cpp.

References Loot::AddItem().

◆ RawTotalChance()

float LootTemplate::LootGroup::RawTotalChance ( ) const

Definition at line 449 of file LootMgr.cpp.

◆ Roll()

LootStoreItem const * LootTemplate::LootGroup::Roll ( Loot &  loot,
uint16  lootMode 
) const
private

◆ TotalChance()

float LootTemplate::LootGroup::TotalChance ( ) const

Definition at line 461 of file LootMgr.cpp.

◆ Verify()

void LootTemplate::LootGroup::Verify ( LootStore const &  lootstore,
uint32  id,
uint8  group_id 
) const
Todo:
replace with 100% when DBs will be ready

Definition at line 471 of file LootMgr.cpp.

References LootStore::GetName(), and TC_LOG_ERROR.

Member Data Documentation

◆ EqualChanced

LootStoreItemList LootTemplate::LootGroup::EqualChanced
private

Definition at line 102 of file LootMgr.cpp.

Referenced by GetEqualChancedItemList(), and ~LootGroup().

◆ ExplicitlyChanced

LootStoreItemList LootTemplate::LootGroup::ExplicitlyChanced
private

Definition at line 101 of file LootMgr.cpp.

Referenced by GetExplicitlyChancedItemList(), and ~LootGroup().


The documentation for this class was generated from the following file: