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

Public Member Functions

 go_razorscale_harpoonAI (GameObject *go)
 
void Reset () override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from GameObjectAI
 GameObjectAI (GameObject *go)
 
virtual ~GameObjectAI ()
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
virtual void SetGUID (ObjectGuid const &, 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

TaskScheduler _scheduler
 

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_razorscale_harpoonAI()

go_razorscale_harpoon::go_razorscale_harpoonAI::go_razorscale_harpoonAI ( GameObject go)
inlineexplicit
1256 : GameObjectAI(go)
1257 { }
Definition GameObjectAI.h:33

Member Function Documentation

◆ Reset()

void go_razorscale_harpoon::go_razorscale_harpoonAI::Reset ( )
inlineoverridevirtual

Reimplemented from GameObjectAI.

1260 {
1261 _scheduler.Schedule(1s, [this](TaskContext)
1262 {
1263 if (Creature* controller = me->FindNearestCreature(NPC_RAZORSCALE_CONTROLLER, 10.0f))
1264 controller->AI()->Talk(0);
1265
1266 if (GameObject* brokenHarpoon = me->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
1267 brokenHarpoon->RemoveFromWorld();
1268 });
1269 }
Definition Creature.h:47
GameObject *const me
Definition GameObjectAI.h:35
Definition GameObject.h:120
Definition TaskScheduler.h:422
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
Definition TaskScheduler.h:233
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition Object.cpp:2562
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2553
TaskScheduler _scheduler
Definition boss_razorscale.cpp:1277
@ GO_RAZOR_BROKEN_HARPOON
Definition ulduar.h:306
@ NPC_RAZORSCALE_CONTROLLER
Definition ulduar.h:186

References _scheduler, WorldObject::FindNearestCreature(), WorldObject::FindNearestGameObject(), GO_RAZOR_BROKEN_HARPOON, GameObjectAI::me, NPC_RAZORSCALE_CONTROLLER, and TaskScheduler::Schedule().

◆ UpdateAI()

void go_razorscale_harpoon::go_razorscale_harpoonAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from GameObjectAI.

1272 {
1273 _scheduler.Update(diff);
1274 }
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition TaskScheduler.cpp:27

References _scheduler, and TaskScheduler::Update().

Member Data Documentation

◆ _scheduler

TaskScheduler go_razorscale_harpoon::go_razorscale_harpoonAI::_scheduler
private

Referenced by Reset(), and UpdateAI().


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