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

Public Member Functions

 go_l70_etc_musicAI (GameObject *go)
 
void UpdateAI (uint32 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 *)
 
virtual void SummonedCreatureEvade (Creature *)
 

Private Attributes

EventMap _events
 

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

go_l70_etc_music::go_l70_etc_musicAI::go_l70_etc_musicAI ( GameObject go)
inline
490 : GameObjectAI(go)
491 {
493 }
@ EVENT_ETC_START_MUSIC
Definition: go_scripts.cpp:480
void ScheduleEvent(uint32 eventId, uint32 time, uint32 group=0, uint32 phase=0)
Definition: EventMap.cpp:56
Definition: GameObjectAI.h:33
EventMap _events
Definition: go_scripts.cpp:512

References _events, EVENT_ETC_START_MUSIC, and EventMap::ScheduleEvent().

Member Function Documentation

◆ UpdateAI()

void go_l70_etc_music::go_l70_etc_musicAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from GameObjectAI.

496 {
497 _events.Update(diff);
498 while (uint32 eventId = _events.ExecuteEvent())
499 {
500 switch (eventId)
501 {
504 _events.ScheduleEvent(EVENT_ETC_START_MUSIC, 1600); // Every 1.6 seconds SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
505 break;
506 default:
507 break;
508 }
509 }
510 }
std::uint32_t uint32
Definition: Define.h:107
@ MUSIC_L70_ETC_MUSIC
Definition: go_scripts.cpp:475
uint32 ExecuteEvent()
Definition: EventMap.cpp:114
void Update(uint32 time)
Definition: EventMap.h:54
GameObject *const me
Definition: GameObjectAI.h:35
void PlayDirectMusic(uint32 music_id, Player *target=nullptr)
Definition: Object.cpp:2927

References _events, EVENT_ETC_START_MUSIC, EventMap::ExecuteEvent(), GameObjectAI::me, MUSIC_L70_ETC_MUSIC, WorldObject::PlayDirectMusic(), EventMap::ScheduleEvent(), and EventMap::Update().

Member Data Documentation

◆ _events

EventMap go_l70_etc_music::go_l70_etc_musicAI::_events
private

Referenced by go_l70_etc_musicAI(), and UpdateAI().