TrinityCore
Loading...
Searching...
No Matches
boss_talon_king_ikiss.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 "Containers.h"
20#include "ScriptedCreature.h"
21#include "SpellScript.h"
22#include "sethekk_halls.h"
23
32
44
53
54// 18473 - Talon King Ikiss
56{
58
59 void Reset() override
60 {
61 _Reset();
63 }
64
66 void MoveInLineOfSight(Unit* who) override
67 {
68 if (!_introDone && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
69 {
70 _introDone = true;
72 }
73
75 }
76
87
88 void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
89 {
91 {
94 }
95 }
96
97 void KilledUnit(Unit* who) override
98 {
99 if (who->GetTypeId() == TYPEID_PLAYER)
100 Talk(SAY_SLAY);
101 }
102
103 void JustDied(Unit* /*killer*/) override
104 {
105 _JustDied();
107 }
108
109 void ExecuteEvent(uint32 eventId) override
110 {
111 switch (eventId)
112 {
113 case EVENT_POLYMORPH:
114 // Second top aggro in normal, random target in heroic.
115 if (IsHeroic())
117 else
119 events.Repeat(15s, 17500ms);
120 break;
123 events.Repeat(7s, 12s);
124 break;
125 case EVENT_SLOW:
127 events.Repeat(15s, 40s);
128 break;
129 case EVENT_BLINK:
134 break;
138 break;
139 default:
140 break;
141 }
142 }
143
144private:
147};
148
149// 38194 - Blink
151{
153
154 bool Validate(SpellInfo const* /*spellInfo*/) override
155 {
157 }
158
159 void FilterTargets(std::list<WorldObject*>& targets)
160 {
161 if (targets.empty())
162 return;
163
165 targets.clear();
166 targets.push_back(target);
167 }
168
174
180};
181
uint32_t uint32
Definition Define.h:133
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ TARGET_UNIT_SRC_AREA_ENEMY
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
DamageEffectType
Definition Unit.h:352
void AddSC_boss_talon_king_ikiss()
@ SPELL_ARCANE_BUBBLE
@ SPELL_ARCANE_VOLLEY
@ SPELL_MANA_SHIELD
@ SPELL_ARCANE_EXPLOSION
@ SPELL_BLINK_TELEPORT
@ EMOTE_ARCANE_EXPLOSION
@ EVENT_ARCANE_VOLLEY
@ EVENT_ARCANE_EXPLOSION
void JustEngagedWith(Unit *who) override
EventMap events
virtual void MoveInLineOfSight(Unit *)
Creature *const me
Definition CreatureAI.h:82
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
TypeID GetTypeId() const
Definition Object.h:93
Unit * GetCaster() const
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:243
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
Definition Unit.h:918
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:1192
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:108
@ DATA_TALON_KING_IKISS
#define RegisterSethekkHallsCreatureAI(ai_name)
bool IsHeroic() const
void JustEngagedWith(Unit *who) override
void KilledUnit(Unit *who) override
void ExecuteEvent(uint32 eventId) override
void MoveInLineOfSight(Unit *who) override
boss_talon_king_ikiss(Creature *creature)
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void JustDied(Unit *) override