TrinityCore
boss_kalecgos.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 "GameObject.h"
20#include "GameObjectAI.h"
21#include "InstanceScript.h"
22#include "MotionMaster.h"
23#include "Player.h"
24#include "ScriptedCreature.h"
25#include "SpellAuraEffects.h"
26#include "SpellScript.h"
27#include "sunwell_plateau.h"
28#include "TemporarySummon.h"
29
31{
37
44
49};
50
52{
63 SPELL_BANISH = 136466, // Changed in MoP - Patch 5.3 for solo player.
64 SPELL_ENRAGE = 44807,
86};
87
89{
106
108{
112
114{
121
123{
127
128Position const KalecgosSummonPos = { 1709.094f, 927.5035f, -74.28364f, 2.932153f };
129Position const FlyPos[2] =
130{
131 { 1704.18f, 927.999f, 57.888f },
132 { 1614.355f, 846.9694f, 119.0971f }
133};
134
136{
143};
144
145struct boss_kalecgos : public BossAI
146{
147 boss_kalecgos(Creature* creature) : BossAI(creature, DATA_KALECGOS), _isEnraged(false), _isBanished(false) { }
148
149 void Reset() override
150 {
151 _isEnraged = false;
152 _isBanished = false;
153 _Reset();
160 }
161
162 void EnterEvadeMode(EvadeReason /*why*/) override
163 {
165 return;
166
172
173 if (Creature* sathrovar = instance->GetCreature(DATA_SATHROVARR))
174 _DespawnAtEvade(Seconds(10), sathrovar);
175
177 }
178
180 {
181 std::vector<GameObject*> portals;
183 for (GameObject* portal : portals)
184 portal->Delete();
185 }
186
187 void DoAction(int32 action) override
188 {
189 switch (action)
190 {
193 break;
194 case ACTION_ENRAGE:
195 _isEnraged = true;
198 break;
199 default:
200 break;
201 }
202 }
203
204 void DamageTaken(Unit* who, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
205 {
206 if (damage >= me->GetHealth() && (!who || who->GetGUID() != me->GetGUID()))
207 damage = 0;
208 }
209
210 void JustEngagedWith(Unit* who) override
211 {
215
217 if (Creature* sathrovar = instance->GetCreature(DATA_SATHROVARR))
218 {
219 sathrovar->SetInCombatWith(kalecgosHuman);
220 kalecgosHuman->SetInCombatWith(sathrovar);
221 }
222 }
223
224 void KilledUnit(Unit* who) override
225 {
226 if (who->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
228 }
229
230 void MovementInform(uint32 type, uint32 id) override
231 {
232 if (type != POINT_MOTION_TYPE)
233 return;
234
235 switch (id)
236 {
237 case POINT_OUTRO_1:
240 break;
241 case POINT_OUTRO_2:
242 me->SetVisible(false);
244 me->KillSelf();
245 break;
246 default:
247 break;
248 }
249 }
250
251 void UpdateAI(uint32 diff) override
252 {
254 return;
255
256 events.Update(diff);
257
259 return;
260
261 while (uint32 eventId = events.ExecuteEvent())
262 {
263 switch (eventId)
264 {
266 if (roll_chance_i(20))
270 break;
273 events.Repeat(Seconds(15));
274 break;
275 case EVENT_TAIL_LASH:
277 events.Repeat(Seconds(15));
278 break;
279 case EVENT_WILD_MAGIC:
280 DoCastAOE(WildMagicSpells[urand(0, 5)], true);
281 events.Repeat(Seconds(20));
282 break;
285 events.Repeat(Seconds(20), Seconds(25));
286 break;
288 if (!_isEnraged && HealthBelowPct(10))
290
291 if (HealthBelowPct(1))
292 {
293 if (Creature* sathrovarr = instance->GetCreature(DATA_SATHROVARR))
294 {
295 if (sathrovarr->HasAura(SPELL_BANISH))
296 {
297 sathrovarr->CastSpell(sathrovarr, SPELL_TAP_CHECK, true);
298 break;
299 }
300 }
301 if (_isBanished)
302 break;
303
304 _isBanished = true;
306 events.Reset();
307 }
309 break;
311 events.Reset();
313 me->SetRegenerateHealth(false);
317 me->AttackStop();
322 break;
323 case EVENT_OUTRO_1:
324 me->SetDisableGravity(true);
327 break;
328 case EVENT_OUTRO_2:
330 break;
331 case EVENT_OUTRO_3:
334 break;
335 default:
336 break;
337 }
338
340 return;
341 }
342 }
343
344private:
347};
348
350{
351 boss_kalecgos_human(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
352
353 void Reset() override
354 {
355 _events.Reset();
357
359 _sathGUID = sath->GetGUID();
360
363 }
364
365 void JustDied(Unit* /*killer*/) override
366 {
368 }
369
370 void DamageTaken(Unit* who, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
371 {
372 if (!who || who->GetGUID() != _sathGUID)
373 damage = 0;
374
376 {
379 }
381 {
384 }
386 {
389 }
390 }
391
392 void UpdateAI(uint32 diff) override
393 {
394 if (!UpdateVictim())
395 return;
396
397 _events.Update(diff);
398
400 return;
401
402 while (uint32 eventId = _events.ExecuteEvent())
403 {
404 switch (eventId)
405 {
406 case EVENT_REVITALIZE:
409 break;
413 break;
414 default:
415 break;
416 }
417
419 return;
420 }
421 }
422
423private:
427};
428
430{
431public:
432 CurseAgonySelector(Unit* source) : NonTankTargetSelector(source, true) { }
433
434 bool operator()(WorldObject* target) const
435 {
436 if (Unit* unitTarget = target->ToUnit())
437 return !NonTankTargetSelector::operator()(unitTarget)
438 && !unitTarget->HasAura(SPELL_AGONY_CURSE)
439 && !unitTarget->HasAura(SPELL_AGONY_CURSE_ALLY)
440 && unitTarget->HasAura(SPELL_SPECTRAL_REALM_AURA);
441 return false;
442 }
443};
444
445struct boss_sathrovarr : public BossAI
446{
447 boss_sathrovarr(Creature* creature) : BossAI(creature, DATA_KALECGOS), _isEnraged(false), _isBanished(false) { }
448
449 void Reset() override
450 {
451 _isEnraged = false;
452 _isBanished = false;
453 _Reset();
458 }
459
460 void JustEngagedWith(Unit* who) override
461 {
464 }
465
466 void EnterEvadeMode(EvadeReason why) override
467 {
469 kalecgos->AI()->EnterEvadeMode(why);
470 }
471
472 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
473 {
474 Unit* unitCaster = caster->ToUnit();
475 if (!unitCaster)
476 return;
477
478 if (spellInfo->Id == SPELL_TAP_CHECK_DAMAGE)
479 {
481 Unit::Kill(unitCaster, me);
482 }
483 }
484
485 void DamageTaken(Unit* who, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
486 {
487 if (damage >= me->GetHealth() && (!who || who->GetGUID() != me->GetGUID()))
488 damage = 0;
489 }
490
491 void KilledUnit(Unit* target) override
492 {
493 if (target->GetTypeId() == TYPEID_PLAYER)
495 else if (Creature* kalecgosHuman = instance->GetCreature(DATA_KALECGOS_HUMAN))
496 {
497 if (kalecgosHuman->GetGUID() == target->GetGUID())
499 }
500 }
501
502 void JustDied(Unit* /*killer*/) override
503 {
504 _JustDied();
508 kalecgos->AI()->DoAction(ACTION_START_OUTRO);
509 }
510
511 void ExecuteEvent(uint32 eventId) override
512 {
513 switch (eventId)
514 {
515 case EVENT_SHADOWBOLT:
516 if (roll_chance_i(20))
519 events.Repeat(Seconds(7), Seconds(10));
520 break;
522 {
526 DoCast(target, SPELL_AGONY_CURSE, args);
527 else
529 events.Repeat(Seconds(20));
530 break;
531 }
533 if (roll_chance_i(20))
536 events.Repeat(Seconds(13));
537 break;
539 {
540 if (HealthBelowPct(10) && !_isEnraged)
541 {
542 _isEnraged = true;
544 kalecgos->AI()->DoAction(ACTION_ENRAGE);
545 }
546
547 if (HealthBelowPct(1))
548 {
550 {
551 if (kalecgos->HasAura(SPELL_BANISH))
552 {
554 break;
555 }
556 }
557 if (_isBanished)
558 break;
559
560 _isBanished = true;
562 }
564 break;
565 }
566 default:
567 break;
568 }
569 }
570
571private:
574};
575
577{
578 public:
579 go_kalecgos_spectral_rift() : GameObjectScript("go_kalecgos_spectral_rift") { }
580
582 {
584
585 bool OnGossipHello(Player* player) override
586 {
588 player->CastSpell(player, SPELL_SPECTRAL_REALM_TRIGGER, true);
589 return true;
590 }
591 };
592
593 GameObjectAI* GetAI(GameObject* go) const override
594 {
595 return GetSunwellPlateauAI<go_kalecgos_spectral_riftAI>(go);
596 }
597};
598
599// 46732 - Tap Check
601{
602 bool Validate(SpellInfo const* spellInfo) override
603 {
604 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
605 }
606
607 void HandleDummy(SpellEffIndex /*effIndex*/)
608 {
609 GetHitUnit()->CastSpell(GetCaster(), GetEffectInfo().CalcValue(), true);
610 }
611
612 void Register() override
613 {
615 }
616};
617
619{
620 public:
622
623 bool operator()(WorldObject* target) const
624 {
625 if (Unit* unitTarget = target->ToUnit())
626 return !NonTankTargetSelector::operator()(unitTarget)
627 && !unitTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION)
628 && !unitTarget->HasAura(SPELL_SPECTRAL_REALM_AURA);
629 return false;
630 }
631};
632
633// 44869 - Spectral Blast
635{
636 bool Validate(SpellInfo const* /*spell*/) override
637 {
638 return ValidateSpellInfo(
639 {
643 });
644 }
645
646 void FilterTargets(std::list<WorldObject*>& targets)
647 {
648 targets.remove_if(SpectralBlastSelector(GetCaster()));
649 }
650
651 void HandleDummy(SpellEffIndex /*effIndex*/)
652 {
653 Unit* caster = GetCaster();
654 Unit* target = GetHitUnit();
655
656 target->CastSpell(target, SPELL_SPECTRAL_BLAST_EFFECT, true);
657 caster->CastSpell(target, SPELL_SPECTRAL_BLAST_VISUAL, true);
658 caster->CastSpell(target, SPELL_SPECTRAL_REALM_TRIGGER, true);
659 }
660
661 void Register() override
662 {
665 }
666};
667
668// 44811 - Spectral Realm
670{
671 bool Validate(SpellInfo const* /*spellInfo*/) override
672 {
673 return ValidateSpellInfo(
674 {
679 });
680 }
681
682 void HandleDummy(SpellEffIndex /*effIndex*/)
683 {
684 Unit* target = GetHitUnit();
685 target->CastSpell(target, SPELL_SPECTRAL_REALM_TELEPORT, true);
686 target->CastSpell(target, SPELL_SPECTRAL_REALM_AURA, true);
687 target->CastSpell(target, SPELL_SPECTRAL_REALM_2, true);
688 target->CastSpell(target, SPELL_SPECTRAL_REALM_REACTION, true);
689 }
690
691 void Register() override
692 {
694 }
695};
696
697// 46021 - Spectral Realm
699{
700 bool Validate(SpellInfo const* /*spellInfo*/) override
701 {
702 return ValidateSpellInfo(
703 {
707 });
708 }
709
710 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
711 {
712 Unit* target = GetTarget();
714 target->CastSpell(target, SPELL_TELEPORT_BACK, true);
715 target->CastSpell(target, SPELL_SPECTRAL_EXHAUSTION, true);
716 }
717
718 void Register() override
719 {
721 }
722};
723
724// 45032, 45034 - Curse of Boundless Agony
726{
727 bool Validate(SpellInfo const* /*spellInfo*/) override
728 {
729 return ValidateSpellInfo(
730 {
735 });
736 }
737
738 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
739 {
740 if (InstanceScript* instance = GetTarget()->GetInstanceScript())
741 if (instance->GetBossState(DATA_KALECGOS) == IN_PROGRESS)
742 return;
743
745 }
746
747 void OnPeriodic(AuraEffect const* aurEff)
748 {
749 if (aurEff->GetTickNumber() <= 5)
751 else if (aurEff->GetTickNumber() <= 10)
753 else
755 }
756
758 {
759 if (aurEff->GetTickNumber() > 1 && aurEff->GetTickNumber() % 5 == 1)
760 aurEff->SetAmount(aurEff->GetAmount() * 2);
761 }
762
763 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
764 {
765 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_CANCEL)
766 return;
767
771 }
772
773 void Register() override
774 {
779 }
780};
781
783{
793}
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:32
@ IN_PROGRESS
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_ENGAGE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: ObjectDefines.h:68
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
Spells
Definition: PlayerAI.cpp:32
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
bool roll_chance_i(int chance)
Definition: Random.h:59
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_0
Definition: SharedDefines.h:30
@ TARGET_UNIT_SRC_AREA_ENEMY
@ EMOTE_ONESHOT_LIFTOFF
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ FACTION_FRIENDLY
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_CANCEL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_MOD_INVISIBILITY_DETECT
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:230
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition: SpellScript.h:864
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define AuraEffectUpdatePeriodicFn(F, I, N)
Definition: SpellScript.h:2052
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
EvadeReason
Definition: UnitAICommon.h:30
@ REACT_PASSIVE
Definition: UnitDefines.h:506
DamageEffectType
Definition: UnitDefines.h:131
@ UNIT_STATE_CASTING
Definition: Unit.h:270
Position const KalecgosSummonPos
void AddSC_boss_kalecgos()
@ SAY_GOOD_DEATH
@ SAY_SATH_AGGRO
@ SAY_ARCANE_BUFFET
@ SAY_GOOD_NEAR_DEATH_0
@ SAY_OUTRO_1
@ SAY_SATH_SLAY
@ SAY_SATH_DEATH
@ SAY_GOOD_NEAR_DEATH_2
@ SAY_OUTRO_2
@ EMOTE_ENRAGE
@ SAY_GOOD_NEAR_DEATH_1
@ SAY_SATH_SPELL1
@ SAY_EVIL_AGGRO
@ SAY_EVIL_SLAY
@ SAY_SATH_SPELL2
uint32 const WildMagicSpells[6]
KalecgosEvents
@ EVENT_REVITALIZE
@ EVENT_SHADOWBOLT
@ EVENT_OUTRO_2
@ EVENT_OUTRO_3
@ EVENT_WILD_MAGIC
@ EVENT_FROST_BREATH
@ EVENT_ARCANE_BUFFET
@ EVENT_AGONY_CURSE
@ EVENT_OUTRO_START
@ EVENT_TAIL_LASH
@ EVENT_SPECTRAL_BLAST
@ EVENT_HEROIC_STRIKE
@ EVENT_OUTRO_1
@ EVENT_CORRUPTION_STRIKE
@ EVENT_CHECK_TIMER
@ SPELL_WILD_MAGIC_6
@ SPELL_SPECTRAL_EXHAUSTION
@ SPELL_FROST_BREATH
@ SPELL_SPECTRAL_REALM_TRIGGER
@ SPELL_SPECTRAL_REALM_2
@ SPELL_ARCANE_BUFFET
@ SPELL_ENRAGE
@ SPELL_WILD_MAGIC_5
@ SPELL_WILD_MAGIC_3
@ SPELL_AGONY_CURSE
@ SPELL_REVITALIZE
@ SPELL_TELEPORT_BACK
@ SPELL_AGONY_CURSE_VISUAL_2
@ SPELL_SPECTRAL_BLAST_VISUAL
@ SPELL_CORRUPTION_STRIKE
@ SPELL_SHADOW_BOLT
@ SPELL_TAIL_LASH
@ SPELL_TAP_CHECK
@ SPELL_AGONY_CURSE_ALLY
@ SPELL_HEROIC_STRIKE
@ SPELL_BANISH
@ SPELL_SPECTRAL_REALM_REACTION
@ SPELL_TAP_CHECK_DAMAGE
@ SPELL_DEMONIC_VISUAL
@ SPELL_SPECTRAL_REALM_AURA
@ SPELL_AGONY_CURSE_VISUAL_1
@ SPELL_WILD_MAGIC_4
@ SPELL_AGONY_CURSE_VISUAL_3
@ SPELL_SPECTRAL_REALM_TELEPORT
@ SPELL_SPECTRAL_BLAST_EFFECT
@ SPELL_WILD_MAGIC_1
@ SPELL_WILD_MAGIC_2
@ SPELL_SPECTRAL_BLAST
Position const FlyPos[2]
KalecgosPoints
@ POINT_OUTRO_1
@ POINT_OUTRO_2
KalecSayPhases
@ PHASE_SAY_ONE
@ PHASE_OUTRO
@ PHASE_SAY_FOUR
@ PHASE_SAY_TWO
@ PHASE_SAY_THREE
SWPActions
@ ACTION_START_OUTRO
@ ACTION_ENRAGE
Yells
uint32 GetTickNumber() const
void SetAmount(int32 amount)
int32 GetAmount() const
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
Definition: SpellScript.h:2051
Unit * GetTarget() const
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
SummonList summons
EventMap events
void _JustDied()
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:299
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
void SetReactState(ReactStates st)
Definition: Creature.h:160
void SetRegenerateHealth(bool value)
Definition: Creature.h:358
CurseAgonySelector(Unit *source)
bool operator()(WorldObject *target) const
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void Repeat(Milliseconds time)
Definition: EventMap.cpp:63
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:217
void SetPhase(uint8 phase)
Definition: EventMap.cpp:28
void Reset()
Definition: EventMap.cpp:21
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
Creature * GetCreature(uint32 type)
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
static Unit * ToUnit(Object *o)
Definition: Object.h:225
TypeID GetTypeId() const
Definition: Object.h:173
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
SpectralBlastSelector(Unit *source)
bool operator()(WorldObject *target) const
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
Definition: SpellInfo.cpp:495
uint32 const Id
Definition: SpellInfo.h:325
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:577
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Definition: SpellScript.h:173
Unit * GetCaster() const
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:863
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
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 DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void SetVisible(bool x)
Definition: Unit.cpp:8351
void SetFaction(uint32 faction) override
Definition: Unit.h:859
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:3089
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition: Unit.cpp:12725
uint64 GetHealth() const
Definition: Unit.h:776
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
void RemoveAllAttackers()
Definition: Unit.cpp:5881
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void RemoveAllAuras()
Definition: Unit.cpp:4242
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition: Unit.cpp:1598
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.h:921
bool AttackStop()
Definition: Unit.cpp:5781
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.cpp:10591
void GetGameObjectListWithEntryInGrid(Container &gameObjectContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition: Object.cpp:3292
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
GameObjectAI * GetAI(GameObject *go) const override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectPeriodicUpdate(AuraEffect *aurEff)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *aurEff)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
void HandleDummy(SpellEffIndex)
@ DATA_KALECGOS
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
bool operator()(Unit const *target) const
bool HealthBelowPct(uint32 pct) const
InstanceScript * _instance
void DamageTaken(Unit *who, uint32 &damage, DamageEffectType, SpellInfo const *) override
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
void Reset() override
boss_kalecgos_human(Creature *creature)
void UpdateAI(uint32 diff) override
void KilledUnit(Unit *who) override
void DoAction(int32 action) override
boss_kalecgos(Creature *creature)
void JustEngagedWith(Unit *who) override
void EnterEvadeMode(EvadeReason) override
void Reset() override
void DamageTaken(Unit *who, uint32 &damage, DamageEffectType, SpellInfo const *) override
void MovementInform(uint32 type, uint32 id) override
void DamageTaken(Unit *who, uint32 &damage, DamageEffectType, SpellInfo const *) override
void Reset() override
void KilledUnit(Unit *target) override
void ExecuteEvent(uint32 eventId) override
void EnterEvadeMode(EvadeReason why) override
boss_sathrovarr(Creature *creature)
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
#define RegisterSunwellPlateauCreatureAI(ai_name)
@ GO_SPECTRAL_RIFT
@ DATA_SATHROVARR
@ DATA_KALECGOS_HUMAN
@ DATA_KALECGOS_DRAGON
@ NPC_KALECGOS_HUMAN