TrinityCore
Loading...
Searching...
No Matches
SimpleCharmedPlayerAI Class Reference

#include <PlayerAI.h>

+ Inheritance diagram for SimpleCharmedPlayerAI:

Public Member Functions

 SimpleCharmedPlayerAI (Player *player)
 
void UpdateAI (uint32 diff) override
 
void OnCharmed (bool isNew) override
 
- Public Member Functions inherited from PlayerAI
 PlayerAI (Player *player)
 
CreatureGetCharmer () const
 
uint8 GetSpec (Player const *who=nullptr) const
 
bool IsHealer (Player const *who=nullptr) const
 
bool IsRangedAttacker (Player const *who=nullptr) const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual void AttackStart (Unit *)
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 offset, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 
virtual void JustExitedCombat ()
 
virtual void OnDespawn ()
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellInfo const *)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastSelf (uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastVictim (uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastAOE (uint32 spellId, CastSpellExtraArgs const &args={})
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
virtual bool ShouldSparWith (Unit const *) const
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
virtual void OnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Protected Member Functions

bool CanAIAttack (Unit const *who) const override
 
UnitSelectAttackTarget () const override
 
- Protected Member Functions inherited from PlayerAI
void SetIsRangedAttacker (bool state)
 
TargetedSpell VerifySpellCast (uint32 spellId, Unit *target)
 
TargetedSpell VerifySpellCast (uint32 spellId, SpellTarget target)
 
template<typename T >
void VerifyAndPushSpellCast (PossibleSpellVector &spells, uint32 spellId, T target, uint32 weight)
 
TargetedSpell SelectSpellCast (PossibleSpellVector &spells)
 
void DoCastAtTarget (TargetedSpell spell)
 
void DoRangedAttackIfReady ()
 
void DoAutoAttackIfReady ()
 
void CancelAllShapeshifts ()
 

Private Member Functions

TargetedSpell SelectAppropriateCastForSpec ()
 

Private Attributes

uint32 _castCheckTimer
 
bool _chaseCloser
 
bool _forceFacing
 
bool _isFollowing
 

Additional Inherited Members

- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Types inherited from PlayerAI
enum  SpellTarget { TARGET_NONE , TARGET_VICTIM , TARGET_CHARMER , TARGET_SELF }
 
typedef std::pair< TargetedSpell, uint32PossibleSpell
 
typedef std::vector< PossibleSpellPossibleSpellVector
 
- Protected Attributes inherited from PlayerAI
Player *const me
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Definition at line 95 of file PlayerAI.h.

Constructor & Destructor Documentation

◆ SimpleCharmedPlayerAI()

SimpleCharmedPlayerAI::SimpleCharmedPlayerAI ( Player player)
inline

Definition at line 98 of file PlayerAI.h.

Member Function Documentation

◆ CanAIAttack()

bool SimpleCharmedPlayerAI::CanAIAttack ( Unit const *  who) const
overrideprotectedvirtual

Reimplemented from UnitAI.

Definition at line 625 of file PlayerAI.cpp.

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

◆ OnCharmed()

void SimpleCharmedPlayerAI::OnCharmed ( bool  isNew)
overridevirtual

Reimplemented from UnitAI.

Definition at line 1261 of file PlayerAI.cpp.

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

◆ SelectAppropriateCastForSpec()

PlayerAI::TargetedSpell SimpleCharmedPlayerAI::SelectAppropriateCastForSpec ( )
private

Definition at line 646 of file PlayerAI.cpp.

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

◆ SelectAttackTarget()

Unit * SimpleCharmedPlayerAI::SelectAttackTarget ( ) const
overrideprotectedvirtual

Reimplemented from PlayerAI.

Definition at line 635 of file PlayerAI.cpp.

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

◆ UpdateAI()

void SimpleCharmedPlayerAI::UpdateAI ( uint32  diff)
overridevirtual

Implements UnitAI.

Definition at line 1155 of file PlayerAI.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _castCheckTimer

uint32 SimpleCharmedPlayerAI::_castCheckTimer
private

Definition at line 108 of file PlayerAI.h.

◆ _chaseCloser

bool SimpleCharmedPlayerAI::_chaseCloser
private

Definition at line 109 of file PlayerAI.h.

◆ _forceFacing

bool SimpleCharmedPlayerAI::_forceFacing
private

Definition at line 110 of file PlayerAI.h.

◆ _isFollowing

bool SimpleCharmedPlayerAI::_isFollowing
private

Definition at line 111 of file PlayerAI.h.


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