TrinityCore
Loading...
Searching...
No Matches
boss_pandemonius.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/*
19 * Timers requires to be revisited
20 * Is Dark Shell cast really delayed?
21 */
22
23#include "ScriptMgr.h"
24#include "ScriptedCreature.h"
25#include "SpellInfo.h"
26#include "SpellMgr.h"
27#include "mana_tombs.h"
28
36
38{
40 SPELL_VOID_BLAST_SCRIPT = 32326, // NYI. Is it used? What it does?
41 SPELL_DARK_SHELL = 32358
42};
43
49
51
52// 18341 - Pandemonius
53struct boss_pandemonius : public BossAI
54{
56
57 void Reset() override
58 {
59 _Reset();
61 }
62
70
71 void OnSpellStart(SpellInfo const* spell) override
72 {
73 if (spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_DARK_SHELL, me))
75 }
76
77 void KilledUnit(Unit* /*victim*/) override
78 {
80 }
81
82 void JustDied(Unit* /*killer*/) override
83 {
85 _JustDied();
86 }
87
88 void ExecuteEvent(uint32 eventId) override
89 {
90 switch (eventId)
91 {
93 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
94 {
95 DoCast(target, SPELL_VOID_BLAST);
97 }
98
99 if (_voidBlastCounter == 5)
100 {
103 }
104 else
105 {
108 }
109 break;
110 case EVENT_DARK_SHELL:
113 break;
114 default:
115 break;
116 }
117 }
118
119private:
121};
122
uint32_t uint32
Definition Define.h:133
#define sSpellMgr
Definition SpellMgr.h:738
PandemoniusSpells
@ SPELL_VOID_BLAST
@ SPELL_DARK_SHELL
@ SPELL_VOID_BLAST_SCRIPT
uint32 constexpr DARK_SHELL_EVENT_GROUP
void AddSC_boss_pandemonius()
PandemoniusTexts
@ SAY_DEATH
@ SAY_AGGRO
@ SAY_SLAY
@ EMOTE_DARK_SHELL
PandemoniusEvents
@ EVENT_VOID_BLAST
@ EVENT_DARK_SHELL
void JustEngagedWith(Unit *who) override
EventMap events
Creature *const me
Definition CreatureAI.h:82
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:95
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
uint32 Id
Definition SpellInfo.h:289
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
#define RegisterManaTombsCreatureAI(ai_name)
Definition mana_tombs.h:48
@ DATA_PANDEMONIUS
Definition mana_tombs.h:31
void KilledUnit(Unit *) override
void JustEngagedWith(Unit *who) override
boss_pandemonius(Creature *creature)
void OnSpellStart(SpellInfo const *spell) override
void Reset() override
void JustDied(Unit *) override
void ExecuteEvent(uint32 eventId) override