Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_hexlord.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 "
SpellScript.h
"
9
#include "
SpellAuraEffects.h
"
10
#include "
zulaman.h
"
11
12
enum
Says
13
{
14
SAY_AGGRO
= 0,
15
SAY_PLAYER_KILL
= 1,
16
SAY_SPIRIT_BOLTS
= 2,
17
SAY_SIPHON_SOUL
= 3,
18
SAY_PET_DEATH
= 4,
19
SAY_DEATH
= 5
20
};
21
22
enum
Spells
23
{
24
SPELL_WL_UNSTABLE_AFFL
= 43522,
25
SPELL_WL_UNSTABLE_AFFL_DISPEL
= 43523,
26
};
27
28
enum
Events
29
{
30
};
31
32
class
boss_hexlord_malacrass
:
public
CreatureScript
33
{
34
public
:
35
36
boss_hexlord_malacrass
() :
CreatureScript
(
"boss_hexlord_malacrass"
) { }
37
38
struct
boss_hex_lord_malacrassAI
:
public
BossAI
39
{
40
boss_hex_lord_malacrassAI
(
Creature
* creature) :
BossAI
(creature,
DATA_HEXLORD
) { }
41
42
void
Reset
()
OVERRIDE
43
{
44
_Reset
();
45
}
46
47
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
48
{
49
Talk
(
SAY_AGGRO
);
50
_EnterCombat
();
51
}
52
53
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
54
{
55
Talk
(
SAY_DEATH
);
56
_JustDied
();
57
}
58
59
void
KilledUnit
(
Unit
* victim)
OVERRIDE
60
{
61
if
(victim->GetTypeId() ==
TYPEID_PLAYER
)
62
Talk
(
SAY_PLAYER_KILL
);
63
}
64
65
void
UpdateAI
(
uint32
diff)
OVERRIDE
66
{
67
if
(!
UpdateVictim
())
68
return
;
69
70
events
.Update(diff);
71
72
if
(
me
->HasUnitState(
UNIT_STATE_CASTING
))
73
return
;
74
/*
75
while (uint32 eventId = events.ExecuteEvent())
76
{
77
switch (eventId)
78
{
79
default:
80
break;
81
}
82
}
83
*/
84
85
DoMeleeAttackIfReady
();
86
}
87
};
88
89
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
90
{
91
return
GetZulAmanAI<boss_hex_lord_malacrassAI>
(creature);
92
}
93
};
94
95
class
spell_hexlord_unstable_affliction
:
public
SpellScriptLoader
96
{
97
public
:
98
spell_hexlord_unstable_affliction
() :
SpellScriptLoader
(
"spell_hexlord_unstable_affliction"
) { }
99
100
class
spell_hexlord_unstable_affliction_AuraScript
:
public
AuraScript
101
{
102
PrepareAuraScript
(
spell_hexlord_unstable_affliction_AuraScript
);
103
104
bool
Validate
(
SpellInfo
const
*
/*spell*/
)
OVERRIDE
105
{
106
if
(!
sSpellMgr
->GetSpellInfo(
SPELL_WL_UNSTABLE_AFFL_DISPEL
))
107
return
false
;
108
return
true
;
109
}
110
111
void
HandleDispel
(
DispelInfo
* dispelInfo)
112
{
113
if
(
Unit
* caster =
GetCaster
())
114
caster->CastSpell(dispelInfo->
GetDispeller
(),
SPELL_WL_UNSTABLE_AFFL_DISPEL
,
true
, NULL,
GetEffect
(
EFFECT_0
));
115
}
116
117
void
Register
()
OVERRIDE
118
{
119
AfterDispel
+=
AuraDispelFn
(
spell_hexlord_unstable_affliction_AuraScript::HandleDispel
);
120
}
121
};
122
123
AuraScript
*
GetAuraScript
() const
OVERRIDE
124
{
125
return
new
spell_hexlord_unstable_affliction_AuraScript
();
126
}
127
};
128
129
void
AddSC_boss_hex_lord_malacrass
()
130
{
131
new
boss_hexlord_malacrass
();
132
new
spell_hexlord_unstable_affliction
();
133
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
TYPEID_PLAYER
static constexpr TypeID TYPEID_PLAYER
Definition
ElunaCompatibility.h:20
ScriptMgr.h
ScriptedCreature.h
EFFECT_0
@ EFFECT_0
Definition
SharedDefines.h:18
SpellAuraEffects.h
sSpellMgr
#define sSpellMgr
Definition
SpellMgr.h:744
SpellScript.h
AuraDispelFn
#define AuraDispelFn(F)
Definition
SpellScript.h:641
UNIT_STATE_CASTING
@ UNIT_STATE_CASTING
Definition
Unit.h:527
Events
Events
Definition
alterac_valley.cpp:40
SAY_PLAYER_KILL
@ SAY_PLAYER_KILL
Definition
boss_akilzon.cpp:13
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
SAY_DEATH
@ SAY_DEATH
Definition
boss_hexlord.cpp:19
SAY_PLAYER_KILL
@ SAY_PLAYER_KILL
Definition
boss_hexlord.cpp:15
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_hexlord.cpp:14
SAY_PET_DEATH
@ SAY_PET_DEATH
Definition
boss_hexlord.cpp:18
SAY_SIPHON_SOUL
@ SAY_SIPHON_SOUL
Definition
boss_hexlord.cpp:17
SAY_SPIRIT_BOLTS
@ SAY_SPIRIT_BOLTS
Definition
boss_hexlord.cpp:16
SPELL_WL_UNSTABLE_AFFL_DISPEL
@ SPELL_WL_UNSTABLE_AFFL_DISPEL
Definition
boss_hexlord.cpp:25
SPELL_WL_UNSTABLE_AFFL
@ SPELL_WL_UNSTABLE_AFFL
Definition
boss_hexlord.cpp:24
AddSC_boss_hex_lord_malacrass
void AddSC_boss_hex_lord_malacrass()
Definition
boss_hexlord.cpp:129
AuraScript
Definition
SpellScript.h:436
AuraScript::AuraScript
AuraScript()
Definition
SpellScript.h:597
AuraScript::GetCaster
Unit * GetCaster() const
Definition
SpellScript.cpp:940
AuraScript::GetEffect
AuraEffect * GetEffect(uint8 effIndex) const
Definition
SpellScript.cpp:1075
AuraScript::AfterDispel
HookList< AuraDispelHandler > AfterDispel
Definition
SpellScript.h:640
BossAI::events
EventMap events
Definition
ScriptedCreature.h:439
BossAI::BossAI
BossAI(Creature *creature, uint32 bossId)
Definition
ScriptedCreature.cpp:456
BossAI::_JustDied
void _JustDied()
Definition
ScriptedCreature.cpp:474
BossAI::_Reset
void _Reset()
Definition
ScriptedCreature.cpp:462
BossAI::_EnterCombat
void _EnterCombat()
Definition
ScriptedCreature.cpp:485
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
DispelInfo
Definition
Unit.h:834
DispelInfo::GetDispeller
Unit * GetDispeller() const
Definition
Unit.h:840
SpellInfo
Definition
SpellInfo.h:158
SpellScriptLoader::SpellScriptLoader
SpellScriptLoader(const char *name)
Definition
ScriptMgr.cpp:1372
UnitAI::DoMeleeAttackIfReady
void DoMeleeAttackIfReady()
Definition
UnitAI.cpp:28
Unit
Definition
Unit.h:1367
boss_hexlord_malacrass
Definition
boss_hexlord.cpp:33
boss_hexlord_malacrass::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_hexlord.cpp:89
boss_hexlord_malacrass::boss_hexlord_malacrass
boss_hexlord_malacrass()
Definition
boss_hexlord.cpp:36
spell_hexlord_unstable_affliction::spell_hexlord_unstable_affliction_AuraScript
Definition
boss_hexlord.cpp:101
spell_hexlord_unstable_affliction::spell_hexlord_unstable_affliction_AuraScript::HandleDispel
void HandleDispel(DispelInfo *dispelInfo)
Definition
boss_hexlord.cpp:111
spell_hexlord_unstable_affliction::spell_hexlord_unstable_affliction_AuraScript::PrepareAuraScript
PrepareAuraScript(spell_hexlord_unstable_affliction_AuraScript)
spell_hexlord_unstable_affliction::spell_hexlord_unstable_affliction_AuraScript::Register
void Register() OVERRIDE
Definition
boss_hexlord.cpp:117
spell_hexlord_unstable_affliction::spell_hexlord_unstable_affliction_AuraScript::Validate
bool Validate(SpellInfo const *) OVERRIDE
Definition
boss_hexlord.cpp:104
spell_hexlord_unstable_affliction
Definition
boss_hexlord.cpp:96
spell_hexlord_unstable_affliction::GetAuraScript
AuraScript * GetAuraScript() const OVERRIDE
Definition
boss_hexlord.cpp:123
spell_hexlord_unstable_affliction::spell_hexlord_unstable_affliction
spell_hexlord_unstable_affliction()
Definition
boss_hexlord.cpp:98
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_hexlord_malacrass::boss_hex_lord_malacrassAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_hexlord.cpp:47
boss_hexlord_malacrass::boss_hex_lord_malacrassAI::Reset
void Reset() OVERRIDE
Definition
boss_hexlord.cpp:42
boss_hexlord_malacrass::boss_hex_lord_malacrassAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_hexlord.cpp:53
boss_hexlord_malacrass::boss_hex_lord_malacrassAI::KilledUnit
void KilledUnit(Unit *victim) OVERRIDE
Definition
boss_hexlord.cpp:59
boss_hexlord_malacrass::boss_hex_lord_malacrassAI::boss_hex_lord_malacrassAI
boss_hex_lord_malacrassAI(Creature *creature)
Definition
boss_hexlord.cpp:40
boss_hexlord_malacrass::boss_hex_lord_malacrassAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_hexlord.cpp:65
zulaman.h
GetZulAmanAI
CreatureAI * GetZulAmanAI(Creature *creature)
Definition
zulaman.h:69
DATA_HEXLORD
@ DATA_HEXLORD
Definition
zulaman.h:19
src
server
scripts
EasternKingdoms
ZulAman
boss_hexlord.cpp
Generated on
for Project SkyFire Core by
1.17.0