Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_bloodmage_thalnos.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
7SDName: Boss_Bloodmage_Thalnos
8SD%Complete: 100
9SDComment:
10SDCategory: Scarlet Monastery
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15
17{
21};
22
30
32{
33public:
34 boss_bloodmage_thalnos() : CreatureScript("boss_bloodmage_thalnos") { }
35
37 {
38 return new boss_bloodmage_thalnosAI(creature);
39 }
40
42 {
43 boss_bloodmage_thalnosAI(Creature* creature) : ScriptedAI(creature) { }
44
45 bool HpYell;
50
52 {
53 HpYell = false;
54 FlameShock_Timer = 10000;
55 ShadowBolt_Timer = 2000;
56 FlameSpike_Timer = 8000;
57 FireNova_Timer = 40000;
58 }
59
60 void EnterCombat(Unit* /*who*/) OVERRIDE
61 {
63 }
64
65 void KilledUnit(Unit* /*Victim*/) OVERRIDE
66 {
68 }
69
71 {
72 if (!UpdateVictim())
73 return;
74
75 //If we are <35% hp
76 if (!HpYell && !HealthAbovePct(35))
77 {
79 HpYell = true;
80 }
81
82 //FlameShock_Timer
83 if (FlameShock_Timer <= diff)
84 {
86 FlameShock_Timer = urand(10000, 15000);
87 }
88 else FlameShock_Timer -= diff;
89
90 //FlameSpike_Timer
91 if (FlameSpike_Timer <= diff)
92 {
94 FlameSpike_Timer = 30000;
95 }
96 else FlameSpike_Timer -= diff;
97
98 //FireNova_Timer
99 if (FireNova_Timer <= diff)
100 {
102 FireNova_Timer = 40000;
103 }
104 else FireNova_Timer -= diff;
105
106 //ShadowBolt_Timer
107 if (ShadowBolt_Timer <= diff)
108 {
110 ShadowBolt_Timer = 2000;
111 }
112 else ShadowBolt_Timer -= diff;
113
115 }
116 };
117};
118
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SPELL_SHADOWBOLT
void AddSC_boss_bloodmage_thalnos()
#define SAY_AGGRO
#define SAY_KILL
@ SPELL_FIRENOVA
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool HealthAbovePct(uint32 pct) const
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================