TrinityCore
SmartAI Class Reference

#include <SmartAI.h>

+ Inheritance diagram for SmartAI:

Public Member Functions

 ~SmartAI ()
 
 SmartAI (Creature *creature, uint32 scriptId={})
 
bool IsAIControlled () const
 
void StartPath (uint32 pathId=0, bool repeat=false, Unit *invoker=nullptr, uint32 nodeId=0)
 
WaypointPath const * LoadPath (uint32 entry)
 
void PausePath (uint32 delay, bool forced=false)
 
bool CanResumePath ()
 
void StopPath (uint32 DespawnTime=0, uint32 quest=0, bool fail=false)
 
void EndPath (bool fail=false)
 
void ResumePath ()
 
bool HasEscortState (uint32 escortState) const
 
void AddEscortState (uint32 escortState)
 
void RemoveEscortState (uint32 escortState)
 
void SetCombatMove (bool on, bool stopMoving=false)
 
bool CanCombatMove () const
 
void SetFollow (Unit *target, float dist=0.0f, float angle=0.0f, uint32 credit=0, uint32 end=0, uint32 creditType=0)
 
void StopFollow (bool complete)
 
bool IsEscortInvokerInRange ()
 
void WaypointReached (uint32 nodeId, uint32 pathId) override
 
void WaypointPathEnded (uint32 nodeId, uint32 pathId) override
 
void SetTimedActionList (SmartScriptHolder &e, uint32 entry, Unit *invoker, uint32 startFromEventId=0)
 
SmartScriptGetScript ()
 
void JustReachedHome () override
 
void JustEngagedWith (Unit *enemy) override
 
void EnterEvadeMode (EvadeReason why) override
 
void JustDied (Unit *killer) override
 
void KilledUnit (Unit *victim) override
 
void JustSummoned (Creature *creature) override
 
void SummonedCreatureDies (Creature *summon, Unit *killer) override
 
void AttackStart (Unit *who) override
 == Triggered Actions Requested ================== More...
 
void MoveInLineOfSight (Unit *who) override
 
void SpellHit (WorldObject *caster, SpellInfo const *spellInfo) override
 
void SpellHitTarget (WorldObject *target, SpellInfo const *spellInfo) override
 
void OnSpellCast (SpellInfo const *spellInfo) override
 
void OnSpellFailed (SpellInfo const *spellInfo) override
 
void OnSpellStart (SpellInfo const *spellInfo) override
 
void DamageTaken (Unit *doneBy, uint32 &damage, DamageEffectType, SpellInfo const *) override
 
void HealReceived (Unit *doneBy, uint32 &addhealth) override
 
void UpdateAI (uint32 diff) override
 
void ReceiveEmote (Player *player, uint32 textEmote) override
 
void MovementInform (uint32 MovementType, uint32 Data) override
 
void IsSummonedBy (WorldObject *summoner) override
 
void DamageDealt (Unit *doneTo, uint32 &damage, DamageEffectType) override
 
void SummonedCreatureDespawn (Creature *unit) override
 
void CorpseRemoved (uint32 &respawnDelay) override
 == State checks ================================= More...
 
void OnDespawn () override
 
void PassengerBoarded (Unit *who, int8 seatId, bool apply) override
 == Fields ======================================= More...
 
void InitializeAI () override
 
void JustAppeared () override
 
void OnCharmed (bool isNew) override
 
void DoAction (int32 param=0) override
 
uint32 GetData (uint32 id=0) const override
 
void SetData (uint32 id, uint32 value) override
 
void SetData (uint32 id, uint32 value, Unit *invoker)
 
void SetGUID (ObjectGuid const &guid, int32 id=0) override
 
ObjectGuid GetGUID (int32 id=0) const override
 
void SetRun (bool run=true)
 
void SetDisableGravity (bool disable=true)
 
void SetEvadeDisabled (bool disable=true)
 
void SetInvincibilityHpLevel (uint32 level)
 
bool OnGossipHello (Player *player) override
 
bool OnGossipSelect (Player *player, uint32 menuId, uint32 gossipListId) override
 
bool OnGossipSelectCode (Player *player, uint32 menuId, uint32 gossipListId, char const *code) override
 
void OnQuestAccept (Player *player, Quest const *quest) override
 
void OnQuestReward (Player *player, Quest const *quest, LootItemType type, uint32 opt) override
 
void OnGameEvent (bool start, uint16 eventId) override
 
void SetDespawnTime (uint32 t)
 
void StartDespawn ()
 
void OnSpellClick (Unit *clicker, bool spellClickHandled) override
 
void SetWPPauseTimer (uint32 time)
 
void SetGossipReturn (bool val)
 
void SetEscortQuest (uint32 questID)
 
- Public Member Functions inherited from CreatureAI
 CreatureAI (Creature *creature, uint32 scriptId={})
 
virtual ~CreatureAI ()
 
uint32 GetId () const
 
bool IsEngaged () const
 
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual void EnterEvadeMode (EvadeReason why=EvadeReason::Other)
 
void JustEnteredCombat (Unit *) override
 
virtual void JustStartedThreateningMe (Unit *who)
 
virtual void JustEngagedWith (Unit *)
 
virtual void OnHealthDepleted (Unit *, bool)
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void JustSummonedGameobject (GameObject *)
 
virtual void SummonedGameobjectDespawn (GameObject *)
 
virtual void JustRegisteredDynObject (DynamicObject *)
 
virtual void JustUnregisteredDynObject (DynamicObject *)
 
virtual void JustRegisteredAreaTrigger (AreaTrigger *)
 
virtual void JustUnregisteredAreaTrigger (AreaTrigger *)
 
virtual void SpellHit (WorldObject *, SpellInfo const *)
 
virtual void SpellHitTarget (WorldObject *, SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual bool IsEscorted () const
 
virtual void JustAppeared ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool isNew) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat ()
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void AttackStart (Unit *victim) override
 == Triggered Actions Requested ================== More...
 
virtual void CorpseRemoved (uint32 &)
 == State checks ================================= More...
 
virtual Optional< QuestGiverStatusGetDialogStatus (Player const *player)
 == Gossip system ================================ More...
 
virtual bool OnGossipHello (Player *)
 
virtual bool OnGossipSelect (Player *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void OnQuestAccept (Player *, Quest const *)
 
virtual void OnQuestReward (Player *, Quest const *, LootItemType, uint32)
 
virtual void WaypointStarted (uint32, uint32)
 == Waypoints system ============================= More...
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual PlayerAIGetAIForCharmedPlayer (Player *)
 
int32 VisualizeBoundary (Seconds duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *victim)
 
virtual void UpdateAI (uint32 diff)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool isNew)
 
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={})
 
bool DoSpellAttackIfReady (uint32 spellId)
 
virtual void OnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Static Public Member Functions

static int32 Permissible (Creature const *)
 
- Static Public Member Functions inherited from CreatureAI
static void DoZoneInCombat (Creature *creature)
 
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 

Private Member Functions

bool AssistPlayerInCombatAgainst (Unit *who)
 
void ReturnToLastOOCPos ()
 
void CheckConditions (uint32 diff)
 
void UpdatePath (uint32 diff)
 
void UpdateFollow (uint32 diff)
 
void UpdateDespawn (uint32 diff)
 

Private Attributes

SmartScript _script
 
bool _charmed
 
uint32 _followCreditType
 
uint32 _followArrivedTimer
 
uint32 _followCredit
 
uint32 _followArrivedEntry
 
ObjectGuid _followGUID
 
float _followDistance
 
float _followAngle
 
uint32 _escortState
 
uint32 _escortNPCFlags
 
uint32 _escortInvokerCheckTimer
 
uint32 _currentWaypointNodeId
 
bool _waypointReached
 
uint32 _waypointPauseTimer
 
bool _waypointPauseForced
 
bool _repeatWaypointPath
 
bool _OOCReached
 
bool _waypointPathEnded
 
bool _run
 
bool _evadeDisabled
 
bool _canCombatMove
 
uint32 _invincibilityHPLevel
 
uint32 _despawnTime
 
uint32 _despawnState
 
bool _vehicleConditions
 
uint32 _vehicleConditionsTimer
 
bool _gossipReturn
 
uint32 _escortQuestId
 

Additional Inherited Members

- Static Public Attributes inherited from UnitAI
static std::unordered_map< std::pair< uint32, Difficulty >, AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
CreatureDoSummon (uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EvadeReason::Other)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Definition at line 39 of file SmartAI.h.

Constructor & Destructor Documentation

◆ ~SmartAI()

SmartAI::~SmartAI ( )
inline

Definition at line 42 of file SmartAI.h.

◆ SmartAI()

SmartAI::SmartAI ( Creature creature,
uint32  scriptId = {} 
)
explicit

Definition at line 35 of file SmartAI.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddEscortState()

void SmartAI::AddEscortState ( uint32  escortState)
inline

Definition at line 63 of file SmartAI.h.

+ Here is the caller graph for this function:

◆ AssistPlayerInCombatAgainst()

bool SmartAI::AssistPlayerInCombatAgainst ( Unit who)
private

Definition at line 450 of file SmartAI.cpp.

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

◆ AttackStart()

void SmartAI::AttackStart ( Unit victim)
overridevirtual

== Triggered Actions Requested ==================

Reimplemented from CreatureAI.

Definition at line 571 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ CanCombatMove()

bool SmartAI::CanCombatMove ( ) const
inline

Definition at line 72 of file SmartAI.h.

◆ CanResumePath()

bool SmartAI::CanResumePath ( )

Definition at line 128 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ CheckConditions()

void SmartAI::CheckConditions ( uint32  diff)
private

Definition at line 877 of file SmartAI.cpp.

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

◆ CorpseRemoved()

void SmartAI::CorpseRemoved ( uint32 )
overridevirtual

== State checks =================================

Reimplemented from CreatureAI.

Definition at line 655 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ DamageDealt()

void SmartAI::DamageDealt ( Unit doneTo,
uint32 damage,
DamageEffectType   
)
overridevirtual

Reimplemented from UnitAI.

Definition at line 645 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ DamageTaken()

void SmartAI::DamageTaken ( Unit doneBy,
uint32 damage,
DamageEffectType  ,
SpellInfo const *   
)
overridevirtual

Reimplemented from UnitAI.

Definition at line 619 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ DoAction()

void SmartAI::DoAction ( int32  param = 0)
overridevirtual

Reimplemented from UnitAI.

Definition at line 709 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ EndPath()

void SmartAI::EndPath ( bool  fail = false)

Definition at line 178 of file SmartAI.cpp.

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

◆ EnterEvadeMode()

void SmartAI::EnterEvadeMode ( EvadeReason  why)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 388 of file SmartAI.cpp.

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

◆ GetData()

uint32 SmartAI::GetData ( uint32  id = 0) const
overridevirtual

Reimplemented from UnitAI.

Definition at line 714 of file SmartAI.cpp.

◆ GetGUID()

ObjectGuid SmartAI::GetGUID ( int32  id = 0) const
overridevirtual

Reimplemented from UnitAI.

Definition at line 726 of file SmartAI.cpp.

◆ GetScript()

SmartScript * SmartAI::GetScript ( )
inline

Definition at line 84 of file SmartAI.h.

+ Here is the caller graph for this function:

◆ HasEscortState()

bool SmartAI::HasEscortState ( uint32  escortState) const
inline

Definition at line 59 of file SmartAI.h.

+ Here is the caller graph for this function:

◆ HealReceived()

void SmartAI::HealReceived ( Unit doneBy,
uint32 addhealth 
)
overridevirtual

Reimplemented from UnitAI.

Definition at line 630 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ InitializeAI()

void SmartAI::InitializeAI ( )
overridevirtual

Reimplemented from UnitAI.

Definition at line 493 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ IsAIControlled()

bool SmartAI::IsAIControlled ( ) const

Definition at line 43 of file SmartAI.cpp.

+ Here is the caller graph for this function:

◆ IsEscortInvokerInRange()

bool SmartAI::IsEscortInvokerInRange ( )

Definition at line 295 of file SmartAI.cpp.

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

◆ IsSummonedBy()

void SmartAI::IsSummonedBy ( WorldObject summoner)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 640 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ JustAppeared()

void SmartAI::JustAppeared ( )
overridevirtual

Reimplemented from CreatureAI.

Definition at line 509 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ JustDied()

void SmartAI::JustDied ( Unit killer)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 548 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ JustEngagedWith()

void SmartAI::JustEngagedWith ( Unit enemy)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 540 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ JustReachedHome()

void SmartAI::JustReachedHome ( )
overridevirtual

Reimplemented from CreatureAI.

Definition at line 520 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ JustSummoned()

void SmartAI::JustSummoned ( Creature creature)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 561 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ KilledUnit()

void SmartAI::KilledUnit ( Unit victim)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 556 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ LoadPath()

WaypointPath const * SmartAI::LoadPath ( uint32  entry)

Definition at line 77 of file SmartAI.cpp.

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

◆ MoveInLineOfSight()

void SmartAI::MoveInLineOfSight ( Unit who)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 434 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ MovementInform()

void SmartAI::MovementInform ( uint32  MovementType,
uint32  Data 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 374 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnCharmed()

void SmartAI::OnCharmed ( bool  isNew)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 670 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnDespawn()

void SmartAI::OnDespawn ( )
overridevirtual

Reimplemented from UnitAI.

Definition at line 660 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnGameEvent()

void SmartAI::OnGameEvent ( bool  start,
uint16  eventId 
)
overridevirtual

Reimplemented from UnitAI.

Definition at line 864 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnGossipHello()

bool SmartAI::OnGossipHello ( Player player)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 747 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnGossipSelect()

bool SmartAI::OnGossipSelect ( Player player,
uint32  menuId,
uint32  gossipListId 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 754 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnGossipSelectCode()

bool SmartAI::OnGossipSelectCode ( Player player,
uint32  menuId,
uint32  gossipListId,
char const *  code 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 761 of file SmartAI.cpp.

◆ OnQuestAccept()

void SmartAI::OnQuestAccept ( Player player,
Quest const *  quest 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 766 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnQuestReward()

void SmartAI::OnQuestReward ( Player player,
Quest const *  quest,
LootItemType  type,
uint32  opt 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 771 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnSpellCast()

void SmartAI::OnSpellCast ( SpellInfo const *  spellInfo)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 604 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnSpellClick()

void SmartAI::OnSpellClick ( Unit clicker,
bool  spellClickHandled 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 869 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnSpellFailed()

void SmartAI::OnSpellFailed ( SpellInfo const *  spellInfo)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 609 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnSpellStart()

void SmartAI::OnSpellStart ( SpellInfo const *  spellInfo)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 614 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ PassengerBoarded()

void SmartAI::PassengerBoarded ( Unit ,
int8  ,
bool   
)
overridevirtual

== Fields =======================================

Reimplemented from CreatureAI.

Definition at line 665 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ PausePath()

void SmartAI::PausePath ( uint32  delay,
bool  forced = false 
)

Definition at line 93 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ Permissible()

static int32 SmartAI::Permissible ( Creature const *  )
inlinestatic

Definition at line 46 of file SmartAI.h.

◆ ReceiveEmote()

void SmartAI::ReceiveEmote ( Player player,
uint32  textEmote 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 635 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ RemoveEscortState()

void SmartAI::RemoveEscortState ( uint32  escortState)
inline

Definition at line 67 of file SmartAI.h.

+ Here is the caller graph for this function:

◆ ResumePath()

void SmartAI::ResumePath ( )

Definition at line 252 of file SmartAI.cpp.

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

◆ ReturnToLastOOCPos()

void SmartAI::ReturnToLastOOCPos ( )
private

Definition at line 266 of file SmartAI.cpp.

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

◆ SetCombatMove()

void SmartAI::SetCombatMove ( bool  on,
bool  stopMoving = false 
)

Definition at line 776 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SetData() [1/2]

void SmartAI::SetData ( uint32  id,
uint32  value 
)
inlineoverridevirtual

Reimplemented from UnitAI.

Definition at line 180 of file SmartAI.h.

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

◆ SetData() [2/2]

void SmartAI::SetData ( uint32  id,
uint32  value,
Unit invoker 
)

Definition at line 719 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SetDespawnTime()

void SmartAI::SetDespawnTime ( uint32  t)
inline

Definition at line 208 of file SmartAI.h.

+ Here is the caller graph for this function:

◆ SetDisableGravity()

void SmartAI::SetDisableGravity ( bool  disable = true)

Definition at line 737 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SetEscortQuest()

void SmartAI::SetEscortQuest ( uint32  questID)
inline

Definition at line 230 of file SmartAI.h.

◆ SetEvadeDisabled()

void SmartAI::SetEvadeDisabled ( bool  disable = true)

Definition at line 742 of file SmartAI.cpp.

◆ SetFollow()

void SmartAI::SetFollow ( Unit target,
float  dist = 0.0f,
float  angle = 0.0f,
uint32  credit = 0,
uint32  end = 0,
uint32  creditType = 0 
)

Definition at line 811 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SetGossipReturn()

void SmartAI::SetGossipReturn ( bool  val)
inline

Definition at line 225 of file SmartAI.h.

◆ SetGUID()

void SmartAI::SetGUID ( ObjectGuid const &  guid,
int32  id = 0 
)
overridevirtual

Reimplemented from UnitAI.

Definition at line 724 of file SmartAI.cpp.

◆ SetInvincibilityHpLevel()

void SmartAI::SetInvincibilityHpLevel ( uint32  level)
inline

Definition at line 196 of file SmartAI.h.

+ Here is the caller graph for this function:

◆ SetRun()

void SmartAI::SetRun ( bool  run = true)

Definition at line 731 of file SmartAI.cpp.

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

◆ SetTimedActionList()

void SmartAI::SetTimedActionList ( SmartScriptHolder e,
uint32  entry,
Unit invoker,
uint32  startFromEventId = 0 
)

Definition at line 859 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SetWPPauseTimer()

void SmartAI::SetWPPauseTimer ( uint32  time)
inline

Definition at line 220 of file SmartAI.h.

◆ SpellHit()

void SmartAI::SpellHit ( WorldObject caster,
SpellInfo const *  spellInfo 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 594 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SpellHitTarget()

void SmartAI::SpellHitTarget ( WorldObject target,
SpellInfo const *  spellInfo 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 599 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ StartDespawn()

void SmartAI::StartDespawn ( )
inline

Definition at line 213 of file SmartAI.h.

+ Here is the caller graph for this function:

◆ StartPath()

void SmartAI::StartPath ( uint32  pathId = 0,
bool  repeat = false,
Unit invoker = nullptr,
uint32  nodeId = 0 
)

Definition at line 48 of file SmartAI.cpp.

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

◆ StopFollow()

void SmartAI::StopFollow ( bool  complete)

Definition at line 830 of file SmartAI.cpp.

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

◆ StopPath()

void SmartAI::StopPath ( uint32  DespawnTime = 0,
uint32  quest = 0,
bool  fail = false 
)

Definition at line 139 of file SmartAI.cpp.

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

◆ SummonedCreatureDespawn()

void SmartAI::SummonedCreatureDespawn ( Creature unit)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 650 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SummonedCreatureDies()

void SmartAI::SummonedCreatureDies ( Creature summon,
Unit killer 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 566 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ UpdateAI()

void SmartAI::UpdateAI ( uint32  diff)
overridevirtual

Implements UnitAI.

Definition at line 275 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ UpdateDespawn()

void SmartAI::UpdateDespawn ( uint32  diff)
private

Definition at line 977 of file SmartAI.cpp.

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

◆ UpdateFollow()

void SmartAI::UpdateFollow ( uint32  diff)
private

Definition at line 958 of file SmartAI.cpp.

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

◆ UpdatePath()

void SmartAI::UpdatePath ( uint32  diff)
private

Definition at line 906 of file SmartAI.cpp.

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

◆ WaypointPathEnded()

void SmartAI::WaypointPathEnded ( uint32  nodeId,
uint32  pathId 
)
overridevirtual
Todo:
move escort related logic

Reimplemented from CreatureAI.

Definition at line 365 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ WaypointReached()

void SmartAI::WaypointReached ( uint32  nodeId,
uint32  pathId 
)
overridevirtual

Reimplemented from CreatureAI.

Definition at line 336 of file SmartAI.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _canCombatMove

bool SmartAI::_canCombatMove
private

Definition at line 266 of file SmartAI.h.

◆ _charmed

bool SmartAI::_charmed
private

Definition at line 244 of file SmartAI.h.

◆ _currentWaypointNodeId

uint32 SmartAI::_currentWaypointNodeId
private

Definition at line 256 of file SmartAI.h.

◆ _despawnState

uint32 SmartAI::_despawnState
private

Definition at line 270 of file SmartAI.h.

◆ _despawnTime

uint32 SmartAI::_despawnTime
private

Definition at line 269 of file SmartAI.h.

◆ _escortInvokerCheckTimer

uint32 SmartAI::_escortInvokerCheckTimer
private

Definition at line 255 of file SmartAI.h.

◆ _escortNPCFlags

uint32 SmartAI::_escortNPCFlags
private

Definition at line 254 of file SmartAI.h.

◆ _escortQuestId

uint32 SmartAI::_escortQuestId
private

Definition at line 279 of file SmartAI.h.

◆ _escortState

uint32 SmartAI::_escortState
private

Definition at line 253 of file SmartAI.h.

◆ _evadeDisabled

bool SmartAI::_evadeDisabled
private

Definition at line 265 of file SmartAI.h.

◆ _followAngle

float SmartAI::_followAngle
private

Definition at line 251 of file SmartAI.h.

◆ _followArrivedEntry

uint32 SmartAI::_followArrivedEntry
private

Definition at line 248 of file SmartAI.h.

◆ _followArrivedTimer

uint32 SmartAI::_followArrivedTimer
private

Definition at line 246 of file SmartAI.h.

◆ _followCredit

uint32 SmartAI::_followCredit
private

Definition at line 247 of file SmartAI.h.

◆ _followCreditType

uint32 SmartAI::_followCreditType
private

Definition at line 245 of file SmartAI.h.

◆ _followDistance

float SmartAI::_followDistance
private

Definition at line 250 of file SmartAI.h.

◆ _followGUID

ObjectGuid SmartAI::_followGUID
private

Definition at line 249 of file SmartAI.h.

◆ _gossipReturn

bool SmartAI::_gossipReturn
private

Definition at line 277 of file SmartAI.h.

◆ _invincibilityHPLevel

uint32 SmartAI::_invincibilityHPLevel
private

Definition at line 267 of file SmartAI.h.

◆ _OOCReached

bool SmartAI::_OOCReached
private

Definition at line 261 of file SmartAI.h.

◆ _repeatWaypointPath

bool SmartAI::_repeatWaypointPath
private

Definition at line 260 of file SmartAI.h.

◆ _run

bool SmartAI::_run
private

Definition at line 264 of file SmartAI.h.

◆ _script

SmartScript SmartAI::_script
private

Definition at line 243 of file SmartAI.h.

◆ _vehicleConditions

bool SmartAI::_vehicleConditions
private

Definition at line 273 of file SmartAI.h.

◆ _vehicleConditionsTimer

uint32 SmartAI::_vehicleConditionsTimer
private

Definition at line 274 of file SmartAI.h.

◆ _waypointPathEnded

bool SmartAI::_waypointPathEnded
private

Definition at line 262 of file SmartAI.h.

◆ _waypointPauseForced

bool SmartAI::_waypointPauseForced
private

Definition at line 259 of file SmartAI.h.

◆ _waypointPauseTimer

uint32 SmartAI::_waypointPauseTimer
private

Definition at line 258 of file SmartAI.h.

◆ _waypointReached

bool SmartAI::_waypointReached
private

Definition at line 257 of file SmartAI.h.


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