Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_princess_theradras.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_Princess_Theradras
8
SD%Complete: 100
9
SDComment:
10
SDCategory: Maraudon
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
#include "
ScriptedCreature.h
"
16
17
enum
Spells
18
{
19
SPELL_DUSTFIELD
= 21909,
20
SPELL_BOULDER
= 21832,
21
SPELL_THRASH
= 3391,
22
SPELL_REPULSIVEGAZE
= 21869
23
};
24
25
class
boss_princess_theradras
:
public
CreatureScript
26
{
27
public
:
28
boss_princess_theradras
() :
CreatureScript
(
"boss_princess_theradras"
) { }
29
30
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
31
{
32
return
new
boss_ptheradrasAI
(creature);
33
}
34
35
struct
boss_ptheradrasAI
:
public
ScriptedAI
36
{
37
boss_ptheradrasAI
(
Creature
* creature) :
ScriptedAI
(creature) { }
38
39
uint32
DustfieldTimer
;
40
uint32
BoulderTimer
;
41
uint32
ThrashTimer
;
42
uint32
RepulsiveGazeTimer
;
43
44
void
Reset
()
OVERRIDE
45
{
46
DustfieldTimer
= 8000;
47
BoulderTimer
= 2000;
48
ThrashTimer
= 5000;
49
RepulsiveGazeTimer
= 23000;
50
}
51
52
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
{ }
53
54
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
55
{
56
me
->SummonCreature(12238, 28.067f, 61.875f, -123.405f, 4.67f,
TempSummonType::TEMPSUMMON_TIMED_DESPAWN
, 600000);
57
}
58
59
void
UpdateAI
(
uint32
diff)
OVERRIDE
60
{
61
if
(!
UpdateVictim
())
62
return
;
63
64
//DustfieldTimer
65
if
(
DustfieldTimer
<= diff)
66
{
67
DoCast
(
me
,
SPELL_DUSTFIELD
);
68
DustfieldTimer
= 14000;
69
}
70
else
DustfieldTimer
-= diff;
71
72
//BoulderTimer
73
if
(
BoulderTimer
<= diff)
74
{
75
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
76
DoCast
(target,
SPELL_BOULDER
);
77
BoulderTimer
= 10000;
78
}
79
else
BoulderTimer
-= diff;
80
81
//RepulsiveGazeTimer
82
if
(
RepulsiveGazeTimer
<= diff)
83
{
84
DoCastVictim
(
SPELL_REPULSIVEGAZE
);
85
RepulsiveGazeTimer
= 20000;
86
}
87
else
RepulsiveGazeTimer
-= diff;
88
89
//ThrashTimer
90
if
(
ThrashTimer
<= diff)
91
{
92
DoCast
(
me
,
SPELL_THRASH
);
93
ThrashTimer
= 18000;
94
}
95
else
ThrashTimer
-= diff;
96
97
DoMeleeAttackIfReady
();
98
}
99
};
100
};
101
102
void
AddSC_boss_ptheradras
()
103
{
104
new
boss_princess_theradras
();
105
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
TempSummonType::TEMPSUMMON_TIMED_DESPAWN
@ TEMPSUMMON_TIMED_DESPAWN
Definition
Object.h:70
ScriptMgr.h
ScriptedCreature.h
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
SPELL_THRASH
@ SPELL_THRASH
Definition
boss_halycon.cpp:13
SPELL_BOULDER
@ SPELL_BOULDER
Definition
boss_princess_theradras.cpp:20
SPELL_DUSTFIELD
@ SPELL_DUSTFIELD
Definition
boss_princess_theradras.cpp:19
SPELL_REPULSIVEGAZE
@ SPELL_REPULSIVEGAZE
Definition
boss_princess_theradras.cpp:22
SPELL_THRASH
@ SPELL_THRASH
Definition
boss_princess_theradras.cpp:21
AddSC_boss_ptheradras
void AddSC_boss_ptheradras()
Definition
boss_princess_theradras.cpp:102
CreatureAI
Definition
CreatureAI.h:54
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_princess_theradras
Definition
boss_princess_theradras.cpp:26
boss_princess_theradras::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_princess_theradras.cpp:30
boss_princess_theradras::boss_princess_theradras
boss_princess_theradras()
Definition
boss_princess_theradras.cpp:28
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
boss_princess_theradras::boss_ptheradrasAI
Definition
boss_princess_theradras.cpp:36
boss_princess_theradras::boss_ptheradrasAI::boss_ptheradrasAI
boss_ptheradrasAI(Creature *creature)
Definition
boss_princess_theradras.cpp:37
boss_princess_theradras::boss_ptheradrasAI::ThrashTimer
uint32 ThrashTimer
Definition
boss_princess_theradras.cpp:41
boss_princess_theradras::boss_ptheradrasAI::BoulderTimer
uint32 BoulderTimer
Definition
boss_princess_theradras.cpp:40
boss_princess_theradras::boss_ptheradrasAI::DustfieldTimer
uint32 DustfieldTimer
Definition
boss_princess_theradras.cpp:39
boss_princess_theradras::boss_ptheradrasAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_princess_theradras.cpp:52
boss_princess_theradras::boss_ptheradrasAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_princess_theradras.cpp:59
boss_princess_theradras::boss_ptheradrasAI::Reset
void Reset() OVERRIDE
Definition
boss_princess_theradras.cpp:44
boss_princess_theradras::boss_ptheradrasAI::RepulsiveGazeTimer
uint32 RepulsiveGazeTimer
Definition
boss_princess_theradras.cpp:42
boss_princess_theradras::boss_ptheradrasAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_princess_theradras.cpp:54
src
server
scripts
Kalimdor
Maraudon
boss_princess_theradras.cpp
Generated on
for Project SkyFire Core by
1.17.0