AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
go_ossirian_crystal::go_ossirian_crystalAI Struct Reference
Inheritance diagram for go_ossirian_crystal::go_ossirian_crystalAI:
GameObjectAI

Public Member Functions

 go_ossirian_crystalAI (GameObject *go)
 
void SetGUID (ObjectGuid guid, int32 type) override
 
bool GossipHello (Player *, bool reportUse) override
 
void DoAction (int32 action) override
 
- Public Member Functions inherited from GameObjectAI
 GameObjectAI (GameObject *go)
 
virtual ~GameObjectAI ()
 
virtual void UpdateAI (uint32)
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void DoAction (int32)
 
virtual void SetGUID (ObjectGuid, int32)
 
virtual ObjectGuid GetGUID (int32) const
 
virtual bool GossipHello (Player *, bool)
 
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 SetData (uint32, uint32)
 
virtual void OnGameEvent (bool, uint16)
 
virtual void OnStateChanged (uint32, Unit *)
 
virtual void EventInform (uint32)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual void JustSummoned (Creature *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 

Private Attributes

InstanceScript_instance
 
ObjectGuid _triggerGUID
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ go_ossirian_crystalAI()

go_ossirian_crystal::go_ossirian_crystalAI::go_ossirian_crystalAI ( GameObject go)
inline
Definition: GameObjectAI.h:34
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * _instance
Definition: boss_ossirian.cpp:364

Member Function Documentation

◆ DoAction()

void go_ossirian_crystal::go_ossirian_crystalAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from GameObjectAI.

353 {
354 if (action == ACTION_DESPAWN_TRIGGER)
355 {
357 {
358 trigger->DespawnOrUnsummon();
359 }
360 }
361 }
@ ACTION_DESPAWN_TRIGGER
Definition: boss_ossirian.cpp:61
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
GameObject *const me
Definition: GameObjectAI.h:36
Definition: Creature.h:46
ObjectGuid _triggerGUID
Definition: boss_ossirian.cpp:365

References _triggerGUID, ACTION_DESPAWN_TRIGGER, ObjectAccessor::GetCreature(), and GameObjectAI::me.

◆ GossipHello()

bool go_ossirian_crystal::go_ossirian_crystalAI::GossipHello ( Player ,
bool  reportUse 
)
inlineoverridevirtual

Reimplemented from GameObjectAI.

329 {
330 if (reportUse)
331 {
332 if (!_instance)
333 return true;
334
336 if (!ossirian)
337 return true;
338
340 {
341 if (!trigger->HasUnitState(UNIT_STATE_CASTING))
342 {
343 ossirian->AI()->SetGUID(me->GetGUID(), ACTION_TRIGGER_WEAKNESS);
344 trigger->CastSpell(trigger, spellWeakness[urand(0, 4)], false);
345 }
346 }
347 }
348
349 return false;
350 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ UNIT_STATE_CASTING
Definition: UnitDefines.h:164
@ DATA_OSSIRIAN
Definition: ruins_of_ahnqiraj.h:33
@ ACTION_TRIGGER_WEAKNESS
Definition: boss_ossirian.cpp:60
uint32 const spellWeakness[NUM_WEAKNESS]
Definition: boss_ossirian.cpp:101
virtual void SetGUID(ObjectGuid, int32=0)
Definition: UnitAI.h:215
CreatureAI * AI() const
Definition: Creature.h:143
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:100

References _instance, _triggerGUID, ACTION_TRIGGER_WEAKNESS, Creature::AI(), DATA_OSSIRIAN, InstanceScript::GetCreature(), ObjectAccessor::GetCreature(), Object::GetGUID(), GameObjectAI::me, UnitAI::SetGUID(), spellWeakness, UNIT_STATE_CASTING, and urand().

◆ SetGUID()

void go_ossirian_crystal::go_ossirian_crystalAI::SetGUID ( ObjectGuid  guid,
int32  type 
)
inlineoverridevirtual

Reimplemented from GameObjectAI.

321 {
322 if (type == GUID_TRIGGER_PAIR)
323 {
324 _triggerGUID = guid;
325 }
326 }
@ GUID_TRIGGER_PAIR
Definition: boss_ossirian.cpp:74

References _triggerGUID, and GUID_TRIGGER_PAIR.

Member Data Documentation

◆ _instance

InstanceScript* go_ossirian_crystal::go_ossirian_crystalAI::_instance
private

Referenced by GossipHello().

◆ _triggerGUID

ObjectGuid go_ossirian_crystal::go_ossirian_crystalAI::_triggerGUID
private

Referenced by DoAction(), GossipHello(), and SetGUID().