Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_emperor_dagran_thaurissan.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 "
blackrock_depths.h
"
9
10
enum
Yells
11
{
12
SAY_AGGRO
= 0,
13
SAY_SLAY
= 1
14
};
15
16
enum
Spells
17
{
18
SPELL_HANDOFTHAURISSAN
= 17492,
19
SPELL_AVATAROFFLAME
= 15636
20
};
21
22
class
boss_emperor_dagran_thaurissan
:
public
CreatureScript
23
{
24
public
:
25
boss_emperor_dagran_thaurissan
() :
CreatureScript
(
"boss_emperor_dagran_thaurissan"
) { }
26
27
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
28
{
29
return
new
boss_draganthaurissanAI
(creature);
30
}
31
32
struct
boss_draganthaurissanAI
:
public
ScriptedAI
33
{
34
boss_draganthaurissanAI
(
Creature
* creature) :
ScriptedAI
(creature)
35
{
36
instance
=
me
->GetInstanceScript();
37
}
38
39
InstanceScript
*
instance
;
40
uint32
HandOfThaurissan_Timer
;
41
uint32
AvatarOfFlame_Timer
;
42
//uint32 Counter;
43
44
void
Reset
()
OVERRIDE
45
{
46
HandOfThaurissan_Timer
= 4000;
47
AvatarOfFlame_Timer
= 25000;
48
//Counter= 0;
49
}
50
51
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
52
{
53
Talk
(
SAY_AGGRO
);
54
me
->CallForHelp(
VISIBLE_RANGE
);
55
}
56
57
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
58
{
59
Talk
(
SAY_SLAY
);
60
}
61
62
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
63
{
64
if
(
Creature
* Moira =
ObjectAccessor::GetCreature
(*
me
,
instance
?
instance
->GetData64(
DATA_MOIRA
) : 0))
65
{
66
Moira->AI()->EnterEvadeMode();
67
Moira->setFaction(35);
68
}
69
}
70
71
void
UpdateAI
(
uint32
diff)
OVERRIDE
72
{
73
//Return since we have no target
74
if
(!
UpdateVictim
())
75
return
;
76
77
if
(
HandOfThaurissan_Timer
<= diff)
78
{
79
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
80
DoCast
(target,
SPELL_HANDOFTHAURISSAN
);
81
82
//3 Hands of Thaurissan will be casted
83
//if (Counter < 3)
84
//{
85
// HandOfThaurissan_Timer = 1000;
86
// ++Counter;
87
//}
88
//else
89
//{
90
HandOfThaurissan_Timer
= 5000;
91
//Counter = 0;
92
//}
93
}
else
HandOfThaurissan_Timer
-= diff;
94
95
//AvatarOfFlame_Timer
96
if
(
AvatarOfFlame_Timer
<= diff)
97
{
98
DoCastVictim
(
SPELL_AVATAROFFLAME
);
99
AvatarOfFlame_Timer
= 18000;
100
}
else
AvatarOfFlame_Timer
-= diff;
101
102
DoMeleeAttackIfReady
();
103
}
104
};
105
};
106
107
void
AddSC_boss_draganthaurissan
()
108
{
109
new
boss_emperor_dagran_thaurissan
();
110
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
ScriptMgr.h
VISIBLE_RANGE
#define VISIBLE_RANGE
Definition
ScriptMgr.h:56
ScriptedCreature.h
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
blackrock_depths.h
DATA_MOIRA
@ DATA_MOIRA
Definition
blackrock_depths.h:48
SAY_SLAY
@ SAY_SLAY
Definition
boss_alizabal.cpp:20
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
AddSC_boss_draganthaurissan
void AddSC_boss_draganthaurissan()
Definition
boss_emperor_dagran_thaurissan.cpp:107
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_emperor_dagran_thaurissan.cpp:12
SAY_SLAY
@ SAY_SLAY
Definition
boss_emperor_dagran_thaurissan.cpp:13
SPELL_AVATAROFFLAME
@ SPELL_AVATAROFFLAME
Definition
boss_emperor_dagran_thaurissan.cpp:19
SPELL_HANDOFTHAURISSAN
@ SPELL_HANDOFTHAURISSAN
Definition
boss_emperor_dagran_thaurissan.cpp:18
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
InstanceScript
Definition
InstanceScript.h:123
ObjectAccessor::GetCreature
static Creature * GetCreature(WorldObject const &u, uint64 guid)
Definition
ObjectAccessor.cpp:209
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_emperor_dagran_thaurissan
Definition
boss_emperor_dagran_thaurissan.cpp:23
boss_emperor_dagran_thaurissan::boss_emperor_dagran_thaurissan
boss_emperor_dagran_thaurissan()
Definition
boss_emperor_dagran_thaurissan.cpp:25
boss_emperor_dagran_thaurissan::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_emperor_dagran_thaurissan.cpp:27
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
Yells
Definition
boss_illidan.cpp:256
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI
Definition
boss_emperor_dagran_thaurissan.cpp:33
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::AvatarOfFlame_Timer
uint32 AvatarOfFlame_Timer
Definition
boss_emperor_dagran_thaurissan.cpp:41
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::boss_draganthaurissanAI
boss_draganthaurissanAI(Creature *creature)
Definition
boss_emperor_dagran_thaurissan.cpp:34
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::Reset
void Reset() OVERRIDE
Definition
boss_emperor_dagran_thaurissan.cpp:44
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_emperor_dagran_thaurissan.cpp:71
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_emperor_dagran_thaurissan.cpp:51
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::HandOfThaurissan_Timer
uint32 HandOfThaurissan_Timer
Definition
boss_emperor_dagran_thaurissan.cpp:40
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
boss_emperor_dagran_thaurissan.cpp:57
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::instance
InstanceScript * instance
Definition
boss_emperor_dagran_thaurissan.cpp:39
boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_emperor_dagran_thaurissan.cpp:62
src
server
scripts
EasternKingdoms
BlackrockMountain
BlackrockDepths
boss_emperor_dagran_thaurissan.cpp
Generated on
for Project SkyFire Core by
1.17.0