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)
 
LootItem * LootItemInSlot (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
 
void BuildLootResponse (WorldPackets::Loot::LootResponse &packet, Player const *viewer, PermissionTypes permission) const
 

Public Attributes

std::vector< LootItem > items
 
std::vector< LootItem > quest_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)
 
NotNormalLootItemList * FillFFALoot (Player *player)
 
NotNormalLootItemList * FillQuestLoot (Player *player)
 
NotNormalLootItemList * FillNonQuestNonFFAConditionalLoot (Player *player, bool presentAtLooting)
 

Private Attributes

GuidSet PlayersLooting
 
NotNormalLootItemMap PlayerQuestItems
 
NotNormalLootItemMap PlayerFFAItems
 
NotNormalLootItemMap PlayerNonQuestNonFFAConditionalItems
 
LootValidatorRefManager i_LootValidatorRefManager
 

Detailed Description

Definition at line 225 of file Loot.h.

Constructor & Destructor Documentation

◆ Loot()

Loot::Loot ( uint32  _gold = 0)

Definition at line 140 of file Loot.cpp.

◆ ~Loot()

Loot::~Loot ( )

Definition at line 144 of file Loot.cpp.

References clear().

Member Function Documentation

◆ AddItem()

◆ AddLooter()

void Loot::AddLooter ( ObjectGuid  GUID)
inline

Definition at line 261 of file Loot.h.

Referenced by Player::SendLoot().

◆ addLootValidatorRef()

void Loot::addLootValidatorRef ( LootValidatorRef *  pLootValidatorRef)
inline

Definition at line 248 of file Loot.h.

Referenced by Roll::targetObjectBuildLink().

◆ BuildLootResponse()

◆ clear()

◆ empty()

bool Loot::empty ( ) const
inline

◆ FillFFALoot()

◆ FillLoot()

◆ FillNonQuestNonFFAConditionalLoot()

◆ FillNotNormalLootFor()

◆ FillQuestLoot()

◆ generateMoneyLoot()

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

Definition at line 466 of file Loot.cpp.

References gold, RATE_DROP_MONEY, sWorld, and urand().

Referenced by Unit::Kill(), and Player::SendLoot().

◆ GetMaxSlotInLootFor()

uint32 Loot::GetMaxSlotInLootFor ( Player *  player) const

◆ GetPlayerFFAItems()

NotNormalLootItemMap const & Loot::GetPlayerFFAItems ( ) const
inline

◆ GetPlayerNonQuestNonFFAConditionalItems()

NotNormalLootItemMap const & Loot::GetPlayerNonQuestNonFFAConditionalItems ( ) const
inline

◆ GetPlayerQuestItems()

NotNormalLootItemMap const & Loot::GetPlayerQuestItems ( ) const
inline

◆ hasItemFor()

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

◆ hasItemForAll()

bool Loot::hasItemForAll ( ) const

Definition at line 549 of file Loot.cpp.

References gold, and items.

Referenced by Player::isAllowedToLoot().

◆ hasOverThresholdItem()

bool Loot::hasOverThresholdItem ( ) const

Definition at line 607 of file Loot.cpp.

References items.

Referenced by Player::isAllowedToLoot(), and Group::SendLooter().

◆ isLooted()

◆ LootItemInSlot()

◆ NotifyItemRemoved()

void Loot::NotifyItemRemoved ( uint8  lootIndex)

◆ NotifyMoneyRemoved()

void Loot::NotifyMoneyRemoved ( )

Definition at line 417 of file Loot.cpp.

References ObjectAccessor::FindPlayer(), and PlayersLooting.

Referenced by WorldSession::HandleLootMoneyOpcode().

◆ NotifyQuestItemRemoved()

void Loot::NotifyQuestItemRemoved ( uint8  questIndex)

Definition at line 432 of file Loot.cpp.

References ObjectAccessor::FindPlayer(), items, PlayerQuestItems, and PlayersLooting.

Referenced by Player::StoreLootItem().

◆ RemoveLooter()

void Loot::RemoveLooter ( ObjectGuid  GUID)
inline

Definition at line 262 of file Loot.h.

Referenced by WorldSession::DoLootRelease().

Member Data Documentation

◆ containerID

◆ gold

◆ i_LootValidatorRefManager

LootValidatorRefManager Loot::i_LootValidatorRefManager
private

Definition at line 291 of file Loot.h.

Referenced by clear().

◆ items

◆ loot_type

◆ lootOwnerGUID

◆ maxDuplicates

uint8 Loot::maxDuplicates

◆ PlayerFFAItems

NotNormalLootItemMap Loot::PlayerFFAItems
private

Definition at line 287 of file Loot.h.

Referenced by clear(), FillFFALoot(), FillNotNormalLootFor(), and LootItemInSlot().

◆ PlayerNonQuestNonFFAConditionalItems

NotNormalLootItemMap Loot::PlayerNonQuestNonFFAConditionalItems
private

◆ PlayerQuestItems

NotNormalLootItemMap Loot::PlayerQuestItems
private

◆ PlayersLooting

GuidSet Loot::PlayersLooting
private

Definition at line 285 of file Loot.h.

Referenced by clear(), NotifyItemRemoved(), NotifyMoneyRemoved(), and NotifyQuestItemRemoved().

◆ quest_items

◆ roundRobinPlayer

ObjectGuid Loot::roundRobinPlayer

◆ unlootedCount


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