TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
go_soulwell::go_soulwellAI Struct Reference

Public Member Functions

 go_soulwellAI (GameObject *go)
 
bool GossipHello (Player *player) override
 
- Public Member Functions inherited from GameObjectAI
 GameObjectAI (GameObject *g)
 
virtual ~GameObjectAI ()
 
virtual void UpdateAI (uint32)
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void DoAction (int32)
 
virtual void SetGUID (uint64, int32)
 
virtual uint64 GetGUID (int32) const
 
virtual bool GossipSelect (Player *, uint32, uint32)
 
virtual bool GossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual bool QuestAccept (Player *, Quest const *)
 
virtual bool QuestReward (Player *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *)
 
virtual void Destroyed (Player *, 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 OnStateChanged (uint32, Unit *)
 
virtual void EventInform (uint32)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

go_soulwell::go_soulwellAI::go_soulwellAI ( GameObject go)
inline
833  : GameObjectAI(go)
834  {
835  }
GameObjectAI(GameObject *g)
Definition: GameObjectAI.h:34

Member Function Documentation

bool go_soulwell::go_soulwellAI::GossipHello ( Player player)
inlineoverridevirtual

Due to the fact that this GameObject triggers CMSG_GAMEOBJECT_USE and CMSG_GAMEOBJECT_REPORT_USE, this GossipHello hook is called twice. The script's handling is fine as it won't remove two charges on the well. We have to find how to segregate REPORT_USE and USE.

Reimplemented from GameObjectAI.

842  {
843  Unit* owner = go->GetOwner();
844  if (!owner || owner->GetTypeId() != TYPEID_PLAYER || !player->IsInSameRaidWith(owner->ToPlayer()))
845  return true;
846  return false;
847  }
Unit * GetOwner() const
Definition: GameObject.cpp:1009
Player * ToPlayer()
Definition: Object.h:191
TypeID GetTypeId() const
Definition: Object.h:113
Definition: ObjectGuid.h:33
GameObject *const go
Definition: GameObjectAI.h:32
Definition: Unit.h:1305

+ Here is the call graph for this function:


The documentation for this struct was generated from the following file: