TrinityCore
obsidian_sanctum.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 "CellImpl.h"
20#include "GridNotifiersImpl.h"
21#include "InstanceScript.h"
22#include "MotionMaster.h"
23#include "ObjectAccessor.h"
24#include "obsidian_sanctum.h"
25#include "ScriptedCreature.h"
26#include "TemporarySummon.h"
27
29{
30 //Mini bosses common spells
31 SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase
32
33 //Miniboses (Vesperon, Shadron, Tenebron)
34 SPELL_SHADOW_BREATH = 57570, // Inflicts 6938 to 8062 Fire damage to enemies in a cone in front of the caster.
35 SPELL_SHADOW_FISSURE = 57579, // Deals 6188 to 8812 Shadow damage to any enemy within the Shadow fissure after 5 sec.
36
37 //Vesperon
38 //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times
39 NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon
40 SPELL_POWER_OF_VESPERON = 61251, // Vesperon's presence decreases the maximum health of all enemies by 25%.
41 SPELL_TWILIGHT_TORMENT_VESP = 57948, // (Shadow only) trigger 57935 then 57988
42 SPELL_TWILIGHT_TORMENT_VESP_ACO = 58853, // (Fire and Shadow) trigger 58835 then 57988
43
44 //Shadron
45 //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times
46 NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron
47 SPELL_POWER_OF_SHADRON = 58105, // Shadron's presence increases Fire damage taken by all enemies by 100%.
48 SPELL_GIFT_OF_TWILIGTH_SHA = 57835, // TARGET_SCRIPT shadron
49 SPELL_GIFT_OF_TWILIGTH_SAR = 58766, // TARGET_SCRIPT sartharion
50 SPELL_VOID_BLAST = 57581, // Twilight Fissure
51
52 //Tenebron
53 //in the portal spawns 6 eggs, if not killed in time (approx. 20s) they will hatch, whelps can cast 60708
54 SPELL_POWER_OF_TENEBRON = 61248, // Tenebron's presence increases Shadow damage taken by all enemies by 100%.
55 //Tenebron, dummy spell
56 SPELL_SUMMON_TWILIGHT_WHELP = 58035, // doesn't work, will spawn NPC_TWILIGHT_WHELP
57 SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP = 58826, // doesn't work, will spawn NPC_SHARTHARION_TWILIGHT_WHELP
66
67 SPELL_TWILIGHT_SHIFT_ENTER = 57620, // enter phase. Player get this when click GO
68 SPELL_TWILIGHT_SHIFT = 57874, // Twilight Shift Aura
69 SPELL_TWILIGHT_SHIFT_REMOVAL = 61187, // leave phase
70 SPELL_TWILIGHT_SHIFT_REMOVAL_ALL = 61190, // leave phase (probably version to make all leave)
71
72 //Whelps
75 SPELL_FADE_ARMOR = 60708, // Reduces the armor of an enemy by 1500 for 15s
76
77 //flame tsunami
78 SPELL_FLAME_TSUNAMI = 57494, // the visual dummy
79 SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction
80
81 SPELL_FLAME_TSUNAMI_DMG_AURA = 57491, // periodic damage, npc has this aura
83 NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike
84
85 //using these custom points for dragons start and end
87 POINT_ID_LAND = 200
88};
89
90enum Misc
91{
93};
94
95#define MAX_WAYPOINT 6
96//points around raid "isle", counter clockwise. should probably be adjusted to be more alike
98{
99 { 3214.012f, 468.932f, 98.652f, 0.0f },
100 { 3244.950f, 468.427f, 98.652f, 0.0f },
101 { 3283.520f, 496.869f, 98.652f, 0.0f },
102 { 3287.316f, 555.875f, 98.652f, 0.0f },
103 { 3250.479f, 585.827f, 98.652f, 0.0f },
104 { 3209.969f, 566.523f, 98.652f, 0.0f }
105};
106
107Position const AcolyteofShadron = { 3363.92f, 534.703f, 97.2683f, 0.0f };
108Position const AcolyteofShadron2 = { 3246.57f, 551.263f, 58.6164f, 0.0f };
109Position const AcolyteofVesperon = { 3145.68f, 520.71f, 89.7f, 0.0f };
110Position const AcolyteofVesperon2 = { 3246.57f, 551.263f, 58.6164f, 0.0f };
111
113{
114 { 3219.28f, 669.121f, 88.5549f, 0.0f },
115 { 3221.55f, 682.852f, 90.5361f, 0.0f },
116 { 3239.77f, 685.94f, 90.3168f, 0.0f },
117 { 3250.33f, 669.749f, 88.7637f, 0.0f },
118 { 3246.6f, 642.365f, 84.8752f, 0.0f },
119 { 3233.68f, 653.117f, 85.7051f, 0.0f }
120};
121
123{
124 { 3252.73f, 515.762f, 58.5501f, 0.0f },
125 { 3256.56f, 521.119f, 58.6061f, 0.0f },
126 { 3255.63f, 527.513f, 58.7568f, 0.0f },
127 { 3264.90f, 525.865f, 58.6436f, 0.0f },
128 { 3264.26f, 516.364f, 58.8011f, 0.0f },
129 { 3257.54f, 502.285f, 58.2077f, 0.0f }
130};
131
133{
143
145{
146 // Shared Events
150
151 // Tenebron
153
154 // Shadron
156
157 // Vesperon
160
161// to control each dragons common abilities
163{
164 dummy_dragonAI(Creature* creature) : ScriptedAI(creature)
165 {
166 Initialize();
167 instance = creature->GetInstanceScript();
168 }
169
171 {
172 waypointId = 0;
173 portalRespawnTime = 30000;
174 _canMoveFree = false;
175 _canLoot = true;
176 }
177
178 void Reset() override
179 {
181
182 events.Reset();
183 Initialize();
184 }
185
186 void JustEngagedWith(Unit* /*who*/) override
187 {
190
193 }
194
195 void SetData(uint32 type, uint32 value) override
196 {
197 if (type == DATA_CAN_LOOT)
198 _canLoot = value != 0;
199 }
200
201 void MovementInform(uint32 type, uint32 pointId) override
202 {
203 if (!instance || type != POINT_MOTION_TYPE)
204 return;
205
206 // debug_log("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId);
207
208 // if healers messed up the raid and we was already initialized
210 {
212 return;
213 }
214
215 // this is end, if we reach this, don't do much
216 if (pointId == POINT_ID_LAND)
217 {
220 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0, true))
221 {
222 AddThreat(target, 1.0f);
223 me->Attack(target, true);
224 me->GetMotionMaster()->MoveChase(target);
225 }
226
227 _canMoveFree = false;
228 return;
229 }
230
231 // increase
232 waypointId = pointId + 1;
233
234 // if we have reached a point bigger or equal to count, it mean we must reset to point 0
236 {
237 if (!_canMoveFree)
238 _canMoveFree = true;
239
240 waypointId = 0;
241 }
242
244 }
245
246 // "opens" the portal and does the "opening" whisper
248 {
249 // there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database
250
251 // using a grid search here seem to be more efficient than caching all four guids
252 // in instance script and calculate range to each.
253 GameObject* portal = me->FindNearestGameObject(GO_TWILIGHT_PORTAL, 50.0f, false);
254
255 switch (me->GetEntry())
256 {
257 case NPC_TENEBRON:
258 {
260 {
261 for (uint32 i = 0; i < 6; ++i)
263 }
264 else
265 {
266 for (uint32 i = 0; i < 6; ++i)
268 }
269 break;
270 }
271 case NPC_SHADRON:
272 {
275 else
277
278 break;
279 }
280 case NPC_VESPERON:
281 {
283 {
285 {
287 acolyte->InterruptNonMeleeSpells(true);
288 me->CastSpell(me, 32747, false);
289 }
290 }
291 else
292 {
294 {
296 acolyte->InterruptNonMeleeSpells(true);
297 me->CastSpell(me, 32747, false);
298 }
299 }
300
301 break;
302 }
303 }
304
307
308 // By using SetRespawnTime() we will actually "spawn" the object with our defined time.
309 // Once time is up, portal will disappear again.
310 if (portal && !portal->isSpawned())
312
313 // Unclear what are expected to happen if one drake has a portal open already
314 // Refresh respawnTime so time again are set to 30secs?
315 }
316
317 void KilledUnit(Unit* who) override
318 {
319 if (who->GetTypeId() == TYPEID_PLAYER)
320 Talk(SAY_SLAY);
321 }
322
323 void JustDied(Unit* /*killer*/) override
324 {
325 if (!_canLoot)
326 me->SetTappedBy(nullptr);
327
328 uint32 spellId = 0;
329
330 switch (me->GetEntry())
331 {
332 case NPC_TENEBRON:
333 spellId = SPELL_POWER_OF_TENEBRON;
336 break;
337 case NPC_SHADRON:
338 spellId = SPELL_POWER_OF_SHADRON;
341 if (Creature* acolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f))
342 acolyte->KillSelf();
343 break;
344 case NPC_VESPERON:
345 spellId = SPELL_POWER_OF_VESPERON;
349 acolyte->KillSelf();
350 break;
351 }
352
354 me->RemoveAurasDueToSpell(spellId);
355
357
358 // not if solo mini-boss fight
360 return;
361
362 // Twilight Revenge to main boss
364 if (sartharion->IsAlive())
365 {
366 sartharion->RemoveAurasDueToSpell(spellId);
367 DoCast(sartharion, SPELL_TWILIGHT_REVENGE, true);
368 }
369 }
370
371 void UpdateAI(uint32 diff) override
372 {
373 events.Update(diff);
374
376 {
379 }
380 }
381
382 void ExecuteEvent(uint32 eventId)
383 {
384 switch (eventId)
385 {
387 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
389 events.ScheduleEvent(eventId, 15s, 20s);
390 break;
394 events.ScheduleEvent(eventId, 20s, 25s);
395 break;
396 default:
397 break;
398 }
399 }
400
401 protected:
408};
409
410/*######
411## Tenebron
412######*/
413
415{
416 npc_tenebron(Creature* creature) : dummy_dragonAI(creature) { }
417
418 void Reset() override
419 {
421 }
422
423 void JustEngagedWith(Unit* who) override
424 {
426
428 }
429
430 void UpdateAI(uint32 diff) override
431 {
432 // if no target, update dummy and return
433 if (!UpdateVictim())
434 {
436 return;
437 }
438
439 events.Update(diff);
440
441 while (uint32 eventId = events.ExecuteEvent())
442 {
443 switch (eventId)
444 {
445 case EVENT_HATCH_EGGS:
446 OpenPortal();
448 break;
449 default:
451 break;
452 }
453 }
454 }
455};
456
457/*######
458## Shadron
459######*/
460
462{
463 npc_shadron(Creature* creature) : dummy_dragonAI(creature) { }
464
465 void Reset() override
466 {
468
471
474
476 }
477
478 void JustEngagedWith(Unit* who) override
479 {
481
483 }
484
485 void UpdateAI(uint32 diff) override
486 {
487 // if no target, update dummy and return
488 if (!UpdateVictim())
489 {
491 return;
492 }
493
494 events.Update(diff);
495
496 while (uint32 eventId = events.ExecuteEvent())
497 {
498 switch (eventId)
499 {
503 else
504 {
506 return;
507
508 OpenPortal();
509
511
513 }
514 break;
515 default:
517 break;
518 }
519 }
520 }
521};
522
523/*######
524## Vesperon
525######*/
526
528{
529 npc_vesperon(Creature* creature) : dummy_dragonAI(creature) { }
530
531 void Reset() override
532 {
534 }
535
536 void JustEngagedWith(Unit* who) override
537 {
539
541 }
542
543 void UpdateAI(uint32 diff) override
544 {
545 // if no target, update dummy and return
546 if (!UpdateVictim())
547 {
549 return;
550 }
551
552 events.Update(diff);
553
554 while (uint32 eventId = events.ExecuteEvent())
555 {
556 switch (eventId)
557 {
561 else
562 {
563 OpenPortal();
566 }
567 break;
568 default:
570 break;
571 }
572 }
573 }
574};
575
576/*######
577## Acolyte of Shadron
578######*/
579
581{
583 {
584 instance = creature->GetInstanceScript();
585 }
586
587 void Reset() override
588 {
589 // Despawn the NPC automatically after 28 seconds
590 me->DespawnOrUnsummon(28s);
591
592 //if not solo fight, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT
594 {
596 sartharion->AddAura(SPELL_GIFT_OF_TWILIGTH_SAR, sartharion);
597 }
598 else
599 {
601 shadron->AddAura(SPELL_GIFT_OF_TWILIGTH_SHA, shadron);
602 }
603
605 }
606
607 void JustDied(Unit* /*killer*/) override
608 {
611
612 instance->instance->DoOnPlayers([](Player* player)
613 {
614 if (player->IsAlive() && player->HasAura(SPELL_TWILIGHT_SHIFT) && !player->GetVictim())
615 {
616 player->CastSpell(player, SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true);
617 player->CastSpell(player, SPELL_TWILIGHT_RESIDUE, true);
618 player->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
619 player->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
620 }
621 });
622
623 // not solo fight, so main boss has debuff
625 if (debuffTarget->IsAlive() && debuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR))
626 debuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR);
627
628 // event not in progress, then solo fight and must remove debuff mini-boss
630 if (debuffTarget->IsAlive() && debuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
631 debuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA);
632 }
633
634private:
636};
637
638/*######
639## Acolyte of Vesperon
640######*/
641
643{
645 {
646 instance = creature->GetInstanceScript();
647 }
648
649 void Reset() override
650 {
651 // Despawn the NPC automatically after 28 seconds
652 me->DespawnOrUnsummon(28s);
653
655
657 }
658
659 void JustDied(Unit* /*killer*/) override
660 {
662
663 // remove twilight torment on Vesperon
665 {
667
668 if (vesperon->IsAlive() && vesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP))
669 vesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP);
670 }
671
672 instance->instance->DoOnPlayers([](Player* player)
673 {
674 if (player->IsAlive() && player->HasAura(SPELL_TWILIGHT_SHIFT) && !player->GetVictim())
675 {
676 player->CastSpell(player, SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true);
677 player->CastSpell(player, SPELL_TWILIGHT_RESIDUE, true);
678 player->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
679 player->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
680 }
681 if (player->IsAlive() && player->HasAura(SPELL_TWILIGHT_TORMENT_VESP) && !player->GetVictim())
683 });
684
686 instance->DoRemoveAurasDueToSpellOnPlayers(57935, true, true);
687 instance->DoRemoveAurasDueToSpellOnPlayers(58835, true, true); // Components of spell Twilight Torment
688 }
689
690private:
692};
693
694/*######
695## Twilight Eggs
696######*/
697
699{
702
704{
705 npc_twilight_eggs(Creature* creature) : ScriptedAI(creature)
706 {
707 SetCombatMovement(false);
708 instance = creature->GetInstanceScript();
709 }
710
711 void Reset() override
712 {
714
716 }
717
719 {
721
724 else
726 me->KillSelf();
727 }
728
729 void JustSummoned(Creature* who) override
730 {
731 DoZoneInCombat(who);
732 }
733
734 void UpdateAI(uint32 diff) override
735 {
736 events.Update(diff);
737
739 {
742
743 SpawnWhelps();
744 }
745 }
746
747private:
750};
751
752/*######
753## Flame Tsunami
754######*/
755
757{
761
763{
764 npc_flame_tsunami(Creature* creature) : ScriptedAI(creature)
765 {
766 me->SetDisplayId(11686);
768 }
769
770 void Reset() override
771 {
776 me->SetUninteractible(true);
777 }
778
779 void UpdateAI(uint32 diff) override
780 {
781 events.Update(diff);
782
783 while (uint32 eventId = events.ExecuteEvent())
784 {
785 switch (eventId)
786 {
790 break;
792 if (Unit* lavaBlaze = GetClosestCreatureWithEntry(me, NPC_LAVA_BLAZE, 10.0f, true))
793 lavaBlaze->CastSpell(lavaBlaze, SPELL_FLAME_TSUNAMI_BUFF, true);
795 break;
796 }
797 }
798 }
799
800private:
802};
803
804/*######
805## Twilight Fissure
806######*/
807
809{
812
814{
816 {
817 SetCombatMovement(false);
818 }
819
820 void Reset() override
821 {
823 me->SetUninteractible(true);
824 me->AddAura(46265, me); // Wrong, can't find proper visual
825 me->AddAura(69422, me);
827 }
828
829 void UpdateAI(uint32 diff) override
830 {
831 events.Update(diff);
832
834 {
837 //DoCastVictim(57620, true);
838 //DoCastVictim(57874, true);
840 me->KillSelf();
841 }
842 }
843
844private:
846};
847
848/*######
849## Twilight Whelps
850######*/
851
853{
856
858{
860 {
861 }
862
863 void Reset() override
864 {
868 }
869
870 void UpdateAI(uint32 diff) override
871 {
872 if (!UpdateVictim())
873 return;
874
875 // twilight torment
876 events.Update(diff);
877
879 {
882 }
883 }
884
885private:
887};
888
890{
891 public:
892 achievement_twilight_assist() : AchievementCriteriaScript("achievement_twilight_assist") { }
893
894 bool OnCheck(Player* /*player*/, Unit* target) override
895 {
896 return target && target->GetAI()->GetData(TWILIGHT_ACHIEVEMENTS) >= 1;
897 }
898};
899
901{
902 public:
903 achievement_twilight_duo() : AchievementCriteriaScript("achievement_twilight_duo") { }
904
905 bool OnCheck(Player* /*player*/, Unit* target) override
906 {
907 return target && target->GetAI()->GetData(TWILIGHT_ACHIEVEMENTS) >= 2;
908 }
909};
910
912{
913 public:
914 achievement_twilight_zone() : AchievementCriteriaScript("achievement_twilight_zone") { }
915
916 bool OnCheck(Player* /*player*/, Unit* target) override
917 {
918 return target && target->GetAI()->GetData(TWILIGHT_ACHIEVEMENTS) == 3;
919 }
920};
921
923{
936}
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
@ IN_PROGRESS
@ DONE
@ NOT_STARTED
@ POINT_MOTION_TYPE
@ TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
Definition: ObjectDefines.h:64
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: ObjectDefines.h:68
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
Enums
Definition: boss_aeonus.cpp:31
void DoZoneInCombat()
Definition: CreatureAI.h:161
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:219
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
void SetReactState(ReactStates st)
Definition: Creature.h:160
void SetTappedBy(Unit const *unit, bool withGroup=true)
Definition: Creature.cpp:1339
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
void SetDisplayId(uint32 displayId, bool setNative=false) override
Definition: Creature.cpp:3402
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
void Reset()
Definition: EventMap.cpp:21
bool isSpawned() const
Definition: GameObject.h:256
void SetRespawnTime(int32 respawn)
virtual bool SetBossState(uint32 id, EncounterState state)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
virtual ObjectGuid GetGuidData(uint32 type) const override
InstanceMap * instance
EncounterState GetBossState(uint32 id) const
void DoOnPlayers(T &&fn)
Definition: Map.h:370
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
virtual uint32 GetData(uint32) const
Definition: UnitAI.h:73
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 InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:3089
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:11618
bool IsAlive() const
Definition: Unit.h:1164
UnitAI * GetAI() const
Definition: Unit.h:660
void SetUninteractible(bool apply)
Definition: Unit.cpp:8147
bool Attack(Unit *victim, bool meleeAttack)
Definition: Unit.cpp:5670
Unit * GetVictim() const
Definition: Unit.h:715
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 SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.h:921
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:834
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition: Object.cpp:2170
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
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
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2148
bool OnCheck(Player *, Unit *target) override
bool OnCheck(Player *, Unit *target) override
bool OnCheck(Player *, Unit *target) override
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
@ NPC_LAVA_BLAZE
@ SPELL_TWILIGHT_REVENGE
@ SPELL_POWER_OF_VESPERON
@ SPELL_POWER_OF_SHADRON
@ SPELL_SHADOW_FISSURE
@ NPC_TWILIHT_WHELP
@ POINT_ID_LAND
@ SPELL_TWILIGHT_SHIFT_REMOVAL
@ SPELL_VOID_BLAST
@ POINT_ID_INIT
@ SPELL_HATCH_EGGS_EFFECT_H
@ SPELL_FLAME_TSUNAMI_BUFF
@ NPC_SARTHARION_TWILIGHT_EGG
@ SPELL_TWILIGHT_SHIFT_ENTER
@ NPC_SARTHARION_TWILIGHT_WHELP
@ SPELL_POWER_OF_TENEBRON
@ SPELL_HATCH_EGGS_EFFECT
@ SPELL_TWILIGHT_SHIFT
@ NPC_ACOLYTE_OF_VESPERON
@ NPC_TWILIGHT_EGG
@ SPELL_TWILIGHT_TORMENT_VESP_ACO
@ SPELL_TWILIGHT_RESIDUE
@ SPELL_TWILIGHT_TORMENT_VESP
@ SPELL_HATCH_EGGS
@ SPELL_SUMMON_TWILIGHT_WHELP
@ SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP
@ NPC_ACOLYTE_OF_SHADRON
@ SPELL_FLAME_TSUNAMI
@ SPELL_FLAME_TSUNAMI_LEAP
@ SPELL_SHADOW_BREATH
@ SPELL_FLAME_TSUNAMI_DMG_AURA
@ SPELL_GIFT_OF_TWILIGTH_SAR
@ SPELL_FADE_ARMOR
@ NPC_TWILIGHT_WHELP
@ SPELL_TWILIGHT_SHIFT_REMOVAL_ALL
@ SPELL_HATCH_EGGS_H
@ SPELL_GIFT_OF_TWILIGTH_SHA
TwilightWhelps
@ EVENT_FADE_ARMOR
DragonEvents
@ EVENT_ACOLYTE_SHADRON
@ EVENT_HATCH_EGGS
@ EVENT_SHADOW_BREATH
@ EVENT_ACOLYTE_VESPERON
@ EVENT_FREE_MOVEMENT
@ EVENT_SHADOW_FISSURE
FlameTsunami
@ EVENT_TSUNAMI_TIMER
@ EVENT_TSUNAMI_BUFF
TwilightFissure
@ EVENT_VOID_BLAST
@ DATA_CAN_LOOT
Position const AcolyteofShadron
TwilightEggs
@ EVENT_TWILIGHT_EGGS
Position const AcolyteofVesperon
Position const AcolyteofVesperon2
#define MAX_WAYPOINT
Position const TwilightEggsSarth[]
void AddSC_obsidian_sanctum()
SharedTextIds
@ SAY_DEATH
@ SAY_AGGRO
@ WHISPER_OPEN_PORTAL
@ SAY_SPECIAL
@ WHISPER_OPENED_PORTAL
@ SAY_SLAY
@ SAY_BREATH
@ SAY_RESPOND
Position const dragonCommon[MAX_WAYPOINT]
Position const AcolyteofShadron2
@ GO_TWILIGHT_PORTAL
#define RegisterObsidianSanctumCreatureAI(ai_name)
@ DATA_VESPERON
@ DATA_TENEBRON
@ DATA_SARTHARION
@ DATA_PORTAL_OPEN
@ DATA_SHADRON
@ TWILIGHT_ACHIEVEMENTS
@ NPC_VESPERON
@ NPC_SHADRON
@ NPC_TENEBRON
void SetCombatMovement(bool allowMovement)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
void SetData(uint32 type, uint32 value) override
dummy_dragonAI(Creature *creature)
void JustDied(Unit *) override
void ExecuteEvent(uint32 eventId)
void KilledUnit(Unit *who) override
void JustEngagedWith(Unit *) override
void MovementInform(uint32 type, uint32 pointId) override
InstanceScript * instance
void UpdateAI(uint32 diff) override
void Reset() override
void JustDied(Unit *) override
npc_acolyte_of_shadron(Creature *creature)
npc_acolyte_of_vesperon(Creature *creature)
void JustDied(Unit *) override
void Reset() override
npc_flame_tsunami(Creature *creature)
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
npc_shadron(Creature *creature)
void Reset() override
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
npc_tenebron(Creature *creature)
void Reset() override
void Reset() override
npc_twilight_eggs(Creature *creature)
void UpdateAI(uint32 diff) override
InstanceScript * instance
void JustSummoned(Creature *who) override
void UpdateAI(uint32 diff) override
npc_twilight_fissure(Creature *creature)
void UpdateAI(uint32 diff) override
npc_twilight_whelp(Creature *creature)
void Reset() override
void UpdateAI(uint32 diff) override
npc_vesperon(Creature *creature)
void Reset() override
void JustEngagedWith(Unit *who) override