TrinityCore
Loading...
Searching...
No Matches
boss_mennu_the_betrayer.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 "ScriptedCreature.h"
24#include "the_slave_pens.h"
25
27{
30 SAY_DEATH = 2
31};
32
41
50
51// 17941 - Mennu the Betrayer
53{
55
68
69 void KilledUnit(Unit* /*victim*/) override
70 {
72 }
73
74 void JustDied(Unit* /*killer*/) override
75 {
76 _JustDied();
78 }
79
80 void UpdateAI(uint32 diff) override
81 {
82 if (!UpdateVictim())
83 return;
84
85 events.Update(diff);
86
88 return;
89
90 while (uint32 eventId = events.ExecuteEvent())
91 {
92 switch (eventId)
93 {
96 events.Repeat(30s, 35s);
97 break;
100 events.Repeat(30s, 40s);
101 break;
104 events.Repeat(35s, 40s);
105 break;
108 events.Repeat(15s, 25s);
109 break;
112 events.Repeat(15s, 25s);
113 break;
114 default:
115 break;
116 }
117
119 return;
120 }
121 }
122};
123
uint32_t uint32
Definition Define.h:154
@ UNIT_STATE_CASTING
Definition Unit.h:290
@ SPELL_CORRUPTED_NOVA_TOTEM
@ SPELL_TAINTED_STONESKIN_TOTEM
@ SPELL_TAINTED_EARTHGRAB_TOTEM
@ SPELL_MENNUS_HEALING_WARD
@ EVENT_CORRUPTED_NOVA_TOTEM
@ EVENT_TAINTED_EARTHGRAB_TOTEM
@ EVENT_TAINTED_STONESKIN_TOTEM
@ EVENT_MENNUS_HEALING_WARD
void AddSC_boss_mennu_the_betrayer()
void JustEngagedWith(Unit *who) override
EventMap events
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void Update(uint32 time)
Definition EventMap.h:77
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
EventId ExecuteEvent()
Definition EventMap.cpp:77
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:172
Definition Unit.h:647
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
void JustEngagedWith(Unit *who) override
boss_mennu_the_betrayer(Creature *creature)
void UpdateAI(uint32 diff) override
@ DATA_MENNU_THE_BETRAYER
#define RegisterSlavePensCreatureAI(ai_name)