Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
SmartGameObjectAI Class Reference

#include <SmartAI.h>

Inheritance diagram for SmartGameObjectAI:
Collaboration diagram for SmartGameObjectAI:

Public Member Functions

void Destroyed (Player *player, uint32 eventId) OVERRIDE
void EventInform (uint32 eventId) OVERRIDE
uint32 GetDialogStatus (Player *) OVERRIDE
SmartScriptGetScript ()
bool GossipHello (Player *player) OVERRIDE
bool GossipSelect (Player *player, uint32 sender, uint32 action) OVERRIDE
bool GossipSelectCode (Player *, uint32, uint32, const char *) OVERRIDE
void InitializeAI () OVERRIDE
void OnGameEvent (bool start, uint16 eventId) OVERRIDE
void OnStateChanged (uint32 state, Unit *unit) OVERRIDE
bool QuestAccept (Player *player, Quest const *quest) OVERRIDE
bool QuestReward (Player *player, Quest const *quest, uint32 opt) OVERRIDE
void Reset () OVERRIDE
void SetData (uint32 id, uint32 value) OVERRIDE
void SetGossipReturn (bool value)
void SetScript9 (SmartScriptHolder &e, uint32 entry, Unit *invoker)
 SmartGameObjectAI (GameObject *g)
void UpdateAI (uint32 diff) OVERRIDE
 ~SmartGameObjectAI ()
Public Member Functions inherited from GameObjectAI
virtual void DoAction (int32)
 GameObjectAI (GameObject *g)
virtual uint32 GetData (uint32) const
virtual uint64 GetData64 (uint32) const
virtual uint64 GetGUID (int32) const
virtual void SetData64 (uint32, uint64)
virtual void SetGUID (uint64, int32)
virtual ~GameObjectAI ()

Static Public Member Functions

static int Permissible (const GameObject *g)
Static Public Member Functions inherited from GameObjectAI
static int Permissible (GameObject const *go)

Protected Attributes

bool _gossipReturn
GameObject *const go
SmartScript mScript
Protected Attributes inherited from GameObjectAI
GameObject *const go

Detailed Description

Definition at line 228 of file SmartAI.h.

Constructor & Destructor Documentation

◆ SmartGameObjectAI()

SmartGameObjectAI::SmartGameObjectAI ( GameObject * g)
inline

Definition at line 231 of file SmartAI.h.

References _gossipReturn, GameObjectAI::GameObjectAI(), and go.

◆ ~SmartGameObjectAI()

SmartGameObjectAI::~SmartGameObjectAI ( )
inline

Definition at line 232 of file SmartAI.h.

Member Function Documentation

◆ Destroyed()

void SmartGameObjectAI::Destroyed ( Player * player,
uint32 eventId )
virtual

Reimplemented from GameObjectAI.

Definition at line 871 of file SmartAI.cpp.

References GetScript(), go, SmartScript::ProcessEventsFor(), and SMART_EVENT_DEATH.

◆ EventInform()

void SmartGameObjectAI::EventInform ( uint32 eventId)
virtual

Reimplemented from GameObjectAI.

Definition at line 898 of file SmartAI.cpp.

References GetScript(), SmartScript::ProcessEventsFor(), and SMART_EVENT_GO_EVENT_INFORM.

◆ GetDialogStatus()

uint32 SmartGameObjectAI::GetDialogStatus ( Player * )
virtual

Reimplemented from GameObjectAI.

Definition at line 868 of file SmartAI.cpp.

◆ GetScript()

◆ GossipHello()

bool SmartGameObjectAI::GossipHello ( Player * player)
virtual

◆ GossipSelect()

bool SmartGameObjectAI::GossipSelect ( Player * player,
uint32 sender,
uint32 action )
virtual

Reimplemented from GameObjectAI.

Definition at line 841 of file SmartAI.cpp.

References GetScript(), go, SmartScript::ProcessEventsFor(), and SMART_EVENT_GOSSIP_SELECT.

◆ GossipSelectCode()

bool SmartGameObjectAI::GossipSelectCode ( Player * ,
uint32 ,
uint32 ,
const char *  )
virtual

Reimplemented from GameObjectAI.

Definition at line 848 of file SmartAI.cpp.

◆ InitializeAI()

void SmartGameObjectAI::InitializeAI ( )
virtual

◆ OnGameEvent()

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

◆ OnStateChanged()

void SmartGameObjectAI::OnStateChanged ( uint32 state,
Unit * unit )
virtual

Reimplemented from GameObjectAI.

Definition at line 893 of file SmartAI.cpp.

References GetScript(), SmartScript::ProcessEventsFor(), and SMART_EVENT_GO_STATE_CHANGED.

◆ Permissible()

int SmartGameObjectAI::Permissible ( const GameObject * g)
static

Definition at line 807 of file SmartAI.cpp.

References GameObject::GetAIName(), PERMIT_BASE_NO, and PERMIT_BASE_SPECIAL.

◆ QuestAccept()

bool SmartGameObjectAI::QuestAccept ( Player * player,
Quest const * quest )
virtual

Reimplemented from GameObjectAI.

Definition at line 854 of file SmartAI.cpp.

References Quest::GetQuestId(), GetScript(), go, SmartScript::ProcessEventsFor(), and SMART_EVENT_ACCEPTED_QUEST.

◆ QuestReward()

bool SmartGameObjectAI::QuestReward ( Player * player,
Quest const * quest,
uint32 opt )
virtual

Reimplemented from GameObjectAI.

Definition at line 861 of file SmartAI.cpp.

References Quest::GetQuestId(), GetScript(), go, SmartScript::ProcessEventsFor(), and SMART_EVENT_REWARD_QUEST.

◆ Reset()

void SmartGameObjectAI::Reset ( )
virtual

Reimplemented from GameObjectAI.

Definition at line 826 of file SmartAI.cpp.

References GetScript(), and SmartScript::OnReset().

◆ SetData()

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

Reimplemented from GameObjectAI.

Definition at line 876 of file SmartAI.cpp.

References GetScript(), SmartScript::ProcessEventsFor(), and SMART_EVENT_DATA_SET.

◆ SetGossipReturn()

void SmartGameObjectAI::SetGossipReturn ( bool value)
inline

Definition at line 243 of file SmartAI.h.

References _gossipReturn.

◆ SetScript9()

void SmartGameObjectAI::SetScript9 ( SmartScriptHolder & e,
uint32 entry,
Unit * invoker )

◆ UpdateAI()

void SmartGameObjectAI::UpdateAI ( uint32 diff)
virtual

Reimplemented from GameObjectAI.

Definition at line 814 of file SmartAI.cpp.

References GetScript(), and SmartScript::OnUpdate().

Member Data Documentation

◆ _gossipReturn

bool SmartGameObjectAI::_gossipReturn
protected

Definition at line 257 of file SmartAI.h.

Referenced by GossipHello(), SetGossipReturn(), and SmartGameObjectAI().

◆ go

GameObject* const SmartGameObjectAI::go
protected

◆ mScript

SmartScript SmartGameObjectAI::mScript
protected

Definition at line 256 of file SmartAI.h.

Referenced by GetScript().


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