Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_lord_overheat.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
/* ScriptData
7
SDName: Boss_Lord_Overheat
8
SD%Complete: 90
9
SDComment:
10
SDCategory: The Stockades
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
#include "
instance_the_stockade.h
"
16
17
18
enum
Says
19
{
20
SAY_AGGRO
= 0,
21
SAY_DEATH
= 1,
22
};
23
24
enum
Spells
25
{
26
SPELL_FIREBALL
= 12466,
27
SPELL_OVERHEAT
= 86633,
28
SPELL_RAIN_OF_FIRE
= 86636
29
};
30
enum
Events
31
{
32
EVENT_FIREBALL
= 1,
33
EVENT_RAIN_OF_FIRE
= 2,
34
EVENT_OVERHEAT
= 3
35
};
36
37
class
boss_lord_overheat
:
public
CreatureScript
38
{
39
public
:
40
boss_lord_overheat
() :
CreatureScript
(
"boss_lord_overheat"
) { }
41
42
struct
boss_lord_overheatAI
:
public
BossAI
43
{
44
boss_lord_overheatAI
(
Creature
* creature) :
BossAI
(creature,
DATA_LORD_OVERHEAT
) { }
45
46
void
Reset
()
OVERRIDE
47
{
48
BossAI::Reset
();
49
events
.ScheduleEvent(
EVENT_FIREBALL
, 1000);
50
events
.ScheduleEvent(
EVENT_RAIN_OF_FIRE
, 15000);
51
events
.ScheduleEvent(
EVENT_OVERHEAT
, 5000);
52
}
53
54
void
EnterCombat
(
Unit
* victim)
OVERRIDE
55
{
56
Talk
(
SAY_AGGRO
);
57
BossAI::EnterCombat
(victim);
58
}
59
60
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
61
{
62
Talk
(
SAY_DEATH
);
63
_JustDied
();
64
instance
->SetBossState(
DATA_LORD_OVERHEAT
,
DONE
);
65
}
66
67
void
JustReachedHome
()
OVERRIDE
68
{
69
BossAI::JustReachedHome
();
70
instance
->SetBossState(
DATA_LORD_OVERHEAT
,
FAIL
);
71
}
72
73
void
UpdateAI
(
uint32
diff)
OVERRIDE
74
{
75
if
(!
UpdateVictim
())
76
return
;
77
78
events
.Update(diff);
79
80
while
(
uint32
eventId =
events
.ExecuteEvent())
81
{
82
switch
(eventId)
83
{
84
case
EVENT_FIREBALL
:
85
{
86
DoCastVictim
(
SPELL_FIREBALL
);
87
events
.ScheduleEvent(
EVENT_FIREBALL
, 4000);
88
break
;
89
}
90
case
EVENT_RAIN_OF_FIRE
:
91
{
92
DoCastVictim
(
SPELL_RAIN_OF_FIRE
);
93
events
.ScheduleEvent(
EVENT_RAIN_OF_FIRE
, 15000);
94
break
;
95
}
96
case
EVENT_OVERHEAT
:
97
{
98
DoCastVictim
(
SPELL_OVERHEAT
);
99
events
.ScheduleEvent(
EVENT_OVERHEAT
, 10000);
100
break
;
101
}
102
default
:
103
break
;
104
}
105
}
106
BossAI::DoMeleeAttackIfReady
();
107
};
108
};
109
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
110
{
111
return
GetTheStockadeAI<boss_lord_overheatAI>
(creature);
112
}
113
};
114
115
void
AddSC_boss_lord_overheat
()
116
{
117
new
boss_lord_overheat
();
118
};
Spells
Spells
Definition
BattlegroundIC.h:645
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
ScriptMgr.h
ScriptedCreature.h
Events
Events
Definition
alterac_valley.cpp:40
SPELL_FIREBALL
@ SPELL_FIREBALL
Definition
boss_balinda.cpp:13
SAY_DEATH
#define SAY_DEATH
Definition
boss_commander_kolurg.cpp:30
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
SPELL_RAIN_OF_FIRE
@ SPELL_RAIN_OF_FIRE
Definition
boss_gehennas.cpp:21
EVENT_RAIN_OF_FIRE
@ EVENT_RAIN_OF_FIRE
Definition
boss_gehennas.cpp:28
Says
Says
Definition
boss_halycon.cpp:17
SAY_DEATH
@ SAY_DEATH
Definition
boss_lord_overheat.cpp:21
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_lord_overheat.cpp:20
SPELL_OVERHEAT
@ SPELL_OVERHEAT
Definition
boss_lord_overheat.cpp:27
SPELL_RAIN_OF_FIRE
@ SPELL_RAIN_OF_FIRE
Definition
boss_lord_overheat.cpp:28
SPELL_FIREBALL
@ SPELL_FIREBALL
Definition
boss_lord_overheat.cpp:26
AddSC_boss_lord_overheat
void AddSC_boss_lord_overheat()
Definition
boss_lord_overheat.cpp:115
EVENT_FIREBALL
@ EVENT_FIREBALL
Definition
boss_lord_overheat.cpp:32
EVENT_RAIN_OF_FIRE
@ EVENT_RAIN_OF_FIRE
Definition
boss_lord_overheat.cpp:33
EVENT_OVERHEAT
@ EVENT_OVERHEAT
Definition
boss_lord_overheat.cpp:34
EVENT_FIREBALL
@ EVENT_FIREBALL
Definition
boss_razorgore.cpp:47
BossAI::instance
InstanceScript *const instance
Definition
ScriptedCreature.h:383
BossAI::JustReachedHome
void JustReachedHome() OVERRIDE
Definition
ScriptedCreature.h:412
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::DoCastVictim
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:168
Unit
Definition
Unit.h:1367
boss_lord_overheat
Definition
boss_lord_overheat.cpp:38
boss_lord_overheat::boss_lord_overheat
boss_lord_overheat()
Definition
boss_lord_overheat.cpp:40
boss_lord_overheat::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_lord_overheat.cpp:109
instance_the_stockade.h
GetTheStockadeAI
AI * GetTheStockadeAI(Creature *creature)
Definition
instance_the_stockade.h:33
DATA_LORD_OVERHEAT
@ DATA_LORD_OVERHEAT
Definition
instance_the_stockade.h:21
boss_lord_overheat::boss_lord_overheatAI::JustReachedHome
void JustReachedHome() OVERRIDE
Definition
boss_lord_overheat.cpp:67
boss_lord_overheat::boss_lord_overheatAI::EnterCombat
void EnterCombat(Unit *victim) OVERRIDE
Definition
boss_lord_overheat.cpp:54
boss_lord_overheat::boss_lord_overheatAI::boss_lord_overheatAI
boss_lord_overheatAI(Creature *creature)
Definition
boss_lord_overheat.cpp:44
boss_lord_overheat::boss_lord_overheatAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_lord_overheat.cpp:60
boss_lord_overheat::boss_lord_overheatAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_lord_overheat.cpp:73
boss_lord_overheat::boss_lord_overheatAI::Reset
void Reset() OVERRIDE
Definition
boss_lord_overheat.cpp:46
src
server
scripts
EasternKingdoms
TheStockade
boss_lord_overheat.cpp
Generated on
for Project SkyFire Core by
1.17.0