TrinityCore
Loading...
Searching...
No Matches
CharmInfo Struct Reference

#include <Unit.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 672 of file Unit.h.

Constructor & Destructor Documentation

◆ CharmInfo()

CharmInfo::CharmInfo ( Unit unit)
explicit

Definition at line 9748 of file Unit.cpp.

+ Here is the call graph for this function:

◆ ~CharmInfo()

CharmInfo::~CharmInfo ( )

Definition at line 9763 of file Unit.cpp.

Member Function Documentation

◆ AddSpellToActionBar()

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

Definition at line 9882 of file Unit.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 9983 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ GetActionBarEntry()

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

Definition at line 700 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetCharmSpell()

CharmSpellInfo * CharmInfo::GetCharmSpell ( uint8  index)
inline

Definition at line 704 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetCommandState()

CommandStates CharmInfo::GetCommandState ( ) const
inline

Definition at line 682 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetPetNumber()

uint32 CharmInfo::GetPetNumber ( ) const
inline

Definition at line 678 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetStayPosition()

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

Definition at line 13207 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ HasCommandState()

bool CharmInfo::HasCommandState ( CommandStates  state) const
inline

Definition at line 683 of file Unit.h.

+ Here is the caller graph for this function:

◆ InitCharmCreateSpells()

void CharmInfo::InitCharmCreateSpells ( )

Definition at line 9832 of file Unit.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 9786 of file Unit.cpp.

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

◆ InitPetActionBar()

void CharmInfo::InitPetActionBar ( )

Definition at line 9771 of file Unit.cpp.

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

◆ InitPossessCreateSpells()

void CharmInfo::InitPossessCreateSpells ( )

Definition at line 9796 of file Unit.cpp.

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

◆ IsAtStay()

bool CharmInfo::IsAtStay ( )

Definition at line 13219 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ IsCommandAttack()

bool CharmInfo::IsCommandAttack ( )

Definition at line 13178 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ IsCommandFollow()

bool CharmInfo::IsCommandFollow ( )

Definition at line 13188 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ IsFollowing()

bool CharmInfo::IsFollowing ( )

Definition at line 13229 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ IsReturning()

bool CharmInfo::IsReturning ( )

Definition at line 13239 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ LoadPetActionBar()

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

Definition at line 9952 of file Unit.cpp.

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

◆ RemoveSpellFromActionBar()

bool CharmInfo::RemoveSpellFromActionBar ( uint32  spell_id)

Definition at line 9914 of file Unit.cpp.

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

◆ RestoreState()

void CharmInfo::RestoreState ( )

Definition at line 9765 of file Unit.cpp.

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

◆ SaveStayPosition()

void CharmInfo::SaveStayPosition ( )

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

Definition at line 13193 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 696 of file Unit.h.

+ Here is the caller graph for this function:

◆ SetCommandState()

void CharmInfo::SetCommandState ( CommandStates  st)
inline

Definition at line 681 of file Unit.h.

+ Here is the caller graph for this function:

◆ SetIsAtStay()

void CharmInfo::SetIsAtStay ( bool  val)

Definition at line 13214 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetIsCommandAttack()

void CharmInfo::SetIsCommandAttack ( bool  val)

Definition at line 13173 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetIsCommandFollow()

void CharmInfo::SetIsCommandFollow ( bool  val)

Definition at line 13183 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetIsFollowing()

void CharmInfo::SetIsFollowing ( bool  val)

Definition at line 13224 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetIsReturning()

void CharmInfo::SetIsReturning ( bool  val)

Definition at line 13234 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ SetPetNumber()

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

Definition at line 9943 of file Unit.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 9989 of file Unit.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 9933 of file Unit.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 723 of file Unit.h.

◆ _CommandState

CommandStates CharmInfo::_CommandState
private

Definition at line 724 of file Unit.h.

◆ _isAtStay

bool CharmInfo::_isAtStay
private

Definition at line 732 of file Unit.h.

◆ _isCommandAttack

bool CharmInfo::_isCommandAttack
private

Definition at line 730 of file Unit.h.

◆ _isCommandFollow

bool CharmInfo::_isCommandFollow
private

Definition at line 731 of file Unit.h.

◆ _isFollowing

bool CharmInfo::_isFollowing
private

Definition at line 733 of file Unit.h.

◆ _isReturning

bool CharmInfo::_isReturning
private

Definition at line 734 of file Unit.h.

◆ _oldReactState

ReactStates CharmInfo::_oldReactState
private

Definition at line 728 of file Unit.h.

◆ _petnumber

uint32 CharmInfo::_petnumber
private

Definition at line 725 of file Unit.h.

◆ _stayX

float CharmInfo::_stayX
private

Definition at line 735 of file Unit.h.

◆ _stayY

float CharmInfo::_stayY
private

Definition at line 736 of file Unit.h.

◆ _stayZ

float CharmInfo::_stayZ
private

Definition at line 737 of file Unit.h.

◆ _unit

Unit* CharmInfo::_unit
private

Definition at line 721 of file Unit.h.

◆ PetActionBar

UnitActionBarEntry CharmInfo::PetActionBar[MAX_UNIT_ACTION_BAR_INDEX]
private

Definition at line 722 of file Unit.h.


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