TrinityCore
Loot Struct Reference

#include <Loot.h>

Public Member Functions

NotNormalLootItemMap const & GetPlayerFFAItems () const
 
 Loot (Map *map, ObjectGuid owner, LootType type, Group const *group)
 
 ~Loot ()
 
 Loot (Loot const &)=delete
 
 Loot (Loot &&)=delete
 
Lootoperator= (Loot const &)=delete
 
Lootoperator= (Loot &&)=delete
 
ObjectGuid const & GetGUID () const
 
ObjectGuid const & GetOwnerGUID () const
 
ItemContext GetItemContext () const
 
void SetItemContext (ItemContext context)
 
LootMethod GetLootMethod () const
 
ObjectGuid const & GetLootMasterGUID () const
 
uint32 GetDungeonEncounterId () const
 
void SetDungeonEncounterId (uint32 dungeonEncounterId)
 
bool isLooted () const
 
bool IsChanged () const
 
void NotifyLootList (Map const *map) const
 
void NotifyItemRemoved (uint8 lootListId, Map const *map)
 
void NotifyMoneyRemoved (Map const *map)
 
void OnLootOpened (Map *map, ObjectGuid looter)
 
void AddLooter (ObjectGuid GUID)
 
void RemoveLooter (ObjectGuid GUID)
 
bool HasAllowedLooter (ObjectGuid const &looter) const
 
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, ItemContext context=ItemContext::NONE)
 
void FillNotNormalLootFor (Player const *player)
 
void AddItem (LootStoreItem const &item)
 
bool AutoStore (Player *player, uint8 bag, uint8 slot, bool broadcast=false, bool createdByPlayer=false)
 
void LootMoney ()
 
LootItem const * GetItemInSlot (uint32 lootListId) const
 
LootItemLootItemInSlot (uint32 lootListId, Player const *player, NotNormalLootItem **ffaItem=nullptr)
 
bool hasItemForAll () const
 
bool hasItemFor (Player const *player) const
 
bool hasOverThresholdItem () const
 
void BuildLootResponse (WorldPackets::Loot::LootResponse &packet, Player const *viewer) const
 
void Update ()
 

Public Attributes

std::vector< LootItemitems
 
uint32 gold
 
uint8 unlootedCount
 
ObjectGuid roundRobinPlayer
 
LootType loot_type
 

Private Attributes

GuidSet PlayersLooting
 
NotNormalLootItemMap PlayerFFAItems
 
ObjectGuid _guid
 
ObjectGuid _owner
 
ItemContext _itemContext
 
LootMethod _lootMethod
 
std::unordered_map< uint32, LootRoll_rolls
 
ObjectGuid _lootMaster
 
GuidUnorderedSet _allowedLooters
 
bool _wasOpened
 
bool _changed
 
uint32 _dungeonEncounterId
 

Detailed Description

Definition at line 280 of file Loot.h.

Constructor & Destructor Documentation

◆ Loot() [1/3]

Loot::Loot ( Map map,
ObjectGuid  owner,
LootType  type,
Group const *  group 
)
explicit

Definition at line 623 of file Loot.cpp.

◆ ~Loot()

Loot::~Loot ( )

Definition at line 630 of file Loot.cpp.

+ Here is the call graph for this function:

◆ Loot() [2/3]

Loot::Loot ( Loot const &  )
delete

◆ Loot() [3/3]

Loot::Loot ( Loot &&  )
delete

Member Function Documentation

◆ AddItem()

void Loot::AddItem ( LootStoreItem const &  item)

Definition at line 827 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 314 of file Loot.h.

+ Here is the caller graph for this function:

◆ AutoStore()

bool Loot::AutoStore ( Player player,
uint8  bag,
uint8  slot,
bool  broadcast = false,
bool  createdByPlayer = false 
)

Definition at line 849 of file Loot.cpp.

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

◆ BuildLootResponse()

void Loot::BuildLootResponse ( WorldPackets::Loot::LootResponse packet,
Player const *  viewer 
) const

Definition at line 997 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,
ItemContext  context = ItemContext::NONE 
)

Definition at line 759 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 const *  player)

Definition at line 1026 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 745 of file Loot.cpp.

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

◆ GetDungeonEncounterId()

uint32 Loot::GetDungeonEncounterId ( ) const
inline

Definition at line 304 of file Loot.h.

+ Here is the caller graph for this function:

◆ GetGUID()

ObjectGuid const & Loot::GetGUID ( ) const
inline

Definition at line 298 of file Loot.h.

+ Here is the caller graph for this function:

◆ GetItemContext()

ItemContext Loot::GetItemContext ( ) const
inline

Definition at line 300 of file Loot.h.

◆ GetItemInSlot()

LootItem const * Loot::GetItemInSlot ( uint32  lootListId) const

Definition at line 909 of file Loot.cpp.

◆ GetLootMasterGUID()

ObjectGuid const & Loot::GetLootMasterGUID ( ) const
inline

Definition at line 303 of file Loot.h.

+ Here is the caller graph for this function:

◆ GetLootMethod()

LootMethod Loot::GetLootMethod ( ) const
inline

Definition at line 302 of file Loot.h.

+ Here is the caller graph for this function:

◆ GetOwnerGUID()

ObjectGuid const & Loot::GetOwnerGUID ( ) const
inline

Definition at line 299 of file Loot.h.

+ Here is the caller graph for this function:

◆ GetPlayerFFAItems()

NotNormalLootItemMap const & Loot::GetPlayerFFAItems ( ) const
inline

Definition at line 282 of file Loot.h.

+ Here is the caller graph for this function:

◆ HasAllowedLooter()

bool Loot::HasAllowedLooter ( ObjectGuid const &  looter) const

Definition at line 740 of file Loot.cpp.

+ Here is the caller graph for this function:

◆ hasItemFor()

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

Definition at line 965 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 952 of file Loot.cpp.

+ Here is the caller graph for this function:

◆ hasOverThresholdItem()

bool Loot::hasOverThresholdItem ( ) const

Definition at line 986 of file Loot.cpp.

+ Here is the caller graph for this function:

◆ IsChanged()

bool Loot::IsChanged ( ) const
inline

Definition at line 308 of file Loot.h.

◆ isLooted()

bool Loot::isLooted ( ) const
inline

Definition at line 307 of file Loot.h.

+ Here is the caller graph for this function:

◆ LootItemInSlot()

LootItem * Loot::LootItemInSlot ( uint32  lootListId,
Player const *  player,
NotNormalLootItem **  ffaItem = nullptr 
)

Definition at line 917 of file Loot.cpp.

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

◆ LootMoney()

void Loot::LootMoney ( )

Definition at line 903 of file Loot.cpp.

+ Here is the caller graph for this function:

◆ NotifyItemRemoved()

void Loot::NotifyItemRemoved ( uint8  lootListId,
Map const *  map 
)

Definition at line 658 of file Loot.cpp.

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

◆ NotifyLootList()

void Loot::NotifyLootList ( Map const *  map) const

Definition at line 638 of file Loot.cpp.

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

◆ NotifyMoneyRemoved()

void Loot::NotifyMoneyRemoved ( Map const *  map)

Definition at line 681 of file Loot.cpp.

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

◆ OnLootOpened()

void Loot::OnLootOpened ( Map map,
ObjectGuid  looter 
)

Definition at line 696 of file Loot.cpp.

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

◆ operator=() [1/2]

Loot & Loot::operator= ( Loot &&  )
delete

◆ operator=() [2/2]

Loot & Loot::operator= ( Loot const &  )
delete

◆ RemoveLooter()

void Loot::RemoveLooter ( ObjectGuid  GUID)
inline

Definition at line 315 of file Loot.h.

+ Here is the caller graph for this function:

◆ SetDungeonEncounterId()

void Loot::SetDungeonEncounterId ( uint32  dungeonEncounterId)
inline

Definition at line 305 of file Loot.h.

+ Here is the caller graph for this function:

◆ SetItemContext()

void Loot::SetItemContext ( ItemContext  context)
inline

Definition at line 301 of file Loot.h.

◆ Update()

void Loot::Update ( )

Definition at line 1015 of file Loot.cpp.

Member Data Documentation

◆ _allowedLooters

GuidUnorderedSet Loot::_allowedLooters
private

Definition at line 351 of file Loot.h.

◆ _changed

bool Loot::_changed
private

Definition at line 353 of file Loot.h.

◆ _dungeonEncounterId

uint32 Loot::_dungeonEncounterId
private

Definition at line 354 of file Loot.h.

◆ _guid

ObjectGuid Loot::_guid
private

Definition at line 345 of file Loot.h.

◆ _itemContext

ItemContext Loot::_itemContext
private

Definition at line 347 of file Loot.h.

◆ _lootMaster

ObjectGuid Loot::_lootMaster
private

Definition at line 350 of file Loot.h.

◆ _lootMethod

LootMethod Loot::_lootMethod
private

Definition at line 348 of file Loot.h.

◆ _owner

ObjectGuid Loot::_owner
private

Definition at line 346 of file Loot.h.

◆ _rolls

std::unordered_map<uint32, LootRoll> Loot::_rolls
private

Definition at line 349 of file Loot.h.

◆ _wasOpened

bool Loot::_wasOpened
private

Definition at line 352 of file Loot.h.

◆ gold

uint32 Loot::gold

Definition at line 285 of file Loot.h.

◆ items

std::vector<LootItem> Loot::items

Definition at line 284 of file Loot.h.

◆ loot_type

LootType Loot::loot_type

Definition at line 288 of file Loot.h.

◆ PlayerFFAItems

NotNormalLootItemMap Loot::PlayerFFAItems
private

Definition at line 342 of file Loot.h.

◆ PlayersLooting

GuidSet Loot::PlayersLooting
private

Definition at line 341 of file Loot.h.

◆ roundRobinPlayer

ObjectGuid Loot::roundRobinPlayer

Definition at line 287 of file Loot.h.

◆ unlootedCount

uint8 Loot::unlootedCount

Definition at line 286 of file Loot.h.


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