AzerothCore 3.3.5a
OpenSource WoW Emulator
No Matches
go_sand_trap Struct Reference
Inheritance diagram for go_sand_trap:

Public Member Functions

 go_sand_trap (GameObject *go)
void Reset () override
void UpdateAI (uint32 const diff) 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 *)

Protected Attributes

TaskScheduler _scheduler
- Protected Attributes inherited from GameObjectAI
GameObject *const me

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ go_sand_trap()

go_sand_trap::go_sand_trap ( GameObject go)
109: GameObjectAI(go) { }
Definition: GameObjectAI.h:34

Member Function Documentation

◆ Reset()

void go_sand_trap::Reset ( )

Reimplemented from GameObjectAI.

112 {
113 _scheduler.Schedule(5s, [this](TaskContext /*context*/)
114 {
115 if (InstanceScript* instance = me->GetInstanceScript())
116 if (Creature* kurinnaxx = instance->GetCreature(DATA_KURINNAXX))
117 me->Use(kurinnaxx);
118 });
119 }
Definition: ruins_of_ahnqiraj.h:28
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
Definition: TaskScheduler.h:232
Definition: TaskScheduler.h:418
GameObject *const me
Definition: GameObjectAI.h:36
Definition: Creature.h:46
void Use(Unit *user)
Definition: GameObject.cpp:1477
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Definition: InstanceScript.h:141
TaskScheduler _scheduler
Definition: boss_kurinnaxx.cpp:127

References _scheduler, DATA_KURINNAXX, WorldObject::GetInstanceScript(), GameObjectAI::me, TaskScheduler::Schedule(), and GameObject::Use().

◆ UpdateAI()

void go_sand_trap::UpdateAI ( uint32 const  diff)

Reimplemented from GameObjectAI.

122 {
123 _scheduler.Update(diff);
124 }
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition: TaskScheduler.cpp:27

References _scheduler, and TaskScheduler::Update().

Member Data Documentation

◆ _scheduler

TaskScheduler go_sand_trap::_scheduler

Referenced by Reset(), and UpdateAI().