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

#include <Loot.h>

Public Member Functions

 LootItem (LootStoreItem const &li)
 
 LootItem ()=default
 
 LootItem (LootItem const &)
 
 LootItem (LootItem &&) noexcept
 
LootItemoperator= (LootItem const &)
 
LootItemoperator= (LootItem &&) noexcept
 
 ~LootItem ()
 
bool AllowedForPlayer (Player const *player, Loot const *loot) const
 
void AddAllowedLooter (Player const *player)
 
GuidSet const & GetAllowedLooters () const
 
bool HasAllowedLooter (ObjectGuid const &looter) const
 
Optional< LootSlotTypeGetUiTypeForPlayer (Player const *player, Loot const &loot) const
 

Static Public Member Functions

static bool AllowedForPlayer (Player const *player, LootStoreItem const &lootStoreItem, bool strictUsabilityCheck)
 
static bool ItemAllowedForPlayer (Player const *player, Loot const *loot, uint32 itemid, bool needs_quest, bool follow_loot_rules, bool strictUsabilityCheck, ConditionsReference const &conditions)
 
static bool CurrencyAllowedForPlayer (Player const *player, uint32 currencyId, bool needs_quest, ConditionsReference const &conditions)
 
static bool TrackingQuestAllowedForPlayer (Player const *player, uint32 questId, ConditionsReference const &conditions)
 

Public Attributes

uint32 itemid = 0
 
uint32 LootListId = 0
 
ItemRandomBonusListId randomBonusListId = 0
 
std::vector< int32BonusListIDs
 
ItemContext context = ItemContext::NONE
 
ConditionsReference conditions
 
GuidSet allowedGUIDs
 
ObjectGuid rollWinnerGUID
 
uint32 count = 0
 
LootItemType type = LootItemType::Item
 
bool is_looted: 1 = false
 
bool is_blocked: 1 = false
 
bool freeforall: 1 = false
 
bool is_underthreshold: 1 = false
 
bool is_counted: 1 = false
 
bool needs_quest: 1 = false
 
bool follow_loot_rules: 1 = false
 

Detailed Description

Definition at line 176 of file Loot.h.

Constructor & Destructor Documentation

◆ LootItem() [1/4]

LootItem::LootItem ( LootStoreItem const &  li)
explicit

Definition at line 43 of file Loot.cpp.

+ Here is the call graph for this function:

◆ LootItem() [2/4]

LootItem::LootItem ( )
default

◆ LootItem() [3/4]

LootItem::LootItem ( LootItem const &  )
default

◆ LootItem() [4/4]

LootItem::LootItem ( LootItem &&  )
defaultnoexcept

◆ ~LootItem()

LootItem::~LootItem ( )
default

Member Function Documentation

◆ AddAllowedLooter()

void LootItem::AddAllowedLooter ( Player const *  player)

Definition at line 200 of file Loot.cpp.

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

◆ AllowedForPlayer() [1/2]

bool LootItem::AllowedForPlayer ( Player const *  player,
Loot const *  loot 
) const

Definition at line 76 of file Loot.cpp.

+ Here is the caller graph for this function:

◆ AllowedForPlayer() [2/2]

bool LootItem::AllowedForPlayer ( Player const *  player,
LootStoreItem const &  lootStoreItem,
bool  strictUsabilityCheck 
)
static

Definition at line 92 of file Loot.cpp.

+ Here is the call graph for this function:

◆ CurrencyAllowedForPlayer()

bool LootItem::CurrencyAllowedForPlayer ( Player const *  player,
uint32  currencyId,
bool  needs_quest,
ConditionsReference const &  conditions 
)
static

Definition at line 164 of file Loot.cpp.

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

◆ GetAllowedLooters()

GuidSet const & LootItem::GetAllowedLooters ( ) const
inline

Definition at line 217 of file Loot.h.

+ Here is the caller graph for this function:

◆ GetUiTypeForPlayer()

Optional< LootSlotType > LootItem::GetUiTypeForPlayer ( Player const *  player,
Loot const &  loot 
) const

Definition at line 210 of file Loot.cpp.

+ Here is the call graph for this function:

◆ HasAllowedLooter()

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

Definition at line 205 of file Loot.cpp.

+ Here is the caller graph for this function:

◆ ItemAllowedForPlayer()

bool LootItem::ItemAllowedForPlayer ( Player const *  player,
Loot const *  loot,
uint32  itemid,
bool  needs_quest,
bool  follow_loot_rules,
bool  strictUsabilityCheck,
ConditionsReference const &  conditions 
)
static

Definition at line 110 of file Loot.cpp.

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

◆ operator=() [1/2]

LootItem & LootItem::operator= ( LootItem &&  )
defaultnoexcept

◆ operator=() [2/2]

LootItem & LootItem::operator= ( LootItem const &  )
default

◆ TrackingQuestAllowedForPlayer()

bool LootItem::TrackingQuestAllowedForPlayer ( Player const *  player,
uint32  questId,
ConditionsReference const &  conditions 
)
static

Definition at line 188 of file Loot.cpp.

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

Member Data Documentation

◆ allowedGUIDs

GuidSet LootItem::allowedGUIDs

Definition at line 184 of file Loot.h.

◆ BonusListIDs

std::vector<int32> LootItem::BonusListIDs

Definition at line 181 of file Loot.h.

◆ conditions

ConditionsReference LootItem::conditions

Definition at line 183 of file Loot.h.

◆ context

ItemContext LootItem::context = ItemContext::NONE

Definition at line 182 of file Loot.h.

◆ count

uint32 LootItem::count = 0

Definition at line 186 of file Loot.h.

◆ follow_loot_rules

bool LootItem::follow_loot_rules

Definition at line 194 of file Loot.h.

◆ freeforall

bool LootItem::freeforall

Definition at line 190 of file Loot.h.

◆ is_blocked

bool LootItem::is_blocked

Definition at line 189 of file Loot.h.

◆ is_counted

bool LootItem::is_counted

Definition at line 192 of file Loot.h.

◆ is_looted

bool LootItem::is_looted

Definition at line 188 of file Loot.h.

◆ is_underthreshold

bool LootItem::is_underthreshold

Definition at line 191 of file Loot.h.

◆ itemid

uint32 LootItem::itemid = 0

Definition at line 178 of file Loot.h.

◆ LootListId

uint32 LootItem::LootListId = 0

Definition at line 179 of file Loot.h.

◆ needs_quest

bool LootItem::needs_quest

Definition at line 193 of file Loot.h.

◆ randomBonusListId

ItemRandomBonusListId LootItem::randomBonusListId = 0

Definition at line 180 of file Loot.h.

◆ rollWinnerGUID

ObjectGuid LootItem::rollWinnerGUID

Definition at line 185 of file Loot.h.

◆ type

LootItemType LootItem::type = LootItemType::Item

Definition at line 187 of file Loot.h.


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