TrinityCore
Loading...
Searching...
No Matches
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
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
99 }
100};
101
102// 66725, 68161 - Meteor Fists
104{
106
107 bool Validate(SpellInfo const* /*spellInfo*/) override
108 {
110 }
111
112 void TriggerFists(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
113 {
115 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_METEOR_FISTS_DAMAGE, aurEff);
116 }
117
122};
123
124// 66765, 67333 - Meteor Fists
125// 66809, 67331 - Meteor Fists
157
158// 66808, 68160 - Meteor Fists
179
uint8_t uint8
Definition Define.h:135
uint32_t uint32
Definition Define.h:133
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
@ EFFECT_0
@ TARGET_UNIT_TARGET_ENEMY
@ SPELL_AURA_DUMMY
#define AuraEffectProcFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define SpellHitFn(F)
@ UNIT_STATE_CASTING
Definition Unit.h:235
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()
HookList< EffectProcHandler > OnEffectProc
void JustEngagedWith(Unit *who) override
EventMap events
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void Update(uint32 time)
Definition EventMap.h:67
EventId ExecuteEvent()
Definition EventMap.cpp:73
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
Unit * GetActionTarget() const
Definition Unit.h:509
Unit * GetActor()
Definition Unit.h:508
int32 GetHitDamage() const
HookList< HitHandler > OnHit
void SetHitDamage(int32 damage)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
PrepareAuraScript(spell_flame_warder_meteor_fists)
void TriggerFists(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_koralon_meteor_fists_damage)
void FilterTargets(std::list< WorldObject * > &targets)
void TriggerFists(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_koralon_meteor_fists)
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
boss_koralon(Creature *creature)
@ DATA_KORALON
#define RegisterVaultOfArchavonCreatureAI(ai_name)