Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
chapter5.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 "ScriptedGossip.h"
9#include "ScriptedEscortAI.h"
10#include "Player.h"
11
12#define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell
13//Light of Dawn
15{
16#ifdef LESS_MOB
17 ENCOUNTER_DK_NUMBER = 5, // how many player queue to start the quest, or -
18 ENCOUNTER_DK_TIMER = 10, // *every 5 minutes. These have to be done in instance data
19 ENCOUNTER_DEFENDER_NUMBER = 10, // how many of defender
20 ENCOUNTER_EARTHSHATTER_NUMBER = 1, // how many of earthshatter
21 ENCOUNTER_ABOMINATION_NUMBER = 2, // how many of abomination
22 ENCOUNTER_BEHEMOTH_NUMBER = 1, // how many of behemoth
23 ENCOUNTER_GHOUL_NUMBER = 5, // how many of ghoul
24 ENCOUNTER_WARRIOR_NUMBER = 1, // how many of warrior
25#else
26 ENCOUNTER_DK_NUMBER = 5, // how many player queue to start the quest, or -
27 ENCOUNTER_DK_TIMER = 10, // *every 5 minutes. These have to be done in instance data
28 ENCOUNTER_DEFENDER_NUMBER = 20, // how many of defender
29 ENCOUNTER_EARTHSHATTER_NUMBER = 20, // how many of earthshatter
30 ENCOUNTER_ABOMINATION_NUMBER = 3, // how many of abomination
31 ENCOUNTER_BEHEMOTH_NUMBER = 2, // how many of behemoth
32 ENCOUNTER_GHOUL_NUMBER = 10, // how many of ghoul
33 ENCOUNTER_WARRIOR_NUMBER = 2, // how many of warrior
34#endif
35 ENCOUNTER_TOTAL_DAWN = 300, // Total number
37
41
42 SAY_LIGHT_OF_DAWN01 = 0, // pre text
45 SAY_LIGHT_OF_DAWN04 = 3, // intro
48 SAY_LIGHT_OF_DAWN07 = 6, // During the fight - Korfax, Champion of the Light
49 SAY_LIGHT_OF_DAWN08 = 7, // Lord Maxwell Tyrosus
50 SAY_LIGHT_OF_DAWN09 = 8, // Highlord Darion Mograine
51 SAY_LIGHT_OF_DAWN25 = 24, // After the fight
52 SAY_LIGHT_OF_DAWN26 = 25, // Highlord Tirion Fordring
53 SAY_LIGHT_OF_DAWN27 = 26, // Highlord Darion Mograine
54 SAY_LIGHT_OF_DAWN28 = 27, // Highlord Tirion Fordring
55 SAY_LIGHT_OF_DAWN29 = 28, // Highlord Tirion Fordring
56 SAY_LIGHT_OF_DAWN30 = 29, // Highlord Tirion Fordring
57 SAY_LIGHT_OF_DAWN31 = 30, // Highlord Tirion Fordring
58 SAY_LIGHT_OF_DAWN32 = 31, // Highlord Alexandros Mograine
59 SAY_LIGHT_OF_DAWN33 = 32, // Highlord Darion Mograine
60 SAY_LIGHT_OF_DAWN34 = 33, // Highlord Darion Mograine
61 SAY_LIGHT_OF_DAWN35 = 34, // Darion Mograine
62 SAY_LIGHT_OF_DAWN36 = 35, // Darion Mograine
63 SAY_LIGHT_OF_DAWN37 = 36, // Highlord Alexandros Mograine
64 SAY_LIGHT_OF_DAWN38 = 37, // Darion Mograine
65 SAY_LIGHT_OF_DAWN39 = 38, // Highlord Alexandros Mograine
66 SAY_LIGHT_OF_DAWN40 = 39, // Darion Mograine
67 SAY_LIGHT_OF_DAWN41 = 40, // Highlord Alexandros Mograine
68 SAY_LIGHT_OF_DAWN42 = 41, // Highlord Alexandros Mograine
69 SAY_LIGHT_OF_DAWN43 = 42, // The Lich King
70 SAY_LIGHT_OF_DAWN44 = 43, // Highlord Darion Mograine
71 SAY_LIGHT_OF_DAWN45 = 44, // The Lich King
72 SAY_LIGHT_OF_DAWN46 = 45, // The Lich King
73 SAY_LIGHT_OF_DAWN47 = 46, // Highlord Tirion Fordring
74 SAY_LIGHT_OF_DAWN48 = 47, // The Lich King
75 SAY_LIGHT_OF_DAWN49 = 48, // The Lich King
76 SAY_LIGHT_OF_DAWN50 = 49, // Lord Maxwell Tyrosus
77 SAY_LIGHT_OF_DAWN51 = 50, // The Lich King
78 SAY_LIGHT_OF_DAWN52 = 51, // Highlord Darion Mograine
79 SAY_LIGHT_OF_DAWN53 = 52, // Highlord Darion Mograine
80 SAY_LIGHT_OF_DAWN54 = 53, // Highlord Tirion Fordring
81 SAY_LIGHT_OF_DAWN55 = 54, // The Lich King
82 SAY_LIGHT_OF_DAWN56 = 55, // Highlord Tirion Fordring
83 SAY_LIGHT_OF_DAWN57 = 56, // The Lich King
84 SAY_LIGHT_OF_DAWN58 = 57, // The Lich King
85 SAY_LIGHT_OF_DAWN59 = 58, // The Lich King
86 SAY_LIGHT_OF_DAWN60 = 59, // Highlord Tirion Fordring
87 SAY_LIGHT_OF_DAWN61 = 60, // Highlord Tirion Fordring
88 SAY_LIGHT_OF_DAWN62 = 61, // Highlord Tirion Fordring
89 SAY_LIGHT_OF_DAWN63 = 62, // Highlord Tirion Fordring
90 SAY_LIGHT_OF_DAWN64 = 63, // Highlord Tirion Fordring
91 SAY_LIGHT_OF_DAWN65 = 64, // Highlord Tirion Fordring
92 SAY_LIGHT_OF_DAWN66 = 65, // Highlord Tirion Fordring
93 SAY_LIGHT_OF_DAWN67 = 66, // Highlord Tirion Fordring
94 SAY_LIGHT_OF_DAWN68 = 67, // Highlord Darion Mograine
95
96 EMOTE_LIGHT_OF_DAWN01 = 68, // Emotes
114
116 SPELL_THE_LIGHT_OF_DAWN_Q = 53606, // quest credit
117
118 // ---- Dark Knight npc --------------------
119 // Highlord Darion Mograine
126 SPELL_THE_MIGHT_OF_MOGRAINE = 53642, // on players when begins
131
132 // Koltira Deathweaver & Orbaz Bloodbane are using the same abilities
134 NPC_ORBAZ_BLOODBANE = 29204, // this guy fleed
135 NPC_THASSARIAN = 29200, // he also does SPELL_THE_LIGHT_OF_DAWN 53658
140 // all do SPELL_HERO_AGGRO_AURA 53627
141
142 // Lich King
143 NPC_THE_LICH_KING = 29183, // show up at end
146 SPELL_SOUL_FEAST_ALEX = 53677, // on Alexandros
147 SPELL_SOUL_FEAST_TIRION = 53685, // on Tirion
148 SPELL_ICEBOUND_VISAGE = 53274, // not sure what is it for
150
151 // others
156
157 NPC_FLESH_BEHEMOTH = 29190, // giant guy
158 SPELL_STOMP = 53634,
161
162 NPC_ACHERUS_GHOUL = 29219, // just ghoul....
164
165 NPC_WARRIOR_OF_THE_FROZEN_WASTES = 29206, // use SPELL_CLEAVE 53631
166
168 NPC_DARION_MOGRAINE = 29228, // ghost
169
170 // ---- Dawn npc --------------------
171 // Highlord Tirion Fordring
178
179 // others
183
187
190
191 NPC_RAYNE = 29181,
195 SPELL_WRATH = 21807,
196
197 NPC_DEFENDER_OF_THE_LIGHT = 29174, // also does SPELL_HEROIC_LEAP 53625
202
206};
207
209{
210 float x, y, z, o;
211};
212
213void UpdateWorldState(Map* map, uint32 id, uint32 state)
214{
215 Map::PlayerList const& players = map->GetPlayers();
216
217 if (!players.isEmpty())
218 {
219 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
220 {
221 if (Player* player = itr->GetSource())
222 player->SendUpdateWorldState(id, state);
223 }
224 }
225}
226
228{
229 {2281.335f, -5300.409f, 85.170f, 0}, // 0 Tirion Fordring loc
230 {2283.896f, -5287.914f, 83.066f, 1.55f}, // 1 Tirion Fordring loc2
231 {2281.461f, -5263.014f, 81.164f, 0}, // 2 Tirion charges
232 {2262.277f, -5293.477f, 82.167f, 0}, // 3 Tirion run
233 {2270.286f, -5287.73f, 82.262f, 0}, // 4 Tirion relocate
234 {2269.511f, -5288.289f, 82.225f, 0}, // 5 Tirion forward
235 {2262.277f, -5293.477f, 82.167f, 0}, // 6 Tirion runs to Darion
236 {2270.286f, -5287.73f, 82.262f, 0},
237 {2269.511f, -5288.289f, 82.225f, 0},
238 {2273.205f, -5288.848f, 82.617f, 0}, // 9 Korfax loc1
239 {2274.739f, -5287.926f, 82.684f, 0}, // 10 Korfax loc2
240 {2253.673f, -5318.004f, 81.724f, 0}, // 11 Korfax kicked
241 {2287.028f, -5309.644f, 87.253f, 0}, // 12 Maxwell loc1
242 {2286.978f, -5308.025f, 86.83f, 0}, // 13 Maxwell loc2
243 {2248.877f, -5307.586f, 82.166f, 0}, // 14 maxwell kicked
244 {2278.58f, -5316.933f, 88.319f, 0}, // 15 Eligor loc1
245 {2278.535f, -5315.479f, 88.08f, 0}, // 16 Eligor loc2
246 {2259.416f, -5304.505f, 82.149f, 0}, // 17 eligor kicked
247 {2289.259f, -5280.355f, 82.112f, 0}, // 18 Koltira loc1
248 {2289.02f, -5281.985f, 82.207f, 0}, // 19 Koltira loc2
249 {2273.289f, -5273.675f, 81.701f, 0}, // 20 Thassarian loc1
250 {2273.332f, -5275.544f, 81.849f, 0}, // 21 Thassarian loc2
251 {2281.198f, -5257.397f, 80.224f, 4.66f}, // 22 Alexandros loc1
252 {2281.156f, -5259.934f, 80.647f, 0}, // 23 Alexandros loc2
253 {2281.294f, -5281.895f, 82.445f, 1.35f}, // 24 Darion loc1
254 {2281.093f, -5263.013f, 81.125f, 0}, // 25 Darion loc1
255 {2281.313f, -5250.282f, 79.322f, 4.69f}, // 26 Lich King spawns
256 {2281.523f, -5261.058f, 80.877f, 0}, // 27 Lich king move forwards
257 {2272.709f, -5255.552f, 78.226f, 0}, // 28 Lich king kicked
258 {2273.972f, -5257.676f, 78.862f, 0}, // 29 Lich king moves forward
259};
260
262{
263public:
264 npc_highlord_darion_mograine() : CreatureScript("npc_highlord_darion_mograine") { }
265
266 bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
267 {
268 player->PlayerTalkClass->ClearMenus();
269 switch (action)
270 {
272 player->CLOSE_GOSSIP_MENU();
274 CAST_AI(npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, creature->AI())->Start(true, false, player->GetGUID());
275 break;
276 }
277 return true;
278 }
279
280 bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
281 {
282 if (creature->IsQuestGiver())
283 player->PrepareQuestMenu(creature->GetGUID());
284
285 if (player->GetQuestStatus(12801) == QUEST_STATUS_INCOMPLETE)
286 player->ADD_GOSSIP_ITEM(0, "I am ready.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
287
288 player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
289
290 return true;
291 }
292
294 {
295 return new npc_highlord_darion_mograineAI(creature);
296 }
297
299 {
301 {
302 uiTirionGUID = 0;
303 uiKorfaxGUID = 0;
304 uiMaxwellGUID = 0;
305 uiEligorGUID = 0;
306 uiRayneGUID = 0;
307 uiKoltiraGUID = 0;
308 uiOrbazGUID = 0;
310 uiLichKingGUID = 0;
311
312 memset(uiDefenderGUID, 0, sizeof(uiDefenderGUID));
313 memset(uiEarthshatterGUID, 0, sizeof(uiEarthshatterGUID));
314 memset(uiAbominationGUID, 0, sizeof(uiAbominationGUID));
315 memset(uiBehemothGUID, 0, sizeof(uiBehemothGUID));
316 memset(uiGhoulGUID, 0, sizeof(uiGhoulGUID));
317 memset(uiWarriorGUID, 0, sizeof(uiWarriorGUID));
318
319 Reset();
320 }
321
329
330 // Darion Mograine
339
340 // Dawn
350
351 // Death
360
362 {
364 {
365 bIsBattle = false;
366 uiStep = 0;
367 uiPhase_timer = 3000;
368 uiFight_duration = 300000; // 5 minutes
372
373 uiAnti_magic_zone = std::rand() % 6000 + 1000;
374 uiDeath_strike = std::rand() % 10000 + 5000;
375 uiDeath_embrace = std::rand() % 10000 + 5000;
376 uiIcy_touch = std::rand() % 10000 + 5000;
377 uiUnholy_blight = std::rand() % 10000 + 5000;
378
379 uiFight_speech = 15000;
380 uiSpawncheck = 1000;
381 uiTargetcheck = 10000;
382
383 me->SetStandState(UNIT_STAND_STATE_STAND);
384 me->Mount(25279);
385 me->SetVisible(true);
386
388 //UpdateWorldState(me->GetMap(), WORLD_STATE_COUNTDOWN, 0);
390
392 temp->setDeathState(DeathState::JUST_DIED);
394 temp->setDeathState(DeathState::JUST_DIED);
396 temp->setDeathState(DeathState::JUST_DIED);
398 temp->setDeathState(DeathState::JUST_DIED);
400 temp->setDeathState(DeathState::JUST_DIED);
401
402 uiTirionGUID = 0;
403 uiKorfaxGUID = 0;
404 uiMaxwellGUID = 0;
405 uiEligorGUID = 0;
406 uiRayneGUID = 0;
407
408 for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
409 {
411 temp->setDeathState(DeathState::JUST_DIED);
412 uiDefenderGUID[i] = 0;
413 }
414 for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
415 {
417 temp->setDeathState(DeathState::JUST_DIED);
418 uiEarthshatterGUID[i] = 0;
419 }
420
422 temp->Respawn();
424 temp->Respawn();
426 temp->Respawn();
428 temp->Respawn();
429
430 uiKoltiraGUID = 0;
431 uiOrbazGUID = 0;
433 uiLichKingGUID = 0;
434 for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
435 {
437 temp->setDeathState(DeathState::JUST_DIED);
438 uiAbominationGUID[i] = 0;
439 }
440 for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
441 {
443 temp->setDeathState(DeathState::JUST_DIED);
444 uiBehemothGUID[i] = 0;
445 }
446 for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
447 {
448 if (Creature* temp = Unit::GetCreature(*me, uiGhoulGUID[i]))
449 temp->setDeathState(DeathState::JUST_DIED);
450 uiGhoulGUID[i] = 0;
451 }
452 for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
453 {
454 if (Creature* temp = Unit::GetCreature(*me, uiWarriorGUID[i]))
455 temp->setDeathState(DeathState::JUST_DIED);
456 uiWarriorGUID[i] = 0;
457 }
458 }
459 }
460
462 {
463 if (!who)
464 return;
465
466 if (who == me)
467 return;
468
469 if (me->Attack(who, true))
470 {
471 me->AddThreat(who, 0.0f);
472 me->SetInCombatWith(who);
473 who->SetInCombatWith(me);
474 DoStartMovement(who);
475 }
476 }
477
479
480 {
481 if (!who)
482 return;
483
484 if (me->IsValidAttackTarget(who))
485 if (me->IsWithinDistInMap(who, 20) && me->IsWithinLOSInMap(who))
486 AttackStart(who);
487 }
488
489 void SetHoldState(bool bOnHold)
490 {
491 SetEscortPaused(bOnHold);
492 }
493
495 {
496 switch (waypointId)
497 {
498 case 0:
499 me->SetWalk(false);
500 SetHoldState(true);
501 break;
502 case 1:
503 SetHoldState(true);
504 SpawnNPC();
506 temp->AI()->Talk(SAY_LIGHT_OF_DAWN07);
508 temp->AI()->Talk(SAY_LIGHT_OF_DAWN08);
509
510 for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
512 for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
514 for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
516 for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
521
522 me->Dismount();
523 me->CastSpell(me, SPELL_THE_MIGHT_OF_MOGRAINE, true); // need to fix, on player only
524
526 temp->Dismount();
528 temp->Dismount();
529
530 bIsBattle = true;
531 break;
532 case 2:
533 me->SetWalk(true);
535 break;
536 case 3:
537 {
538 //Unit* pTirion = Unit::GetCreature(*me, uiTirionGUID);
539
541 if (me->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
542 me->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
544 {
545 if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
546 temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
547 temp->SetWalk(true);
548 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[19].x, LightofDawnLoc[19].y, LightofDawnLoc[19].z);
549 }
551 {
552 if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
553 temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
554 temp->SetWalk(true);
555 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[21].x, LightofDawnLoc[21].y, LightofDawnLoc[21].z);
556 }
558 {
559 temp->SetWalk(true);
560 temp->SetUInt32Value(UNIT_FIELD_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
561 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[10].x, LightofDawnLoc[10].y, LightofDawnLoc[10].z);
562 }
564 {
565 temp->SetWalk(true);
566 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[13].x, LightofDawnLoc[13].y, LightofDawnLoc[13].z);
567 }
569 {
570 temp->SetWalk(true);
571 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16].x, LightofDawnLoc[16].y, LightofDawnLoc[16].z);
572 }
573 JumpToNextStep(10000);
574 }
575 break;
576 case 4:
578 me->SetStandState(UNIT_STAND_STATE_KNEEL);
579
581 temp->SetStandState(UNIT_STAND_STATE_KNEEL);
583 temp->SetStandState(UNIT_STAND_STATE_KNEEL);
584 SetHoldState(true);
585 break;
586 case 5:
588 SetHoldState(true);
589 break;
590 case 6:
591 SetHoldState(true);
592 me->HandleEmoteCommand(EMOTE_ONESHOT_SPECIALATTACK1H);
593 JumpToNextStep(1000);
594 break;
595 case 7:
596 SetHoldState(true);
597 JumpToNextStep(2000);
598 break;
599 case 8:
600 me->SetUInt32Value(UNIT_FIELD_VIRTUAL_ITEM_ID + 0, uint32(EQUIP_UNEQUIP));
602 me->CastSpell(temp, SPELL_ASHBRINGER, true);
604 SetHoldState(true);
605 break;
606 }
607 }
608
610 {
611 if (!bIsBattle)//do not reset self if we are in battle
613 }
614
616 {
618
619 if (!bIsBattle)
620 {
621 if (uiPhase_timer <= diff)
622 {
623 // ******* Before battle *****************************************************************
624 switch (uiStep)
625 {
626 case 0: // countdown
627 //UpdateWorldState(me->GetMap(), WORLD_STATE_COUNTDOWN, 1);
628 break;
629
630 case 1: // just delay
631 //UpdateWorldState(me->GetMap(), WORLD_STATE_REMAINS, 1);
635 JumpToNextStep(3000);
636 break;
637
638 case 2:
641 uiKoltiraGUID = pKoltira->GetGUID();
643 uiOrbazGUID = pOrbaz->GetGUID();
644 if (Creature* pThassarian = GetClosestCreatureWithEntry(me, NPC_THASSARIAN, 50.0f))
645 uiThassarianGUID = pThassarian->GetGUID();
646 JumpToNextStep(10000);
647 break;
648
649 case 3: // rise
651 JumpToNextStep(3000);
652 break;
653
654 case 4: // summon ghoul
655 // Dunno whats the summon spell, so workaround
656 DoCast(me, 33271); // shack effect
657 uiPhase_timer = 500;
659 {
660 Unit* temp = me->SummonCreature(NPC_ACHERUS_GHOUL, (me->GetPositionX()-20)+rand()%40, (me->GetPositionY()-20)+rand()%40, me->GetPositionZ(), 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
661 temp->SetWalk(false);
662 temp->setFaction(2084);
665 }
666 else
667 {
669 ++uiStep;
670 }
671 break;
672
673 case 5: // summon abomination
674 DoCast(me, 33271); // shack effect
675 uiPhase_timer = 500;
677 {
678 Unit* temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, (me->GetPositionX()-20)+rand()%40, (me->GetPositionY()-20)+rand()%40, me->GetPositionZ(), 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
679 temp->SetWalk(false);
680 temp->setFaction(2084);
683 }
684 else
685 {
687 ++uiStep;
688 }
689 break;
690
691 case 6: // summon warrior
692 DoCast(me, 33271); // shack effect
693 uiPhase_timer = 500;
695 {
696 Unit* temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, (me->GetPositionX()-20)+rand()%40, (me->GetPositionY()-20)+rand()%40, me->GetPositionZ(), 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
697 temp->SetWalk(false);
698 temp->setFaction(2084);
701 }
702 else
703 {
705 ++uiStep;
706 }
707 break;
708
709 case 7: // summon warrior
710 DoCast(me, 33271); // shack effect
711 uiPhase_timer = 500;
713 {
714 Unit* temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, (me->GetPositionX()-20)+rand()%40, (me->GetPositionY()-20)+rand()%40, me->GetPositionZ(), 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
715 temp->SetWalk(false);
716 temp->setFaction(2084);
719 }
720 else
721 {
723 ++uiStep;
724 }
725 break;
726
727 case 8: // summon announce
729 JumpToNextStep(5000);
730 break;
731
732 case 9: // charge begins
733 SetHoldState(false);
735 {
736 temp->SetWalk(false);
737 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
738 }
740 {
741 temp->SetWalk(false);
742 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
743 }
745 {
746 temp->SetWalk(false);
747 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
748 }
749 for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
751 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
752 for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
754 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
755 for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
756 if (Creature* temp = Unit::GetCreature(*me, uiGhoulGUID[i]))
757 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
758 for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
759 if (Creature* temp = Unit::GetCreature(*me, uiWarriorGUID[i]))
760 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
761 JumpToNextStep(5000);
762 break;
763
764 // ******* After battle *****************************************************************
765 case 11: // Tirion starts to speak
767 temp->AI()->Talk(SAY_LIGHT_OF_DAWN28);
768 JumpToNextStep(21000);
769 break;
770
771 case 12:
773 temp->AI()->Talk(SAY_LIGHT_OF_DAWN29);
774 JumpToNextStep(13000);
775 break;
776
777 case 13:
779 temp->AI()->Talk(SAY_LIGHT_OF_DAWN30);
780 JumpToNextStep(13000);
781 break;
782
783 case 14:
784 me->SetStandState(UNIT_STAND_STATE_STAND);
786 JumpToNextStep(7000);
787 break;
788
789 case 15: // summon gate
791 {
793 temp->CastSpell(temp, SPELL_ALEXANDROS_MOGRAINE_SPAWN, true);
794 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN06);
795 uiAlexandrosGUID = temp->GetGUID();
796 }
797 JumpToNextStep(4000);
798 break;
799
800 case 16: // Alexandros out
802 {
804 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[23].x, LightofDawnLoc[23].y, LightofDawnLoc[23].z);
805 temp->AI()->Talk(SAY_LIGHT_OF_DAWN32);
806 }
807 SetHoldState(false); // makes darion turns back
808 JumpToNextStep(5000);
809 break;
810
811 case 17:
812 me->SetStandState(UNIT_STAND_STATE_KNEEL);
814 JumpToNextStep(5000);
815 break;
816
817 case 18: // Darion's spirit out
819 {
820 temp->AI()->Talk(SAY_LIGHT_OF_DAWN35);
821 temp->SetWalk(false);
822 uiDarionGUID = temp->GetGUID();
823 }
824 JumpToNextStep(4000);
825 break;
826
827 case 19: // runs to father
829 {
830 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN07);
831 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[25].x, LightofDawnLoc[25].y, LightofDawnLoc[25].z);
832 }
833 JumpToNextStep(4000);
834 break;
835
836 case 20:
838 temp->AI()->Talk(SAY_LIGHT_OF_DAWN36);
839 JumpToNextStep(4000);
840 break;
841
842 case 21:
844 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN08);
845 JumpToNextStep(4000);
846 break;
847
848 case 22:
850 temp->AI()->Talk(SAY_LIGHT_OF_DAWN37);
851 JumpToNextStep(8000);
852 break;
853
854 case 23:
856 temp->AI()->Talk(SAY_LIGHT_OF_DAWN38);
857 JumpToNextStep(8000);
858 break;
859
860 case 24:
862 temp->AI()->Talk(SAY_LIGHT_OF_DAWN39);
863
864 if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID)) // Tirion moves forward here
865 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[1].x, LightofDawnLoc[1].y, LightofDawnLoc[1].z);
866
867 JumpToNextStep(15000);
868 break;
869
870 case 25:
872 temp->AI()->Talk(SAY_LIGHT_OF_DAWN40);
873 JumpToNextStep(11000);
874 break;
875
876 case 26:
878 temp->AI()->Talk(SAY_LIGHT_OF_DAWN41);
879 JumpToNextStep(5000);
880 break;
881
882 case 27:
884 temp->setDeathState(DeathState::JUST_DIED);
885 JumpToNextStep(24000);
886 break;
887
888 case 28:
890 temp->AI()->Talk(SAY_LIGHT_OF_DAWN42);
891 JumpToNextStep(6000);
892 break;
893
894 case 29: // lich king spawns
896 {
897 temp->AI()->Talk(SAY_LIGHT_OF_DAWN43);
898 uiLichKingGUID = temp->GetGUID();
900 temp->CastSpell(pAlex, SPELL_SOUL_FEAST_ALEX, false);
901 }
902 JumpToNextStep(2000);
903 break;
904
905 case 30:
906 if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID)) // just hide him
907 {
908 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN09);
909 temp->SetVisible(false);
910 }
912 {
913 temp->InterruptNonMeleeSpells(false);
914 temp->AI()->Talk(SAY_LIGHT_OF_DAWN45);
915 }
916 JumpToNextStep(3000);
917 break;
918
919 case 31:
920 me->SetStandState(UNIT_STAND_STATE_STAND);
923 JumpToNextStep(3000);
924 break;
925
926 case 32:
928 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[27].x, LightofDawnLoc[27].y, LightofDawnLoc[27].z);
929 JumpToNextStep(6000);
930 break;
931
932 case 33: // Darion supports to jump to lich king here
934 DoCast(me, SPELL_MOGRAINE_CHARGE); // jumping charge
935 // doesn't make it looks well, so workarounds, Darion charges, looks better
936 me->SetSpeed(MOVE_RUN, 3.0f);
937 me->SetWalk(false);
938 SetHoldState(false);
940 break;
941
942 case 35: // Lich king counterattacks
944 {
945 temp->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
946 temp->AI()->Talk(SAY_LIGHT_OF_DAWN46);
947 }
948 me->SetSpeed(MOVE_RUN, 6.0f);
949 me->SetStandState(UNIT_STAND_STATE_DEAD);
950 SetHoldState(false); // Darion got kicked by lich king
952 break;
953
954 case 37: // Lich king counterattacks
955 me->SetStandState(UNIT_STAND_STATE_KNEEL);
956 JumpToNextStep(3000);
957 break;
958
959 case 38:
961 temp->AI()->Talk(SAY_LIGHT_OF_DAWN47);
962 JumpToNextStep(8000);
963 break;
964
965 case 39:
967 temp->AI()->Talk(SAY_LIGHT_OF_DAWN48);
968 JumpToNextStep(15000);
969 break;
970
971 case 40:
973 temp->AI()->Talk(SAY_LIGHT_OF_DAWN49);
974 JumpToNextStep(17000);
975 break;
976
977 case 41: // Lich king - Apocalypse
979 {
980 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN11);
981 temp->AI()->Talk(SAY_LIGHT_OF_DAWN51);
982 if (Creature* pTirion = Unit::GetCreature(*me, uiTirionGUID))
983 {
984 pTirion->SetStandState(UNIT_STAND_STATE_KNEEL);
985 //temp->CastSpell(pTirion, SPELL_APOCALYPSE, false); // not working
986 temp->CastSpell(pTirion, SPELL_SOUL_FEAST_TIRION, false);
987 pTirion->AI()->Talk(EMOTE_LIGHT_OF_DAWN12);
988 }
989 }
990 JumpToNextStep(2000);
991 break;
992
993 case 42: // Maxwell yells for attack
994 {
995 float fLichPositionX = 0,
996 fLichPositionY = 0,
997 fLichPositionZ = 0;
999 {
1000 fLichPositionX = temp->GetPositionX();
1001 fLichPositionY = temp->GetPositionY();
1002 fLichPositionZ = temp->GetPositionZ();
1003 }
1004
1005 if (fLichPositionX && fLichPositionY)
1006 {
1007 Unit* temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%10, LightofDawnLoc[0].y+rand()%10, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
1009 temp->SetWalk(false);
1010 temp->SetSpeed(MOVE_RUN, 2.0f);
1011 temp->setFaction(me->getFaction());
1012 temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
1013 uiDefenderGUID[0] = temp->GetGUID();
1014
1015 temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].x+rand()%10, LightofDawnLoc[0].y+rand()%10, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
1017 temp->SetWalk(false);
1018 temp->SetSpeed(MOVE_RUN, 2.0f);
1019 temp->setFaction(me->getFaction());
1020 temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
1021 uiEarthshatterGUID[0] = temp->GetGUID();
1022 }
1024 {
1026 temp->SetWalk(false);
1027 temp->SetSpeed(MOVE_RUN, 2.0f);
1028 temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
1029 temp->AI()->Talk(SAY_LIGHT_OF_DAWN50);
1030 }
1032 {
1034 temp->SetWalk(false);
1035 temp->SetSpeed(MOVE_RUN, 2.0f);
1036 temp->HandleEmoteCommand(EMOTE_STATE_ATTACK_UNARMED);
1037 temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
1038 }
1040 {
1042 temp->SetWalk(false);
1043 temp->SetSpeed(MOVE_RUN, 2.0f);
1044 temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
1045 }
1046 }
1047 JumpToNextStep(4500);
1048 break;
1049
1050 case 43: // They all got kicked
1052 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN13);
1053
1055 {
1056 temp->SetUInt32Value(UNIT_FIELD_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
1057 temp->SetSpeed(MOVE_RUN, 6.0f);
1058 temp->SetStandState(UNIT_STAND_STATE_DEAD);
1059 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[14].x, LightofDawnLoc[14].y, LightofDawnLoc[14].z);
1060 }
1062 {
1063 temp->SetUInt32Value(UNIT_FIELD_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
1064 temp->SetSpeed(MOVE_RUN, 6.0f);
1065 temp->SetStandState(UNIT_STAND_STATE_DEAD);
1066 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[11].x, LightofDawnLoc[11].y, LightofDawnLoc[11].z);
1067 }
1069 {
1070 temp->SetUInt32Value(UNIT_FIELD_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
1071 temp->SetSpeed(MOVE_RUN, 6.0f);
1072 temp->SetStandState(UNIT_STAND_STATE_DEAD);
1073 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[17].x, LightofDawnLoc[17].y, LightofDawnLoc[17].z);
1074 }
1075 if (Creature* temp = Unit::GetCreature(*me, uiDefenderGUID[0]))
1076 {
1077 temp->SetSpeed(MOVE_RUN, 6.0f);
1078 temp->SetStandState(UNIT_STAND_STATE_DEAD);
1079 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%10, LightofDawnLoc[0].y+rand()%10, LightofDawnLoc[0].z);
1080 }
1082 {
1083 temp->SetSpeed(MOVE_RUN, 6.0f);
1084 temp->SetStandState(UNIT_STAND_STATE_DEAD);
1085 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%10, LightofDawnLoc[0].y+rand()%10, LightofDawnLoc[0].z);
1086 }
1087 JumpToNextStep(3000);
1088 break;
1089
1090 case 44: // make them stand up
1092 temp->SetStandState(UNIT_STAND_STATE_STAND);
1094 temp->SetStandState(UNIT_STAND_STATE_STAND);
1096 temp->SetStandState(UNIT_STAND_STATE_STAND);
1097 JumpToNextStep(1000);
1098 break;
1099
1100 case 45:
1102 JumpToNextStep(5000);
1103 break;
1104
1105 case 46: // Darion stand up, "not today"
1106 me->SetSpeed(MOVE_RUN, 1.0f);
1107 me->SetWalk(true);
1108 me->SetStandState(UNIT_STAND_STATE_STAND);
1110 SetHoldState(false); // Darion throws sword
1111 JumpToNextStep(7000);
1112 break;
1113
1114 case 47: // Ashbringer rebirth
1115 me->SetStandState(UNIT_STAND_STATE_KNEEL);
1118 {
1119 temp->SetStandState(UNIT_STAND_STATE_STAND);
1121 temp->CastSpell(temp, SPELL_REBIRTH_OF_THE_ASHBRINGER, false);
1122 }
1123 JumpToNextStep(1000);
1124 break;
1125
1126 case 48: // Show the cleansing effect (dawn of light)
1127 //if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID))
1128 // go->SetPhaseMask(128, true);
1129 me->SummonGameObject(GO_LIGHT_OF_DAWN, 2283.896f, -5287.914f, 83.066f, 0, 0, 0, 0, 0, 30000);
1131 {
1132 if (temp->HasAura(SPELL_REBIRTH_OF_THE_ASHBRINGER, 0))
1133 temp->RemoveAurasDueToSpell(SPELL_REBIRTH_OF_THE_ASHBRINGER);
1134 temp->CastSpell(temp, 41542, false); // workarounds, light expoded, makes it cool
1135 temp->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
1136 }
1138 temp->InterruptNonMeleeSpells(false);
1139 JumpToNextStep(2500);
1140 break;
1141
1142 case 49:
1144 temp->AI()->Talk(SAY_LIGHT_OF_DAWN54);
1145 JumpToNextStep(4000);
1146 break;
1147
1148 case 50:
1150 temp->AI()->Talk(SAY_LIGHT_OF_DAWN55);
1151 JumpToNextStep(5000);
1152 break;
1153
1154 case 51:
1156 temp->AI()->Talk(SAY_LIGHT_OF_DAWN56);
1157 JumpToNextStep(1000);
1158 break;
1159
1160 case 52: // Tiron charges
1162 {
1163 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN16);
1164 temp->CastSpell(temp, SPELL_TIRION_CHARGE, false); // jumping charge
1165 temp->SetUInt32Value(UNIT_FIELD_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
1166 temp->SetSpeed(MOVE_RUN, 3.0f); // workarounds, make Tirion still running
1167 temp->SetWalk(false);
1168 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[2].x, LightofDawnLoc[2].y, LightofDawnLoc[2].z);
1170 lktemp->Relocate(LightofDawnLoc[28].x, LightofDawnLoc[28].y, LightofDawnLoc[28].z); // workarounds, he should kick back by Tirion, but here we relocate him
1171 }
1172 JumpToNextStep(1500);
1173 break;
1174
1175 case 53:
1177 temp->AI()->Talk(SAY_LIGHT_OF_DAWN57);
1178 JumpToNextStep(1000);
1179 break;
1180
1181 case 54:
1183 {
1184 temp->SetSpeed(MOVE_RUN, 1.0f);
1185 me->SetWalk(true);
1186 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[29].x, LightofDawnLoc[29].y, LightofDawnLoc[29].z); // 26
1187 }
1188 JumpToNextStep(4000);
1189 break;
1190
1191 case 55:
1193 temp->SetStandState(UNIT_STAND_STATE_KNEEL);
1194 JumpToNextStep(2000);
1195 break;
1196
1197 case 56:
1199 temp->SetStandState(UNIT_STAND_STATE_STAND);
1200 JumpToNextStep(1500);
1201 break;
1202
1203 case 57:
1205 temp->AI()->Talk(SAY_LIGHT_OF_DAWN58);
1206 JumpToNextStep(10000);
1207 break;
1208
1209 case 58:
1211 temp->AI()->Talk(SAY_LIGHT_OF_DAWN59);
1212 JumpToNextStep(10000);
1213 break;
1214
1215 case 59:
1217 temp->CastSpell(temp, SPELL_TELEPORT_VISUAL, false);
1218 if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID)) // Tirion runs to Darion
1219 {
1220 temp->SetUInt32Value(UNIT_FIELD_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
1221 temp->SetSpeed(MOVE_RUN, 1.0f);
1222 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[6].x, LightofDawnLoc[6].y, LightofDawnLoc[6].z);
1223 }
1224 JumpToNextStep(2500);
1225 break;
1226
1227 case 60:
1228 if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID)) // Lich king disappears here
1229 {
1230 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN17);
1231 temp->Kill(temp);
1232 }
1233 JumpToNextStep(10000);
1234 break;
1235
1236 case 61:
1238 temp->AI()->Talk(SAY_LIGHT_OF_DAWN60);
1239 JumpToNextStep(3000);
1240 break;
1241
1242 case 62:
1244 {
1245 temp->SetWalk(true);
1246 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[7].x, LightofDawnLoc[7].y, LightofDawnLoc[7].z);
1247 }
1248 JumpToNextStep(5500);
1249 break;
1250
1251 case 63:
1253 {
1254 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[8].x, LightofDawnLoc[8].y, LightofDawnLoc[8].z);
1255 temp->AI()->Talk(SAY_LIGHT_OF_DAWN61);
1256 }
1257 JumpToNextStep(15000);
1258 break;
1259
1260 case 64:
1262 temp->AI()->Talk(SAY_LIGHT_OF_DAWN62);
1263 JumpToNextStep(7000);
1264 break;
1265
1266 case 65:
1268 temp->AI()->Talk(SAY_LIGHT_OF_DAWN63);
1269 JumpToNextStep(10000);
1270 break;
1271
1272 case 66:
1274 temp->AI()->Talk(SAY_LIGHT_OF_DAWN64);
1275 JumpToNextStep(11000);
1276 break;
1277
1278 case 67:
1280 temp->AI()->Talk(SAY_LIGHT_OF_DAWN65);
1281 JumpToNextStep(10000);
1282 break;
1283
1284 case 68:
1286 temp->AI()->Talk(SAY_LIGHT_OF_DAWN66);
1287 JumpToNextStep(8000);
1288 break;
1289
1290 case 69:
1292 temp->AI()->Talk(SAY_LIGHT_OF_DAWN67);
1293 JumpToNextStep(10000);
1294 break;
1295
1296 case 70:
1297 me->SetStandState(UNIT_STAND_STATE_STAND);
1299 JumpToNextStep(10000);
1300 break;
1301
1302 case 71:
1303 //if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID)) // Turn off dawn of light
1304 // go->SetPhaseMask(0, true);
1305 {
1306 Map* map = me->GetMap(); // search players with in 50 yards for quest credit
1307 Map::PlayerList const &PlayerList = map->GetPlayers();
1308 if (!PlayerList.isEmpty())
1309 {
1310 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
1311 if (i->GetSource()->IsAlive() && me->IsWithinDistInMap(i->GetSource(), 50))
1312 i->GetSource()->CastSpell(i->GetSource(), SPELL_THE_LIGHT_OF_DAWN_Q, false);
1313 }
1314 }
1315 me->SetVisible(false); // respawns another Darion for quest turn in
1316 me->SummonCreature(NPC_HIGHLORD_DARION_MOGRAINE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
1317 JumpToNextStep(1000);
1318 break;
1319
1320 case 72:
1321 SetHoldState(false); // Escort ends
1322 JumpToNextStep(25000);
1323 break;
1324
1325 case 73:
1327 temp->DespawnOrUnsummon();
1329 temp->DespawnOrUnsummon();
1331 temp->DespawnOrUnsummon();
1333 temp->DespawnOrUnsummon();
1334 me->DespawnOrUnsummon();
1335 break;
1336 }
1337
1338 } else uiPhase_timer -= diff;
1339 }
1340
1341 // ******* During battle *****************************************************************
1342 else
1343 {
1344 if (uiAnti_magic_zone <= diff)
1345 {
1347 uiAnti_magic_zone = std::rand() % 30000 + 25000;
1348 } else uiAnti_magic_zone -= diff;
1349
1350 if (uiDeath_strike <= diff)
1351 {
1353 uiDeath_strike = std::rand() % 10000 + 5000;
1354 } else uiDeath_strike -= diff;
1355
1356 if (uiDeath_embrace <= diff)
1357 {
1359 uiDeath_embrace = std::rand() % 10000 + 5000;
1360 } else uiDeath_embrace -= diff;
1361
1362 if (uiIcy_touch <= diff)
1363 {
1365 uiIcy_touch = std::rand() % 10000 + 5000;
1366 } else uiIcy_touch -= diff;
1367
1368 if (uiUnholy_blight <= diff)
1369 {
1371 uiUnholy_blight = std::rand() % 10000 + 5000;
1372 } else uiUnholy_blight -= diff;
1373
1374 if (uiFight_speech <= diff)
1375 {
1377 uiFight_speech = std::rand() % 20000 + 15000;
1378 } else uiFight_speech -= diff;
1379
1380 // Check spawns
1381 if (uiSpawncheck <= diff)
1382 {
1383 SpawnNPC();
1384 uiSpawncheck = 1000;
1385 } else uiSpawncheck -= diff;
1386
1387 // Check targets
1388 if (uiTargetcheck <= diff)
1389 {
1390 for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
1392 for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
1394 for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
1396 for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
1401
1402 uiTargetcheck = 10000;
1403 } else uiTargetcheck -= diff;
1404
1405 // Battle end
1406 if (uiFight_duration <= diff + 5000)
1407 {
1408 if (!uiTirionGUID)
1410 {
1411 temp->setFaction(me->getFaction());
1412 temp->SetUInt32Value(UNIT_FIELD_VIRTUAL_ITEM_ID + 0, uint32(EQUIP_UNEQUIP));
1413 temp->AI()->Talk(SAY_LIGHT_OF_DAWN25);
1414 uiTirionGUID = temp->GetGUID();
1415 }
1416 }
1417 if (uiFight_duration <= diff)
1418 {
1419 bIsBattle = false;
1420 uiFight_duration = 300000;
1421
1422 if (me->HasAura(SPELL_THE_MIGHT_OF_MOGRAINE, 0))
1423 me->RemoveAurasDueToSpell(SPELL_THE_MIGHT_OF_MOGRAINE);
1424 me->RemoveAllAuras();
1425 me->DeleteThreatList();
1426 me->CombatStop(true);
1427 me->InterruptNonMeleeSpells(false);
1428 me->SetWalk(false);
1429
1430 for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
1432 for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
1434 for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
1436 for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
1438 for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
1440 for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
1442
1444 {
1445 temp->RemoveAllAuras();
1446 temp->DeleteThreatList();
1447 temp->CombatStop(true);
1448 temp->AttackStop();
1449 temp->setFaction(me->getFaction());
1450 temp->SetWalk(false);
1451 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[9].x, LightofDawnLoc[9].y, LightofDawnLoc[9].z);
1452 }
1453
1455 {
1456 temp->RemoveAllAuras();
1457 temp->DeleteThreatList();
1458 temp->CombatStop(true);
1459 temp->AttackStop();
1460 temp->setFaction(me->getFaction());
1461 temp->SetWalk(false);
1462 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[12].x, LightofDawnLoc[12].y, LightofDawnLoc[12].z);
1463 }
1464
1466 {
1467 temp->RemoveAllAuras();
1468 temp->DeleteThreatList();
1469 temp->CombatStop(true);
1470 temp->AttackStop();
1471 temp->setFaction(me->getFaction());
1472 temp->SetWalk(false);
1473 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[15].x, LightofDawnLoc[15].y, LightofDawnLoc[15].z);
1474 }
1476
1478 {
1479 temp->RemoveAllAuras();
1480 temp->DeleteThreatList();
1481 temp->CombatStop(true);
1482 temp->AttackStop();
1483 temp->setFaction(me->getFaction());
1484 temp->SetWalk(false);
1485 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[18].x, LightofDawnLoc[18].y, LightofDawnLoc[18].z);
1486 temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
1487 }
1488
1490 temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN04);
1491
1493 {
1494 temp->RemoveAllAuras();
1495 temp->DeleteThreatList();
1496 temp->CombatStop(true);
1497 temp->AttackStop();
1498 temp->setFaction(me->getFaction());
1499 temp->SetWalk(false);
1500 temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[20].x, LightofDawnLoc[20].y, LightofDawnLoc[20].z);
1501 temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
1502 }
1503
1505 temp->AI()->Talk(SAY_LIGHT_OF_DAWN26);
1506
1507 SetHoldState(false);
1508
1509 } else uiFight_duration -= diff;
1510
1512 }
1513 }
1514
1516 {
1517 uiPhase_timer = uiTimer;
1518 ++uiStep;
1519 }
1520
1522 {
1523 if (Creature* temp = Unit::GetCreature(*me, ui_GUID))
1524 if (temp->IsAlive())
1525 if (Unit* pTarger = SelectTarget(SELECT_TARGET_RANDOM, 0))
1526 if (pTarger->IsAlive())
1527 {
1528 // temp->DeleteThreatList();
1529 temp->AddThreat(pTarger, 0.0f);
1530 temp->AI()->AttackStart(pTarger);
1531 temp->SetInCombatWith(pTarger);
1532 pTarger->SetInCombatWith(temp);
1533 // temp->GetMotionMaster()->MoveChase(pTarger, 20.0f);
1534 }
1535 }
1536
1538 {
1539 Unit* temp = NULL;
1540
1541 // Death
1542 for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
1543 {
1544 temp = Unit::GetCreature(*me, uiGhoulGUID[i]);
1545 if (!temp)
1546 {
1547 temp = me->SummonCreature(NPC_ACHERUS_GHOUL, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
1548 temp->setFaction(2084);
1549 uiGhoulGUID[i] = temp->GetGUID();
1550 }
1551 }
1552 for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
1553 {
1555 if (!temp)
1556 {
1557 temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
1558 temp->setFaction(2084);
1559 uiAbominationGUID[i] = temp->GetGUID();
1560 }
1561 }
1562 for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
1563 {
1564 temp = Unit::GetCreature(*me, uiWarriorGUID[i]);
1565 if (!temp)
1566 {
1567 temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
1568 temp->setFaction(2084);
1569 uiWarriorGUID[i] = temp->GetGUID();
1570 }
1571 }
1572 for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
1573 {
1574 temp = Unit::GetCreature(*me, uiBehemothGUID[i]);
1575 if (!temp)
1576 {
1577 temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
1578 temp->setFaction(2084);
1579 uiBehemothGUID[i] = temp->GetGUID();
1580 }
1581 }
1582
1583 // Dawn
1584 for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
1585 {
1586 temp = Unit::GetCreature(*me, uiDefenderGUID[i]);
1587 if (!temp)
1588 {
1589 temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
1590 temp->setFaction(2089);
1591 me->AddThreat(temp, 0.0f);
1592 uiDefenderGUID[i] = temp->GetGUID();
1593 }
1594 }
1595 for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
1596 {
1598 if (!temp)
1599 {
1600 temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
1601 temp->setFaction(2089);
1602 me->AddThreat(temp, 0.0f);
1603 uiEarthshatterGUID[i] = temp->GetGUID();
1604 }
1605 }
1607 if (!temp)
1608 {
1609 temp = me->SummonCreature(NPC_KORFAX_CHAMPION_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
1610 temp->setFaction(2089);
1611 me->AddThreat(temp, 0.0f);
1612 uiKorfaxGUID = temp->GetGUID();
1613 }
1615 if (!temp)
1616 {
1617 temp = me->SummonCreature(NPC_LORD_MAXWELL_TYROSUS, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
1618 temp->setFaction(2089);
1619 me->AddThreat(temp, 0.0f);
1620 uiMaxwellGUID = temp->GetGUID();
1621 }
1623 if (!temp)
1624 {
1625 temp = me->SummonCreature(NPC_COMMANDER_ELIGOR_DAWNBRINGER, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
1626 temp->setFaction(2089);
1627 me->AddThreat(temp, 0.0f);
1628 uiEligorGUID = temp->GetGUID();
1629 }
1631 if (!temp)
1632 {
1633 temp = me->SummonCreature(NPC_RAYNE, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TempSummonType::TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
1634 temp->setFaction(2089);
1635 me->AddThreat(temp, 0.0f);
1636 uiRayneGUID = temp->GetGUID();
1637 }
1638 }
1639
1640 void DespawnNPC(uint64 pGUID)
1641 {
1642 if (Creature* temp = Unit::GetCreature(*me, pGUID))
1643 if (temp->IsAlive())
1644 {
1645 temp->SetVisible(false);
1646 temp->Kill(temp);
1647 }
1648 }
1649 };
1650};
1651
1652/*######
1653## npc the lich king in dawn of light
1654######*/
1656{
1657public:
1658 npc_the_lich_king_tirion_dawn() : CreatureScript("npc_the_lich_king_tirion_dawn") { }
1659
1661 {
1662 return new npc_the_lich_king_tirion_dawnAI(creature);
1663 }
1664
1666 {
1668 void Reset() OVERRIDE { }
1669 void AttackStart(Unit* /*who*/) OVERRIDE { } // very sample, just don't make them aggreesive
1670 void UpdateAI(uint32 /*diff*/) OVERRIDE { }
1671 void JustDied(Unit* /*killer*/) OVERRIDE { }
1672 };
1673};
1674
@ EQUIP_UNEQUIP
Definition CreatureAI.h:50
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
@ TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
Definition Object.h:69
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:89
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
#define CAST_AI(a, b)
@ STATE_ESCORT_ESCORTING
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
@ EMOTE_ONESHOT_SPECIALATTACK1H
@ EMOTE_ONESHOT_KICK
@ EMOTE_ONESHOT_ROAR
@ EMOTE_STATE_READY2H
@ EMOTE_ONESHOT_NONE
@ EMOTE_STATE_ATTACK_UNARMED
@ UNIT_NPC_FLAG_GOSSIP
Definition Unit.h:687
@ JUST_DIED
Definition Unit.h:504
@ UNIT_STAND_STATE_DEAD
Definition Unit.h:169
@ UNIT_STAND_STATE_KNEEL
Definition Unit.h:170
@ UNIT_STAND_STATE_STAND
Definition Unit.h:162
@ MOVE_RUN
Definition Unit.h:556
@ UNIT_FLAG_NOT_SELECTABLE
Definition Unit.h:650
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ UNIT_FIELD_VIRTUAL_ITEM_ID
@ UNIT_FIELD_NPC_FLAGS
@ UNIT_FIELD_FLAGS
@ UNIT_FIELD_NPC_EMOTESTATE
@ SPELL_CLEAVE
@ SPELL_THUNDERCLAP
static Location LightofDawnLoc[]
Definition chapter5.cpp:227
void UpdateWorldState(Map *map, uint32 id, uint32 state)
Definition chapter5.cpp:213
mograine
Definition chapter5.cpp:15
@ SPELL_STOMP
Definition chapter5.cpp:158
@ SAY_LIGHT_OF_DAWN27
Definition chapter5.cpp:53
@ SPELL_HOLY_WRATH
Definition chapter5.cpp:200
@ SAY_LIGHT_OF_DAWN01
Definition chapter5.cpp:42
@ SPELL_SCOURGE_AGGRO_AURA
Definition chapter5.cpp:155
@ EMOTE_LIGHT_OF_DAWN02
Definition chapter5.cpp:97
@ SPELL_PLAGUE_STRIKE1
Definition chapter5.cpp:139
@ NPC_THE_LICH_KING
Definition chapter5.cpp:143
@ SPELL_TIRION_CHARGE
Definition chapter5.cpp:176
@ SPELL_ASHBRINGER
Definition chapter5.cpp:130
@ SAY_LIGHT_OF_DAWN59
Definition chapter5.cpp:85
@ SAY_LIGHT_OF_DAWN53
Definition chapter5.cpp:79
@ SAY_LIGHT_OF_DAWN38
Definition chapter5.cpp:64
@ SPELL_DEATH_EMBRACE
Definition chapter5.cpp:123
@ SPELL_BLOOD_STRIKE1
Definition chapter5.cpp:136
@ SPELL_SCOURGE_HOOK
Definition chapter5.cpp:154
@ EMOTE_LIGHT_OF_DAWN03
Definition chapter5.cpp:98
@ SPELL_MOGRAINE_CHARGE
Definition chapter5.cpp:129
@ SAY_LIGHT_OF_DAWN49
Definition chapter5.cpp:75
@ SAY_LIGHT_OF_DAWN32
Definition chapter5.cpp:58
@ SAY_LIGHT_OF_DAWN52
Definition chapter5.cpp:78
@ SAY_LIGHT_OF_DAWN37
Definition chapter5.cpp:63
@ SAY_LIGHT_OF_DAWN08
Definition chapter5.cpp:49
@ SAY_LIGHT_OF_DAWN09
Definition chapter5.cpp:50
@ EMOTE_LIGHT_OF_DAWN15
Definition chapter5.cpp:110
@ SPELL_DEATH_STRIKE
Definition chapter5.cpp:122
@ SAY_LIGHT_OF_DAWN42
Definition chapter5.cpp:68
@ SPELL_THE_LIGHT_OF_DAWN
Definition chapter5.cpp:125
@ SPELL_THE_MIGHT_OF_MOGRAINE
Definition chapter5.cpp:126
@ NPC_FLESH_BEHEMOTH
Definition chapter5.cpp:157
@ EMOTE_LIGHT_OF_DAWN10
Definition chapter5.cpp:105
@ SAY_LIGHT_OF_DAWN02
Definition chapter5.cpp:43
@ SAY_LIGHT_OF_DAWN04
Definition chapter5.cpp:45
@ NPC_RAMPAGING_ABOMINATION
Definition chapter5.cpp:152
@ SPELL_ICY_TOUCH2
Definition chapter5.cpp:138
@ SAY_LIGHT_OF_DAWN67
Definition chapter5.cpp:93
@ EMOTE_LIGHT_OF_DAWN08
Definition chapter5.cpp:103
@ ENCOUNTER_DK_NUMBER
Definition chapter5.cpp:17
@ SAY_LIGHT_OF_DAWN29
Definition chapter5.cpp:55
@ NPC_HIGHLORD_TIRION_FORDRING
Definition chapter5.cpp:172
@ SAY_LIGHT_OF_DAWN56
Definition chapter5.cpp:82
@ NPC_DEFENDER_OF_THE_LIGHT
Definition chapter5.cpp:197
@ SAY_LIGHT_OF_DAWN61
Definition chapter5.cpp:87
@ SAY_LIGHT_OF_DAWN47
Definition chapter5.cpp:73
@ SPELL_HEROIC_LEAP
Definition chapter5.cpp:182
@ SAY_LIGHT_OF_DAWN54
Definition chapter5.cpp:80
@ SPELL_SOUL_FEAST_TIRION
Definition chapter5.cpp:147
@ SPELL_CHAIN_HEAL
Definition chapter5.cpp:204
@ EMOTE_LIGHT_OF_DAWN18
Definition chapter5.cpp:113
@ SPELL_UNHOLY_BLIGHT
Definition chapter5.cpp:127
@ WORLD_STATE_COUNTDOWN
Definition chapter5.cpp:39
@ GO_LIGHT_OF_DAWN
Definition chapter5.cpp:115
@ SAY_LIGHT_OF_DAWN26
Definition chapter5.cpp:52
@ ENCOUNTER_TOTAL_DAWN
Definition chapter5.cpp:35
@ SPELL_ICEBOUND_VISAGE
Definition chapter5.cpp:148
@ EMOTE_LIGHT_OF_DAWN13
Definition chapter5.cpp:108
@ SAY_LIGHT_OF_DAWN06
Definition chapter5.cpp:47
@ EMOTE_LIGHT_OF_DAWN11
Definition chapter5.cpp:106
@ SAY_LIGHT_OF_DAWN41
Definition chapter5.cpp:67
@ SAY_LIGHT_OF_DAWN68
Definition chapter5.cpp:94
@ SAY_LIGHT_OF_DAWN31
Definition chapter5.cpp:57
@ SAY_LIGHT_OF_DAWN64
Definition chapter5.cpp:90
@ EMOTE_LIGHT_OF_DAWN17
Definition chapter5.cpp:112
@ EMOTE_LIGHT_OF_DAWN06
Definition chapter5.cpp:101
@ SAY_LIGHT_OF_DAWN58
Definition chapter5.cpp:84
@ NPC_ORBAZ_BLOODBANE
Definition chapter5.cpp:134
@ SAY_LIGHT_OF_DAWN44
Definition chapter5.cpp:70
@ WORLD_STATE_REMAINS
Definition chapter5.cpp:38
@ EMOTE_LIGHT_OF_DAWN01
Definition chapter5.cpp:96
@ SAY_LIGHT_OF_DAWN46
Definition chapter5.cpp:72
@ ENCOUNTER_ABOMINATION_NUMBER
Definition chapter5.cpp:21
@ WORLD_STATE_EVENT_BEGIN
Definition chapter5.cpp:40
@ EMOTE_LIGHT_OF_DAWN04
Definition chapter5.cpp:99
@ SPELL_TELEPORT_VISUAL
Definition chapter5.cpp:145
@ EMOTE_LIGHT_OF_DAWN14
Definition chapter5.cpp:109
@ EMOTE_LIGHT_OF_DAWN05
Definition chapter5.cpp:100
@ SAY_LIGHT_OF_DAWN35
Definition chapter5.cpp:61
@ EMOTE_LIGHT_OF_DAWN16
Definition chapter5.cpp:111
@ NPC_DARION_MOGRAINE
Definition chapter5.cpp:168
@ SAY_LIGHT_OF_DAWN62
Definition chapter5.cpp:88
@ NPC_ACHERUS_GHOUL
Definition chapter5.cpp:162
@ SPELL_APOCALYPSE
Definition chapter5.cpp:144
@ SPELL_ANTI_MAGIC_ZONE1
Definition chapter5.cpp:121
@ EQUIP_HIGHLORD_TIRION_FORDRING
Definition chapter5.cpp:173
@ SAY_LIGHT_OF_DAWN65
Definition chapter5.cpp:91
@ ENCOUNTER_TOTAL_SCOURGE
Definition chapter5.cpp:36
@ EMOTE_LIGHT_OF_DAWN09
Definition chapter5.cpp:104
@ SPELL_CLEAVE1
Definition chapter5.cpp:153
@ SAY_LIGHT_OF_DAWN28
Definition chapter5.cpp:54
@ SAY_LIGHT_OF_DAWN34
Definition chapter5.cpp:60
@ NPC_WARRIOR_OF_THE_FROZEN_WASTES
Definition chapter5.cpp:165
@ SPELL_ICY_TOUCH1
Definition chapter5.cpp:124
@ SPELL_REJUVENATION
Definition chapter5.cpp:192
@ SPELL_GHOULPLOSION
Definition chapter5.cpp:163
@ SAY_LIGHT_OF_DAWN33
Definition chapter5.cpp:59
@ SAY_LIGHT_OF_DAWN40
Definition chapter5.cpp:66
@ NPC_COMMANDER_ELIGOR_DAWNBRINGER
Definition chapter5.cpp:188
@ SPELL_LAY_ON_HANDS
Definition chapter5.cpp:174
@ SAY_LIGHT_OF_DAWN55
Definition chapter5.cpp:81
@ SAY_LIGHT_OF_DAWN30
Definition chapter5.cpp:56
@ SAY_LIGHT_OF_DAWN07
Definition chapter5.cpp:48
@ SAY_LIGHT_OF_DAWN45
Definition chapter5.cpp:71
@ NPC_LEONID_BARTHALOMEW_THE_REVERED
Definition chapter5.cpp:185
@ SPELL_HERO_AGGRO_AURA
Definition chapter5.cpp:160
@ NPC_HIGHLORD_DARION_MOGRAINE
Definition chapter5.cpp:120
@ NPC_THASSARIAN
Definition chapter5.cpp:135
@ SAY_LIGHT_OF_DAWN57
Definition chapter5.cpp:83
@ SPELL_DEATH_GRIP
Definition chapter5.cpp:137
@ SAY_LIGHT_OF_DAWN03
Definition chapter5.cpp:44
@ NPC_KORFAX_CHAMPION_OF_THE_LIGHT
Definition chapter5.cpp:180
@ SAY_LIGHT_OF_DAWN43
Definition chapter5.cpp:69
@ NPC_RAYNE
Definition chapter5.cpp:191
@ EMOTE_LIGHT_OF_DAWN07
Definition chapter5.cpp:102
@ SPELL_HOLY_LIGHT2
Definition chapter5.cpp:189
@ SPELL_TIRION_CHARGE_VISUAL
Definition chapter5.cpp:177
@ SPELL_WRATH
Definition chapter5.cpp:195
@ SAY_LIGHT_OF_DAWN50
Definition chapter5.cpp:76
@ SPELL_SOUL_FEAST_ALEX
Definition chapter5.cpp:146
@ ENCOUNTER_GHOUL_NUMBER
Definition chapter5.cpp:23
@ NPC_DUKE_NICHOLAS_ZVERENHOFF
Definition chapter5.cpp:186
@ ENCOUNTER_BEHEMOTH_NUMBER
Definition chapter5.cpp:22
@ ENCOUNTER_EARTHSHATTER_NUMBER
Definition chapter5.cpp:20
@ ENCOUNTER_WARRIOR_NUMBER
Definition chapter5.cpp:24
@ SAY_LIGHT_OF_DAWN36
Definition chapter5.cpp:62
@ ENCOUNTER_DK_TIMER
Definition chapter5.cpp:18
@ SAY_LIGHT_OF_DAWN48
Definition chapter5.cpp:74
@ SPELL_HOLY_LIGHT1
Definition chapter5.cpp:198
@ EMOTE_LIGHT_OF_DAWN12
Definition chapter5.cpp:107
@ SPELL_HOLY_STRIKE
Definition chapter5.cpp:199
@ NPC_LORD_MAXWELL_TYROSUS
Definition chapter5.cpp:184
@ SAY_LIGHT_OF_DAWN60
Definition chapter5.cpp:86
@ SAY_LIGHT_OF_DAWN39
Definition chapter5.cpp:65
@ ENCOUNTER_DEFENDER_NUMBER
Definition chapter5.cpp:19
@ SPELL_THUNDER
Definition chapter5.cpp:205
@ SAY_LIGHT_OF_DAWN51
Definition chapter5.cpp:77
@ SPELL_REBIRTH_OF_THE_ASHBRINGER
Definition chapter5.cpp:175
@ SAY_LIGHT_OF_DAWN05
Definition chapter5.cpp:46
@ SAY_LIGHT_OF_DAWN25
Definition chapter5.cpp:51
@ SPELL_THE_LIGHT_OF_DAWN_Q
Definition chapter5.cpp:116
@ NPC_RIMBLAT_EARTHSHATTER
Definition chapter5.cpp:203
@ SPELL_ALEXANDROS_MOGRAINE_SPAWN
Definition chapter5.cpp:128
@ NPC_HIGHLORD_ALEXANDROS_MOGRAINE
Definition chapter5.cpp:167
@ SPELL_STARFALL
Definition chapter5.cpp:193
@ SPELL_TRANQUILITY
Definition chapter5.cpp:194
@ SAY_LIGHT_OF_DAWN66
Definition chapter5.cpp:92
@ NPC_KOLTIRA_DEATHWEAVER
Definition chapter5.cpp:133
@ SPELL_REBUKE
Definition chapter5.cpp:149
@ SAY_LIGHT_OF_DAWN63
Definition chapter5.cpp:89
void AddSC_the_scarlet_enclave_c5()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
CreatureScript(const char *name)
bool isEmpty() const
Definition LinkedList.h:86
Definition Map.h:238
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)
uint64 GetGUID() const
Definition Object.h:119
void SetUInt32Value(uint16 index, uint32 value)
Definition Object.cpp:1038
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
Definition Unit.h:1367
void setFaction(uint32 faction)
Definition Unit.h:1699
MotionMaster * GetMotionMaster()
Definition Unit.h:2605
static Creature * GetCreature(WorldObject &object, uint64 guid)
Definition Unit.cpp:4905
bool SetWalk(bool enable)
Definition Unit.cpp:9137
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition Unit.cpp:4318
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition chapter5.cpp:293
bool OnGossipHello(Player *player, Creature *creature) OVERRIDE
Definition chapter5.cpp:280
bool OnGossipSelect(Player *player, Creature *creature, uint32, uint32 action) OVERRIDE
Definition chapter5.cpp:266
CreatureAI * GetAI(Creature *creature) const OVERRIDE
float y
Definition chapter5.cpp:210
float o
Definition chapter5.cpp:210
float z
Definition chapter5.cpp:210
float x
Definition chapter5.cpp:210
Creature * me
ScriptedAI(Creature *creature)
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
void EnterEvadeMode() OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
bool HasEscortState(uint32 escortState) const
npc_escortAI(Creature *creature)
void SetEscortPaused(bool on)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition chapter5.cpp:615
uint64 uiEarthshatterGUID[ENCOUNTER_EARTHSHATTER_NUMBER]
Definition chapter5.cpp:349
uint64 uiAbominationGUID[ENCOUNTER_ABOMINATION_NUMBER]
Definition chapter5.cpp:356
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================