Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_ramstein_the_gorger.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_Ramstein_The_Gorger
8
SD%Complete: 70
9
SDComment:
10
SDCategory: Stratholme
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
#include "
stratholme.h
"
16
17
enum
Spells
18
{
19
SPELL_TRAMPLE
= 5568,
20
SPELL_KNOCKOUT
= 17307
21
};
22
23
enum
CreatureId
24
{
25
NPC_MINDLESS_UNDEAD
= 11030
26
};
27
28
class
boss_ramstein_the_gorger
:
public
CreatureScript
29
{
30
public
:
31
boss_ramstein_the_gorger
() :
CreatureScript
(
"boss_ramstein_the_gorger"
) { }
32
33
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
34
{
35
return
new
boss_ramstein_the_gorgerAI
(creature);
36
}
37
38
struct
boss_ramstein_the_gorgerAI
:
public
ScriptedAI
39
{
40
boss_ramstein_the_gorgerAI
(
Creature
* creature) :
ScriptedAI
(creature)
41
{
42
instance
=
me
->GetInstanceScript();
43
}
44
45
InstanceScript
*
instance
;
46
47
uint32
Trample_Timer
;
48
uint32
Knockout_Timer
;
49
50
void
Reset
()
OVERRIDE
51
{
52
Trample_Timer
= 3000;
53
Knockout_Timer
= 12000;
54
}
55
56
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
57
{
58
}
59
60
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
61
{
62
for
(
uint8
i = 0; i < 30; ++i)
63
{
64
if
(
Creature
* mob =
me
->SummonCreature(
NPC_MINDLESS_UNDEAD
, 3969.35f+(std::rand() % 10 + -10), -3391.87f+(std::rand() % 10 + -10), 119.11f, 5.91f,
TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
, 1800000))
65
mob->AI()->AttackStart(
me
->SelectNearestTarget(100.0f));
66
}
67
68
if
(
instance
)
69
instance
->SetData(
TYPE_RAMSTEIN
,
DONE
);
70
}
71
72
void
UpdateAI
(
uint32
diff)
OVERRIDE
73
{
74
//Return since we have no target
75
if
(!
UpdateVictim
())
76
return
;
77
78
//Trample
79
if
(
Trample_Timer
<= diff)
80
{
81
DoCast
(
me
,
SPELL_TRAMPLE
);
82
Trample_Timer
= 7000;
83
}
else
Trample_Timer
-= diff;
84
85
//Knockout
86
if
(
Knockout_Timer
<= diff)
87
{
88
DoCastVictim
(
SPELL_KNOCKOUT
);
89
Knockout_Timer
= 10000;
90
}
else
Knockout_Timer
-= diff;
91
92
DoMeleeAttackIfReady
();
93
}
94
};
95
};
96
97
void
AddSC_boss_ramstein_the_gorger
()
98
{
99
new
boss_ramstein_the_gorger
();
100
}
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
DONE
@ DONE
Definition
InstanceScript.h:49
TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition
Object.h:68
ScriptMgr.h
ScriptedCreature.h
SPELL_TRAMPLE
@ SPELL_TRAMPLE
Definition
boss_ramstein_the_gorger.cpp:19
SPELL_KNOCKOUT
@ SPELL_KNOCKOUT
Definition
boss_ramstein_the_gorger.cpp:20
CreatureId
CreatureId
Definition
boss_ramstein_the_gorger.cpp:24
NPC_MINDLESS_UNDEAD
@ NPC_MINDLESS_UNDEAD
Definition
boss_ramstein_the_gorger.cpp:25
AddSC_boss_ramstein_the_gorger
void AddSC_boss_ramstein_the_gorger()
Definition
boss_ramstein_the_gorger.cpp:97
CreatureAI
Definition
CreatureAI.h:54
CreatureAI::UpdateVictim
bool UpdateVictim()
Definition
CreatureAI.cpp:192
Creature
Definition
Creature.h:427
CreatureScript::CreatureScript
CreatureScript(const char *name)
Definition
ScriptMgr.cpp:1436
InstanceScript
Definition
InstanceScript.h:123
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_ramstein_the_gorger
Definition
boss_ramstein_the_gorger.cpp:29
boss_ramstein_the_gorger::boss_ramstein_the_gorger
boss_ramstein_the_gorger()
Definition
boss_ramstein_the_gorger.cpp:31
boss_ramstein_the_gorger::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_ramstein_the_gorger.cpp:33
stratholme.h
TYPE_RAMSTEIN
@ TYPE_RAMSTEIN
Definition
stratholme.h:15
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI
Definition
boss_ramstein_the_gorger.cpp:39
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_ramstein_the_gorger.cpp:60
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI::instance
InstanceScript * instance
Definition
boss_ramstein_the_gorger.cpp:45
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_ramstein_the_gorger.cpp:72
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI::Trample_Timer
uint32 Trample_Timer
Definition
boss_ramstein_the_gorger.cpp:47
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_ramstein_the_gorger.cpp:56
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI::boss_ramstein_the_gorgerAI
boss_ramstein_the_gorgerAI(Creature *creature)
Definition
boss_ramstein_the_gorger.cpp:40
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI::Reset
void Reset() OVERRIDE
Definition
boss_ramstein_the_gorger.cpp:50
boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI::Knockout_Timer
uint32 Knockout_Timer
Definition
boss_ramstein_the_gorger.cpp:48
src
server
scripts
EasternKingdoms
Stratholme
boss_ramstein_the_gorger.cpp
Generated on
for Project SkyFire Core by
1.17.0