TrinityCore
boss_lord_alexei_barov.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/* ScriptData
19SDName: Boss_Lord_Alexei_Barov
20SD%Complete: 100
21SDComment: aura applied/defined in database
22SDCategory: Scholomance
23EndScriptData */
24
25#include "scholomance.h"
26#include "ScriptMgr.h"
27#include "ScriptedCreature.h"
28
30{
33 SPELL_UNHOLY_AURA = 17467
34};
35
37{
40};
41
43{
44 public: boss_lord_alexei_barov() : CreatureScript("boss_lord_alexei_barov") { }
45
47 {
49
50 void Reset() override
51 {
52 _Reset();
53
56 }
57
58 void JustEngagedWith(Unit* who) override
59 {
63 }
64
65 void UpdateAI(uint32 diff) override
66 {
67 if (!UpdateVictim())
68 return;
69
70 events.Update(diff);
71
73 return;
74
75 while (uint32 eventId = events.ExecuteEvent())
76 {
77 switch (eventId)
78 {
79 case EVENT_IMMOLATE:
82 break;
86 break;
87 default:
88 break;
89 }
90
92 return;
93 }
94 }
95 };
96
97 CreatureAI* GetAI(Creature* creature) const override
98 {
99 return GetScholomanceAI<boss_lordalexeibarovAI>(creature);
100 }
101};
102
104{
106}
uint32_t uint32
Definition: Define.h:142
Spells
Definition: PlayerAI.cpp:32
@ UNIT_STATE_CASTING
Definition: Unit.h:270
@ SPELL_VEILOFSHADOW
@ SPELL_UNHOLY_AURA
void AddSC_boss_lordalexeibarov()
@ EVENT_VEILOFSHADOW
void JustEngagedWith(Unit *who) override
EventMap events
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
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:627
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
CreatureAI * GetAI(Creature *creature) const override
@ DATA_LORDALEXEIBAROV
Definition: scholomance.h:31