AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Roll Class Reference

#include "Group.h"

Inheritance diagram for Roll:
LootValidatorRef Reference< Loot, LootValidatorRef > LinkedListElement

Public Types

typedef std::map< ObjectGuid, RollVotePlayerVote
 

Public Member Functions

 Roll (ObjectGuid _guid, LootItem const &li)
 
 ~Roll ()
 
void setLoot (Loot *pLoot)
 
LootgetLoot ()
 
void targetObjectBuildLink ()
 
- Public Member Functions inherited from LootValidatorRef
 LootValidatorRef ()=default
 
void targetObjectDestroyLink () override
 
void sourceObjectDestroyLink () override
 
- Public Member Functions inherited from Reference< Loot, LootValidatorRef >
 Reference ()
 
virtual ~Reference ()=default
 
void link (Loot *toObj, LootValidatorRef *fromObj)
 
void unlink ()
 
void invalidate ()
 
bool isValid () const
 
Reference< Loot, LootValidatorRef > * next ()
 
Reference< Loot, LootValidatorRef > const * next () const
 
Reference< Loot, LootValidatorRef > * prev ()
 
Reference< Loot, LootValidatorRef > const * prev () const
 
Reference< Loot, LootValidatorRef > * nocheck_next ()
 
Reference< Loot, LootValidatorRef > const * nocheck_next () const
 
Reference< Loot, LootValidatorRef > * nocheck_prev ()
 
Reference< Loot, LootValidatorRef > const * nocheck_prev () const
 
Lootoperator-> () const
 
LootgetTarget () const
 
LootValidatorRefGetSource () const
 
- Public Member Functions inherited from LinkedListElement
 LinkedListElement ()=default
 
 ~LinkedListElement ()
 
bool hasNext () const
 
bool hasPrev () const
 
bool isInList () const
 
LinkedListElementnext ()
 
LinkedListElement const * next () const
 
LinkedListElementprev ()
 
LinkedListElement const * prev () const
 
LinkedListElementnocheck_next ()
 
LinkedListElement const * nocheck_next () const
 
LinkedListElementnocheck_prev ()
 
LinkedListElement const * nocheck_prev () const
 
void delink ()
 
void insertBefore (LinkedListElement *pElem)
 
void insertAfter (LinkedListElement *pElem)
 

Public Attributes

ObjectGuid itemGUID
 
uint32 itemid
 
int32 itemRandomPropId
 
uint32 itemRandomSuffix
 
uint8 itemCount
 
PlayerVote playerVote
 
uint8 totalPlayersRolling
 
uint8 totalNeed
 
uint8 totalGreed
 
uint8 totalPass
 
uint8 itemSlot
 
uint8 rollVoteMask
 

Additional Inherited Members

virtual void targetObjectBuildLink ()=0
 
virtual void targetObjectDestroyLink ()=0
 
virtual void sourceObjectDestroyLink ()=0
 

Detailed Description

Member Typedef Documentation

◆ PlayerVote

typedef std::map<ObjectGuid, RollVote> Roll::PlayerVote

Constructor & Destructor Documentation

◆ Roll()

Roll::Roll ( ObjectGuid  _guid,
LootItem const &  li 
)
47 : itemGUID(_guid), itemid(li.itemid),
48 itemRandomPropId(li.randomPropertyId), itemRandomSuffix(li.randomSuffix), itemCount(li.count),
51{
52}
@ ROLL_ALL_TYPE_NO_DISENCHANT
Definition: LootMgr.h:48
int32 itemRandomPropId
Definition: Group.h:153
uint8 totalGreed
Definition: Group.h:160
uint8 totalPlayersRolling
Definition: Group.h:158
uint8 itemSlot
Definition: Group.h:162
uint32 itemid
Definition: Group.h:152
uint8 itemCount
Definition: Group.h:155
uint8 rollVoteMask
Definition: Group.h:163
uint32 itemRandomSuffix
Definition: Group.h:154
uint8 totalNeed
Definition: Group.h:159
uint8 totalPass
Definition: Group.h:161
ObjectGuid itemGUID
Definition: Group.h:151

◆ ~Roll()

Roll::~Roll ( )
55{
56}

Member Function Documentation

◆ getLoot()

Loot * Roll::getLoot ( )
64{
65 return getTarget();
66}
Loot * getTarget() const
Definition: Reference.h:95

References Reference< Loot, LootValidatorRef >::getTarget().

Referenced by Group::CountRollVote(), and Group::CountTheRoll().

◆ setLoot()

void Roll::setLoot ( Loot pLoot)
59{
60 link(pLoot, this);
61}
void link(Loot *toObj, LootValidatorRef *fromObj)
Definition: Reference.h:45

References Reference< Loot, LootValidatorRef >::link().

Referenced by Group::GroupLoot(), and Group::NeedBeforeGreed().

◆ targetObjectBuildLink()

void Roll::targetObjectBuildLink ( )
virtual

Implements Reference< Loot, LootValidatorRef >.

2068{
2069 // called from link()
2071}
void addLootValidatorRef(LootValidatorRef *pLootValidatorRef)
Definition: LootMgr.h:337

References Loot::addLootValidatorRef(), and Reference< Loot, LootValidatorRef >::getTarget().

Member Data Documentation

◆ itemCount

◆ itemGUID

◆ itemid

◆ itemRandomPropId

◆ itemRandomSuffix

◆ itemSlot

◆ playerVote

◆ rollVoteMask

◆ totalGreed

◆ totalNeed

◆ totalPass

◆ totalPlayersRolling