Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_maleki_the_pallid.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_maleki_the_pallid
8SD%Complete: 100
9SDComment:
10SDCategory: Stratholme
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "stratholme.h"
16
18{
23};
24
26{
27public:
28 boss_maleki_the_pallid() : CreatureScript("boss_maleki_the_pallid") { }
29
31 {
32 return new boss_maleki_the_pallidAI(creature);
33 }
34
36 {
38 {
39 instance = me->GetInstanceScript();
40 }
41
43
47
49 {
50 Frostbolt_Timer = 1000;
51 IceTomb_Timer = 16000;
52 DrainLife_Timer = 31000;
53 }
54
55 void EnterCombat(Unit* /*who*/) OVERRIDE
56 {
57 }
58
59 void JustDied(Unit* /*killer*/) OVERRIDE
60 {
61 if (instance)
63 }
64
66 {
67 //Return since we have no target
68 if (!UpdateVictim())
69 return;
70
71 //Frostbolt
72 if (Frostbolt_Timer <= diff)
73 {
74 if (rand()%100 < 90)
76 Frostbolt_Timer = 3500;
77 } else Frostbolt_Timer -= diff;
78
79 //IceTomb
80 if (IceTomb_Timer <= diff)
81 {
82 if (rand()%100 < 65)
84 IceTomb_Timer = 28000;
85 } else IceTomb_Timer -= diff;
86
87 //DrainLife
88 if (DrainLife_Timer <= diff)
89 {
90 if (rand()%100 < 55)
92 DrainLife_Timer = 31000;
93 } else DrainLife_Timer -= diff;
94
96 }
97 };
98};
99
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ IN_PROGRESS
@ SPELL_FROSTBOLT
void AddSC_boss_maleki_the_pallid()
@ SPELL_DRAIN_MANA
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
@ TYPE_PALLID
Definition stratholme.h:14
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================