TrinityCore
Loading...
Searching...
No Matches
Loot Struct Reference

#include <Loot.h>

Public Member Functions

NotNormalLootItemMap const & GetPlayerQuestItems () const
 
NotNormalLootItemMap const & GetPlayerFFAItems () const
 
NotNormalLootItemMap const & GetPlayerNonQuestNonFFAConditionalItems () const
 
 Loot (uint32 _gold=0)
 
 ~Loot ()
 
void addLootValidatorRef (LootValidatorRef *pLootValidatorRef)
 
void clear ()
 
bool empty () const
 
bool isLooted () const
 
void NotifyItemRemoved (uint8 lootIndex)
 
void NotifyQuestItemRemoved (uint8 questIndex)
 
void NotifyMoneyRemoved ()
 
void AddLooter (ObjectGuid GUID)
 
void RemoveLooter (ObjectGuid GUID)
 
void generateMoneyLoot (uint32 minAmount, uint32 maxAmount)
 
bool FillLoot (uint32 lootId, LootStore const &store, Player *lootOwner, bool personal, bool noEmptyError=false, uint16 lootMode=LOOT_MODE_DEFAULT)
 
void AddItem (LootStoreItem const &item)
 
LootItemLootItemInSlot (uint32 lootslot, Player *player, NotNormalLootItem **qitem=nullptr, NotNormalLootItem **ffaitem=nullptr, NotNormalLootItem **conditem=nullptr)
 
uint32 GetMaxSlotInLootFor (Player *player) const
 
bool hasItemForAll () const
 
bool hasItemFor (Player const *player) const
 
bool hasOverThresholdItem () const
 

Public Attributes

std::vector< LootItemitems
 
std::vector< LootItemquest_items
 
uint32 gold
 
uint8 unlootedCount
 
ObjectGuid roundRobinPlayer
 
ObjectGuid lootOwnerGUID
 
LootType loot_type
 
uint8 maxDuplicates
 
uint32 containerID
 

Private Member Functions

void FillNotNormalLootFor (Player *player, bool presentAtLooting)
 
NotNormalLootItemListFillFFALoot (Player *player)
 
NotNormalLootItemListFillQuestLoot (Player *player)
 
NotNormalLootItemListFillNonQuestNonFFAConditionalLoot (Player *player, bool presentAtLooting)
 

Private Attributes

GuidSet PlayersLooting
 
NotNormalLootItemMap PlayerQuestItems
 
NotNormalLootItemMap PlayerFFAItems
 
NotNormalLootItemMap PlayerNonQuestNonFFAConditionalItems
 
LootValidatorRefManager i_LootValidatorRefManager
 

Friends

ByteBufferoperator<< (ByteBuffer &b, LootView const &lv)
 

Detailed Description

Definition at line 206 of file Loot.h.

Constructor & Destructor Documentation

◆ Loot()

Loot::Loot ( uint32  _gold = 0)

Definition at line 139 of file Loot.cpp.

◆ ~Loot()

Loot::~Loot ( )

Definition at line 143 of file Loot.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddItem()

void Loot::AddItem ( LootStoreItem const &  item)

Definition at line 173 of file Loot.cpp.

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

◆ AddLooter()

void Loot::AddLooter ( ObjectGuid  GUID)
inline

Definition at line 244 of file Loot.h.

+ Here is the caller graph for this function:

◆ addLootValidatorRef()

void Loot::addLootValidatorRef ( LootValidatorRef pLootValidatorRef)
inline

Definition at line 231 of file Loot.h.

+ Here is the caller graph for this function:

◆ clear()

void Loot::clear ( )

Definition at line 148 of file Loot.cpp.

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

◆ empty()

bool Loot::empty ( ) const
inline

Definition at line 238 of file Loot.h.

+ Here is the caller graph for this function:

◆ FillFFALoot()

NotNormalLootItemList * Loot::FillFFALoot ( Player player)
private

Definition at line 305 of file Loot.cpp.

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

◆ FillLoot()

bool Loot::FillLoot ( uint32  lootId,
LootStore const &  store,
Player lootOwner,
bool  personal,
bool  noEmptyError = false,
uint16  lootMode = LOOT_MODE_DEFAULT 
)

Definition at line 220 of file Loot.cpp.

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

◆ FillNonQuestNonFFAConditionalLoot()

NotNormalLootItemList * Loot::FillNonQuestNonFFAConditionalLoot ( Player player,
bool  presentAtLooting 
)
private

Definition at line 366 of file Loot.cpp.

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

◆ FillNotNormalLootFor()

void Loot::FillNotNormalLootFor ( Player player,
bool  presentAtLooting 
)
private

Definition at line 267 of file Loot.cpp.

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

◆ FillQuestLoot()

NotNormalLootItemList * Loot::FillQuestLoot ( Player player)
private

Definition at line 328 of file Loot.cpp.

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

◆ generateMoneyLoot()

void Loot::generateMoneyLoot ( uint32  minAmount,
uint32  maxAmount 
)

Definition at line 465 of file Loot.cpp.

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

◆ GetMaxSlotInLootFor()

uint32 Loot::GetMaxSlotInLootFor ( Player player) const

Definition at line 541 of file Loot.cpp.

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

◆ GetPlayerFFAItems()

NotNormalLootItemMap const & Loot::GetPlayerFFAItems ( ) const
inline

Definition at line 211 of file Loot.h.

+ Here is the caller graph for this function:

◆ GetPlayerNonQuestNonFFAConditionalItems()

NotNormalLootItemMap const & Loot::GetPlayerNonQuestNonFFAConditionalItems ( ) const
inline

Definition at line 212 of file Loot.h.

+ Here is the caller graph for this function:

◆ GetPlayerQuestItems()

NotNormalLootItemMap const & Loot::GetPlayerQuestItems ( ) const
inline

Definition at line 210 of file Loot.h.

+ Here is the caller graph for this function:

◆ hasItemFor()

bool Loot::hasItemFor ( Player const *  player) const

Definition at line 561 of file Loot.cpp.

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

◆ hasItemForAll()

bool Loot::hasItemForAll ( ) const

Definition at line 548 of file Loot.cpp.

+ Here is the caller graph for this function:

◆ hasOverThresholdItem()

bool Loot::hasOverThresholdItem ( ) const

Definition at line 606 of file Loot.cpp.

+ Here is the caller graph for this function:

◆ isLooted()

bool Loot::isLooted ( ) const
inline

Definition at line 239 of file Loot.h.

+ Here is the caller graph for this function:

◆ LootItemInSlot()

LootItem * Loot::LootItemInSlot ( uint32  lootslot,
Player player,
NotNormalLootItem **  qitem = nullptr,
NotNormalLootItem **  ffaitem = nullptr,
NotNormalLootItem **  conditem = nullptr 
)

Definition at line 478 of file Loot.cpp.

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

◆ NotifyItemRemoved()

void Loot::NotifyItemRemoved ( uint8  lootIndex)

Definition at line 400 of file Loot.cpp.

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

◆ NotifyMoneyRemoved()

void Loot::NotifyMoneyRemoved ( )

Definition at line 416 of file Loot.cpp.

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

◆ NotifyQuestItemRemoved()

void Loot::NotifyQuestItemRemoved ( uint8  questIndex)

Definition at line 431 of file Loot.cpp.

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

◆ RemoveLooter()

void Loot::RemoveLooter ( ObjectGuid  GUID)
inline

Definition at line 245 of file Loot.h.

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

ByteBuffer & operator<< ( ByteBuffer b,
LootView const &  lv 
)
friend

Definition at line 628 of file Loot.cpp.

Member Data Documentation

◆ containerID

uint32 Loot::containerID

Definition at line 225 of file Loot.h.

◆ gold

uint32 Loot::gold

Definition at line 216 of file Loot.h.

◆ i_LootValidatorRefManager

LootValidatorRefManager Loot::i_LootValidatorRefManager
private

Definition at line 271 of file Loot.h.

◆ items

std::vector<LootItem> Loot::items

Definition at line 214 of file Loot.h.

◆ loot_type

LootType Loot::loot_type

Definition at line 220 of file Loot.h.

◆ lootOwnerGUID

ObjectGuid Loot::lootOwnerGUID

Definition at line 219 of file Loot.h.

◆ maxDuplicates

uint8 Loot::maxDuplicates

Definition at line 221 of file Loot.h.

◆ PlayerFFAItems

NotNormalLootItemMap Loot::PlayerFFAItems
private

Definition at line 267 of file Loot.h.

◆ PlayerNonQuestNonFFAConditionalItems

NotNormalLootItemMap Loot::PlayerNonQuestNonFFAConditionalItems
private

Definition at line 268 of file Loot.h.

◆ PlayerQuestItems

NotNormalLootItemMap Loot::PlayerQuestItems
private

Definition at line 266 of file Loot.h.

◆ PlayersLooting

GuidSet Loot::PlayersLooting
private

Definition at line 265 of file Loot.h.

◆ quest_items

std::vector<LootItem> Loot::quest_items

Definition at line 215 of file Loot.h.

◆ roundRobinPlayer

ObjectGuid Loot::roundRobinPlayer

Definition at line 218 of file Loot.h.

◆ unlootedCount

uint8 Loot::unlootedCount

Definition at line 217 of file Loot.h.


The documentation for this struct was generated from the following files: