Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_arcanist_doan.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_Arcanist_Doan
8
SD%Complete: 100
9
SDComment:
10
SDCategory: Scarlet Monastery
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
16
enum
Yells
17
{
18
SAY_AGGRO
= 0,
19
SAY_SPECIALAE
= 1
20
};
21
22
enum
Spells
23
{
24
SPELL_POLYMORPH
= 13323,
25
SPELL_AOESILENCE
= 8988,
26
SPELL_ARCANEEXPLOSION
= 9433,
27
SPELL_FIREAOE
= 9435,
28
SPELL_ARCANEBUBBLE
= 9438
29
};
30
31
class
boss_arcanist_doan
:
public
CreatureScript
32
{
33
public
:
34
boss_arcanist_doan
() :
CreatureScript
(
"boss_arcanist_doan"
) { }
35
36
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
37
{
38
return
new
boss_arcanist_doanAI
(creature);
39
}
40
41
struct
boss_arcanist_doanAI
:
public
ScriptedAI
42
{
43
boss_arcanist_doanAI
(
Creature
* creature) :
ScriptedAI
(creature) { }
44
45
uint32
Polymorph_Timer
;
46
uint32
AoESilence_Timer
;
47
uint32
ArcaneExplosion_Timer
;
48
bool
bCanDetonate
;
49
bool
bShielded
;
50
51
void
Reset
()
OVERRIDE
52
{
53
Polymorph_Timer
= 20000;
54
AoESilence_Timer
= 15000;
55
ArcaneExplosion_Timer
= 3000;
56
bCanDetonate
=
false
;
57
bShielded
=
false
;
58
}
59
60
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
61
{
62
Talk
(
SAY_AGGRO
);
63
}
64
65
void
UpdateAI
(
uint32
diff)
OVERRIDE
66
{
67
if
(!
UpdateVictim
())
68
return
;
69
70
if
(
bShielded
&&
bCanDetonate
)
71
{
72
DoCast
(
me
,
SPELL_FIREAOE
);
73
bCanDetonate
=
false
;
74
}
75
76
if
(
me
->HasAura(
SPELL_ARCANEBUBBLE
))
77
return
;
78
79
//If we are <50% hp cast Arcane Bubble
80
if
(!
bShielded
&& !
HealthAbovePct
(50))
81
{
82
//wait if we already casting
83
if
(
me
->IsNonMeleeSpellCasted(
false
))
84
return
;
85
86
Talk
(
SAY_SPECIALAE
);
87
DoCast
(
me
,
SPELL_ARCANEBUBBLE
);
88
89
bCanDetonate
=
true
;
90
bShielded
=
true
;
91
}
92
93
if
(
Polymorph_Timer
<= diff)
94
{
95
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 1))
96
DoCast
(target,
SPELL_POLYMORPH
);
97
98
Polymorph_Timer
= 20000;
99
}
100
else
Polymorph_Timer
-= diff;
101
102
//AoESilence_Timer
103
if
(
AoESilence_Timer
<= diff)
104
{
105
DoCastVictim
(
SPELL_AOESILENCE
);
106
AoESilence_Timer
= urand(15000, 20000);
107
}
108
else
AoESilence_Timer
-= diff;
109
110
//ArcaneExplosion_Timer
111
if
(
ArcaneExplosion_Timer
<= diff)
112
{
113
DoCastVictim
(
SPELL_ARCANEEXPLOSION
);
114
ArcaneExplosion_Timer
= 8000;
115
}
116
else
ArcaneExplosion_Timer
-= diff;
117
118
DoMeleeAttackIfReady
();
119
}
120
};
121
};
122
123
void
AddSC_boss_arcanist_doan
()
124
{
125
new
boss_arcanist_doan
();
126
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
ScriptMgr.h
ScriptedCreature.h
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_arcanist_doan.cpp:18
SAY_SPECIALAE
@ SAY_SPECIALAE
Definition
boss_arcanist_doan.cpp:19
SPELL_FIREAOE
@ SPELL_FIREAOE
Definition
boss_arcanist_doan.cpp:27
SPELL_AOESILENCE
@ SPELL_AOESILENCE
Definition
boss_arcanist_doan.cpp:25
SPELL_ARCANEBUBBLE
@ SPELL_ARCANEBUBBLE
Definition
boss_arcanist_doan.cpp:28
SPELL_POLYMORPH
@ SPELL_POLYMORPH
Definition
boss_arcanist_doan.cpp:24
SPELL_ARCANEEXPLOSION
@ SPELL_ARCANEEXPLOSION
Definition
boss_arcanist_doan.cpp:26
AddSC_boss_arcanist_doan
void AddSC_boss_arcanist_doan()
Definition
boss_arcanist_doan.cpp:123
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
SPELL_POLYMORPH
@ SPELL_POLYMORPH
Definition
boss_priestess_delrissa.cpp:734
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::SelectTarget
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition
UnitAI.cpp:66
UnitAI::DoCastVictim
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:168
Unit
Definition
Unit.h:1367
boss_arcanist_doan
Definition
boss_arcanist_doan.cpp:32
boss_arcanist_doan::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_arcanist_doan.cpp:36
boss_arcanist_doan::boss_arcanist_doan
boss_arcanist_doan()
Definition
boss_arcanist_doan.cpp:34
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::HealthAbovePct
bool HealthAbovePct(uint32 pct) const
Definition
ScriptedCreature.h:251
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
Yells
Definition
boss_illidan.cpp:256
boss_arcanist_doan::boss_arcanist_doanAI
Definition
boss_arcanist_doan.cpp:42
boss_arcanist_doan::boss_arcanist_doanAI::bShielded
bool bShielded
Definition
boss_arcanist_doan.cpp:49
boss_arcanist_doan::boss_arcanist_doanAI::Polymorph_Timer
uint32 Polymorph_Timer
Definition
boss_arcanist_doan.cpp:45
boss_arcanist_doan::boss_arcanist_doanAI::Reset
void Reset() OVERRIDE
Definition
boss_arcanist_doan.cpp:51
boss_arcanist_doan::boss_arcanist_doanAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_arcanist_doan.cpp:65
boss_arcanist_doan::boss_arcanist_doanAI::AoESilence_Timer
uint32 AoESilence_Timer
Definition
boss_arcanist_doan.cpp:46
boss_arcanist_doan::boss_arcanist_doanAI::bCanDetonate
bool bCanDetonate
Definition
boss_arcanist_doan.cpp:48
boss_arcanist_doan::boss_arcanist_doanAI::boss_arcanist_doanAI
boss_arcanist_doanAI(Creature *creature)
Definition
boss_arcanist_doan.cpp:43
boss_arcanist_doan::boss_arcanist_doanAI::ArcaneExplosion_Timer
uint32 ArcaneExplosion_Timer
Definition
boss_arcanist_doan.cpp:47
boss_arcanist_doan::boss_arcanist_doanAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_arcanist_doan.cpp:60
src
server
scripts
EasternKingdoms
ScarletMonastery
boss_arcanist_doan.cpp
Generated on
for Project SkyFire Core by
1.17.0