Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_randolph_moloch.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_Randolf_Moloch
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
SAY_VANISH
= 2
23
};
24
25
enum
Spells
26
{
27
SPELL_SWEEP
= 86729,
28
SPELL_VANISH
= 55964,
29
SPELL_WILDLY_STABBING
= 86726
30
};
31
enum
Events
32
{
33
EVENT_SWEEP
= 1,
34
EVENT_VANISH
= 2,
35
EVENT_WILDLY_STABBING
= 3
36
};
37
38
class
boss_randolph_moloch
:
public
CreatureScript
39
{
40
public
:
41
boss_randolph_moloch
() :
CreatureScript
(
"boss_randolph_moloch"
) { }
42
43
struct
boss_randolph_molochAI
:
public
BossAI
44
{
45
boss_randolph_molochAI
(
Creature
* creature) :
BossAI
(creature,
DATA_RANDOLPH_MOLOCH
) { }
46
47
void
Reset
()
OVERRIDE
48
{
49
BossAI::Reset
();
50
events
.ScheduleEvent(
EVENT_SWEEP
, 5000);
51
events
.ScheduleEvent(
EVENT_VANISH
, 10000);
52
events
.ScheduleEvent(
EVENT_WILDLY_STABBING
, 6000);
53
}
54
55
void
EnterCombat
(
Unit
* victim)
OVERRIDE
56
{
57
me
->HandleEmoteCommand(
EMOTE_ONESHOT_BOW
);
58
Talk
(
SAY_AGGRO
);
59
BossAI::EnterCombat
(victim);
60
}
61
62
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
63
{
64
Talk
(
SAY_DEATH
);
65
_JustDied
();
66
instance
->SetBossState(
DATA_RANDOLPH_MOLOCH
,
DONE
);
67
}
68
69
void
JustReachedHome
()
OVERRIDE
70
{
71
BossAI::JustReachedHome
();
72
instance
->SetBossState(
DATA_RANDOLPH_MOLOCH
,
FAIL
);
73
}
74
75
void
UpdateAI
(
uint32
diff)
OVERRIDE
76
{
77
if
(!
UpdateVictim
())
78
return
;
79
80
events
.Update(diff);
81
82
while
(
uint32
eventId =
events
.ExecuteEvent())
83
{
84
switch
(eventId)
85
{
86
case
EVENT_SWEEP
:
87
{
88
DoCastVictim
(
SPELL_SWEEP
);
89
events
.ScheduleEvent(
EVENT_SWEEP
, 5000);
90
break
;
91
}
92
case
EVENT_VANISH
:
93
{
94
//TODO: vanish should be cast at 35% and 65% HP and not reset boss
95
//if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
96
//DoCast(target, SPELL_VANISH);
97
Talk
(
SAY_VANISH
);
98
events
.ScheduleEvent(
EVENT_VANISH
, 10000);
99
break
;
100
}
101
case
EVENT_WILDLY_STABBING
:
102
{
103
DoCastVictim
(
SPELL_WILDLY_STABBING
);
104
events
.ScheduleEvent(
EVENT_WILDLY_STABBING
, 6000);
105
break
;
106
}
107
default
:
108
break
;
109
}
110
}
111
BossAI::DoMeleeAttackIfReady
();
112
};
113
};
114
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
115
{
116
return
GetTheStockadeAI<boss_randolph_molochAI>
(creature);
117
}
118
};
119
120
void
AddSC_boss_randolph_moloch
()
121
{
122
new
boss_randolph_moloch
();
123
};
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
EMOTE_ONESHOT_BOW
@ EMOTE_ONESHOT_BOW
Definition
SharedDefines.h:2133
Events
Events
Definition
alterac_valley.cpp:40
SAY_DEATH
#define SAY_DEATH
Definition
boss_commander_kolurg.cpp:30
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
Says
Says
Definition
boss_halycon.cpp:17
SPELL_VANISH
@ SPELL_VANISH
Definition
boss_moroes.cpp:27
SAY_DEATH
@ SAY_DEATH
Definition
boss_randolph_moloch.cpp:21
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_randolph_moloch.cpp:20
SAY_VANISH
@ SAY_VANISH
Definition
boss_randolph_moloch.cpp:22
SPELL_SWEEP
@ SPELL_SWEEP
Definition
boss_randolph_moloch.cpp:27
SPELL_WILDLY_STABBING
@ SPELL_WILDLY_STABBING
Definition
boss_randolph_moloch.cpp:29
AddSC_boss_randolph_moloch
void AddSC_boss_randolph_moloch()
Definition
boss_randolph_moloch.cpp:120
EVENT_VANISH
@ EVENT_VANISH
Definition
boss_randolph_moloch.cpp:34
EVENT_SWEEP
@ EVENT_SWEEP
Definition
boss_randolph_moloch.cpp:33
EVENT_WILDLY_STABBING
@ EVENT_WILDLY_STABBING
Definition
boss_randolph_moloch.cpp:35
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_randolph_moloch
Definition
boss_randolph_moloch.cpp:39
boss_randolph_moloch::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_randolph_moloch.cpp:114
boss_randolph_moloch::boss_randolph_moloch
boss_randolph_moloch()
Definition
boss_randolph_moloch.cpp:41
instance_the_stockade.h
GetTheStockadeAI
AI * GetTheStockadeAI(Creature *creature)
Definition
instance_the_stockade.h:33
DATA_RANDOLPH_MOLOCH
@ DATA_RANDOLPH_MOLOCH
Definition
instance_the_stockade.h:20
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_randolph_moloch::boss_randolph_molochAI::EnterCombat
void EnterCombat(Unit *victim) OVERRIDE
Definition
boss_randolph_moloch.cpp:55
boss_randolph_moloch::boss_randolph_molochAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_randolph_moloch.cpp:62
boss_randolph_moloch::boss_randolph_molochAI::Reset
void Reset() OVERRIDE
Definition
boss_randolph_moloch.cpp:47
boss_randolph_moloch::boss_randolph_molochAI::boss_randolph_molochAI
boss_randolph_molochAI(Creature *creature)
Definition
boss_randolph_moloch.cpp:45
boss_randolph_moloch::boss_randolph_molochAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_randolph_moloch.cpp:75
boss_randolph_moloch::boss_randolph_molochAI::JustReachedHome
void JustReachedHome() OVERRIDE
Definition
boss_randolph_moloch.cpp:69
src
server
scripts
EasternKingdoms
TheStockade
boss_randolph_moloch.cpp
Generated on
for Project SkyFire Core by
1.17.0