TrinityCore
SmartGameObjectAI Class Reference

#include <SmartAI.h>

+ Inheritance diagram for SmartGameObjectAI:

Public Member Functions

 SmartGameObjectAI (GameObject *go, uint32 scriptId={})
 
 ~SmartGameObjectAI ()
 
void UpdateAI (uint32 diff) override
 
void InitializeAI () override
 
void Reset () override
 
SmartScriptGetScript ()
 
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
 
bool OnReportUse (Player *player) override
 
void Destroyed (WorldObject *attacker, uint32 eventId) override
 
void SetData (uint32 id, uint32 value, Unit *invoker)
 
void SetData (uint32 id, uint32 value) override
 
void SetTimedActionList (SmartScriptHolder &e, uint32 entry, Unit *invoker)
 
void OnGameEvent (bool start, uint16 eventId) override
 
void OnLootStateChanged (uint32 state, Unit *unit) override
 
void EventInform (uint32 eventId) override
 
void SpellHit (WorldObject *caster, SpellInfo const *spellInfo) override
 
void JustSummoned (Creature *creature) override
 
void SummonedCreatureDies (Creature *summon, Unit *killer) override
 
void SummonedCreatureDespawn (Creature *unit) override
 
void SetGossipReturn (bool val)
 
- Public Member Functions inherited from GameObjectAI
 GameObjectAI (GameObject *go, uint32 scriptId={})
 
virtual ~GameObjectAI ()
 
uint32 GetId () const
 
virtual void UpdateAI (uint32)
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void DoAction (int32)
 
virtual void SetGUID (ObjectGuid const &, int32)
 
virtual ObjectGuid GetGUID (int32) const
 
virtual Optional< QuestGiverStatusGetDialogStatus (Player const *player)
 
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 bool OnReportUse (Player *)
 
virtual void Destroyed (WorldObject *, uint32)
 
virtual void Damaged (WorldObject *, uint32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void OnGameEvent (bool, uint16)
 
virtual void OnLootStateChanged (uint32, Unit *)
 
virtual void OnStateChanged (uint32)
 
virtual void EventInform (uint32)
 
virtual void SpellHit (WorldObject *, SpellInfo const *)
 
virtual void SpellHitTarget (WorldObject *, SpellInfo const *)
 
virtual void JustSummoned (Creature *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual bool OnCapturePointAssaulted (Player *)
 
virtual bool OnCapturePointUpdated (WorldPackets::Battleground::BattlegroundCapturePointState)
 

Static Public Member Functions

static int32 Permissible (GameObject const *)
 
- Static Public Member Functions inherited from GameObjectAI
static int32 Permissible (GameObject const *go)
 

Private Attributes

SmartScript _script
 
bool _gossipReturn
 

Additional Inherited Members

- Protected Attributes inherited from GameObjectAI
GameObject *const me
 

Detailed Description

Definition at line 282 of file SmartAI.h.

Constructor & Destructor Documentation

◆ SmartGameObjectAI()

SmartGameObjectAI::SmartGameObjectAI ( GameObject go,
uint32  scriptId = {} 
)
inline

Definition at line 285 of file SmartAI.h.

◆ ~SmartGameObjectAI()

SmartGameObjectAI::~SmartGameObjectAI ( )
inline

Definition at line 286 of file SmartAI.h.

Member Function Documentation

◆ Destroyed()

void SmartGameObjectAI::Destroyed ( WorldObject attacker,
uint32  eventId 
)
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1058 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ EventInform()

void SmartGameObjectAI::EventInform ( uint32  eventId)
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1083 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ GetScript()

SmartScript * SmartGameObjectAI::GetScript ( )
inline

Definition at line 291 of file SmartAI.h.

+ Here is the caller graph for this function:

◆ InitializeAI()

void SmartGameObjectAI::InitializeAI ( )
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1002 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ JustSummoned()

void SmartGameObjectAI::JustSummoned ( Creature creature)
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1093 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnGameEvent()

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

Reimplemented from GameObjectAI.

Definition at line 1073 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnGossipHello()

bool SmartGameObjectAI::OnGossipHello ( Player player)
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1017 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnGossipSelect()

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

Reimplemented from GameObjectAI.

Definition at line 1025 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnGossipSelectCode()

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

Reimplemented from GameObjectAI.

Definition at line 1033 of file SmartAI.cpp.

◆ OnLootStateChanged()

void SmartGameObjectAI::OnLootStateChanged ( uint32  state,
Unit unit 
)
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1078 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnQuestAccept()

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

Reimplemented from GameObjectAI.

Definition at line 1039 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnQuestReward()

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

Reimplemented from GameObjectAI.

Definition at line 1045 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ OnReportUse()

bool SmartGameObjectAI::OnReportUse ( Player player)
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1050 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ Permissible()

static int32 SmartGameObjectAI::Permissible ( GameObject const *  )
inlinestatic

Definition at line 295 of file SmartAI.h.

◆ Reset()

void SmartGameObjectAI::Reset ( )
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1011 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SetData() [1/2]

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

Reimplemented from GameObjectAI.

Definition at line 308 of file SmartAI.h.

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

◆ SetData() [2/2]

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

Definition at line 1063 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SetGossipReturn()

void SmartGameObjectAI::SetGossipReturn ( bool  val)
inline

Definition at line 326 of file SmartAI.h.

◆ SetTimedActionList()

void SmartGameObjectAI::SetTimedActionList ( SmartScriptHolder e,
uint32  entry,
Unit invoker 
)

Definition at line 1068 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SpellHit()

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

Reimplemented from GameObjectAI.

Definition at line 1088 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SummonedCreatureDespawn()

void SmartGameObjectAI::SummonedCreatureDespawn ( Creature unit)
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 1103 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ SummonedCreatureDies()

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

Reimplemented from GameObjectAI.

Definition at line 1098 of file SmartAI.cpp.

+ Here is the call graph for this function:

◆ UpdateAI()

void SmartGameObjectAI::UpdateAI ( uint32  diff)
overridevirtual

Reimplemented from GameObjectAI.

Definition at line 997 of file SmartAI.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _gossipReturn

bool SmartGameObjectAI::_gossipReturn
private

Definition at line 332 of file SmartAI.h.

◆ _script

SmartScript SmartGameObjectAI::_script
private

Definition at line 329 of file SmartAI.h.


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