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

Public Member Functions

 go_pirate_day_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 *)
 

Public Attributes

uint32 rnd
 

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

go_pirate_day_music::go_pirate_day_musicAI::go_pirate_day_musicAI ( GameObject go)
inline
724 : GameObjectAI(go)
725 {
727 }
@ EVENT_PDM_START_MUSIC
Definition: go_scripts.cpp:712
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:748

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

Member Function Documentation

◆ UpdateAI()

void go_pirate_day_music::go_pirate_day_musicAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from GameObjectAI.

730 {
731 _events.Update(diff);
732 while (uint32 eventId = _events.ExecuteEvent())
733 {
734 switch (eventId)
735 {
738 break;
740 _events.ScheduleEvent(EVENT_PDM_START_MUSIC, 5000); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
741 break;
742 default:
743 break;
744 }
745 }
746 }
std::uint32_t uint32
Definition: Define.h:107
@ MUSIC_PIRATE_DAY_MUSIC
Definition: go_scripts.cpp:707
@ HOLIDAY_PIRATES_DAY
Definition: SharedDefines.h:2762
bool IsHolidayActive(HolidayIds id)
Definition: GameEventMgr.cpp:1909
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_PDM_START_MUSIC, EventMap::ExecuteEvent(), HOLIDAY_PIRATES_DAY, IsHolidayActive(), GameObjectAI::me, MUSIC_PIRATE_DAY_MUSIC, WorldObject::PlayDirectMusic(), EventMap::ScheduleEvent(), and EventMap::Update().

Member Data Documentation

◆ _events

EventMap go_pirate_day_music::go_pirate_day_musicAI::_events
private

Referenced by go_pirate_day_musicAI(), and UpdateAI().

◆ rnd

uint32 go_pirate_day_music::go_pirate_day_musicAI::rnd