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
1054: packedData(uint32(ACT_DISABLED) << 24) {}
std::uint32_t uint32
Definition: Define.h:108
@ ACT_DISABLED
Definition: Unit.h:1026
uint32 packedData
Definition: Unit.h:1056

Member Function Documentation

◆ GetAction()

◆ GetType()

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

References packedData, and UNIT_ACTION_BUTTON_TYPE.

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

◆ IsActionBarForSpell()

bool UnitActionBarEntry::IsActionBarForSpell ( ) const
inline
1062 {
1063 ActiveStates Type = GetType();
1064 return Type == ACT_DISABLED || Type == ACT_ENABLED || Type == ACT_PASSIVE;
1065 }
@ ACT_ENABLED
Definition: Unit.h:1027
@ ACT_PASSIVE
Definition: Unit.h:1025
ActiveStates GetType() const
Definition: Unit.h:1059

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

Referenced by CharmInfo::SetSpellAutocast().

◆ SetAction()

void UnitActionBarEntry::SetAction ( uint32  action)
inline
1078 {
1079 packedData = (packedData & 0xFF000000) | UNIT_ACTION_BUTTON_ACTION(action);
1080 }

References packedData, and UNIT_ACTION_BUTTON_ACTION.

Referenced by CharmInfo::AddSpellToActionBar().

◆ SetActionAndType()

void UnitActionBarEntry::SetActionAndType ( uint32  action,
ActiveStates  type 
)
inline
1068 {
1069 packedData = MAKE_UNIT_ACTION_BUTTON(action, type);
1070 }
#define MAKE_UNIT_ACTION_BUTTON(A, T)
Definition: Unit.h:1050

References MAKE_UNIT_ACTION_BUTTON, and packedData.

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

◆ SetType()

Member Data Documentation

◆ packedData

uint32 UnitActionBarEntry::packedData