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 
)
45 : itemGUID(_guid), itemid(li.itemid),
46 itemRandomPropId(li.randomPropertyId), itemRandomSuffix(li.randomSuffix), itemCount(li.count),
49{
50}
@ ROLL_ALL_TYPE_NO_DISENCHANT
Definition: LootMgr.h:48
int32 itemRandomPropId
Definition: Group.h:152
uint8 totalGreed
Definition: Group.h:159
uint8 totalPlayersRolling
Definition: Group.h:157
uint8 itemSlot
Definition: Group.h:161
uint32 itemid
Definition: Group.h:151
uint8 itemCount
Definition: Group.h:154
uint8 rollVoteMask
Definition: Group.h:162
uint32 itemRandomSuffix
Definition: Group.h:153
uint8 totalNeed
Definition: Group.h:158
uint8 totalPass
Definition: Group.h:160
ObjectGuid itemGUID
Definition: Group.h:150

◆ ~Roll()

Roll::~Roll ( )
53{
54}

Member Function Documentation

◆ getLoot()

Loot * Roll::getLoot ( )
62{
63 return getTarget();
64}
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)
57{
58 link(pLoot, this);
59}
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 >.

2007{
2008 // called from link()
2010}
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