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
 
LootItem & operator= (LootItem const &)
 
LootItem & operator= (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< LootSlotType > GetUiTypeForPlayer (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< int32 > BonusListIDs
 
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() [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.

References allowedGUIDs, and BaseEntity::GetGUID().

Referenced by LootItemStorage::LoadStoredLoot().

◆ AllowedForPlayer() [1/2]

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

◆ AllowedForPlayer() [2/2]

◆ CurrencyAllowedForPlayer()

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

◆ GetAllowedLooters()

GuidSet const & LootItem::GetAllowedLooters ( ) const
inline

◆ GetUiTypeForPlayer()

◆ HasAllowedLooter()

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

◆ ItemAllowedForPlayer()

◆ 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.

References conditions, Player::IsQuestCompletedBitSet(), and ConditionsReference::Meets().

Referenced by AllowedForPlayer().

Member Data Documentation

◆ allowedGUIDs

GuidSet LootItem::allowedGUIDs

◆ BonusListIDs

◆ conditions

◆ context

◆ count

◆ follow_loot_rules

◆ freeforall

◆ is_blocked

◆ is_counted

bool LootItem::is_counted

◆ is_looted

◆ is_underthreshold

◆ itemid

◆ LootListId

◆ needs_quest

◆ randomBonusListId

◆ rollWinnerGUID

ObjectGuid LootItem::rollWinnerGUID

◆ type


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