![]() |
TrinityCore
|
#include <Unit.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 |
| float | _stayX |
| float | _stayY |
| float | _stayZ |
|
explicit |
Definition at line 9725 of file Unit.cpp.
References _charmspells, _oldReactState, _unit, ACT_DISABLED, MAX_SPELL_CHARM, REACT_PASSIVE, and Object::ToCreature().
| bool CharmInfo::AddSpellToActionBar | ( | SpellInfo const * | spellInfo, |
| ActiveStates | newstate = ACT_DECIDE, |
||
| uint8 | preferredSlot = 0 |
||
| ) |
Definition at line 9859 of file Unit.cpp.
References ACT_DECIDE, ACT_DISABLED, ACT_PASSIVE, ASSERT, SpellInfo::GetFirstRankSpell(), SpellInfo::Id, UnitActionBarEntry::IsActionBarForSpell(), SpellInfo::IsAutocastable(), MAX_UNIT_ACTION_BAR_INDEX, PetActionBar, UnitActionBarEntry::SetAction(), SetActionBar(), and sSpellMgr.
Referenced by Pet::addSpell(), InitCharmCreateSpells(), and InitPossessCreateSpells().
| void CharmInfo::BuildActionBar | ( | WorldPacket * | data | ) |
Definition at line 9960 of file Unit.cpp.
References MAX_UNIT_ACTION_BAR_INDEX, and PetActionBar.
Referenced by Player::CharmSpellInitialize(), Player::PetSpellInitialize(), and Player::PossessSpellInitialize().
|
inline |
Definition at line 714 of file Unit.h.
Referenced by Pet::CleanupActionBar(), Pet::GenerateActionBarData(), and WorldSession::HandlePetSetAction().
|
inline |
Definition at line 718 of file Unit.h.
Referenced by Player::CharmSpellInitialize(), and Creature::GetPetAutoSpellOnPos().
|
inline |
Definition at line 696 of file Unit.h.
Referenced by Player::CharmSpellInitialize(), and Player::PetSpellInitialize().
|
inline |
Definition at line 692 of file Unit.h.
Referenced by Pet::_SaveAuras(), Pet::_SaveSpells(), Pet::FillPetInfo(), Pet::GetDebugInfo(), WorldSession::HandlePetRename(), Player::RemovePet(), Pet::resetTalentsForAllPetsOf(), Pet::SavePetToDB(), SpellHistory::PersistenceHelper< Pet >::SetIdentifier(), and Player::UnsummonPetTemporaryIfAny().
| void CharmInfo::GetStayPosition | ( | float & | x, |
| float & | y, | ||
| float & | z | ||
| ) |
|
inline |
Definition at line 697 of file Unit.h.
Referenced by PetAI::_AttackStart(), Pet::AddToWorld(), PetAI::CanAttack(), Spell::EffectResurrectPet(), AuraEffect::HandleModPossessPet(), PetAI::HandleReturnMovement(), and PetAI::UpdateAI().
| void CharmInfo::InitCharmCreateSpells | ( | ) |
Definition at line 9809 of file Unit.cpp.
References _charmspells, _unit, ACT_DISABLED, ACT_ENABLED, ACT_PASSIVE, AddSpellToActionBar(), WorldObject::CastSpell(), Object::GetTypeId(), SpellInfo::Id, InitEmptyActionBar(), InitPetActionBar(), SpellInfo::IsAutocastable(), SpellInfo::IsPassive(), Creature::m_spells, MAX_SPELL_CHARM, SpellInfo::NeedsExplicitUnitTarget(), UnitActionBarEntry::SetActionAndType(), sSpellMgr, Object::ToCreature(), ToggleCreatureAutocast(), and TYPEID_PLAYER.
Referenced by Guardian::InitStats(), and Unit::SetCharmedBy().
| void CharmInfo::InitEmptyActionBar | ( | bool | withAttack = true | ) |
Definition at line 9763 of file Unit.cpp.
References ACT_COMMAND, ACT_PASSIVE, ACTION_BAR_INDEX_END, ACTION_BAR_INDEX_START, COMMAND_ATTACK, and SetActionBar().
Referenced by InitCharmCreateSpells(), and InitPossessCreateSpells().
| void CharmInfo::InitPetActionBar | ( | ) |
Definition at line 9748 of file Unit.cpp.
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(), Pet::InitPetCreateSpells(), and LoadPetActionBar().
| void CharmInfo::InitPossessCreateSpells | ( | ) |
Definition at line 9773 of file Unit.cpp.
References _unit, ACT_PASSIVE, AddSpellToActionBar(), WorldObject::CastSpell(), Object::GetEntry(), Object::GetTypeId(), SpellInfo::Id, InitEmptyActionBar(), SpellInfo::IsPassive(), Creature::m_spells, MAX_CREATURE_SPELLS, MAX_UNIT_ACTION_BAR_INDEX, sSpellMgr, Object::ToCreature(), and TYPEID_UNIT.
Referenced by Unit::SetCharmedBy().
| bool CharmInfo::IsAtStay | ( | ) |
Definition at line 13195 of file Unit.cpp.
References _isAtStay.
Referenced by PetAI::HandleReturnMovement(), PetAI::SelectNextTarget(), and PetAI::UpdateAI().
| bool CharmInfo::IsCommandAttack | ( | ) |
Definition at line 13154 of file Unit.cpp.
References _isCommandAttack.
Referenced by PetAI::_AttackStart(), PetAI::CanAttack(), PetAI::DoAttack(), WorldSession::HandlePetActionHelper(), and PetAI::UpdateAI().
| bool CharmInfo::IsCommandFollow | ( | ) |
Definition at line 13164 of file Unit.cpp.
References _isCommandFollow.
Referenced by PetAI::CanAttack().
| bool CharmInfo::IsFollowing | ( | ) |
Definition at line 13205 of file Unit.cpp.
References _isFollowing.
Referenced by PetAI::HandleReturnMovement(), and PetAI::SelectNextTarget().
| bool CharmInfo::IsReturning | ( | ) |
Definition at line 13215 of file Unit.cpp.
References _isReturning.
Referenced by PetAI::CanAttack(), PetAI::HandleReturnMovement(), PetAI::MovementInform(), and PetAI::SelectNextTarget().
| void CharmInfo::LoadPetActionBar | ( | const std::string & | data | ) |
Definition at line 9929 of file Unit.cpp.
References ACT_PASSIVE, ACTION_BAR_INDEX_END, ACTION_BAR_INDEX_START, InitPetActionBar(), SpellInfo::IsAutocastable(), PetActionBar, UnitActionBarEntry::SetActionAndType(), SetActionBar(), sSpellMgr, and Trinity::Tokenize().
Referenced by Pet::LoadPetFromDB().
| bool CharmInfo::RemoveSpellFromActionBar | ( | uint32 | spell_id | ) |
Definition at line 9891 of file Unit.cpp.
References ACT_PASSIVE, MAX_UNIT_ACTION_BAR_INDEX, PetActionBar, SetActionBar(), and sSpellMgr.
Referenced by Pet::removeSpell().
| void CharmInfo::RestoreState | ( | ) |
Definition at line 9742 of file Unit.cpp.
References _oldReactState, _unit, and Object::ToCreature().
Referenced by Unit::DeleteCharmInfo().
| void CharmInfo::SaveStayPosition | ( | ) |
At this point a new spline destination is enabled because of Unit::StopMoving()
Definition at line 13169 of file Unit.cpp.
References _stayX, _stayY, _stayZ, _unit, Movement::MoveSpline::FinalDestination(), Unit::GetDirectTransport(), Unit::movespline, and Movement::MoveSpline::onTransport.
Referenced by Spell::EffectResurrectPet(), and WorldSession::HandlePetActionHelper().
|
inline |
Definition at line 710 of file Unit.h.
Referenced by AddSpellToActionBar(), Pet::CleanupActionBar(), WorldSession::HandlePetSetAction(), InitEmptyActionBar(), InitPetActionBar(), LoadPetActionBar(), and RemoveSpellFromActionBar().
|
inline |
Definition at line 695 of file Unit.h.
Referenced by WorldSession::HandlePetActionHelper().
| void CharmInfo::SetIsAtStay | ( | bool | val | ) |
Definition at line 13190 of file Unit.cpp.
References _isAtStay.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), PetAI::DoAttack(), Spell::EffectResurrectPet(), WorldSession::HandlePetActionHelper(), and PetAI::MovementInform().
| void CharmInfo::SetIsCommandAttack | ( | bool | val | ) |
Definition at line 13149 of file Unit.cpp.
References _isCommandAttack.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), PetAI::DoAttack(), Spell::EffectResurrectPet(), WorldSession::HandlePetActionHelper(), and PetAI::StopAttack().
| void CharmInfo::SetIsCommandFollow | ( | bool | val | ) |
Definition at line 13159 of file Unit.cpp.
References _isCommandFollow.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), Spell::EffectResurrectPet(), and WorldSession::HandlePetActionHelper().
| void CharmInfo::SetIsFollowing | ( | bool | val | ) |
Definition at line 13200 of file Unit.cpp.
References _isFollowing.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), Spell::EffectResurrectPet(), WorldSession::HandlePetActionHelper(), and PetAI::MovementInform().
| void CharmInfo::SetIsReturning | ( | bool | val | ) |
Definition at line 13210 of file Unit.cpp.
References _isReturning.
Referenced by Pet::AddToWorld(), PetAI::ClearCharmInfoFlags(), Spell::EffectResurrectPet(), WorldSession::HandlePetActionHelper(), and PetAI::HandleReturnMovement().
| void CharmInfo::SetPetNumber | ( | uint32 | petnumber, |
| bool | statwindow | ||
| ) |
Definition at line 9920 of file Unit.cpp.
References _petnumber, _unit, and Unit::SetPetNumberForClient().
Referenced by Unit::InitTamedPet(), Pet::LoadPetFromDB(), Unit::RemoveCharmedBy(), Unit::SetCharmedBy(), and Player::SummonPet().
| void CharmInfo::SetSpellAutocast | ( | SpellInfo const * | spellInfo, |
| bool | state | ||
| ) |
Definition at line 9966 of file Unit.cpp.
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 | ||
| ) |
Definition at line 9910 of file Unit.cpp.
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 |
Definition at line 737 of file Unit.h.
Referenced by CharmInfo(), InitCharmCreateSpells(), and ToggleCreatureAutocast().
|
private |
|
private |
Definition at line 746 of file Unit.h.
Referenced by IsAtStay(), and SetIsAtStay().
|
private |
Definition at line 744 of file Unit.h.
Referenced by IsCommandAttack(), and SetIsCommandAttack().
|
private |
Definition at line 745 of file Unit.h.
Referenced by IsCommandFollow(), and SetIsCommandFollow().
|
private |
Definition at line 747 of file Unit.h.
Referenced by IsFollowing(), and SetIsFollowing().
|
private |
Definition at line 748 of file Unit.h.
Referenced by IsReturning(), and SetIsReturning().
|
private |
Definition at line 742 of file Unit.h.
Referenced by CharmInfo(), and RestoreState().
|
private |
Definition at line 739 of file Unit.h.
Referenced by SetPetNumber().
|
private |
Definition at line 749 of file Unit.h.
Referenced by GetStayPosition(), and SaveStayPosition().
|
private |
Definition at line 750 of file Unit.h.
Referenced by GetStayPosition(), and SaveStayPosition().
|
private |
Definition at line 751 of file Unit.h.
Referenced by GetStayPosition(), and SaveStayPosition().
|
private |
Definition at line 735 of file Unit.h.
Referenced by CharmInfo(), InitCharmCreateSpells(), InitPossessCreateSpells(), RestoreState(), SaveStayPosition(), and SetPetNumber().
|
private |
Definition at line 736 of file Unit.h.
Referenced by AddSpellToActionBar(), BuildActionBar(), LoadPetActionBar(), RemoveSpellFromActionBar(), and SetSpellAutocast().