Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
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
"
8
#include "
stormstout_brewery.h
"
9
#include "
Player.h
"
10
#include "
SpellScript.h
"
11
12
enum
Spells
13
{
14
SPELL_GROUND_POUND
= 106807,
15
SPELL_GOING_BANANAS
= 106651
16
};
17
18
enum
Events
19
{
20
EVENT_GROUND_POUND
= 1,
21
EVENT_BANANA_AURA
= 2,
22
};
23
24
enum
Yells
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
34
class
boss_ook_ook
:
public
CreatureScript
35
{
36
public
:
37
boss_ook_ook
() :
CreatureScript
(
"boss_ook_ook"
) { }
38
39
struct
boss_ook_ookAI
:
public
BossAI
40
{
41
uint8
SpellTalkId
= 0;
42
boss_ook_ookAI
(
Creature
* creature) :
BossAI
(creature,
DATA_OOK_OOK
) { }
43
44
void
Reset
()
OVERRIDE
45
{
46
BossAI::Reset
();
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
();
56
Talk
(
YELL_DEATH
);
57
instance
->SetBossState(
DATA_OOK_OOK
,
DONE
);
58
}
59
60
void
EnterCombat
(
Unit
* victim)
OVERRIDE
61
{
62
BossAI::EnterCombat
(victim);
63
Talk
(
YELL_AGGRO
);
64
}
65
66
void
JustReachedHome
()
OVERRIDE
67
{
68
BossAI::JustReachedHome
();
69
instance
->SetBossState(
DATA_OOK_OOK
,
FAIL
);
70
}
71
72
void
KilledUnit
(
Unit
* victim)
OVERRIDE
73
{
74
Talk
(
YELL_KILL
);
75
}
76
77
void
UpdateAI
(
uint32
diff)
OVERRIDE
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
{
91
case
EVENT_GROUND_POUND
:
92
{
93
DoCastVictim
(
SPELL_GROUND_POUND
);
94
events
.ScheduleEvent(
EVENT_GROUND_POUND
,
DUNGEON_MODE
(15000, 10000));
95
break
;
96
}
97
case
EVENT_BANANA_AURA
:
98
{
99
DoCast
(
me
,
SPELL_GOING_BANANAS
);
100
101
if
(
SpellTalkId
<= 2)
102
{
103
Talk
(
YELL_SPELL1
+
SpellTalkId
);
104
SpellTalkId
++;
105
}
106
107
events
.ScheduleEvent(
EVENT_BANANA_AURA
,
DUNGEON_MODE
(12000, 7000));
108
break
;
109
}
110
default
:
111
break
;
112
}
113
}
114
DoMeleeAttackIfReady
();
115
}
116
};
117
118
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
119
{
120
return
GetStormstoutBreweryAI<boss_ook_ookAI>
(creature);
121
}
122
};
123
124
void
AddSC_boss_ook_ook
()
125
{
126
new
boss_ook_ook
();
127
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint8
std::uint8_t uint8
Definition
Define.h:79
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
FAIL
@ FAIL
Definition
InstanceScript.h:48
DONE
@ DONE
Definition
InstanceScript.h:49
Player.h
ScriptMgr.h
ScriptedCreature.h
SpellScript.h
UNIT_STATE_CASTING
@ UNIT_STATE_CASTING
Definition
Unit.h:527
REACT_DEFENSIVE
@ REACT_DEFENSIVE
Definition
Unit.h:1157
Events
Events
Definition
alterac_valley.cpp:40
YELL_AGGRO
@ YELL_AGGRO
Definition
boss_balinda.cpp:19
YELL_KILL
@ YELL_KILL
Definition
boss_brutallus.cpp:25
YELL_DEATH
@ YELL_DEATH
Definition
boss_brutallus.cpp:28
AddSC_boss_ook_ook
void AddSC_boss_ook_ook()
Definition
boss_ook_ook.cpp:124
YELL_SPELL2
@ YELL_SPELL2
Definition
boss_ook_ook.cpp:30
YELL_SPELL3
@ YELL_SPELL3
Definition
boss_ook_ook.cpp:31
YELL_AGGRO
@ YELL_AGGRO
Definition
boss_ook_ook.cpp:26
YELL_KILL
@ YELL_KILL
Definition
boss_ook_ook.cpp:28
YELL_DEATH
@ YELL_DEATH
Definition
boss_ook_ook.cpp:27
YELL_SPELL1
@ YELL_SPELL1
Definition
boss_ook_ook.cpp:29
SPELL_GROUND_POUND
@ SPELL_GROUND_POUND
Definition
boss_ook_ook.cpp:14
SPELL_GOING_BANANAS
@ SPELL_GOING_BANANAS
Definition
boss_ook_ook.cpp:15
EVENT_GROUND_POUND
@ EVENT_GROUND_POUND
Definition
boss_ook_ook.cpp:20
EVENT_BANANA_AURA
@ EVENT_BANANA_AURA
Definition
boss_ook_ook.cpp:21
BossAI::instance
InstanceScript *const instance
Definition
ScriptedCreature.h:383
BossAI::JustReachedHome
void JustReachedHome() OVERRIDE
Definition
ScriptedCreature.h:412
BossAI::CheckInRoom
bool CheckInRoom()
Definition
ScriptedCreature.h:427
BossAI::events
EventMap events
Definition
ScriptedCreature.h:439
BossAI::Reset
void Reset() OVERRIDE
Definition
ScriptedCreature.h:400
BossAI::BossAI
BossAI(Creature *creature, uint32 bossId)
Definition
ScriptedCreature.cpp:456
BossAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
ScriptedCreature.h:404
BossAI::_JustDied
void _JustDied()
Definition
ScriptedCreature.cpp:474
CreatureAI
Definition
CreatureAI.h:54
CreatureAI::Talk
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
Definition
CreatureAI.cpp:28
CreatureAI::UpdateVictim
bool UpdateVictim()
Definition
CreatureAI.cpp:192
Creature
Definition
Creature.h:427
CreatureScript::CreatureScript
CreatureScript(const char *name)
Definition
ScriptMgr.cpp:1436
UnitAI::DoMeleeAttackIfReady
void DoMeleeAttackIfReady()
Definition
UnitAI.cpp:28
UnitAI::DoCast
void DoCast(uint32 spellId)
Definition
UnitAI.cpp:110
UnitAI::DoCastVictim
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:168
Unit
Definition
Unit.h:1367
boss_ook_ook
Definition
boss_ook_ook.cpp:35
boss_ook_ook::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_ook_ook.cpp:118
boss_ook_ook::boss_ook_ook
boss_ook_ook()
Definition
boss_ook_ook.cpp:37
stormstout_brewery.h
GetStormstoutBreweryAI
AI * GetStormstoutBreweryAI(Creature *creature)
Definition
stormstout_brewery.h:44
DATA_OOK_OOK
@ DATA_OOK_OOK
Definition
stormstout_brewery.h:17
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::DUNGEON_MODE
const T & DUNGEON_MODE(const T &normal5, const T &heroic5) const
Definition
ScriptedCreature.h:294
Yells
Definition
boss_illidan.cpp:256
boss_ook_ook::boss_ook_ookAI::SpellTalkId
uint8 SpellTalkId
Definition
boss_ook_ook.cpp:41
boss_ook_ook::boss_ook_ookAI::EnterCombat
void EnterCombat(Unit *victim) OVERRIDE
Definition
boss_ook_ook.cpp:60
boss_ook_ook::boss_ook_ookAI::Reset
void Reset() OVERRIDE
Definition
boss_ook_ook.cpp:44
boss_ook_ook::boss_ook_ookAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_ook_ook.cpp:53
boss_ook_ook::boss_ook_ookAI::KilledUnit
void KilledUnit(Unit *victim) OVERRIDE
Definition
boss_ook_ook.cpp:72
boss_ook_ook::boss_ook_ookAI::boss_ook_ookAI
boss_ook_ookAI(Creature *creature)
Definition
boss_ook_ook.cpp:42
boss_ook_ook::boss_ook_ookAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_ook_ook.cpp:77
boss_ook_ook::boss_ook_ookAI::JustReachedHome
void JustReachedHome() OVERRIDE
Definition
boss_ook_ook.cpp:66
src
server
scripts
Pandaria
StormstoutBrewery
boss_ook_ook.cpp
Generated on
for Project SkyFire Core by
1.17.0