Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Loot Struct Reference

#include <LootMgr.h>

Collaboration diagram for Loot:

Public Member Functions

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

Public Attributes

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

Private Member Functions

QuestItemListFillFFALoot (Player *player)
QuestItemListFillNonQuestNonFFAConditionalLoot (Player *player, bool presentAtLooting)
void FillNotNormalLootFor (Player *player, bool presentAtLooting)
QuestItemListFillQuestLoot (Player *player)

Private Attributes

LootValidatorRefManager i_LootValidatorRefManager
QuestItemMap PlayerFFAItems
QuestItemMap PlayerNonQuestNonFFAConditionalItems
QuestItemMap PlayerQuestItems
std::set< uint64PlayersLooting

Detailed Description

Definition at line 276 of file LootMgr.h.

Constructor & Destructor Documentation

◆ Loot()

Loot::Loot ( uint32 _gold = 0)
inline

Definition at line 294 of file LootMgr.h.

References containerID, gold, loot_type, maxDuplicates, roundRobinPlayer, and unlootedCount.

◆ ~Loot()

Loot::~Loot ( )
inline

Definition at line 295 of file LootMgr.h.

References clear().

Member Function Documentation

◆ AddItem()

◆ AddLooter()

void Loot::AddLooter ( uint64 GUID)
inline

Definition at line 337 of file LootMgr.h.

References PlayersLooting.

Referenced by Player::SendLoot().

◆ addLootValidatorRef()

void Loot::addLootValidatorRef ( LootValidatorRef * pLootValidatorRef)
inline

Definition at line 302 of file LootMgr.h.

References i_LootValidatorRefManager.

Referenced by Roll::targetObjectBuildLink().

◆ clear()

◆ DeleteLootItemFromContainerItemDB()

void Loot::DeleteLootItemFromContainerItemDB ( uint32 itemID)

◆ DeleteLootMoneyFromContainerItemDB()

void Loot::DeleteLootMoneyFromContainerItemDB ( )

◆ empty()

bool Loot::empty ( ) const
inline

Definition at line 331 of file LootMgr.h.

References gold, and items.

◆ FillFFALoot()

QuestItemList * Loot::FillFFALoot ( Player * player)
private

◆ FillLoot()

◆ FillNonQuestNonFFAConditionalLoot()

◆ FillNotNormalLootFor()

◆ FillQuestLoot()

◆ generateMoneyLoot()

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

Definition at line 673 of file LootMgr.cpp.

References gold, RATE_DROP_MONEY, and sWorld.

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

◆ GetMaxSlotInLootFor()

uint32 Loot::GetMaxSlotInLootFor ( Player * player) const

◆ GetPlayerFFAItems()

QuestItemMap const & Loot::GetPlayerFFAItems ( ) const
inline

Definition at line 279 of file LootMgr.h.

References PlayerFFAItems.

Referenced by hasItemFor().

◆ GetPlayerNonQuestNonFFAConditionalItems()

QuestItemMap const & Loot::GetPlayerNonQuestNonFFAConditionalItems ( ) const
inline

Definition at line 280 of file LootMgr.h.

References PlayerNonQuestNonFFAConditionalItems.

Referenced by hasItemFor().

◆ GetPlayerQuestItems()

QuestItemMap const & Loot::GetPlayerQuestItems ( ) const
inline

Definition at line 278 of file LootMgr.h.

References PlayerQuestItems.

Referenced by hasItemFor(), and Player::StoreLootItem().

◆ hasItemFor()

◆ HasLooter()

bool Loot::HasLooter ( uint64 GUID)
inline

Definition at line 339 of file LootMgr.h.

References PlayersLooting.

Referenced by WorldSession::HandleAutostoreLootItemOpcode().

◆ hasOverThresholdItem()

bool Loot::hasOverThresholdItem ( ) const

Definition at line 828 of file LootMgr.cpp.

References items.

Referenced by Player::isAllowedToLoot().

◆ isLooted()

◆ LootItemInSlot()

◆ NotifyItemRemoved()

void Loot::NotifyItemRemoved ( uint8 lootIndex,
ObjectGuid lootGuid = 0 )

◆ NotifyMoneyRemoved()

void Loot::NotifyMoneyRemoved ( ObjectGuid lootGuid = 0)

Definition at line 618 of file LootMgr.cpp.

References ObjectAccessor::FindPlayer(), and PlayersLooting.

Referenced by WorldSession::HandleLootMoneyOpcode().

◆ NotifyQuestItemRemoved()

void Loot::NotifyQuestItemRemoved ( uint8 questIndex,
ObjectGuid lootGuid = 0 )

Definition at line 636 of file LootMgr.cpp.

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

Referenced by Player::StoreLootItem().

◆ RemoveLooter()

void Loot::RemoveLooter ( uint64 GUID)
inline

Definition at line 338 of file LootMgr.h.

References PlayersLooting.

Referenced by WorldSession::DoLootRelease().

Member Data Documentation

◆ containerID

◆ gold

◆ i_LootValidatorRefManager

LootValidatorRefManager Loot::i_LootValidatorRefManager
private

Definition at line 364 of file LootMgr.h.

Referenced by addLootValidatorRef(), and clear().

◆ items

◆ loot_type

LootType Loot::loot_type

◆ maxDuplicates

uint8 Loot::maxDuplicates

Definition at line 288 of file LootMgr.h.

Referenced by Loot().

◆ PlayerFFAItems

QuestItemMap Loot::PlayerFFAItems
private

◆ PlayerNonQuestNonFFAConditionalItems

QuestItemMap Loot::PlayerNonQuestNonFFAConditionalItems
private

◆ PlayerQuestItems

◆ PlayersLooting

std::set<uint64> Loot::PlayersLooting
private

◆ quest_items

◆ roundRobinPlayer

uint64 Loot::roundRobinPlayer

◆ unlootedCount


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