Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_hogger.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_Hogger
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
enum
Says
18
{
19
SAY_AGGRO
= 0,
20
SAY_DEATH
= 1,
21
SAY_ENRAGE
= 2
22
};
23
24
enum
Spells
25
{
26
SPELL_ENRAGE
= 86736,
27
SPELL_MADDENING_CALL
= 86620,
28
SPELL_VICIOUS_SLICE
= 86604
29
};
30
enum
Events
31
{
32
EVENT_VICIOUS_SLICE
= 1,
33
EVENT_MADDENING_CALL
= 2,
34
EVENT_ENRAGE
= 3
35
};
36
37
class
boss_hogger
:
public
CreatureScript
38
{
39
public
:
40
boss_hogger
() :
CreatureScript
(
"boss_hogger"
) { }
41
42
struct
boss_hoggerAI
:
public
BossAI
43
{
44
boss_hoggerAI
(
Creature
* creature) :
BossAI
(creature,
DATA_HOGGER
) { }
45
46
void
Reset
()
OVERRIDE
47
{
48
BossAI::Reset
();
49
events
.ScheduleEvent(
EVENT_VICIOUS_SLICE
, 4000);
50
events
.ScheduleEvent(
EVENT_MADDENING_CALL
, 9000);
51
events
.ScheduleEvent(
EVENT_ENRAGE
, 60000);
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_HOGGER
,
DONE
);
65
}
66
67
void
JustReachedHome
()
OVERRIDE
68
{
69
BossAI::JustReachedHome
();
70
instance
->SetBossState(
DATA_HOGGER
,
FAIL
);
71
}
72
73
void
UpdateAI
(
uint32
diff)
OVERRIDE
74
{
75
if
(!
UpdateVictim
())
76
return
;
77
78
events
.Update(diff);
79
80
if
(
me
->HasUnitState(
UNIT_STATE_CASTING
))
81
return
;
82
83
while
(
uint32
eventId =
events
.ExecuteEvent())
84
{
85
switch
(eventId)
86
{
87
case
EVENT_VICIOUS_SLICE
:
88
{
89
DoCastVictim
(
SPELL_VICIOUS_SLICE
);
90
events
.ScheduleEvent(
EVENT_VICIOUS_SLICE
, 8000);
91
break
;
92
}
93
case
EVENT_MADDENING_CALL
:
94
{
95
DoCastAOE
(
SPELL_MADDENING_CALL
);
96
events
.ScheduleEvent(
EVENT_MADDENING_CALL
, 18000);
97
break
;
98
}
99
case
EVENT_ENRAGE
:
100
{
101
DoCast
(
me
,
SPELL_ENRAGE
);
102
Talk
(
SAY_ENRAGE
);
103
events
.ScheduleEvent(
EVENT_MADDENING_CALL
, 60000);
104
break
;
105
}
106
default
:
107
break
;
108
}
109
}
110
BossAI::DoMeleeAttackIfReady
();
111
};
112
};
113
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
114
{
115
return
GetTheStockadeAI<boss_hoggerAI>
(creature);
116
}
117
};
118
119
void
AddSC_boss_hogger
()
120
{
121
new
boss_hogger
();
122
};
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
UNIT_STATE_CASTING
@ UNIT_STATE_CASTING
Definition
Unit.h:527
SPELL_ENRAGE
@ SPELL_ENRAGE
Definition
alterac_valley.cpp:14
Events
Events
Definition
alterac_valley.cpp:40
EVENT_ENRAGE
@ EVENT_ENRAGE
Definition
alterac_valley.cpp:45
SAY_DEATH
#define SAY_DEATH
Definition
boss_commander_kolurg.cpp:30
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
SAY_ENRAGE
@ SAY_ENRAGE
Definition
boss_curator.cpp:21
Says
Says
Definition
boss_halycon.cpp:17
SAY_DEATH
@ SAY_DEATH
Definition
boss_hogger.cpp:20
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_hogger.cpp:19
SAY_ENRAGE
@ SAY_ENRAGE
Definition
boss_hogger.cpp:21
SPELL_ENRAGE
@ SPELL_ENRAGE
Definition
boss_hogger.cpp:26
SPELL_VICIOUS_SLICE
@ SPELL_VICIOUS_SLICE
Definition
boss_hogger.cpp:28
SPELL_MADDENING_CALL
@ SPELL_MADDENING_CALL
Definition
boss_hogger.cpp:27
AddSC_boss_hogger
void AddSC_boss_hogger()
Definition
boss_hogger.cpp:119
EVENT_MADDENING_CALL
@ EVENT_MADDENING_CALL
Definition
boss_hogger.cpp:33
EVENT_ENRAGE
@ EVENT_ENRAGE
Definition
boss_hogger.cpp:34
EVENT_VICIOUS_SLICE
@ EVENT_VICIOUS_SLICE
Definition
boss_hogger.cpp:32
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::DoCast
void DoCast(uint32 spellId)
Definition
UnitAI.cpp:110
UnitAI::DoCastVictim
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:168
UnitAI::DoCastAOE
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:176
Unit
Definition
Unit.h:1367
boss_hogger
Definition
boss_hogger.cpp:38
boss_hogger::boss_hogger
boss_hogger()
Definition
boss_hogger.cpp:40
boss_hogger::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_hogger.cpp:113
instance_the_stockade.h
GetTheStockadeAI
AI * GetTheStockadeAI(Creature *creature)
Definition
instance_the_stockade.h:33
DATA_HOGGER
@ DATA_HOGGER
Definition
instance_the_stockade.h:22
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_hogger::boss_hoggerAI::EnterCombat
void EnterCombat(Unit *victim) OVERRIDE
Definition
boss_hogger.cpp:54
boss_hogger::boss_hoggerAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_hogger.cpp:60
boss_hogger::boss_hoggerAI::Reset
void Reset() OVERRIDE
Definition
boss_hogger.cpp:46
boss_hogger::boss_hoggerAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_hogger.cpp:73
boss_hogger::boss_hoggerAI::boss_hoggerAI
boss_hoggerAI(Creature *creature)
Definition
boss_hogger.cpp:44
boss_hogger::boss_hoggerAI::JustReachedHome
void JustReachedHome() OVERRIDE
Definition
boss_hogger.cpp:67
src
server
scripts
EasternKingdoms
TheStockade
boss_hogger.cpp
Generated on
for Project SkyFire Core by
1.17.0