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

#include "Unit.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
1042: packedData(uint32(ACT_DISABLED) << 24) {}
std::uint32_t uint32
Definition: Define.h:108
@ ACT_DISABLED
Definition: Unit.h:1014
uint32 packedData
Definition: Unit.h:1044

Member Function Documentation

◆ GetAction()

◆ GetType()

ActiveStates UnitActionBarEntry::GetType ( ) const
inline
ActiveStates
Definition: Unit.h:1012
#define UNIT_ACTION_BUTTON_TYPE(X)
Definition: Unit.h:1037

References packedData, and UNIT_ACTION_BUTTON_TYPE.

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

◆ IsActionBarForSpell()

bool UnitActionBarEntry::IsActionBarForSpell ( ) const
inline
1050 {
1051 ActiveStates Type = GetType();
1052 return Type == ACT_DISABLED || Type == ACT_ENABLED || Type == ACT_PASSIVE;
1053 }
@ ACT_ENABLED
Definition: Unit.h:1015
@ ACT_PASSIVE
Definition: Unit.h:1013
ActiveStates GetType() const
Definition: Unit.h:1047

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

Referenced by CharmInfo::SetSpellAutocast().

◆ SetAction()

void UnitActionBarEntry::SetAction ( uint32  action)
inline
1066 {
1067 packedData = (packedData & 0xFF000000) | UNIT_ACTION_BUTTON_ACTION(action);
1068 }

References packedData, and UNIT_ACTION_BUTTON_ACTION.

Referenced by CharmInfo::AddSpellToActionBar().

◆ SetActionAndType()

void UnitActionBarEntry::SetActionAndType ( uint32  action,
ActiveStates  type 
)
inline
1056 {
1057 packedData = MAKE_UNIT_ACTION_BUTTON(action, type);
1058 }
#define MAKE_UNIT_ACTION_BUTTON(A, T)
Definition: Unit.h:1038

References MAKE_UNIT_ACTION_BUTTON, and packedData.

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

◆ SetType()

Member Data Documentation

◆ packedData

uint32 UnitActionBarEntry::packedData