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

#include "CharmInfo.h"

Public Member Functions

 UnitActionBarEntry ()
 
ActiveStates GetType () const
 
uint32 GetAction () const
 
bool IsActionBarForSpell () const
 
void SetActionAndType (uint32 action, ActiveStates type)
 
void SetType (ActiveStates type)
 
void SetAction (uint32 action)
 

Public Attributes

uint32 packedData
 

Detailed Description

Constructor & Destructor Documentation

◆ UnitActionBarEntry()

UnitActionBarEntry::UnitActionBarEntry ( )
inline
@ ACT_DISABLED
Definition CharmInfo.h:62
std::uint32_t uint32
Definition Define.h:107
uint32 packedData
Definition CharmInfo.h:98

Member Function Documentation

◆ GetAction()

◆ GetType()

ActiveStates UnitActionBarEntry::GetType ( ) const
inline
ActiveStates
Definition CharmInfo.h:60
#define UNIT_ACTION_BUTTON_TYPE(X)
Definition CharmInfo.h:32

References packedData, and UNIT_ACTION_BUTTON_TYPE.

Referenced by Pet::GenerateActionBarData(), Creature::GetPetAutoSpellOnPos(), WorldSession::HandlePetSetAction(), and IsActionBarForSpell().

◆ IsActionBarForSpell()

bool UnitActionBarEntry::IsActionBarForSpell ( ) const
inline
104 {
105 ActiveStates Type = GetType();
106 return Type == ACT_DISABLED || Type == ACT_ENABLED || Type == ACT_PASSIVE;
107 }
@ ACT_ENABLED
Definition CharmInfo.h:63
@ ACT_PASSIVE
Definition CharmInfo.h:61
ActiveStates GetType() const
Definition CharmInfo.h:101

References ACT_DISABLED, ACT_ENABLED, ACT_PASSIVE, and GetType().

Referenced by CharmInfo::SetSpellAutocast().

◆ SetAction()

void UnitActionBarEntry::SetAction ( uint32  action)
inline
120 {
121 packedData = (packedData & 0xFF000000) | UNIT_ACTION_BUTTON_ACTION(action);
122 }

References packedData, and UNIT_ACTION_BUTTON_ACTION.

Referenced by CharmInfo::AddSpellToActionBar().

◆ SetActionAndType()

void UnitActionBarEntry::SetActionAndType ( uint32  action,
ActiveStates  type 
)
inline
110 {
111 packedData = MAKE_UNIT_ACTION_BUTTON(action, type);
112 }
#define MAKE_UNIT_ACTION_BUTTON(A, T)
Definition CharmInfo.h:33

References MAKE_UNIT_ACTION_BUTTON, and packedData.

Referenced by CharmInfo::InitCharmCreateSpells(), CharmInfo::LoadPetActionBar(), and CharmInfo::SetActionBar().

◆ SetType()

Member Data Documentation

◆ packedData

uint32 UnitActionBarEntry::packedData

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