Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_azshir_the_sleepless.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_Azshir_the_Sleepless
8SD%Complete: 80
9SDComment:
10SDCategory: Scarlet Monastery
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15
22
24{
25public:
26 boss_azshir_the_sleepless() : CreatureScript("boss_azshir_the_sleepless") { }
27
29 {
30 return new boss_azshir_the_sleeplessAI(creature);
31 }
32
34 {
36
40
42 {
45 Terrify_Timer = 20000;
46 }
47
48 void EnterCombat(Unit* /*who*/) OVERRIDE { }
49
51 {
52 if (!UpdateVictim())
53 return;
54
55 //If we are <50% hp cast Soul Siphon rank 1
56 if (!HealthAbovePct(50) && !me->IsNonMeleeSpellCasted(false))
57 {
58 //SoulSiphon_Timer
59 if (SoulSiphon_Timer <= diff)
60 {
62 return;
63
64 //SoulSiphon_Timer = 20000;
65 }
66 else SoulSiphon_Timer -= diff;
67 }
68
69 //CallOfTheGrave_Timer
70 if (CallOftheGrave_Timer <= diff)
71 {
74 }
75 else CallOftheGrave_Timer -= diff;
76
77 //Terrify_Timer
78 if (Terrify_Timer <= diff)
79 {
81 Terrify_Timer = 20000;
82 }
83 else Terrify_Timer -= diff;
84
86 }
87 };
88};
89
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
void AddSC_boss_azshir_the_sleepless()
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
Creature * me
bool HealthAbovePct(uint32 pct) const
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================