Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_ook_ook.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
9#include "Player.h"
10#include "SpellScript.h"
11
13{
16};
17
23
25{
26 YELL_AGGRO = 0, // "Me gonna ook you in the dooker!"
27 YELL_DEATH = 1, // "Ook! Oooook!!"
28 YELL_KILL = 2, // "In the dooker!"
29 YELL_SPELL1 = 3, // GOING BANANAS 1 - "Get Ooking party started!" sId 28800
30 YELL_SPELL2 = 4, // GOING BANANAS 2 - "Come on and get your Ook on!" sId 28801
31 YELL_SPELL3 = 5, // GOING BANANAS 3 - "We gonna Ook all night!" sId 28802
32};
33
35{
36public:
37 boss_ook_ook() : CreatureScript("boss_ook_ook") { }
38
39 struct boss_ook_ookAI : public BossAI
40 {
42 boss_ook_ookAI(Creature* creature) : BossAI(creature, DATA_OOK_OOK) { }
43
45 {
47 me->SetReactState(REACT_DEFENSIVE);
48 SpellTalkId = 0;
49 events.ScheduleEvent(EVENT_GROUND_POUND, DUNGEON_MODE(15000, 10000));
50 events.ScheduleEvent(EVENT_BANANA_AURA, DUNGEON_MODE(12000, 7000));
51 }
52
53 void JustDied(Unit* /* killer */) OVERRIDE
54 {
55 _JustDied();
57 instance->SetBossState(DATA_OOK_OOK, DONE);
58 }
59
61 {
62 BossAI::EnterCombat(victim);
64 }
65
67 {
69 instance->SetBossState(DATA_OOK_OOK, FAIL);
70 }
71
72 void KilledUnit(Unit* victim) OVERRIDE
73 {
75 }
76
78 {
79 if (!UpdateVictim() || !CheckInRoom())
80 return;
81
82 events.Update(diff);
83
84 if (me->HasUnitState(UNIT_STATE_CASTING))
85 return;
86
87 while (uint32 eventId = events.ExecuteEvent())
88 {
89 switch (eventId)
90 {
92 {
94 events.ScheduleEvent(EVENT_GROUND_POUND, DUNGEON_MODE(15000, 10000));
95 break;
96 }
98 {
100
101 if (SpellTalkId <= 2)
102 {
104 SpellTalkId++;
105 }
106
107 events.ScheduleEvent(EVENT_BANANA_AURA, DUNGEON_MODE(12000, 7000));
108 break;
109 }
110 default:
111 break;
112 }
113 }
115 }
116 };
117
119 {
121 }
122};
123
125{
126 new boss_ook_ook();
127}
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ FAIL
@ DONE
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ REACT_DEFENSIVE
Definition Unit.h:1157
@ YELL_AGGRO
@ YELL_KILL
@ YELL_DEATH
void AddSC_boss_ook_ook()
@ YELL_SPELL2
@ YELL_SPELL3
@ YELL_AGGRO
@ YELL_KILL
@ YELL_DEATH
@ YELL_SPELL1
@ SPELL_GROUND_POUND
@ SPELL_GOING_BANANAS
@ EVENT_GROUND_POUND
@ EVENT_BANANA_AURA
InstanceScript *const instance
void JustReachedHome() OVERRIDE
bool CheckInRoom()
EventMap events
void Reset() OVERRIDE
BossAI(Creature *creature, uint32 bossId)
void EnterCombat(Unit *) OVERRIDE
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
AI * GetStormstoutBreweryAI(Creature *creature)
@ DATA_OOK_OOK
Creature * me
const T & DUNGEON_MODE(const T &normal5, const T &heroic5) const
void EnterCombat(Unit *victim) OVERRIDE
void JustDied(Unit *) OVERRIDE
void KilledUnit(Unit *victim) OVERRIDE
boss_ook_ookAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================