TrinityCore
Loading...
Searching...
No Matches
boss_vectus.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 "scholomance.h"
24#include "ScriptedCreature.h"
25
32
34{
35 // Passive
37
38 // Combat
40 SPELL_FLAMESTRIKE = 18399
41};
42
48
50{
51 PATH_VECTUS_IDLE = 3904400
52};
53
54// 10432 - Vectus
55struct boss_vectus : public BossAI
56{
57 boss_vectus(Creature* creature) : BossAI(creature, DATA_VECTUS) { }
58
59 void Reset() override
60 {
61 events.Reset();
62
64 }
65
66 void JustEngagedWith(Unit* /*who*/) override
67 {
70 }
71
72 void UpdateAI(uint32 diff) override
73 {
74 if (!UpdateVictim())
75 return;
76
77 events.Update(diff);
78
80 return;
81
82 while (uint32 eventId = events.ExecuteEvent())
83 {
84 switch (eventId)
85 {
88 events.Repeat(20s, 30s);
89 break;
93 events.Repeat(10s, 15s);
94 break;
95 default:
96 break;
97 }
98
100 return;
101 }
102 }
103
104 void WaypointReached(uint32 waypointId, uint32 pathId) override
105 {
106 if (pathId != PATH_VECTUS_IDLE)
107 return;
108
109 if (waypointId == 2)
111 else if (waypointId == 3)
113 else if (waypointId == 4)
115 }
116};
117
uint32_t uint32
Definition Define.h:154
@ UNIT_STATE_CASTING
Definition Unit.h:290
VectusSpells
@ SPELL_FLAMESTRIKE
@ SPELL_FIRE_SHIELD
@ SPELL_BLAST_WAVE
VectusEvents
@ EVENT_FLAMESTRIKE
@ EVENT_BLAST_WAVE
void AddSC_boss_vectus()
VectusTexts
@ TALK_IDLE2
@ TALK_IDLE3
@ TALK_IDLE
VectusPaths
@ PATH_VECTUS_IDLE
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
void Reset()
Definition EventMap.cpp:25
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
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
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
@ DATA_VECTUS
Definition scholomance.h:39
#define RegisterScholomanceCreatureAI(ai_name)
Definition scholomance.h:72
void UpdateAI(uint32 diff) override
void Reset() override
boss_vectus(Creature *creature)
void WaypointReached(uint32 waypointId, uint32 pathId) override
void JustEngagedWith(Unit *) override