AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "CharmInfo.h"
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 |
int32 | _forcedSpellId |
ObjectGuid | _forcedTargetGUID |
float | _stayX |
float | _stayY |
float | _stayZ |
GlobalCooldownMgr | _GlobalCooldownMgr |
|
explicit |
References _charmspells, _oldReactState, _unit, ACT_DISABLED, Creature::GetReactState(), Object::IsCreature(), MAX_SPELL_CHARM, REACT_PASSIVE, Creature::SetReactState(), and Object::ToCreature().
|
default |
bool CharmInfo::AddSpellToActionBar | ( | SpellInfo const * | spellInfo, |
ActiveStates | newstate = ACT_DECIDE , |
||
uint32 | index = MAX_UNIT_ACTION_BAR_INDEX + 1 |
||
) |
References _unit, ACT_DECIDE, ACT_DISABLED, ACT_PASSIVE, EventProcessor::AddEventAtOffset(), Unit::GetCharmer(), SpellInfo::GetFirstRankSpell(), SpellInfo::Id, SpellInfo::IsAutocastable(), Object::IsPlayer(), Unit::m_Events, MAX_UNIT_ACTION_BAR_INDEX, PetActionBar, UnitActionBarEntry::SetAction(), SetActionBar(), sSpellMgr, and Object::ToCreature().
Referenced by Pet::addSpell(), InitCharmCreateSpells(), and InitPossessCreateSpells().
void CharmInfo::BuildActionBar | ( | WorldPacket * | data | ) |
References MAX_UNIT_ACTION_BAR_INDEX, and PetActionBar.
Referenced by Player::CharmSpellInitialize(), Player::PetSpellInitialize(), and Player::PossessSpellInitialize().
|
inline |
References PetActionBar.
Referenced by Pet::CleanupActionBar(), Pet::GenerateActionBarData(), and WorldSession::HandlePetSetAction().
|
inline |
References _charmspells.
Referenced by Player::CharmSpellInitialize(), and Creature::GetPetAutoSpellOnPos().
|
inline |
References _CommandState.
Referenced by Player::CharmSpellInitialize(), and Player::PetSpellInitialize().
|
inline |
References _forcedSpellId.
Referenced by WorldSession::HandlePetActionHelper(), WorldSession::HandlePetCastSpellOpcode(), and PetAI::UpdateAI().
|
inline |
|
inline |
References _GlobalCooldownMgr.
Referenced by Spell::CancelGlobalCooldown(), Spell::CheckPetCast(), Spell::HasGlobalCooldown(), Spell::TriggerGlobalCooldown(), and PetAI::UpdateAI().
|
inline |
References _petnumber.
Referenced by Pet::_LoadSpellCooldowns(), Pet::_SaveAuras(), Pet::_SaveSpellCooldowns(), Pet::_SaveSpells(), Pet::FillPetInfo(), Pet::GetDebugInfo(), WorldSession::HandlePetRename(), Player::RemovePet(), Pet::resetTalentsForAllPetsOf(), Pet::SavePetToDB(), and Player::UnsummonPetTemporaryIfAny().
|
inline |
void CharmInfo::GetStayPosition | ( | float & | x, |
float & | y, | ||
float & | z | ||
) |
|
inline |
References _CommandState.
Referenced by PetAI::AttackStart(), PetAI::CanAttack(), AuraEffect::HandleModPossessPet(), PetAI::HandleReturnMovement(), PetAI::SpellHit(), and PetAI::UpdateAI().
bool CharmInfo::HasStayPosition | ( | ) |
void CharmInfo::InitCharmCreateSpells | ( | ) |
References _charmspells, _unit, ACT_DISABLED, ACT_ENABLED, ACT_PASSIVE, AddSpellToActionBar(), Unit::CastSpell(), InitPetActionBar(), SpellInfo::IsAutocastable(), SpellInfo::IsPassive(), Object::IsPlayer(), Creature::m_spells, MAX_SPELL_CHARM, SpellInfo::NeedsExplicitUnitTarget(), UnitActionBarEntry::SetActionAndType(), sSpellMgr, Object::ToCreature(), and ToggleCreatureAutocast().
Referenced by Guardian::InitStats(), and Unit::SetCharmedBy().
void CharmInfo::InitEmptyActionBar | ( | bool | withAttack = true | ) |
References ACT_COMMAND, ACT_PASSIVE, ACTION_BAR_INDEX_END, ACTION_BAR_INDEX_START, COMMAND_ATTACK, and SetActionBar().
Referenced by InitPossessCreateSpells().
void CharmInfo::InitPetActionBar | ( | ) |
References ACT_COMMAND, ACT_PASSIVE, ACT_REACTION, ACTION_BAR_INDEX_END, ACTION_BAR_INDEX_PET_SPELL_END, ACTION_BAR_INDEX_PET_SPELL_START, ACTION_BAR_INDEX_START, COMMAND_ATTACK, and SetActionBar().
Referenced by InitCharmCreateSpells(), and Pet::InitPetCreateSpells().
void CharmInfo::InitPossessCreateSpells | ( | ) |
References _unit, ACT_PASSIVE, AddSpellToActionBar(), Unit::CastSpell(), Object::GetEntry(), InitEmptyActionBar(), Object::IsCreature(), SpellInfo::IsPassive(), Creature::m_spells, MAX_CREATURE_SPELLS, sSpellMgr, and Object::ToCreature().
Referenced by Unit::SetCharmedBy().
bool CharmInfo::IsAtStay | ( | ) |
References _isAtStay.
Referenced by PetAI::HandleReturnMovement(), PetAI::SelectNextTarget(), and PetAI::UpdateAI().
bool CharmInfo::IsCommandAttack | ( | ) |
References _isCommandAttack.
Referenced by PetAI::AttackStart(), PetAI::CanAttack(), PetAI::DoAttack(), WorldSession::HandlePetActionHelper(), PetAI::SpellHit(), and PetAI::UpdateAI().
bool CharmInfo::IsCommandFollow | ( | ) |
References _isCommandFollow.
Referenced by PetAI::CanAttack().
bool CharmInfo::IsFollowing | ( | ) |
References _isFollowing.
Referenced by PetAI::HandleReturnMovement(), and PetAI::SelectNextTarget().
bool CharmInfo::IsReturning | ( | ) |
References _isReturning.
Referenced by PetAI::CanAttack(), PetAI::HandleReturnMovement(), PetAI::MovementInform(), and PetAI::SelectNextTarget().
void CharmInfo::LoadPetActionBar | ( | const std::string & | data | ) |
References ACT_PASSIVE, ACTION_BAR_INDEX_END, ACTION_BAR_INDEX_START, SpellInfo::IsAutocastable(), PetActionBar, UnitActionBarEntry::SetActionAndType(), SetActionBar(), sSpellMgr, and Acore::Tokenize().
Referenced by Pet::LoadPetFromDB().
bool CharmInfo::RemoveSpellFromActionBar | ( | uint32 | spell_id | ) |
References ACT_DISABLED, MAX_UNIT_ACTION_BAR_INDEX, PetActionBar, SetActionBar(), and sSpellMgr.
Referenced by Pet::removeSpell().
void CharmInfo::RemoveStayPosition | ( | ) |
void CharmInfo::RestoreState | ( | ) |
References _oldReactState, _unit, and Object::ToCreature().
Referenced by Unit::DeleteCharmInfo().
void CharmInfo::SaveStayPosition | ( | bool | atCurrentPos | ) |
At this point a new spline destination is enabled because of Unit::StopMoving()
References _stayX, _stayY, _stayZ, _unit, Movement::MoveSpline::FinalDestination(), Unit::GetDirectTransport(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), INVALID_HEIGHT, Unit::movespline, Movement::MoveSpline::onTransport, and WorldObject::UpdateAllowedPositionZ().
Referenced by WorldSession::HandlePetActionHelper(), and Pet::Update().
|
inline |
|
inline |
References _CommandState.
Referenced by WorldSession::HandlePetActionHelper(), and Pet::Update().
|
inline |
References _forcedSpellId.
Referenced by WorldSession::HandlePetActionHelper(), PetAI::HandleReturnMovement(), Unit::PetSpellFail(), and PetAI::SpellHit().
|
inline |
References _forcedTargetGUID.
Referenced by WorldSession::HandlePetActionHelper(), PetAI::HandleReturnMovement(), Unit::PetSpellFail(), and PetAI::SpellHit().
void CharmInfo::SetIsAtStay | ( | bool | val | ) |
References _isAtStay.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), PetAI::DoAttack(), WorldSession::HandlePetActionHelper(), PetAI::MovementInform(), Unit::PetSpellFail(), and Pet::Update().
void CharmInfo::SetIsCommandAttack | ( | bool | val | ) |
References _isCommandAttack.
Referenced by PetAI::_stopAttack(), Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), PetAI::DoAttack(), WorldSession::HandlePetActionHelper(), Unit::PetSpellFail(), and Pet::Update().
void CharmInfo::SetIsCommandFollow | ( | bool | val | ) |
References _isCommandFollow.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), WorldSession::HandlePetActionHelper(), and Pet::Update().
void CharmInfo::SetIsFollowing | ( | bool | val | ) |
References _isFollowing.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), WorldSession::HandlePetActionHelper(), PetAI::MovementInform(), Unit::PetSpellFail(), and Pet::Update().
void CharmInfo::SetIsReturning | ( | bool | val | ) |
References _isReturning.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), WorldSession::HandlePetActionHelper(), PetAI::HandleReturnMovement(), Unit::PetSpellFail(), and Pet::Update().
void CharmInfo::SetPetNumber | ( | uint32 | petnumber, |
bool | statwindow | ||
) |
References _petnumber, _unit, Unit::SetUInt32Value(), and UNIT_FIELD_PETNUMBER.
Referenced by Unit::InitTamedPet(), Pet::LoadPetFromDB(), Unit::RemoveCharmedBy(), Unit::SetCharmedBy(), and Player::SummonPet().
|
inline |
References _oldReactState.
Referenced by WorldSession::HandlePetActionHelper().
void CharmInfo::SetSpellAutocast | ( | SpellInfo const * | spellInfo, |
bool | state | ||
) |
References ACT_DISABLED, ACT_ENABLED, UnitActionBarEntry::GetAction(), SpellInfo::Id, UnitActionBarEntry::IsActionBarForSpell(), MAX_UNIT_ACTION_BAR_INDEX, PetActionBar, and UnitActionBarEntry::SetType().
Referenced by WorldSession::HandlePetSpellAutocastOpcode().
void CharmInfo::ToggleCreatureAutocast | ( | SpellInfo const * | spellInfo, |
bool | apply | ||
) |
References _charmspells, ACT_DISABLED, ACT_ENABLED, UnitActionBarEntry::GetAction(), SpellInfo::Id, SpellInfo::IsPassive(), MAX_SPELL_CHARM, and UnitActionBarEntry::SetType().
Referenced by WorldSession::HandlePetSpellAutocastOpcode(), and InitCharmCreateSpells().
|
private |
Referenced by CharmInfo(), GetCharmSpell(), InitCharmCreateSpells(), and ToggleCreatureAutocast().
|
private |
Referenced by GetCommandState(), HasCommandState(), and SetCommandState().
|
private |
Referenced by GetForcedSpell(), and SetForcedSpell().
|
private |
Referenced by GetForcedTarget(), and SetForcedTargetGUID().
|
private |
Referenced by GetGlobalCooldownMgr().
|
private |
Referenced by IsAtStay(), and SetIsAtStay().
|
private |
Referenced by IsCommandAttack(), and SetIsCommandAttack().
|
private |
Referenced by IsCommandFollow(), and SetIsCommandFollow().
|
private |
Referenced by IsFollowing(), and SetIsFollowing().
|
private |
Referenced by IsReturning(), and SetIsReturning().
|
private |
Referenced by CharmInfo(), GetPlayerReactState(), RestoreState(), and SetPlayerReactState().
|
private |
Referenced by GetPetNumber(), and SetPetNumber().
|
private |
Referenced by GetStayPosition(), HasStayPosition(), RemoveStayPosition(), and SaveStayPosition().
|
private |
Referenced by GetStayPosition(), HasStayPosition(), RemoveStayPosition(), and SaveStayPosition().
|
private |
Referenced by GetStayPosition(), HasStayPosition(), RemoveStayPosition(), and SaveStayPosition().
|
private |
|
private |