TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
go_ossirian_crystal Class Reference

Public Member Functions

 go_ossirian_crystal ()
 
bool OnGossipHello (Player *player, GameObject *) override
 
- Public Member Functions inherited from GameObjectScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, GameObject *)
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, GameObject *, Quest const *)
 
virtual bool OnQuestReward (Player *, GameObject *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, GameObject *)
 
virtual void OnDestroyed (GameObject *, Player *)
 
virtual void OnDamaged (GameObject *, Player *)
 
virtual void OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
virtual GameObjectAIGetAI (GameObject *) const
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 
- Public Member Functions inherited from UpdatableScript< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from GameObjectScript
 GameObjectScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

go_ossirian_crystal::go_ossirian_crystal ( )
inline
283 : GameObjectScript("go_ossirian_crystal") { }
GameObjectScript(const char *name)
Definition: ScriptMgr.cpp:1592

Member Function Documentation

bool go_ossirian_crystal::OnGossipHello ( Player player,
GameObject  
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

286  {
287  InstanceScript* Instance = player->GetInstanceScript();
288  if (!Instance)
289  return false;
290 
291  Creature* Ossirian = player->FindNearestCreature(NPC_OSSIRIAN, 30.0f);
292  if (!Ossirian || Instance->GetBossState(DATA_OSSIRIAN) != IN_PROGRESS)
293  return false;
294 
295  Ossirian->AI()->DoAction(ACTION_TRIGGER_WEAKNESS);
296  return true;
297  }
Definition: ruins_of_ahnqiraj.h:30
Definition: boss_ossirian.cpp:49
Definition: Creature.h:467
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
Definition: ruins_of_ahnqiraj.h:43
Definition: InstanceScript.h:59
CreatureAI * AI() const
Definition: Creature.h:525
virtual void DoAction(int32)
Definition: UnitAI.h:138
Definition: InstanceScript.h:141
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227

+ Here is the call graph for this function:


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