Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
CharmInfo Struct Reference

#include <Unit.h>

Collaboration diagram for CharmInfo:

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 1235 of file Unit.h.

Constructor & Destructor Documentation

◆ CharmInfo()

◆ ~CharmInfo()

CharmInfo::~CharmInfo ( )

Definition at line 5551 of file Unit.cpp.

Member Function Documentation

◆ AddSpellToActionBar()

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

◆ BuildActionBar()

void CharmInfo::BuildActionBar ( WorldPacket * data) const

◆ GetActionBarEntry()

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

Definition at line 1275 of file Unit.h.

References PetActionBar.

◆ GetCharmSpell()

CharmSpellInfo * CharmInfo::GetCharmSpell ( uint8 index)
inline

Definition at line 1282 of file Unit.h.

References _charmspells.

Referenced by Player::CharmSpellInitialize().

◆ GetCommandState()

CommandStates CharmInfo::GetCommandState ( ) const
inline

Definition at line 1251 of file Unit.h.

References _CommandState.

Referenced by Player::CharmSpellInitialize().

◆ GetGlobalCooldownMgr()

GlobalCooldownMgr & CharmInfo::GetGlobalCooldownMgr ( )
inline

Definition at line 1287 of file Unit.h.

References m_GlobalCooldownMgr.

◆ GetPetNumber()

uint32 CharmInfo::GetPetNumber ( ) const
inline

◆ GetStayPosition()

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

Definition at line 9086 of file Unit.cpp.

References _stayX, _stayY, and _stayZ.

◆ HasCommandState()

bool CharmInfo::HasCommandState ( CommandStates state) const
inline

Definition at line 1255 of file Unit.h.

References _CommandState.

Referenced by AuraEffect::HandleModPossessPet().

◆ InitCharmCreateSpells()

◆ InitEmptyActionBar()

void CharmInfo::InitEmptyActionBar ( bool withAttack = true)

◆ InitPetActionBar()

◆ InitPossessCreateSpells()

◆ IsAtStay()

bool CharmInfo::IsAtStay ( ) const
inline

Definition at line 1297 of file Unit.h.

References _isAtStay.

◆ IsCommandAttack()

bool CharmInfo::IsCommandAttack ( ) const
inline

Definition at line 1293 of file Unit.h.

References _isCommandAttack.

Referenced by WorldSession::HandlePetActionHelper().

◆ IsCommandFollow()

bool CharmInfo::IsCommandFollow ( ) const
inline

Definition at line 1295 of file Unit.h.

References _isCommandFollow.

◆ IsFollowing()

bool CharmInfo::IsFollowing ( ) const
inline

Definition at line 1299 of file Unit.h.

References _isFollowing.

◆ IsReturning()

bool CharmInfo::IsReturning ( ) const
inline

Definition at line 1301 of file Unit.h.

References _isReturning.

◆ LoadPetActionBar()

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

◆ RemoveSpellFromActionBar()

bool CharmInfo::RemoveSpellFromActionBar ( uint32 spell_id)

Definition at line 5708 of file Unit.cpp.

References ACT_PASSIVE, MAX_UNIT_ACTION_BAR_INDEX, PetActionBar, SetActionBar(), and sSpellMgr.

◆ RestoreState()

void CharmInfo::RestoreState ( )

Definition at line 5554 of file Unit.cpp.

References _oldReactState, _unit, and TYPEID_UNIT.

◆ SaveStayPosition()

void CharmInfo::SaveStayPosition ( )

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

Definition at line 9077 of file Unit.cpp.

References _stayX, _stayY, _stayZ, and _unit.

Referenced by WorldSession::HandlePetActionHelper().

◆ SetActionBar()

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

◆ SetCommandState()

void CharmInfo::SetCommandState ( CommandStates st)
inline

Definition at line 1247 of file Unit.h.

References _CommandState.

Referenced by WorldSession::HandlePetActionHelper().

◆ SetIsAtStay()

void CharmInfo::SetIsAtStay ( bool val)

◆ SetIsCommandAttack()

void CharmInfo::SetIsCommandAttack ( bool val)

◆ SetIsCommandFollow()

void CharmInfo::SetIsCommandFollow ( bool val)

◆ SetIsFollowing()

void CharmInfo::SetIsFollowing ( bool val)

◆ SetIsReturning()

void CharmInfo::SetIsReturning ( bool val)

◆ SetPetNumber()

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

◆ SetSpellAutocast()

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

◆ ToggleCreatureAutocast()

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

Member Data Documentation

◆ _barInit

bool CharmInfo::_barInit
private

Definition at line 1311 of file Unit.h.

Referenced by CharmInfo().

◆ _charmspells

CharmSpellInfo CharmInfo::_charmspells[4]
private

Definition at line 1308 of file Unit.h.

Referenced by CharmInfo(), GetCharmSpell(), InitCharmCreateSpells(), and ToggleCreatureAutocast().

◆ _CommandState

CommandStates CharmInfo::_CommandState
private

Definition at line 1309 of file Unit.h.

Referenced by CharmInfo(), GetCommandState(), HasCommandState(), and SetCommandState().

◆ _isAtStay

bool CharmInfo::_isAtStay
private

Definition at line 1318 of file Unit.h.

Referenced by CharmInfo(), IsAtStay(), and SetIsAtStay().

◆ _isCommandAttack

bool CharmInfo::_isCommandAttack
private

Definition at line 1316 of file Unit.h.

Referenced by CharmInfo(), IsCommandAttack(), and SetIsCommandAttack().

◆ _isCommandFollow

bool CharmInfo::_isCommandFollow
private

Definition at line 1317 of file Unit.h.

Referenced by CharmInfo(), IsCommandFollow(), and SetIsCommandFollow().

◆ _isFollowing

bool CharmInfo::_isFollowing
private

Definition at line 1319 of file Unit.h.

Referenced by CharmInfo(), IsFollowing(), and SetIsFollowing().

◆ _isReturning

bool CharmInfo::_isReturning
private

Definition at line 1320 of file Unit.h.

Referenced by CharmInfo(), IsReturning(), and SetIsReturning().

◆ _oldReactState

ReactStates CharmInfo::_oldReactState
private

Definition at line 1314 of file Unit.h.

Referenced by CharmInfo(), and RestoreState().

◆ _petnumber

uint32 CharmInfo::_petnumber
private

Definition at line 1310 of file Unit.h.

Referenced by CharmInfo(), GetPetNumber(), and SetPetNumber().

◆ _stayX

float CharmInfo::_stayX
private

Definition at line 1321 of file Unit.h.

Referenced by CharmInfo(), GetStayPosition(), and SaveStayPosition().

◆ _stayY

float CharmInfo::_stayY
private

Definition at line 1322 of file Unit.h.

Referenced by CharmInfo(), GetStayPosition(), and SaveStayPosition().

◆ _stayZ

float CharmInfo::_stayZ
private

Definition at line 1323 of file Unit.h.

Referenced by CharmInfo(), GetStayPosition(), and SaveStayPosition().

◆ _unit

Unit* CharmInfo::_unit
private

◆ m_GlobalCooldownMgr

GlobalCooldownMgr CharmInfo::m_GlobalCooldownMgr
private

Definition at line 1325 of file Unit.h.

Referenced by GetGlobalCooldownMgr().

◆ PetActionBar


The documentation for this struct was generated from the following files:
  • src/server/game/Entities/Unit/Unit.h
  • src/server/game/Entities/Unit/Unit.cpp