Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_pandemonius.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_Pandemonius
8SD%Complete: 75
9SDComment: Not known how void blast is done (amount of rapid cast seems to be related to players in party). All mobs remaining in surrounding area should aggro when engaged.
10SDCategory: Auchindoun, Mana Tombs
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15
28
30{
31public:
32 boss_pandemonius() : CreatureScript("boss_pandemonius") { }
33
35 {
36 return new boss_pandemoniusAI(creature);
37 }
38
40 {
41 boss_pandemoniusAI(Creature* creature) : ScriptedAI(creature)
42 {
43 }
44
48
50 {
51 VoidBlast_Timer = 8000+rand()%15000;
52 DarkShell_Timer = 20000;
54 }
55
56 void JustDied(Unit* /*killer*/) OVERRIDE
57 {
59 }
60
61 void KilledUnit(Unit* /*victim*/) OVERRIDE
62 {
64 }
65
66 void EnterCombat(Unit* /*who*/) OVERRIDE
67 {
69 }
70
72 {
73 if (!UpdateVictim())
74 return;
75
76 if (VoidBlast_Timer <= diff)
77 {
78 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
79 {
80 DoCast(target, SPELL_VOID_BLAST);
81 VoidBlast_Timer = 500;
83 }
84
85 if (VoidBlast_Counter == 5)
86 {
87 VoidBlast_Timer = 15000+rand()%10000;
89 }
90 } else VoidBlast_Timer -= diff;
91
93 {
94 if (DarkShell_Timer <= diff)
95 {
96 if (me->IsNonMeleeSpellCasted(false))
97 me->InterruptNonMeleeSpells(true);
98
100
102 DarkShell_Timer = 20000;
103 } else DarkShell_Timer -= diff;
104 }
105
107 }
108 };
109};
110
112{
113 new boss_pandemonius();
114}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
#define SAY_DEATH
#define SAY_AGGRO
#define SAY_KILL
@ SPELL_VOID_BLAST
Definition boss_muru.cpp:50
@ SAY_DEATH
@ SPELL_VOID_BLAST
@ SAY_AGGRO
@ SPELL_DARK_SHELL
@ SAY_KILL
@ H_SPELL_DARK_SHELL
@ H_SPELL_VOID_BLAST
@ EMOTE_DARK_SHELL
void AddSC_boss_pandemonius()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition UnitAI.cpp:66
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================