AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ActionButton Struct Reference

#include "Player.h"

Public Member Functions

 ActionButton ()=default
 
ActionButtonType GetType () const
 
uint32 GetAction () const
 
void SetActionAndType (uint32 action, ActionButtonType type)
 

Public Attributes

uint32 packedData {0}
 
ActionButtonUpdateState uState {ACTIONBUTTON_NEW}
 

Detailed Description

Constructor & Destructor Documentation

◆ ActionButton()

ActionButton::ActionButton ( )
default

Member Function Documentation

◆ GetAction()

uint32 ActionButton::GetAction ( ) const
inline
#define ACTION_BUTTON_ACTION(X)
Definition: Player.h:248
uint32 packedData
Definition: Player.h:256

References ACTION_BUTTON_ACTION, and packedData.

Referenced by Spell::EffectCastButtons().

◆ GetType()

ActionButtonType ActionButton::GetType ( ) const
inline
ActionButtonType
Definition: Player.h:228
#define ACTION_BUTTON_TYPE(X)
Definition: Player.h:249

References ACTION_BUTTON_TYPE, and packedData.

Referenced by Spell::EffectCastButtons().

◆ SetActionAndType()

void ActionButton::SetActionAndType ( uint32  action,
ActionButtonType  type 
)
inline
263 {
264 uint32 newData = action | (uint32(type) << 24);
265 if (newData != packedData || uState == ACTIONBUTTON_DELETED)
266 {
267 packedData = newData;
270 }
271 }
std::uint32_t uint32
Definition: Define.h:107
@ ACTIONBUTTON_NEW
Definition: Player.h:223
@ ACTIONBUTTON_DELETED
Definition: Player.h:224
@ ACTIONBUTTON_CHANGED
Definition: Player.h:222
ActionButtonUpdateState uState
Definition: Player.h:257

References ACTIONBUTTON_CHANGED, ACTIONBUTTON_DELETED, ACTIONBUTTON_NEW, packedData, and uState.

Referenced by Player::addActionButton().

Member Data Documentation

◆ packedData

uint32 ActionButton::packedData {0}

◆ uState

ActionButtonUpdateState ActionButton::uState {ACTIONBUTTON_NEW}

Referenced by SetActionAndType().