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/*
19 * Timers requires to be revisited
20 */
21
22#include "ScriptMgr.h"
23#include "blood_furnace.h"
24#include "ScriptedCreature.h"
25
27{
30 SAY_DEATH = 2
31};
32
39
45
46// 17381 - The Maker
47struct boss_the_maker : public BossAI
48{
49 boss_the_maker(Creature* creature) : BossAI(creature, DATA_THE_MAKER) { }
50
51 void JustEngagedWith(Unit* who) override
52 {
54
56
59 }
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 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
80 DoCast(target, SPELL_DOMINATION);
81 events.Repeat(20s, 30s);
82 break;
85 events.Repeat(10s, 20s);
86 break;
87 default:
88 break;
89 }
90 }
91};
92
uint32_t uint32
Definition Define.h:154
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
#define RegisterBloodFurnaceCreatureAI(ai_name)
@ DATA_THE_MAKER
MakerTexts
@ SAY_DEATH
@ SAY_AGGRO
@ SAY_SLAY
MakerEvents
@ EVENT_DOMINATION
@ EVENT_EXPLODING_BEAKER
void AddSC_boss_the_maker()
MakerSpells
@ SPELL_EXPLODING_BEAKER_H
@ SPELL_EXPLODING_BEAKER
@ SPELL_DOMINATION
TypeID GetTypeId() const
Definition BaseEntity.h:166
void JustEngagedWith(Unit *who) override
EventMap events
Creature *const me
Definition CreatureAI.h:63
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
uint32 GetThreatListPlayerCount(bool includeOffline=false) const
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:172
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:71
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:81
Definition Unit.h:647
ThreatManager & GetThreatManager()
Definition Unit.h:1093
T const & DUNGEON_MODE(T const &normal5, T const &heroic10) const
void ExecuteEvent(uint32 eventId) override
boss_the_maker(Creature *creature)
void KilledUnit(Unit *who) override
void JustDied(Unit *) override
void JustEngagedWith(Unit *who) override