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 "blood_furnace.h"
20#include "ScriptedCreature.h"
21
23{
26 SAY_DIE = 2
27};
28
36
44
46{
47 public:
48 boss_the_maker() : CreatureScript("boss_the_maker") { }
49
50 struct boss_the_makerAI : public BossAI
51 {
52 boss_the_makerAI(Creature* creature) : BossAI(creature, DATA_THE_MAKER) { }
53
64
65 void KilledUnit(Unit* who) override
66 {
67 if (who->GetTypeId() == TYPEID_PLAYER)
69 }
70
71 void JustDied(Unit* /*killer*/) override
72 {
73 _JustDied();
75 }
76
77 void ExecuteEvent(uint32 eventId) override
78 {
79 switch (eventId)
80 {
84 break;
86 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
89 break;
91 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
92 DoCast(target, SPELL_DOMINATION);
94 break;
95 case EVENT_KNOCKDOWN:
98 break;
99 default:
100 break;
101 }
102 }
103 };
104
105 CreatureAI* GetAI(Creature* creature) const override
106 {
107 return GetBloodFurnaceAI<boss_the_makerAI>(creature);
108 }
109};
110
112{
113 new boss_the_maker();
114}
uint32_t uint32
Definition Define.h:154
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
Spells
Definition PlayerAI.cpp:32
@ DATA_THE_MAKER
@ SAY_AGGRO
@ SAY_KILL
@ SAY_DIE
@ SPELL_KNOCKDOWN
@ SPELL_EXPLODING_BREAKER
@ SPELL_ACID_SPRAY
@ SPELL_DOMINATION
void AddSC_boss_the_maker()
@ EVENT_DOMINATION
@ EVENT_EXPLODING_BREAKER
@ EVENT_ACID_SPRAY
@ EVENT_KNOCKDOWN
Yells
TypeID GetTypeId() const
Definition BaseEntity.h:166
void JustEngagedWith(Unit *who) override
EventMap events
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:180
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
CreatureAI * GetAI(Creature *creature) const override
void KilledUnit(Unit *who) override
void ExecuteEvent(uint32 eventId) override
void JustEngagedWith(Unit *who) override