TrinityCore
CharmInfo Struct Reference

#include <CharmInfo.h>

Public Member Functions

 CharmInfo (Unit *unit)
 
 ~CharmInfo ()
 
void RestoreState ()
 
uint32 GetPetNumber () const
 
void SetPetNumber (uint32 petnumber, bool statwindow)
 
void SetCommandState (CommandStates st)
 
CommandStates GetCommandState () const
 
bool HasCommandState (CommandStates state) const
 
void InitPossessCreateSpells ()
 
void InitCharmCreateSpells ()
 
void InitPetActionBar ()
 
void InitEmptyActionBar (bool withAttack=true)
 
bool AddSpellToActionBar (SpellInfo const *spellInfo, ActiveStates newstate=ACT_DECIDE, uint8 preferredSlot=0)
 
bool RemoveSpellFromActionBar (uint32 spell_id)
 
void LoadPetActionBar (const std::string &data)
 
void BuildActionBar (WorldPacket *data)
 
void SetSpellAutocast (SpellInfo const *spellInfo, bool state)
 
void SetActionBar (uint8 index, uint32 spellOrAction, ActiveStates type)
 
UnitActionBarEntry const * GetActionBarEntry (uint8 index) const
 
void ToggleCreatureAutocast (SpellInfo const *spellInfo, bool apply)
 
CharmSpellInfoGetCharmSpell (uint8 index)
 
void SetIsCommandAttack (bool val)
 
bool IsCommandAttack ()
 
void SetIsCommandFollow (bool val)
 
bool IsCommandFollow ()
 
void SetIsAtStay (bool val)
 
bool IsAtStay ()
 
void SetIsFollowing (bool val)
 
bool IsFollowing ()
 
void SetIsReturning (bool val)
 
bool IsReturning ()
 
void SaveStayPosition ()
 
void GetStayPosition (float &x, float &y, float &z)
 

Private Attributes

Unit_unit
 
UnitActionBarEntry PetActionBar [MAX_UNIT_ACTION_BAR_INDEX]
 
CharmSpellInfo _charmspells [4]
 
CommandStates _CommandState
 
uint32 _petnumber
 
ReactStates _oldReactState
 
bool _isCommandAttack
 
bool _isCommandFollow
 
bool _isAtStay
 
bool _isFollowing
 
bool _isReturning
 
float _stayX
 
float _stayY
 
float _stayZ
 

Detailed Description

Definition at line 88 of file CharmInfo.h.

Constructor & Destructor Documentation

◆ CharmInfo()

CharmInfo::CharmInfo ( Unit unit)
explicit

Definition at line 26 of file CharmInfo.cpp.

+ Here is the call graph for this function:

◆ ~CharmInfo()

CharmInfo::~CharmInfo ( )

Definition at line 41 of file CharmInfo.cpp.

Member Function Documentation

◆ AddSpellToActionBar()

bool CharmInfo::AddSpellToActionBar ( SpellInfo const *  spellInfo,
ActiveStates  newstate = ACT_DECIDE,
uint8  preferredSlot = 0 
)

Definition at line 166 of file CharmInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildActionBar()

void CharmInfo::BuildActionBar ( WorldPacket data)

Definition at line 267 of file CharmInfo.cpp.

◆ GetActionBarEntry()

UnitActionBarEntry const * CharmInfo::GetActionBarEntry ( uint8  index) const
inline

Definition at line 117 of file CharmInfo.h.

+ Here is the caller graph for this function:

◆ GetCharmSpell()

CharmSpellInfo * CharmInfo::GetCharmSpell ( uint8  index)
inline

Definition at line 121 of file CharmInfo.h.

+ Here is the caller graph for this function:

◆ GetCommandState()

CommandStates CharmInfo::GetCommandState ( ) const
inline

Definition at line 98 of file CharmInfo.h.

+ Here is the caller graph for this function:

◆ GetPetNumber()

uint32 CharmInfo::GetPetNumber ( ) const
inline

Definition at line 94 of file CharmInfo.h.

+ Here is the caller graph for this function:

◆ GetStayPosition()

void CharmInfo::GetStayPosition ( float &  x,
float &  y,
float &  z 
)

Definition at line 12610 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ HasCommandState()

bool CharmInfo::HasCommandState ( CommandStates  state) const
inline

Definition at line 99 of file CharmInfo.h.

+ Here is the caller graph for this function:

◆ InitCharmCreateSpells()

void CharmInfo::InitCharmCreateSpells ( )

Definition at line 113 of file CharmInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitEmptyActionBar()

void CharmInfo::InitEmptyActionBar ( bool  withAttack = true)

Definition at line 64 of file CharmInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitPetActionBar()

void CharmInfo::InitPetActionBar ( )

Definition at line 49 of file CharmInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitPossessCreateSpells()

void CharmInfo::InitPossessCreateSpells ( )

Definition at line 74 of file CharmInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsAtStay()

bool CharmInfo::IsAtStay ( )

Definition at line 12622 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ IsCommandAttack()

bool CharmInfo::IsCommandAttack ( )

Definition at line 12581 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ IsCommandFollow()

bool CharmInfo::IsCommandFollow ( )

Definition at line 12591 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ IsFollowing()

bool CharmInfo::IsFollowing ( )

Definition at line 12632 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ IsReturning()

bool CharmInfo::IsReturning ( )

Definition at line 12642 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ LoadPetActionBar()

void CharmInfo::LoadPetActionBar ( const std::string &  data)

Definition at line 236 of file CharmInfo.cpp.

+ Here is the call graph for this function:

◆ RemoveSpellFromActionBar()

bool CharmInfo::RemoveSpellFromActionBar ( uint32  spell_id)

Definition at line 198 of file CharmInfo.cpp.

+ Here is the call graph for this function:

◆ RestoreState()

void CharmInfo::RestoreState ( )

Definition at line 43 of file CharmInfo.cpp.

+ Here is the call graph for this function:

◆ SaveStayPosition()

void CharmInfo::SaveStayPosition ( )

At this point a new spline destination is enabled because of Unit::StopMoving()

Definition at line 12596 of file Unit.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetActionBar()

void CharmInfo::SetActionBar ( uint8  index,
uint32  spellOrAction,
ActiveStates  type 
)
inline

Definition at line 112 of file CharmInfo.h.

+ Here is the caller graph for this function:

◆ SetCommandState()

void CharmInfo::SetCommandState ( CommandStates  st)
inline

Definition at line 97 of file CharmInfo.h.

+ Here is the caller graph for this function:

◆ SetIsAtStay()

void CharmInfo::SetIsAtStay ( bool  val)

Definition at line 12617 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetIsCommandAttack()

void CharmInfo::SetIsCommandAttack ( bool  val)

Definition at line 12576 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetIsCommandFollow()

void CharmInfo::SetIsCommandFollow ( bool  val)

Definition at line 12586 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetIsFollowing()

void CharmInfo::SetIsFollowing ( bool  val)

Definition at line 12627 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetIsReturning()

void CharmInfo::SetIsReturning ( bool  val)

Definition at line 12637 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetPetNumber()

void CharmInfo::SetPetNumber ( uint32  petnumber,
bool  statwindow 
)

Definition at line 227 of file CharmInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSpellAutocast()

void CharmInfo::SetSpellAutocast ( SpellInfo const *  spellInfo,
bool  state 
)

Definition at line 273 of file CharmInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToggleCreatureAutocast()

void CharmInfo::ToggleCreatureAutocast ( SpellInfo const *  spellInfo,
bool  apply 
)

Definition at line 217 of file CharmInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _charmspells

CharmSpellInfo CharmInfo::_charmspells[4]
private

Definition at line 140 of file CharmInfo.h.

◆ _CommandState

CommandStates CharmInfo::_CommandState
private

Definition at line 141 of file CharmInfo.h.

◆ _isAtStay

bool CharmInfo::_isAtStay
private

Definition at line 149 of file CharmInfo.h.

◆ _isCommandAttack

bool CharmInfo::_isCommandAttack
private

Definition at line 147 of file CharmInfo.h.

◆ _isCommandFollow

bool CharmInfo::_isCommandFollow
private

Definition at line 148 of file CharmInfo.h.

◆ _isFollowing

bool CharmInfo::_isFollowing
private

Definition at line 150 of file CharmInfo.h.

◆ _isReturning

bool CharmInfo::_isReturning
private

Definition at line 151 of file CharmInfo.h.

◆ _oldReactState

ReactStates CharmInfo::_oldReactState
private

Definition at line 145 of file CharmInfo.h.

◆ _petnumber

uint32 CharmInfo::_petnumber
private

Definition at line 142 of file CharmInfo.h.

◆ _stayX

float CharmInfo::_stayX
private

Definition at line 152 of file CharmInfo.h.

◆ _stayY

float CharmInfo::_stayY
private

Definition at line 153 of file CharmInfo.h.

◆ _stayZ

float CharmInfo::_stayZ
private

Definition at line 154 of file CharmInfo.h.

◆ _unit

Unit* CharmInfo::_unit
private

Definition at line 138 of file CharmInfo.h.

◆ PetActionBar

UnitActionBarEntry CharmInfo::PetActionBar[MAX_UNIT_ACTION_BAR_INDEX]
private

Definition at line 139 of file CharmInfo.h.


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