TrinityCore
boss_koralon.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 "ScriptedCreature.h"
20#include "SpellScript.h"
21#include "vault_of_archavon.h"
22
24{
28 SPELL_FLAME_CINDER_B = 66681, // don't know the real relation to SPELL_FLAME_CINDER_A atm.
31
32 // Flame Warder
34};
35
37{
42};
43
44struct boss_koralon : public BossAI
45{
46 boss_koralon(Creature* creature) : BossAI(creature, DATA_KORALON) { }
47
48 void JustEngagedWith(Unit* who) override
49 {
51
53 events.ScheduleEvent(EVENT_BURNING_BREATH, 15s); // 1st after 15sec, then every 45sec
54 events.ScheduleEvent(EVENT_METEOR_FISTS, 75s); // 1st after 75sec, then every 45sec
56
58 }
59
60 void UpdateAI(uint32 diff) override
61 {
62 if (!UpdateVictim())
63 return;
64
65 events.Update(diff);
66
68 return;
69
70 while (uint32 eventId = events.ExecuteEvent())
71 {
72 switch (eventId)
73 {
77 break;
81 break;
85 break;
89 break;
90 default:
91 break;
92 }
93
95 return;
96 }
97 }
98};
99
100// 66725, 68161 - Meteor Fists
102{
103 bool Validate(SpellInfo const* /*spellInfo*/) override
104 {
106 }
107
108 void TriggerFists(AuraEffect* aurEff, ProcEventInfo& eventInfo)
109 {
112 }
113
114 void Register() override
115 {
117 }
118};
119
120// 66765, 67333 - Meteor Fists
121// 66809, 67331 - Meteor Fists
123{
124public:
126 {
127 _chainTargets = 0;
128 }
129
130private:
131 void FilterTargets(std::list<WorldObject*>& targets)
132 {
133 _chainTargets = uint8(targets.size());
134 }
135
137 {
138 if (_chainTargets)
140 }
141
142 void Register() override
143 {
146 }
147
148private:
150};
151
152// 66808, 68160 - Meteor Fists
154{
155 bool Validate(SpellInfo const* /*spellInfo*/) override
156 {
158 }
159
160 void TriggerFists(AuraEffect* aurEff, ProcEventInfo& eventInfo)
161 {
164 }
165
166 void Register() override
167 {
169 }
170};
171
173{
178}
uint8_t uint8
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:142
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
@ EFFECT_0
Definition: SharedDefines.h:30
@ TARGET_UNIT_TARGET_ENEMY
@ SPELL_AURA_DUMMY
#define AuraEffectProcFn(F, I, N)
Definition: SpellScript.h:2160
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition: SpellScript.h:864
#define SpellHitFn(F)
Definition: SpellScript.h:854
@ UNIT_STATE_CASTING
Definition: Unit.h:270
KoralonEvents
@ EVENT_FLAME_CINDER
@ EVENT_BURNING_BREATH
@ EVENT_METEOR_FISTS
@ EVENT_BURNING_FURY
KoralonSpells
@ SPELL_METEOR_FISTS_DAMAGE
@ SPELL_BURNING_FURY
@ SPELL_FLAME_CINDER_A
@ SPELL_FLAME_CINDER_B
@ SPELL_METEOR_FISTS
@ SPELL_FW_METEOR_FISTS_DAMAGE
@ SPELL_BURNING_BREATH
void AddSC_boss_koralon()
void PreventDefaultAction()
Unit * GetTarget() const
HookList< EffectProcHandler > OnEffectProc
Definition: SpellScript.h:2155
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
Unit * GetProcTarget() const
Definition: Unit.h:495
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
int32 GetHitDamage() const
HookList< HitHandler > OnHit
Definition: SpellScript.h:850
void SetHitDamage(int32 damage)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:863
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
void TriggerFists(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void TriggerFists(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
boss_koralon(Creature *creature)
@ DATA_KORALON
#define RegisterVaultOfArchavonCreatureAI(ai_name)