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#include "ScriptMgr.h"
19#include "mana_tombs.h"
20#include "ScriptedCreature.h"
21
29
31{
33 SPELL_DARK_SHELL = 32358
34};
35
41
43
44struct boss_pandemonius : public BossAI
45{
47 {
49 }
50
51 void Reset() override
52 {
53 _Reset();
55 }
56
57 void JustDied(Unit* /*killer*/) override
58 {
60 }
61
62 void KilledUnit(Unit* /*victim*/) override
63 {
65 }
66
74
75 void ExecuteEvent(uint32 eventId) override
76 {
77 switch (eventId)
78 {
80 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
81 {
82 DoCast(target, SPELL_VOID_BLAST);
84 }
85
86 if (VoidBlastCounter == 5)
87 {
90 }
91 else
92 {
95 }
96 break;
98 if (me->IsNonMeleeSpellCast(false))
103 break;
104 default:
105 break;
106 }
107 }
108
109 private:
111};
112
uint32_t uint32
Definition Define.h:154
Spells
Definition PlayerAI.cpp:32
@ SPELL_VOID_BLAST
@ SPELL_DARK_SHELL
@ SAY_DEATH
@ SAY_AGGRO
@ SAY_KILL
@ EMOTE_DARK_SHELL
uint32 constexpr DARK_SHELL_EVENT_GROUP
void AddSC_boss_pandemonius()
@ EVENT_VOID_BLAST
@ EVENT_DARK_SHELL
void JustEngagedWith(Unit *who) override
EventMap events
Creature *const me
Definition CreatureAI.h:63
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:100
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:79
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3231
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition Unit.cpp:3201
#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 Reset() override
void JustDied(Unit *) override
void ExecuteEvent(uint32 eventId) override