Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_sartharion.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "GridNotifiers.h"
9#include "GridNotifiersImpl.h"
10#include "Cell.h"
11#include "CellImpl.h"
12#include "obsidian_sanctum.h"
13
15{
16 //Sartharion Yell
27
29 WHISPER_OPEN_PORTAL = 6, // whisper, shared by two dragons
30
33
34 //Sartharion Spells
35 SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min.
36 SPELL_CLEAVE = 56909, // Inflicts 35% weapon damage to an enemy and its nearest allies, affecting up to 10 targets.
37 SPELL_FLAME_BREATH = 56908, // Inflicts 8750 to 11250 Fire damage to enemies in a cone in front of the caster.
38 SPELL_FLAME_BREATH_H = 58956, // Inflicts 10938 to 14062 Fire damage to enemies in a cone in front of the caster.
39 SPELL_TAIL_LASH = 56910, // A sweeping tail strike hits all enemies behind the caster, inflicting 3063 to 3937 damage and stunning them for 2 sec.
40 SPELL_TAIL_LASH_H = 58957, // A sweeping tail strike hits all enemies behind the caster, inflicting 4375 to 5625 damage and stunning them for 2 sec.
41 SPELL_WILL_OF_SARTHARION = 61254, // Sartharion's presence bolsters the resolve of the Twilight Drakes, increasing their total health by 25%. This effect also increases Sartharion's health by 25%.
42 SPELL_LAVA_STRIKE = 57571, // (Real spell casted should be 57578) 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572)
45
46 SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes
47 SPELL_PYROBUFFET_RANGE = 58907, // possibly used when player get too far away from dummy creatures (2x Creature entry 30494)
48
49 SPELL_TWILIGHT_SHIFT_ENTER = 57620, // enter phase. Player get this when click GO
50 SPELL_TWILIGHT_SHIFT = 57874, // Twilight Shift Aura
51 SPELL_TWILIGHT_SHIFT_REMOVAL = 61187, // leave phase
52 SPELL_TWILIGHT_SHIFT_REMOVAL_ALL = 61190, // leave phase (probably version to make all leave)
53
54 //Mini bosses common spells
55 SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase
56
57 //Miniboses (Vesperon, Shadron, Tenebron)
58 SPELL_SHADOW_BREATH_H = 59126, // Inflicts 8788 to 10212 Fire damage to enemies in a cone in front of the caster.
59 SPELL_SHADOW_BREATH = 57570, // Inflicts 6938 to 8062 Fire damage to enemies in a cone in front of the caster.
60
61 SPELL_SHADOW_FISSURE_H = 59127, // Deals 9488 to 13512 Shadow damage to any enemy within the Shadow fissure after 5 sec.
62 SPELL_SHADOW_FISSURE = 57579, // Deals 6188 to 8812 Shadow damage to any enemy within the Shadow fissure after 5 sec.
63
64 //Vesperon
65 //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times
66 NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon
67 SPELL_POWER_OF_VESPERON = 61251, // Vesperon's presence decreases the maximum health of all enemies by 25%.
68 SPELL_TWILIGHT_TORMENT_VESP = 57948, // (Shadow only) trigger 57935 then 57988
69 SPELL_TWILIGHT_TORMENT_VESP_ACO = 58853, // (Fire and Shadow) trigger 58835 then 57988
70
71 //Shadron
72 //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times
73 NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron
74 SPELL_POWER_OF_SHADRON = 58105, // Shadron's presence increases Fire damage taken by all enemies by 100%.
75 SPELL_GIFT_OF_TWILIGTH_SHA = 57835, // TARGET_SCRIPT shadron
76 SPELL_GIFT_OF_TWILIGTH_SAR = 58766, // TARGET_SCRIPT sartharion
77 SPELL_VOID_BLAST = 57581, // Twilight Fissure
79
80 //Tenebron
81 //in the portal spawns 6 eggs, if not killed in time (approx. 20s) they will hatch, whelps can cast 60708
82 SPELL_POWER_OF_TENEBRON = 61248, // Tenebron's presence increases Shadow damage taken by all enemies by 100%.
83 //Tenebron, dummy spell
84 SPELL_SUMMON_TWILIGHT_WHELP = 58035, // doesn't work, will spawn NPC_TWILIGHT_WHELP
85 SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP = 58826, // doesn't work, will spawn NPC_SHARTHARION_TWILIGHT_WHELP
86
94
95 //Whelps
98 SPELL_FADE_ARMOR = 60708, // Reduces the armor of an enemy by 1500 for 15s
99
100 //flame tsunami
101 SPELL_FLAME_TSUNAMI = 57494, // the visual dummy
102 SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction
103
104 SPELL_FLAME_TSUNAMI_DMG_AURA = 57491, // periodic damage, npc has this aura
106
107 NPC_FLAME_TSUNAMI = 30616, // for the flame waves
108 NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike
109
110 //using these custom points for dragons start and end
113};
114
116{
118};
119
121{
122 float m_fX, m_fY, m_fZ;
123};
124
125struct Location
126{
127 float x, y, z;
128};
129struct Locations
130{
131 float x, y, z;
132};
133
134//each dragons special points. First where fly to before connect to connon, second where land point is.
136{
137 {3212.854f, 575.597f, 109.856f}, //init
138 {3246.425f, 565.367f, 61.249f} //end
139};
140
142{
143 {3293.238f, 472.223f, 106.968f},
144 {3271.669f, 526.907f, 61.931f}
145};
146
148{
149 {3193.310f, 472.861f, 102.697f},
150 {3227.268f, 533.238f, 59.995f}
151};
152
153#define MAX_WAYPOINT 6
154//points around raid "isle", counter clockwise. should probably be adjusted to be more alike
156{
157 {3214.012f, 468.932f, 98.652f},
158 {3244.950f, 468.427f, 98.652f},
159 {3283.520f, 496.869f, 98.652f},
160 {3287.316f, 555.875f, 98.652f},
161 {3250.479f, 585.827f, 98.652f},
162 {3209.969f, 566.523f, 98.652f}
163};
164
165static Location FlameRight1Spawn = { 3200.00f, 573.211f, 57.1551f };
166static Location FlameRight1Direction = { 3289.28f, 573.211f, 57.1551f };
167static Location FlameRight2Spawn = { 3200.00f, 532.211f, 57.1551f };
168static Location FlameRight2Direction = { 3289.28f, 532.211f, 57.1551f };
169static Location FlameRight3Spawn = { 3200.00f, 491.211f, 57.1551f };
170static Location FlameRight3Direction = { 3289.28f, 491.211f, 57.1551f };
171static Location FlameLeft1Spawn = { 3289.28f, 511.711f, 57.1551f };
172static Location FlameLeft1Direction = { 3200.00f, 511.711f, 57.1551f };
173static Location FlameLeft2Spawn = { 3289.28f, 552.711f, 57.1551f };
174static Location FlameLeft2Direction = { 3200.00f, 552.711f, 57.1551f };
175
176static Location AcolyteofShadron = { 3363.92f, 534.703f, 97.2683f };
177static Location AcolyteofShadron2 = { 3246.57f, 551.263f, 58.6164f };
178static Location AcolyteofVesperon = { 3145.68f, 520.71f, 89.7f };
179static Location AcolyteofVesperon2 = { 3246.57f, 551.263f, 58.6164f };
181{
182 {3219.28f, 669.121f, 88.5549f},
183 {3221.55f, 682.852f, 90.5361f},
184 {3239.77f, 685.94f, 90.3168f},
185 {3250.33f, 669.749f, 88.7637f},
186 {3246.6f, 642.365f, 84.8752f},
187 {3233.68f, 653.117f, 85.7051f}
188};
190{
191 {3252.73f, 515.762f, 58.5501f},
192 {3256.56f, 521.119f, 58.6061f},
193 {3255.63f, 527.513f, 58.7568f},
194 {3264.90f, 525.865f, 58.6436f},
195 {3264.26f, 516.364f, 58.8011f},
196 {3257.54f, 502.285f, 58.2077f}
197};
198
199#define TWILIGHT_ACHIEVEMENTS 1
200
201/*######
202## Boss Sartharion
203######*/
204
206{
207public:
208 boss_sartharion() : CreatureScript("boss_sartharion") { }
209
211 {
212 return new boss_sartharionAI(creature);
213 }
214
216 {
217 boss_sartharionAI(Creature* creature) : ScriptedAI(creature)
218 {
219 instance = creature->GetInstanceScript();
220 }
221
223
226
229
233
239
243
245
247 {
248 m_bIsBerserk = false;
249 m_bIsSoftEnraged = false;
250
252 m_bIsHardEnraged = false;
253
254 m_uiTenebronTimer = 30000;
255 m_uiShadronTimer = 75000;
256 m_uiVesperonTimer = 120000;
257
258 m_uiFlameTsunamiTimer = 30000;
259 m_uiFlameBreathTimer = 20000;
260 m_uiTailSweepTimer = 20000;
261 m_uiCleaveTimer = 7000;
262 m_uiLavaStrikeTimer = 5000;
263
264 m_bHasCalledTenebron = false;
265 m_bHasCalledShadron = false;
266 m_bHasCalledVesperon = false;
267
268 if (me->HasAura(SPELL_TWILIGHT_REVENGE))
269 me->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE);
270
271 me->SetHomePosition(3246.57f, 551.263f, 58.6164f, 4.66003f);
272
273 drakeCount = 0;
274
275 // Drakes respawning system
276 if (instance)
277 {
278 Creature* pTenebron = Unit::GetCreature(*me, instance->GetData64(DATA_TENEBRON));
279 Creature* pShadron = Unit::GetCreature(*me, instance->GetData64(DATA_SHADRON));
280 Creature* pVesperon = Unit::GetCreature(*me, instance->GetData64(DATA_VESPERON));
281 if (pTenebron)
282 {
283 pTenebron->SetHomePosition(3239.07f, 657.235f, 86.8775f, 4.74729f);
284 if (pTenebron->IsAlive())
285 {
288 pTenebron->GetMotionMaster()->MoveTargetedHome();
289 }else
290 {
291 if (instance->GetData(TYPE_TENEBRON_PREKILLED) == false)
292 {
293 pTenebron->Respawn();
294 pTenebron->GetMotionMaster()->MoveTargetedHome();
295 pTenebron->AI()->SetData(DATA_CAN_LOOT, 0);
296 }
297 }
298 }
299 if (pShadron)
300 {
301 pShadron->SetHomePosition(3363.06f, 525.28f, 98.362f, 4.76475f);
302 if (pShadron->IsAlive())
303 {
306 pShadron->GetMotionMaster()->MoveTargetedHome();
307 }else
308 {
309 if (instance->GetData(TYPE_SHADRON_PREKILLED) == false)
310 {
311 pShadron->Respawn();
312 pShadron->GetMotionMaster()->MoveTargetedHome();
313 pShadron->AI()->SetData(DATA_CAN_LOOT, 0);
314 }
315 }
316 }
317 if (pVesperon)
318 {
319 pVesperon->SetHomePosition(3145.68f, 520.71f, 89.7f, 4.64258f);
320 if (pVesperon->IsAlive())
321 {
324 pVesperon->GetMotionMaster()->MoveTargetedHome();
325 }else
326 {
327 if (instance->GetData(TYPE_VESPERON_PREKILLED) == false)
328 {
329 pVesperon->Respawn();
330 pVesperon->GetMotionMaster()->MoveTargetedHome();
331 pVesperon->AI()->SetData(DATA_CAN_LOOT, 0);
332 }
333 }
334 }
335 }
336 }
337
339 {
340 if (instance)
342 }
343
344 void EnterCombat(Unit* /*who*/) OVERRIDE
345 {
348
349 if (instance)
350 {
352 FetchDragons();
353 }
354 }
355
356 void JustDied(Unit* /*killer*/) OVERRIDE
357 {
359
360 if (instance)
361 {
362 Creature* pTenebron = Unit::GetCreature(*me, instance->GetData64(DATA_TENEBRON));
363 Creature* pShadron = Unit::GetCreature(*me, instance->GetData64(DATA_SHADRON));
364 Creature* pVesperon = Unit::GetCreature(*me, instance->GetData64(DATA_VESPERON));
365 if (pTenebron && pTenebron->IsAlive())
366 pTenebron->DisappearAndDie();
367 if (pShadron && pShadron->IsAlive())
368 pShadron->DisappearAndDie();
369 if (pVesperon && pVesperon->IsAlive())
370 pVesperon->DisappearAndDie();
371
373 }
374 }
375
376 void KilledUnit(Unit* /*victim*/) OVERRIDE
377 {
379 }
380
381 // me->ResetLootMode() is called from Reset()
382 // AddDrakeLootMode() should only ever be called from FetchDragons(), which is called from Aggro()
384 {
385 if (me->HasLootMode(LOOT_MODE_HARD_MODE_2)) // Has two Drake loot modes
386 me->AddLootMode(LOOT_MODE_HARD_MODE_3); // Add 3rd Drake loot mode
387 else if (me->HasLootMode(LOOT_MODE_HARD_MODE_1)) // Has one Drake loot mode
388 me->AddLootMode(LOOT_MODE_HARD_MODE_2); // Add 2nd Drake loot mode
389 else // Has no Drake loot modes
390 me->AddLootMode(LOOT_MODE_HARD_MODE_1); // Add 1st Drake loot mode
391 }
392
394 {
395 if (type == TWILIGHT_ACHIEVEMENTS)
396 return drakeCount;
397
398 return 0;
399 }
400
402 {
403 if (!instance)
404 return;
405
406 me->ResetLootMode();
407 drakeCount = 0;
408
409 Creature* pFetchTene = Unit::GetCreature(*me, instance->GetData64(DATA_TENEBRON));
410 Creature* pFetchShad = Unit::GetCreature(*me, instance->GetData64(DATA_SHADRON));
411 Creature* pFetchVesp = Unit::GetCreature(*me, instance->GetData64(DATA_VESPERON));
412
413 //if at least one of the dragons are alive and are being called
414 bool bCanUseWill = false;
415
416 if (pFetchTene && pFetchTene->IsAlive() && !pFetchTene->GetVictim())
417 {
418 bCanUseWill = true;
419 if (!pFetchTene->IsInCombat())
420 {
423 ++drakeCount;
424 }
425 pFetchTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aTene[0].m_fX, m_aTene[0].m_fY, m_aTene[0].m_fZ);
426
429 }
430
431 if (pFetchShad && pFetchShad->IsAlive() && !pFetchShad->GetVictim())
432 {
433 bCanUseWill = true;
434 if (!pFetchShad->IsInCombat())
435 {
438 ++drakeCount;
439 }
440 pFetchShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aShad[0].m_fX, m_aShad[0].m_fY, m_aShad[0].m_fZ);
441
444 }
445
446 if (pFetchVesp && pFetchVesp->IsAlive() && !pFetchVesp->GetVictim())
447 {
448 bCanUseWill = true;
449 if (!pFetchVesp->IsInCombat())
450 {
453 ++drakeCount;
454 }
455 pFetchVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aVesp[0].m_fX, m_aVesp[0].m_fY, m_aVesp[0].m_fZ);
456
459 }
460
461 if (bCanUseWill)
463 }
464
465 void CallDragon(uint32 uiDataId)
466 {
467 if (instance)
468 {
469 if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(uiDataId)))
470 {
471 if (temp->IsAlive() && !temp->GetVictim())
472 {
473 temp->SetWalk(false);
474
475 if (temp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
477
478 int32 iTextId = 0;
479
480 switch (temp->GetEntry())
481 {
482 case NPC_TENEBRON:
484 temp->AddAura(SPELL_POWER_OF_TENEBRON, temp);
485 temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aTene[1].m_fX, m_aTene[1].m_fY, m_aTene[1].m_fZ);
486 break;
487 case NPC_SHADRON:
489 temp->AddAura(SPELL_POWER_OF_SHADRON, temp);
490 temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aShad[1].m_fX, m_aShad[1].m_fY, m_aShad[1].m_fZ);
491 break;
492 case NPC_VESPERON:
494 temp->AddAura(SPELL_POWER_OF_VESPERON, temp);
495 temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aVesp[1].m_fX, m_aVesp[1].m_fY, m_aVesp[1].m_fZ);
496 break;
497 }
498
499 Talk(iTextId);
500 }
501 }
502 }
503 }
504
506 {
507 if (Map* map = me->GetMap())
508 if (map->IsRaid())
509 {
510 Map::PlayerList const &PlayerList = map->GetPlayers();
511
512 if (!PlayerList.isEmpty())
513 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
514 if (i->GetSource() && i->GetSource()->IsAlive())
515 Talk(WHISPER_LAVA_CHURN, i->GetSource());
516 }
517 }
518
519 // Selects a random Fire Cyclone and makes it cast Lava Strike.
520 // FIXME: Frequency of the casts reduced to compensate 100% chance of spawning a Lava Blaze add
522 {
523 std::list<Creature*> pFireCyclonesList;
526 me->VisitNearbyObject(200.0f, searcher);
527
528 if (pFireCyclonesList.empty())
529 return;
530
531 std::list<Creature*>::iterator itr = pFireCyclonesList.begin();
532 uint32 rnd = rand()%pFireCyclonesList.size();
533
534 for (uint32 i = 0; i < rnd; ++i)
535 ++itr;
536
537 (*itr)->CastSpell(target, SPELL_LAVA_STRIKE, true);
538 }
539
541 {
542 //Return since we have no target
543 if (!UpdateVictim())
544 return;
545
546 Unit* pTene = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_TENEBRON) : 0);
547 Unit* pShad = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_SHADRON) : 0);
548 Unit* pVesp = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_VESPERON) : 0);
549
550 //spell will target dragons, if they are still alive at 35%
551 if (!m_bIsBerserk && !HealthAbovePct(35)
552 && ((pTene && pTene->IsAlive()) || (pShad && pShad->IsAlive()) || (pVesp && pVesp->IsAlive())))
553 {
556 m_bIsBerserk = true;
557 }
558
559 //soft enrage
561 {
562 // m_bIsSoftEnraged is used while determining Lava Strike cooldown.
563 m_bIsSoftEnraged = true;
564 }
565
566 // hard enrage
567 if (!m_bIsHardEnraged)
568 {
569 if (m_uiEnrageTimer <= uiDiff)
570 {
571 DoCast(me, SPELL_PYROBUFFET, true);
572 m_bIsHardEnraged = true;
573 }
574 else
575 m_uiEnrageTimer -= uiDiff;
576 }
577
578 // flame tsunami
579 if (m_uiFlameTsunamiTimer <= uiDiff)
580 {
582 switch (std::rand() % 1)
583 {
584 case 0:
585 {
592 break;
593 }
594 case 1:
595 {
600 break;
601 }
602 }
603
604 m_uiFlameTsunamiTimer = 30000;
605 }
606 else
607 m_uiFlameTsunamiTimer -= uiDiff;
608
609 // flame breath
610 if (m_uiFlameBreathTimer <= uiDiff)
611 {
614 m_uiFlameBreathTimer = std::rand() % 35000 + 25000;
615 }
616 else
617 m_uiFlameBreathTimer -= uiDiff;
618
619 // Tail Sweep
620 if (m_uiTailSweepTimer <= uiDiff)
621 {
623 m_uiTailSweepTimer = std::rand() % 20000 + 15000;
624 }
625 else
626 m_uiTailSweepTimer -= uiDiff;
627
628 // Cleave
629 if (m_uiCleaveTimer <= uiDiff)
630 {
632 m_uiCleaveTimer = std::rand() % 10000 + 7000;
633 }
634 else
635 m_uiCleaveTimer -= uiDiff;
636
637 // Lavas Strike
638 if (m_uiLavaStrikeTimer <= uiDiff)
639 {
640 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
641 {
643
644 if ((std::rand() % 5) == 0)
646 }
647 m_uiLavaStrikeTimer = (m_bIsSoftEnraged ? std::rand() % 2000 + 1400 : std::rand() % 20000 + 5000);
648 }
649 else
650 m_uiLavaStrikeTimer -= uiDiff;
651
652 // call tenebron
653 if (!m_bHasCalledTenebron && m_uiTenebronTimer <= uiDiff)
654 {
657 }
658 else
659 m_uiTenebronTimer -= uiDiff;
660
661 // call shadron
662 if (!m_bHasCalledShadron && m_uiShadronTimer <= uiDiff)
663 {
665 m_bHasCalledShadron = true;
666 }
667 else
668 m_uiShadronTimer -= uiDiff;
669
670 // call vesperon
671 if (!m_bHasCalledVesperon && m_uiVesperonTimer <= uiDiff)
672 {
675 }
676 else
677 m_uiVesperonTimer -= uiDiff;
678
680
682 }
683 };
684};
685
695
705
715
716//to control each dragons common abilities
718{
719 dummy_dragonAI(Creature* creature) : ScriptedAI(creature)
720 {
721 instance = creature->GetInstanceScript();
722 }
723
725
731
733 {
736
737 m_uiWaypointId = 0;
738 m_uiMoveNextTimer = 500;
739 m_iPortalRespawnTime = 30000;
740 m_bCanMoveFree = false;
741 m_bCanLoot = true;
742 }
743
744 void SetData(uint32 type, uint32 value) OVERRIDE
745 {
746 if (type == DATA_CAN_LOOT)
747 m_bCanLoot = value;
748 }
749
750 void MovementInform(uint32 uiType, uint32 uiPointId) OVERRIDE
751 {
752 if (!instance || uiType != POINT_MOTION_TYPE)
753 return;
754
755// debug_log("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId);
756
757 //if healers messed up the raid and we was already initialized
759 {
761 return;
762 }
763
764 //this is end, if we reach this, don't do much
765 if (uiPointId == POINT_ID_LAND)
766 {
767 me->GetMotionMaster()->Clear();
768 me->SetInCombatWithZone();
769 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
770 {
771 me->AddThreat(target, 1.0f);
772 me->Attack(target, true);
773 me->GetMotionMaster()->MoveChase(target);
774 }
775
776 m_bCanMoveFree = false;
777 return;
778 }
779
780 //get amount of common points
781 uint32 uiCommonWPCount = sizeof(m_aDragonCommon)/sizeof(Waypoint);
782
783 //increase
784 m_uiWaypointId = uiPointId+1;
785
786 //if we have reached a point bigger or equal to count, it mean we must reset to point 0
787 if (m_uiWaypointId >= uiCommonWPCount)
788 {
789 if (!m_bCanMoveFree)
790 m_bCanMoveFree = true;
791
792 m_uiWaypointId = 0;
793 }
794
795 m_uiMoveNextTimer = 500;
796 }
797
798 //used when open portal and spawn mobs in phase
799 void DoRaidWhisper(int32 iTextId)
800 {
801 Map* map = me->GetMap();
802
803 if (map && map->IsDungeon())
804 {
805 Map::PlayerList const &PlayerList = map->GetPlayers();
806
807 if (!PlayerList.isEmpty())
808 {
809 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
810 Talk(iTextId, i->GetSource());
811 }
812 }
813 }
814
815 //"opens" the portal and does the "opening" whisper
817 {
818 int32 iTextId = 0;
819
820 //there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database
821
822 //using a grid search here seem to be more efficient than caching all four guids
823 //in instance script and calculate range to each.
824 GameObject* pPortal = me->FindNearestGameObject(GO_TWILIGHT_PORTAL, 50.0f);
825
826 switch (me->GetEntry())
827 {
828 case NPC_TENEBRON:
829 {
830 iTextId = WHISPER_HATCH_EGGS;
832 {
833 for (uint32 i = 0; i < 6; ++i)
835 }
836 else
837 {
838 for (uint32 i = 0; i < 6; ++i)
840 }
841 break;
842 }
843 case NPC_SHADRON:
844 {
845 iTextId = WHISPER_OPEN_PORTAL;
848 else
850
851 break;
852 }
853 case NPC_VESPERON:
854 {
855 iTextId = WHISPER_OPEN_PORTAL;
857 {
859 {
860 me->InterruptNonMeleeSpells(true);
861 Acolyte->InterruptNonMeleeSpells(true);
862 me->CastSpell(me, 32747, false);
863 }
864 }
865 else
866 {
868 {
869 me->InterruptNonMeleeSpells(true);
870 Acolyte->InterruptNonMeleeSpells(true);
871 me->CastSpell(me, 32747, false);
872 }
873 }
874
875 break;
876 }
877 }
878
879 DoRaidWhisper(iTextId);
880
881 //By using SetRespawnTime() we will actually "spawn" the object with our defined time.
882 //Once time is up, portal will disappear again.
883 if (pPortal && !pPortal->isSpawned())
885
886 //Unclear what are expected to happen if one drake has a portal open already
887 //Refresh respawnTime so time again are set to 30secs?
888 }
889
890 void JustDied(Unit* /*killer*/) OVERRIDE
891 {
892 if (!m_bCanLoot)
893 me->SetLootRecipient(NULL);
894
895 int32 iTextId = 0;
896 uint32 uiSpellId = 0;
897
898 switch (me->GetEntry())
899 {
900 case NPC_TENEBRON:
901 iTextId = SAY_TENEBRON_DEATH;
902 uiSpellId = SPELL_POWER_OF_TENEBRON;
905 break;
906 case NPC_SHADRON:
907 iTextId = SAY_SHADRON_DEATH;
908 uiSpellId = SPELL_POWER_OF_SHADRON;
910 instance->SetData(TYPE_SHADRON_PREKILLED, 1);
911 if (Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f))
912 pAcolyte->Kill(pAcolyte);
913 break;
914 case NPC_VESPERON:
915 iTextId = SAY_VESPERON_DEATH;
916 uiSpellId = SPELL_POWER_OF_VESPERON;
919 if (Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_VESPERON, 100.0f))
920 pAcolyte->Kill(pAcolyte);
921 break;
922 }
923
924 Talk(iTextId);
925
926 me->RemoveAurasDueToSpell(uiSpellId);
927
928 if (instance)
929 {
930 instance->DoRemoveAurasDueToSpellOnPlayers(uiSpellId);
931
932 // not if solo mini-boss fight
934 return;
935
936 // Twilight Revenge to main boss
937 if (Unit* pSartharion = Unit::GetUnit(*me, instance->GetData64(DATA_SARTHARION)))
938 if (pSartharion->IsAlive())
939 {
940 pSartharion->RemoveAurasDueToSpell(uiSpellId);
941 DoCast(pSartharion, SPELL_TWILIGHT_REVENGE, true);
942 }
943 }
944 }
945
947 {
949 {
950 if (m_uiMoveNextTimer <= uiDiff)
951 {
953 me->GetMotionMaster()->MovePoint(m_uiWaypointId,
955
956// debug_log("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId);
958 }
959 else
960 m_uiMoveNextTimer -= uiDiff;
961 }
962 }
963};
964
965/*######
966## Mob Tenebron
967######*/
968
970{
971public:
972 npc_tenebron() : CreatureScript("npc_tenebron") { }
973
975 {
976 return new npc_tenebronAI(creature);
977 }
978
980 {
981 npc_tenebronAI(Creature* creature) : dummy_dragonAI(creature) { }
982
986
988
990 {
992
993 m_uiShadowBreathTimer = 20000;
995 m_uiHatchEggTimer = 30000;
996
997 m_bHasPortalOpen = false;
998 }
999
1001 {
1004 }
1005
1006 void KilledUnit(Unit* /*victim*/) OVERRIDE
1007 {
1009 }
1010
1012 {
1013 //if no target, update dummy and return
1014 if (!UpdateVictim())
1015 {
1017 return;
1018 }
1019
1020 // shadow fissure
1021 if (m_uiShadowFissureTimer <= uiDiff)
1022 {
1023 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
1025
1026 m_uiShadowFissureTimer = std::rand() % 20000 + 15000;
1027 }
1028 else
1029 m_uiShadowFissureTimer -= uiDiff;
1030
1031 // Hatch Egg
1032 if (m_uiHatchEggTimer <= uiDiff)
1033 {
1034 OpenPortal();
1035 m_uiHatchEggTimer = 30000;
1036 }
1037 else
1038 m_uiHatchEggTimer -= uiDiff;
1039
1040 // shadow breath
1041 if (m_uiShadowBreathTimer <= uiDiff)
1042 {
1045 m_uiShadowBreathTimer = std::rand() % 25000 + 20000;
1046 }
1047 else
1048 m_uiShadowBreathTimer -= uiDiff;
1049
1051 }
1052 };
1053};
1054
1055/*######
1056## Mob Shadron
1057######*/
1058
1060{
1061public:
1062 npc_shadron() : CreatureScript("npc_shadron") { }
1063
1065 {
1066 return new npc_shadronAI(creature);
1067 }
1068
1070 {
1071 npc_shadronAI(Creature* creature) : dummy_dragonAI(creature) { }
1072
1076
1078
1080 {
1082
1083 m_uiShadowBreathTimer = 20000;
1086
1087 if (me->HasAura(SPELL_TWILIGHT_TORMENT_VESP))
1088 me->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP);
1089
1090 if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
1091 me->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA);
1092
1093 m_bHasPortalOpen = false;
1094 }
1095
1097 {
1100 }
1101
1102 void KilledUnit(Unit* /*victim*/) OVERRIDE
1103 {
1105 }
1106
1108 {
1109 //if no target, update dummy and return
1110 if (!UpdateVictim())
1111 {
1113 return;
1114 }
1115
1116 // shadow fissure
1117 if (m_uiShadowFissureTimer <= uiDiff)
1118 {
1119 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
1121
1122 m_uiShadowFissureTimer = std::rand() % 20000 + 15000;
1123 }
1124 else
1125 m_uiShadowFissureTimer -= uiDiff;
1126
1127 // Portal Event
1128 if (m_uiAcolyteShadronTimer <= uiDiff)
1129 {
1130 if (m_bHasPortalOpen)
1132 else
1133 {
1134 if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
1135 return;
1136
1137 OpenPortal();
1138 m_bHasPortalOpen = true;
1139 m_uiAcolyteShadronTimer = std::rand() % 65000 + 60000;
1140 }
1141 }
1142 else
1143 m_uiAcolyteShadronTimer -= uiDiff;
1144
1145 // shadow breath
1146 if (m_uiShadowBreathTimer <= uiDiff)
1147 {
1150 m_uiShadowBreathTimer = std::rand() % 25000 + 20000;
1151 }
1152 else
1153 m_uiShadowBreathTimer -= uiDiff;
1154
1156 }
1157 };
1158};
1159
1160/*######
1161## Mob Vesperon
1162######*/
1163
1165{
1166public:
1167 npc_vesperon() : CreatureScript("npc_vesperon") { }
1168
1170 {
1171 return new npc_vesperonAI(creature);
1172 }
1173
1175 {
1176 npc_vesperonAI(Creature* creature) : dummy_dragonAI(creature) { }
1177
1181
1183
1185 {
1187
1188 m_uiShadowBreathTimer = 20000;
1191
1192 m_bHasPortalOpen = false;
1193 }
1194
1196 {
1199 }
1200
1201 void KilledUnit(Unit* /*victim*/) OVERRIDE
1202 {
1204 }
1205
1207 {
1208 //if no target, update dummy and return
1209 if (!UpdateVictim())
1210 {
1212 return;
1213 }
1214
1215 // shadow fissure
1216 if (m_uiShadowFissureTimer <= uiDiff)
1217 {
1218 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
1220
1221 m_uiShadowFissureTimer = std::rand() % 20000 + 15000;
1222 }
1223 else
1224 m_uiShadowFissureTimer -= uiDiff;
1225
1226 // Portal Event
1227 if (m_uiAcolyteVesperonTimer <= uiDiff)
1228 {
1229 if (m_bHasPortalOpen)
1231 else
1232 {
1233 OpenPortal();
1235 m_uiAcolyteVesperonTimer = std::rand() % 70000 + 60000;
1236 }
1237 }
1238 else
1239 m_uiAcolyteVesperonTimer -= uiDiff;
1240
1241 // shadow breath
1242 if (m_uiShadowBreathTimer <= uiDiff)
1243 {
1246 m_uiShadowBreathTimer = std::rand() % 25000 + 20000;
1247 }
1248 else
1249 m_uiShadowBreathTimer -= uiDiff;
1250
1252 }
1253 };
1254};
1255
1256/*######
1257## Mob Acolyte of Shadron
1258######*/
1259
1261{
1262public:
1263 npc_acolyte_of_shadron() : CreatureScript("npc_acolyte_of_shadron") { }
1264
1266 {
1267 return new npc_acolyte_of_shadronAI(creature);
1268 }
1269
1271 {
1273 {
1274 instance = creature->GetInstanceScript();
1275 }
1276
1279
1281 {
1282 uiDespawnTimer = 28000;
1283 if (instance)
1284 {
1285 Creature* target = NULL;
1286 //if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT
1288 {
1289 target = Unit::GetCreature((*me), instance->GetData64(DATA_SARTHARION));
1290 if (target)
1291 target->AddAura(SPELL_GIFT_OF_TWILIGTH_SAR, target);
1292 }
1293 else
1294 {
1295 target = Unit::GetCreature((*me), instance->GetData64(DATA_SHADRON));
1296 if (target)
1297 target->AddAura(SPELL_GIFT_OF_TWILIGTH_SHA, target);
1298 }
1299 }
1300
1301 me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER, me);
1302 }
1303
1304 void JustDied(Unit* /*killer*/) OVERRIDE
1305 {
1306 if (instance)
1307 {
1308 Creature* Shadron = instance->instance->GetCreature(instance->GetData64(DATA_SHADRON));
1309 if (Shadron)
1310 {
1311 (CAST_AI(npc_shadron::npc_shadronAI, Shadron->AI()))->m_bHasPortalOpen = false;
1312 }
1313
1314 Creature* pDebuffTarget = NULL;
1315 Map* map = me->GetMap();
1316 if (map->IsDungeon())
1317 {
1318 Map::PlayerList const &PlayerList = map->GetPlayers();
1319
1320 if (PlayerList.isEmpty())
1321 return;
1322
1323 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
1324 {
1325 if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_SHIFT, 0) && !i->GetSource()->GetVictim())
1326 {
1327 i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true);
1328 i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_RESIDUE, true);
1329 i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
1330 i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
1331 }
1332 }
1333 }
1334
1335 //not solo fight, so main boss has deduff
1336 pDebuffTarget = instance->instance->GetCreature(instance->GetData64(DATA_SARTHARION));
1337 if (pDebuffTarget && pDebuffTarget->IsAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR))
1339
1340 //event not in progress, then solo fight and must remove debuff mini-boss
1341 pDebuffTarget = instance->instance->GetCreature(instance->GetData64(DATA_SHADRON));
1342 if (pDebuffTarget && pDebuffTarget->IsAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
1344 }
1345 }
1346
1348 {
1349 if (uiDespawnTimer < uiDiff)
1350 {
1351 me->SetVisible(false);
1352 me->Kill(me);
1353 uiDespawnTimer = 28000;
1354 return;
1355 }else uiDespawnTimer -= uiDiff;
1356
1357 if (!UpdateVictim())
1358 return;
1359
1361 }
1362 };
1363};
1364
1365/*######
1366## Mob Acolyte of Vesperon
1367######*/
1368
1370{
1371public:
1372 npc_acolyte_of_vesperon() : CreatureScript("npc_acolyte_of_vesperon") { }
1373
1375 {
1376 return new npc_acolyte_of_vesperonAI(creature);
1377 }
1378
1380 {
1382 {
1383 instance = creature->GetInstanceScript();
1384 }
1385
1388
1390 {
1391 uiDespawnTimer = 28000;
1392 if (instance)
1393 me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER, me);
1395 }
1396
1397 void JustDied(Unit* /*killer*/) OVERRIDE
1398 {
1399 me->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP_ACO);
1400
1401 // remove twilight torment on Vesperon
1402 if (instance)
1403 {
1404 Creature* pVesperon = instance->instance->GetCreature(instance->GetData64(DATA_VESPERON));
1405 if (pVesperon)
1406 (CAST_AI(npc_vesperon::npc_vesperonAI, pVesperon->AI()))->m_bHasPortalOpen = false;
1407
1408 if (pVesperon && pVesperon->IsAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP))
1410
1411 Map* map = me->GetMap();
1412 if (map->IsDungeon())
1413 {
1414 Map::PlayerList const &PlayerList = map->GetPlayers();
1415
1416 if (PlayerList.isEmpty())
1417 return;
1418
1419 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
1420 {
1421 if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_SHIFT, 0) && !i->GetSource()->GetVictim())
1422 {
1423 i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true);
1424 i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_RESIDUE, true);
1425 i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
1426 i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
1427 }
1428 if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_TORMENT_VESP, 0) && !i->GetSource()->GetVictim())
1429 i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP);
1430 }
1431 }
1432
1433 instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_TWILIGHT_TORMENT_VESP_ACO);
1434 instance->DoRemoveAurasDueToSpellOnPlayers(57935);
1435 instance->DoRemoveAurasDueToSpellOnPlayers(58835); // Components of spell Twilight Torment
1436 }
1437 }
1438
1440 {
1441 if (uiDespawnTimer < uiDiff)
1442 {
1443 me->SetVisible(false);
1444 me->Kill(me);
1445 uiDespawnTimer = 28000;
1446 return;
1447 }else uiDespawnTimer -= uiDiff;
1448
1449 if (!UpdateVictim())
1450 return;
1451
1453 }
1454 };
1455};
1456
1457/*######
1458## Mob Twilight Eggs
1459######*/
1460
1462{
1463public:
1464 npc_twilight_eggs() : CreatureScript("npc_twilight_eggs") { }
1465
1467 {
1468 return new npc_twilight_eggsAI(creature);
1469 }
1470
1472 {
1474 {
1475 SetCombatMovement(false);
1476 instance = creature->GetInstanceScript();
1477 }
1478
1481
1483
1485 {
1486 if (instance)
1487 me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER, me);
1488 m_uiFadeArmorTimer = 1000;
1489 m_uiHatchEggTimer = 20000;
1490 }
1491
1493 {
1494 me->RemoveAllAuras();
1495
1497 me->SummonCreature(NPC_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
1498 else
1499 me->SummonCreature(NPC_SHARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
1500 me->DealDamage(me, me->GetHealth());
1501 }
1502
1504 {
1505 who->SetInCombatWithZone();
1506 }
1507
1509 {
1510 if (m_uiHatchEggTimer <= uiDiff)
1511 {
1512 Creature* Tenebron = instance->instance->GetCreature(instance->GetData64(DATA_TENEBRON));
1513 if (Tenebron)
1514 (CAST_AI(npc_tenebron::npc_tenebronAI, Tenebron->AI()))->m_bHasPortalOpen = false;
1515 SpawnWhelps();
1516 }
1517 else
1518 m_uiHatchEggTimer -= uiDiff;
1519 }
1520
1521 void AttackStart(Unit* /*who*/) OVERRIDE { }
1523 };
1524};
1525
1526/*######
1527## Mob Flame Tsunami
1528######*/
1530{
1531public:
1532 npc_flame_tsunami() : CreatureScript("npc_flame_tsunami") { }
1533
1535 {
1536 return new npc_flame_tsunamiAI(creature);
1537 }
1538
1540 {
1542 {
1543 me->SetDisplayId(11686);
1544 me->AddAura(SPELL_FLAME_TSUNAMI, me);
1545 }
1546
1550
1552 {
1553 me->SetReactState(REACT_PASSIVE);
1554 Tsunami_Timer = 100;
1557 TsunamiBuff_timer = 1000;
1558 entry = 0;
1559 }
1560
1562 {
1563 if (Tsunami_Timer <= diff)
1564 {
1566 Tsunami_Timer = 500;
1567 }else Tsunami_Timer -= diff;
1568
1569 if (TsunamiBuff_timer <= diff)
1570 {
1571 if (Unit* LavaBlaze = GetClosestCreatureWithEntry(me, NPC_LAVA_BLAZE, 10.0f, true))
1572 LavaBlaze->CastSpell(LavaBlaze, SPELL_FLAME_TSUNAMI_BUFF, true);
1573 TsunamiBuff_timer = 1000;
1574 }else TsunamiBuff_timer -= diff;
1575 }
1576 };
1577};
1578
1579// Twilight Fissure
1581{
1582public:
1583 npc_twilight_fissure() : CreatureScript("npc_twilight_fissure") { }
1584
1586 {
1587 return new npc_twilight_fissureAI(creature);
1588 }
1589
1591 {
1593 {
1594 SetCombatMovement(false);
1595 }
1596
1598
1600 {
1603 me->AddAura( 46265, me ); // Wrong, can't find proper visual
1604 me->AddAura( 69422, me );
1605 VoidBlast_Timer = 5000;
1606 }
1607
1609 {
1610 if (VoidBlast_Timer <= diff)
1611 {
1614 //DoCastVictim(57620, true);
1615 //DoCastVictim(57874, true);
1616 VoidBlast_Timer = 9000;
1617 me->RemoveAllAuras();
1618 me->Kill(me);
1619 } else VoidBlast_Timer -= diff;
1620 }
1621 };
1622};
1623
1624/*######
1625## Mob Twilight Whelps
1626######*/
1627
1629{
1630public:
1631 npc_twilight_whelp() : CreatureScript("npc_twilight_whelp") { }
1632
1634 {
1635 return new npc_twilight_whelpAI(creature);
1636 }
1637
1639 {
1641 {
1642 Reset();
1643 }
1644
1646
1648 {
1649 me->RemoveAllAuras();
1650 me->SetInCombatWithZone();
1651 m_uiFadeArmorTimer = 1000;
1652 }
1653
1655 {
1656 //Return since we have no target
1657 if (!UpdateVictim())
1658 return;
1659
1660 // twilight torment
1661 if (m_uiFadeArmorTimer <= uiDiff)
1662 {
1664 m_uiFadeArmorTimer = std::rand() % 10000 + 5000;
1665 }
1666 else
1667 m_uiFadeArmorTimer -= uiDiff;
1668
1670 }
1671 };
1672};
1673
1675{
1676 public:
1678 {
1679 }
1680
1681 bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
1682 {
1683 if (!target)
1684 return false;
1685
1686 if (Creature* Sartharion = target->ToCreature())
1687 if (Sartharion->AI()->GetData(TWILIGHT_ACHIEVEMENTS) >= 1)
1688 return true;
1689
1690 return false;
1691 }
1692};
1693
1695{
1696 public:
1698 {
1699 }
1700
1701 bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
1702 {
1703 if (!target)
1704 return false;
1705
1706 if (Creature* Sartharion = target->ToCreature())
1707 if (Sartharion->AI()->GetData(TWILIGHT_ACHIEVEMENTS) >= 2)
1708 return true;
1709
1710 return false;
1711 }
1712};
1713
1715{
1716 public:
1718 {
1719 }
1720
1721 bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
1722 {
1723 if (!target)
1724 return false;
1725
1726 if (Creature* Sartharion = target->ToCreature())
1727 if (Sartharion->AI()->GetData(TWILIGHT_ACHIEVEMENTS) == 3)
1728 return true;
1729
1730 return false;
1731 }
1732};
1733
1735{
1736 new boss_sartharion();
1737 new npc_vesperon();
1738 new npc_shadron();
1739 new npc_tenebron();
1742 new npc_twilight_eggs();
1743 new npc_flame_tsunami();
1745 new npc_twilight_whelp();
1749}
@ IN_MILLISECONDS
Definition Common.h:125
@ MINUTE
Definition Common.h:119
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ IN_PROGRESS
@ DONE
@ NOT_STARTED
@ POINT_MOTION_TYPE
@ TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
Definition Object.h:69
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:70
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition Object.h:73
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
#define CAST_AI(a, b)
@ LOOT_MODE_HARD_MODE_3
@ LOOT_MODE_HARD_MODE_1
@ LOOT_MODE_HARD_MODE_2
@ REACT_PASSIVE
Definition Unit.h:1156
@ UNIT_FLAG_NON_ATTACKABLE
Definition Unit.h:626
@ UNIT_FLAG_NOT_SELECTABLE
Definition Unit.h:650
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ UNIT_FIELD_FLAGS
@ SPELL_CLEAVE
Enums
#define SPELL_BERSERK
@ SPELL_TAIL_LASH
@ SPELL_VOID_BLAST
Definition boss_muru.cpp:50
@ SPELL_FLAME_BREATH
@ NPC_LAVA_BLAZE
@ SPELL_TWILIGHT_REVENGE
@ SPELL_POWER_OF_VESPERON
@ SAY_SARTHARION_BERSERK
@ SPELL_POWER_OF_SHADRON
@ SPELL_CLEAVE
@ NPC_FLAME_TSUNAMI
@ SAY_SARTHARION_SLAY
@ SPELL_SHADOW_FISSURE
@ NPC_TWILIHT_WHELP
@ POINT_ID_LAND
@ SPELL_TWILIGHT_SHIFT_REMOVAL
@ SPELL_VOID_BLAST
@ SPELL_LAVA_STRIKE
@ POINT_ID_INIT
@ SAY_SARTHARION_AGGRO
@ SPELL_VOID_BLAST_H
@ SPELL_HATCH_EGGS_EFFECT_H
@ SAY_SARTHARION_CALL_TENEBRON
@ SAY_SARTHARION_DEATH
@ SPELL_FLAME_TSUNAMI_BUFF
@ SPELL_FLAME_BREATH
@ WHISPER_OPEN_PORTAL
@ NPC_SARTHARION_TWILIGHT_EGG
@ SPELL_TWILIGHT_SHIFT_ENTER
@ WHISPER_LAVA_CHURN
@ SPELL_SHADOW_BREATH_H
@ SAY_SARTHARION_BREATH
@ WHISPER_SHADRON_DICIPLE
@ SPELL_POWER_OF_TENEBRON
@ SPELL_HATCH_EGGS_EFFECT
@ SPELL_TWILIGHT_SHIFT
@ NPC_ACOLYTE_OF_VESPERON
@ WHISPER_HATCH_EGGS
@ SAY_SARTHARION_CALL_VESPERON
@ SPELL_WILL_OF_SARTHARION
@ NPC_TWILIGHT_EGG
@ WHISPER_VESPERON_DICIPLE
@ SPELL_TWILIGHT_TORMENT_VESP_ACO
@ SPELL_TAIL_LASH
@ SPELL_TWILIGHT_RESIDUE
@ SPELL_TWILIGHT_TORMENT_VESP
@ SPELL_HATCH_EGGS
@ SAY_SARTHARION_CALL_SHADRON
@ SAY_SARTHARION_SPECIAL
@ SPELL_SUMMON_TWILIGHT_WHELP
@ SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP
@ SPELL_FLAME_BREATH_H
@ NPC_ACOLYTE_OF_SHADRON
@ SPELL_FLAME_TSUNAMI
@ SPELL_PYROBUFFET_RANGE
@ SPELL_FLAME_TSUNAMI_LEAP
@ SPELL_PYROBUFFET
@ SPELL_SHADOW_BREATH
@ SPELL_FLAME_TSUNAMI_DMG_AURA
@ SPELL_SHADOW_FISSURE_H
@ NPC_SHARTHARION_TWILIGHT_WHELP
@ SPELL_TAIL_LASH_H
@ NPC_FIRE_CYCLONE
@ SPELL_GIFT_OF_TWILIGTH_SAR
@ SPELL_FADE_ARMOR
@ SPELL_BERSERK
@ NPC_TWILIGHT_WHELP
@ SPELL_TWILIGHT_SHIFT_REMOVAL_ALL
@ SPELL_HATCH_EGGS_H
@ SPELL_GIFT_OF_TWILIGTH_SHA
static Location FlameLeft2Spawn
static Location FlameRight3Direction
static Location AcolyteofVesperon
static Location FlameLeft1Spawn
@ SAY_VESPERON_BREATH
@ SAY_VESPERON_AGGRO
@ SAY_VESPERON_SPECIAL
@ SAY_VESPERON_DEATH
@ SAY_VESPERON_SLAY
@ SAY_VESPERON_RESPOND
static Location FlameLeft1Direction
static Location AcolyteofShadron2
static Location FlameRight1Spawn
static Location AcolyteofVesperon2
static Location FlameRight2Spawn
@ DATA_CAN_LOOT
Locations TwilightEggs[]
Locations TwilightEggsSarth[]
void AddSC_boss_sartharion()
static Location FlameLeft2Direction
#define TWILIGHT_ACHIEVEMENTS
static Location FlameRight1Direction
Waypoint m_aDragonCommon[MAX_WAYPOINT]
static Location FlameRight3Spawn
@ SAY_SHADRON_BREATH
@ SAY_SHADRON_SLAY
@ SAY_SHADRON_SPECIAL
@ SAY_SHADRON_DEATH
@ SAY_SHADRON_AGGRO
@ SAY_SHADRON_RESPOND
@ SAY_TENEBRON_DEATH
@ SAY_TENEBRON_SPECIAL
@ SAY_TENEBRON_SLAY
@ SAY_TENEBRON_BREATH
@ SAY_TENEBRON_AGGRO
@ SAY_TENEBRON_RESPOND
Waypoint m_aShad[]
#define MAX_WAYPOINT
static Location AcolyteofShadron
Waypoint m_aTene[]
Waypoint m_aVesp[]
static Location FlameRight2Direction
AchievementCriteriaScript(const char *name)
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
virtual void EnterEvadeMode()
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:626
void Respawn(bool force=false)
CreatureAI * AI() const
Definition Creature.h:483
void DisappearAndDie()
Definition Creature.cpp:206
CreatureScript(const char *name)
bool isSpawned() const
Definition GameObject.h:705
void SetRespawnTime(int32 respawn)
Definition GameObject.h:699
bool isEmpty() const
Definition LinkedList.h:86
Definition Map.h:238
bool IsDungeon() const
Definition Map.h:369
MapRefManager PlayerList
Definition Map.h:406
PlayerList const & GetPlayers() const
Definition Map.h:407
iterator end()
iterator begin()
LinkedListHead::Iterator< MapReference const > const_iterator
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
void MoveTargetedHome()
void SetFlag(uint16 index, uint32 newFlag)
Definition Object.cpp:1261
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition Object.cpp:1280
Creature * ToCreature()
Definition Object.h:207
bool HasFlag(uint16 index, uint32 flag) const
Definition Object.cpp:1309
virtual void SetData(uint32, uint32)
Definition UnitAI.h:128
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition UnitAI.cpp:66
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:176
Definition Unit.h:1367
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
MotionMaster * GetMotionMaster()
Definition Unit.h:2605
Aura * AddAura(uint32 spellId, Unit *target)
bool IsAlive() const
Definition Unit.h:2032
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
static Creature * GetCreature(WorldObject &object, uint64 guid)
Definition Unit.cpp:4905
static Unit * GetUnit(WorldObject &object, uint64 guid)
Definition Unit.cpp:4895
Unit * GetVictim() const
Definition Unit.h:1468
bool IsInCombat() const
Definition Unit.h:1896
InstanceScript * GetInstanceScript()
Definition Object.cpp:1612
bool OnCheck(Player *, Unit *target) OVERRIDE
bool OnCheck(Player *, Unit *target) OVERRIDE
bool OnCheck(Player *, Unit *target) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ POINT_ID_LAND
@ NPC_VESPERON
@ NPC_SHADRON
@ NPC_TENEBRON
@ GO_TWILIGHT_PORTAL
@ TYPE_SARTHARION_EVENT
@ DATA_VESPERON
@ TYPE_VESPERON_PREKILLED
@ DATA_TENEBRON
@ TYPE_TENEBRON_PREKILLED
@ TYPE_SHADRON_PREKILLED
@ DATA_SARTHARION
@ DATA_SHADRON
float y
Definition chapter5.cpp:210
float z
Definition chapter5.cpp:210
float x
Definition chapter5.cpp:210
void SetCombatMovement(bool allowMovement)
Creature * me
bool HealthAbovePct(uint32 pct) const
bool HealthBelowPct(uint32 pct) const
bool EnterEvadeIfOutOfCombatArea(uint32 const diff)
const T & RAID_MODE(const T &normal10, const T &normal25) const
ScriptedAI(Creature *creature)
uint32 GetData(uint32 type) const OVERRIDE
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
void DoRaidWhisper(int32 iTextId)
void Reset() OVERRIDE
dummy_dragonAI(Creature *creature)
void MovementInform(uint32 uiType, uint32 uiPointId) OVERRIDE
void JustDied(Unit *) OVERRIDE
void SetData(uint32 type, uint32 value) OVERRIDE
InstanceScript * instance
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void EnterCombat(Unit *) OVERRIDE
void KilledUnit(Unit *) OVERRIDE
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
npc_shadronAI(Creature *creature)
npc_tenebronAI(Creature *creature)
void KilledUnit(Unit *) OVERRIDE
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
void EnterCombat(Unit *) OVERRIDE
void JustSummoned(Creature *who) OVERRIDE
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
void EnterCombat(Unit *) OVERRIDE
void KilledUnit(Unit *) OVERRIDE
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================