TrinityCore
Loading...
Searching...
No Matches
boss_the_maker.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 "ScriptedCreature.h"
20#include "blood_furnace.h"
21
23{
26 SAY_DEATH = 2
27};
28
36
44
45// 17381 - The Maker
46struct boss_the_maker : public BossAI
47{
48 boss_the_maker(Creature* creature) : BossAI(creature, DATA_THE_MAKER) { }
49
60
61 void KilledUnit(Unit* who) override
62 {
63 if (who->GetTypeId() == TYPEID_PLAYER)
65 }
66
67 void JustDied(Unit* /*killer*/) override
68 {
69 _JustDied();
71 }
72
73 void ExecuteEvent(uint32 eventId) override
74 {
75 switch (eventId)
76 {
79 events.Repeat(15s, 23s);
80 break;
82 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
84 events.Repeat(4s, 12s);
85 break;
87 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
88 DoCast(target, SPELL_DOMINATION);
89 events.Repeat(120s);
90 break;
91 case EVENT_KNOCKDOWN:
93 events.Repeat(4s, 12s);
94 break;
95 default:
96 break;
97 }
98 }
99};
100
uint32_t uint32
Definition Define.h:133
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
#define RegisterBloodFurnaceCreatureAI(ai_name)
@ DATA_THE_MAKER
MakerTexts
@ SAY_DEATH
@ SAY_AGGRO
@ SAY_SLAY
MakerEvents
@ EVENT_DOMINATION
@ EVENT_EXPLODING_BREAKER
@ EVENT_ACID_SPRAY
@ EVENT_KNOCKDOWN
void AddSC_boss_the_maker()
MakerSpells
@ SPELL_KNOCKDOWN
@ SPELL_EXPLODING_BREAKER
@ SPELL_ACID_SPRAY
@ SPELL_DOMINATION
void JustEngagedWith(Unit *who) override
EventMap events
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
TypeID GetTypeId() const
Definition Object.h:93
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
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
void ExecuteEvent(uint32 eventId) override
boss_the_maker(Creature *creature)
void KilledUnit(Unit *who) override
void JustDied(Unit *) override
void JustEngagedWith(Unit *who) override