Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
zone_silithus.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/* ScriptData
7SDName: Silithus
8SD%Complete: 100
9SDComment: Quest support: 7785, 8304.
10SDCategory: Silithus
11EndScriptData */
12
13/* ContentData
14npc_highlord_demitrian
15npcs_rutgar_and_frankal
16go_wind_stone
17EndContentData */
18
19#include "ScriptMgr.h"
20#include "ScriptedCreature.h"
21#include "ScriptedGossip.h"
22#include "Group.h"
23#include "Player.h"
24
25/*###
26## npc_highlord_demitrian
27###*/
28
29#define GOSSIP_DEMITRIAN1 "What do you know of it?"
30#define GOSSIP_DEMITRIAN2 "I am listening, Demitrian."
31#define GOSSIP_DEMITRIAN3 "Continue, please."
32#define GOSSIP_DEMITRIAN4 "A battle?"
33#define GOSSIP_DEMITRIAN5 "<Nod>"
34#define GOSSIP_DEMITRIAN6 "Caught unaware? How?"
35#define GOSSIP_DEMITRIAN7 "So what did Ragnaros do next?"
36
38{
39public:
40 npc_highlord_demitrian() : CreatureScript("npc_highlord_demitrian") { }
41
42 bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
43 {
44 player->PlayerTalkClass->ClearMenus();
45 switch (action)
46 {
49 player->SEND_GOSSIP_MENU(6842, creature->GetGUID());
50 break;
53 player->SEND_GOSSIP_MENU(6843, creature->GetGUID());
54 break;
57 player->SEND_GOSSIP_MENU(6844, creature->GetGUID());
58 break;
61 player->SEND_GOSSIP_MENU(6867, creature->GetGUID());
62 break;
65 player->SEND_GOSSIP_MENU(6868, creature->GetGUID());
66 break;
69 player->SEND_GOSSIP_MENU(6869, creature->GetGUID());
70 break;
72 player->SEND_GOSSIP_MENU(6870, creature->GetGUID());
73
74 ItemPosCountVec dest;
75 uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 19016, 1);
76 if (msg == EQUIP_ERR_OK)
77 player->StoreNewItem(dest, 19016, true);
78 break;
79 }
80 return true;
81 }
82
83 bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
84 {
85 if (creature->IsQuestGiver())
86 player->PrepareQuestMenu(creature->GetGUID());
87
88 if (player->GetQuestStatus(7785) == QUEST_STATUS_NONE &&
89 (player->HasItemCount(18563, 1, false) || player->HasItemCount(18564, 1, false)))
91
92 player->SEND_GOSSIP_MENU(6812, creature->GetGUID());
93 return true;
94 }
95};
96
97/*###
98## npcs_rutgar_and_frankal
99###*/
100
101//gossip item text best guess
102#define GOSSIP_ITEM1 "I seek information about Natalia"
103
104#define GOSSIP_ITEM2 "That sounds dangerous!"
105#define GOSSIP_ITEM3 "What did you do?"
106#define GOSSIP_ITEM4 "Who?"
107#define GOSSIP_ITEM5 "Women do that. What did she demand?"
108#define GOSSIP_ITEM6 "What do you mean?"
109#define GOSSIP_ITEM7 "What happened next?"
110
111#define GOSSIP_ITEM11 "Yes, please continue"
112#define GOSSIP_ITEM12 "What language?"
113#define GOSSIP_ITEM13 "The Priestess attacked you?!"
114#define GOSSIP_ITEM14 "I should ask the monkey about this"
115#define GOSSIP_ITEM15 "Then what..."
116
117enum RutgarAndFrankal //trigger creatures to kill
118{
121};
122
124{
125public:
126 npcs_rutgar_and_frankal() : CreatureScript("npcs_rutgar_and_frankal") { }
127
128 bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
129 {
130 player->PlayerTalkClass->ClearMenus();
131 switch (action)
132 {
135 player->SEND_GOSSIP_MENU(7755, creature->GetGUID());
136 break;
137 case GOSSIP_ACTION_INFO_DEF + 1:
139 player->SEND_GOSSIP_MENU(7756, creature->GetGUID());
140 break;
141 case GOSSIP_ACTION_INFO_DEF + 2:
143 player->SEND_GOSSIP_MENU(7757, creature->GetGUID());
144 break;
145 case GOSSIP_ACTION_INFO_DEF + 3:
147 player->SEND_GOSSIP_MENU(7758, creature->GetGUID());
148 break;
149 case GOSSIP_ACTION_INFO_DEF + 4:
151 player->SEND_GOSSIP_MENU(7759, creature->GetGUID());
152 break;
153 case GOSSIP_ACTION_INFO_DEF + 5:
155 player->SEND_GOSSIP_MENU(7760, creature->GetGUID());
156 break;
157 case GOSSIP_ACTION_INFO_DEF + 6:
158 player->SEND_GOSSIP_MENU(7761, creature->GetGUID());
159 //'kill' our trigger to update quest status
160 player->KilledMonsterCredit(TRIGGER_RUTGAR, 0);
161 break;
162
163 case GOSSIP_ACTION_INFO_DEF + 9:
165 player->SEND_GOSSIP_MENU(7762, creature->GetGUID());
166 break;
167 case GOSSIP_ACTION_INFO_DEF + 10:
169 player->SEND_GOSSIP_MENU(7763, creature->GetGUID());
170 break;
171 case GOSSIP_ACTION_INFO_DEF + 11:
173 player->SEND_GOSSIP_MENU(7764, creature->GetGUID());
174 break;
175 case GOSSIP_ACTION_INFO_DEF + 12:
177 player->SEND_GOSSIP_MENU(7765, creature->GetGUID());
178 break;
179 case GOSSIP_ACTION_INFO_DEF + 13:
181 player->SEND_GOSSIP_MENU(7766, creature->GetGUID());
182 break;
183 case GOSSIP_ACTION_INFO_DEF + 14:
184 player->SEND_GOSSIP_MENU(7767, creature->GetGUID());
185 //'kill' our trigger to update quest status
186 player->KilledMonsterCredit(TRIGGER_FRANKAL, 0);
187 break;
188 }
189 return true;
190 }
191
192 bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
193 {
194 if (creature->IsQuestGiver())
195 player->PrepareQuestMenu(creature->GetGUID());
196
197 if (player->GetQuestStatus(8304) == QUEST_STATUS_INCOMPLETE &&
198 creature->GetEntry() == 15170 &&
199 !player->GetReqKillOrCastCurrentCount(8304, TRIGGER_RUTGAR))
201
202 if (player->GetQuestStatus(8304) == QUEST_STATUS_INCOMPLETE &&
203 creature->GetEntry() == 15171 &&
204 player->GetReqKillOrCastCurrentCount(8304, TRIGGER_RUTGAR))
206
207 player->SEND_GOSSIP_MENU(7754, creature->GetGUID());
208
209 return true;
210 }
211};
212
213/*####
214# quest_a_pawn_on_the_eternal_board (Defines)
215####*/
269/*#####
270# Quest: A Pawn on the Eternal Board
271#####*/
272
273/* ContentData
274A Pawn on the Eternal Board - creatures, gameobjects and defines
275npc_qiraj_war_spawn : Adds that are summoned in the Qiraj gates battle.
276npc_anachronos_the_ancient : Creature that controls the event.
277npc_anachronos_quest_trigger: controls the spawning of the BG War mobs.
278go_crystalline_tear : GameObject that begins the event and hands out quest
279TO DO: get correct spell IDs and timings for spells cast upon dragon transformations
280TO DO: Dragons should use the HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF) after transformation, but for some unknown reason it doesnt work.
281EndContentData */
282
283#define EVENT_AREA_RADIUS 65 //65yds
284#define EVENT_COOLDOWN 500000 //in ms. appear after event completed or failed (should be = Adds despawn time)
285
291
292// Creature 0 - Anachronos, 1 - Fandral, 2 - Arygos, 3 - Merithra, 4 - Caelestrasz
294{
295 {ANACHRONOS_SAY_1, 0, 2000},
296 {FANDRAL_SAY_1, 1, 4000},
297 {MERITHRA_EMOTE_1, 3, 500},
298 {MERITHRA_SAY_1, 3, 500},
299 {ARYGOS_EMOTE_1, 2, 2000},
300 {CAELESTRASZ_SAY_1, 4, 8000},
301 {MERITHRA_SAY_2, 3, 6000},
302 {0, 3, 2000},
303 {MERITHRA_YELL_1, 3, 2500},
304 {0, 3, 3000}, //Morph
305 {0, 3, 4000}, //EmoteLiftoff
306 {0, 3, 4000}, // spell
307 {0, 3, 1250}, //fly
308 {0, 3, 250}, //remove flags
309 {ARYGOS_SAY_1, 2, 3000},
310 {0, 3, 2000},
311 {ARYGOS_YELL_1, 2, 3000},
312 {0, 3, 3000}, //Morph
313 {0, 3, 4000}, //EmoteLiftoff
314 {0, 3, 4000}, // spell
315 {0, 3, 1000}, //fly
316 {0, 3, 1000}, //remove flags
317 {CAELESTRASZ_SAY_2, 4, 5000},
318 {0, 3, 3000},
319 {CAELESTRASZ_YELL_1, 4, 3000},
320 {0, 3, 3000}, //Morph
321 {0, 3, 4000}, //EmoteLiftoff
322 {0, 3, 2500}, // spell
323 {ANACHRONOS_SAY_2, 0, 2000},
324 {0, 3, 250}, //fly
325 {0, 3, 25}, //remove flags
326 {FANDRAL_SAY_2, 1, 3000},
327 {ANACHRONOS_SAY_3, 0, 10000}, //Both run through the armies
328 {0, 3, 2000}, // Sands will stop
329 {0, 3, 8000}, // Summon Gate
330 {ANACHRONOS_SAY_4, 0, 4000},
331 {0, 0, 2000}, //spell 1-> Arcane cosmetic (Mobs freeze)
332 {0, 0, 5000}, //Spell 2-> Arcane long cosmetic (barrier appears) (Barrier -> Glyphs)
333 {0, 0, 7000}, //BarrieR
334 {0, 0, 4000}, //Glyphs
335 {ANACHRONOS_SAY_5, 0, 2000},
336 {0, 0, 4000}, // Roots
337 {FANDRAL_SAY_3, 1, 3000}, //Root Text
338 {FANDRAL_EMOTE_1, 1, 3000}, //falls knee
339 {ANACHRONOS_SAY_6, 0, 3000},
340 {ANACHRONOS_SAY_7, 0, 3000},
341 {ANACHRONOS_SAY_8, 0, 8000},
342 {ANACHRONOS_EMOTE_1, 0, 1000}, //Give Scepter
343 {FANDRAL_SAY_4, 1, 3000},
344 {FANDRAL_SAY_5, 1, 3000}, //->Equip hammer~Scepter, throw it at door
345 {FANDRAL_EMOTE_2, 1, 3000}, //Throw hammer at door.
346 {ANACHRONOS_SAY_9, 0, 3000},
347 {FANDRAL_SAY_6, 1, 3000}, //fandral goes away
348 {ANACHRONOS_EMOTE_2, 0, 3000},
349 {ANACHRONOS_EMOTE_3, 0, 3000},
350 {0, 0, 2000},
351 {0, 0, 2000},
352 {0, 0, 4000},
353 {ANACHRONOS_SAY_10, 0, 3000},
354 {0, 0, 2000},
355 {0, 0, 3000},
356 {0, 0, 15000},
357 {0, 0, 5000},
358 {0, 0, 3500},
359 {0, 0, 5000},
360 {0, 0, 3500},
361 {0, 0, 5000},
362 {0, 0, 0}
363};
364
365//Cordinates for Spawns
367{
368 {-8085.0f, 1528.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
369 {-8080.0f, 1526.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
370 {-8085.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
371 {-8080.0f, 1522.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
372 {-8085.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
373
374 {-8085.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
375 {-8080.0f, 1522.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
376 {-8085.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
377 {-8080.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
378 {-8085.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
379
380 {-8085.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
381 {-8080.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
382 {-8080.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
383 {-8080.0f, 1424.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
384 {-8085.0f, 1422.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
385 // 2 waves of warriors
386 {-8082.0f, 1528.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
387 {-8078.0f, 1525.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
388 {-8082.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
389 {-8078.0f, 1526.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
390 {-8082.0f, 1527.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
391
392 {-8082.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
393 {-8078.0f, 1522.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
394 {-8082.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
395 {-8078.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
396 {-8082.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
397
398 {-8082.0f, 1523.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
399 {-8078.0f, 1521.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
400 {-8082.0f, 1528.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
401 {-8078.0f, 1519.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
402 {-8082.0f, 1526.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
403
404 {-8082.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
405 {-8078.0f, 1522.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
406 {-8082.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
407 {-8078.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
408 {-8082.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
409
410 {-8088.0f, 1510.0f, 2.61f, 0.0f}, //Anubisath Conqueror
411 {-8084.0f, 1520.0f, 2.61f, 0.0f}, //Anubisath Conqueror
412 {-8088.0f, 1530.0f, 2.61f, 0.0f}, //Anubisath Conqueror
413
414 {-8080.0f, 1513.0f, 2.61f, 0.0f}, //Qiraj Wasp
415 {-8082.0f, 1523.0f, 2.61f, 0.0f}, //Qiraj Wasp
416 {-8085.0f, 1518.0f, 2.61f, 0.0f}, //Qiraj Wasp
417 {-8082.0f, 1516.0f, 2.61f, 0.0f}, //Qiraj Wasp
418 {-8085.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Wasp
419 {-8080.0f, 1528.0f, 2.61f, 0.0f}, //Qiraj Wasp
420
421 {-8082.0f, 1513.0f, 2.61f, 0.0f}, //Qiraj Wasp
422 {-8079.0f, 1523.0f, 2.61f, 0.0f}, //Qiraj Wasp
423 {-8080.0f, 1531.0f, 2.61f, 0.0f}, //Qiraj Wasp
424 {-8079.0f, 1516.0f, 2.61f, 0.0f}, //Qiraj Wasp
425 {-8082.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Wasp
426 {-8080.0f, 1518.0f, 2.61f, 0.0f}, //Qiraj Wasp
427
428 {-8081.0f, 1514.0f, 2.61f, 0.0f}, //Qiraj Tank
429 {-8081.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Tank
430 {-8081.0f, 1526.0f, 2.61f, 0.0f}, //Qiraj Tank
431 {-8081.0f, 1512.0f, 2.61f, 0.0f}, //Qiraj Tank
432 {-8082.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Tank
433 {-8081.0f, 1528.0f, 2.61f, 0.0f}, //Qiraj Tank
434
435 {-8082.0f, 1513.0f, 2.61f, 3.141592f}, //Anubisath Conqueror
436 {-8082.0f, 1520.0f, 2.61f, 3.141592f}, //Anubisath Conqueror
437 {-8082.0f, 1527.0f, 2.61f, 3.141592f}, //Anubisath Conqueror
438};
439
446
448{
449 {30, 0, 15423, 0, 0, 24000, 0}, // Kaldorei Soldier
450 { 3, 35, 15424, 0, 0, 24000, 0}, // Anubisath Conqueror
451 {12, 38, 15414, 0, 0, 24000, 0}, // Qiraji Wasps
452 { 6, 50, 15422, 0, 0, 24000, 0}, // Qiraji Tanks
453 {15, 15, 15423, 0, 0, 24000, 0} // Kaldorei Soldier
454};
455
460
462{
463 {100000, 2000, 33652}, // Stop Time
464 {38500, 300000, 28528}, // Poison Cloud
465 {58000, 300000, 35871}, // Frost Debuff (need correct spell)
466 {80950, 300000, 42075}, // Fire Explosion (need correct spell however this one looks cool)
467};
468/*#####
469# npc_anachronos_the_ancient
470######*/
472{
473public:
474 npc_anachronos_the_ancient() : CreatureScript("npc_anachronos_the_ancient") { }
475
477 {
478 return new npc_anachronos_the_ancientAI(creature);
479 }
480
482 {
484
487
495
497 {
498 AnimationTimer = 1500;
499 AnimationCount = 0;
501 MerithraGUID = 0;
502 ArygosGUID = 0;
503 CaelestraszGUID = 0;
504 FandralGUID = 0;
505 PlayerGUID = 0;
506 eventEnd = false;
507
509 }
510
512 {
514 if (!player)
515 return;
516
517 Creature* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f);
518 Creature* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f);
519 Creature* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f);
520 Creature* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f);
521
522 if (!Fandral || !Arygos || !Caelestrasz || !Merithra)
523 return;
524
526 if (eventEnd == false)
527 {
528 switch (AnimationCount)
529 {
530 case 0:
531 Talk(ANACHRONOS_SAY_1, Fandral);
532 break;
533 case 1:
534 Fandral->SetTarget(me->GetGUID());
535 Fandral->AI()->Talk(FANDRAL_SAY_1, me);
536 break;
537 case 2:
538 Fandral->SetTarget(0);
539 Merithra->AI()->Talk(MERITHRA_EMOTE_1);
540 break;
541 case 3:
542 Merithra->AI()->Talk(MERITHRA_SAY_1);
543 break;
544 case 4:
545 Arygos->AI()->Talk(ARYGOS_EMOTE_1);
546 break;
547 case 5:
548 Caelestrasz->SetTarget(Fandral->GetGUID());
549 Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_1);
550 break;
551 case 6:
552 Merithra->AI()->Talk(MERITHRA_SAY_2);
553 break;
554 case 7:
555 Caelestrasz->SetTarget(0);
556 Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
557 break;
558 case 8:
559 Merithra->AI()->Talk(MERITHRA_YELL_1);
560 break;
561 case 9:
562 Merithra->CastSpell(Merithra, 25105, true);
563 break;
564 case 10:
566 Merithra->SetDisableGravity(true);
567 Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 3);
568 break;
569 case 11:
570 Merithra->CastSpell(Merithra, 24818, false);
571 break;
572 case 12:
573 Merithra->GetMotionMaster()->MoveCharge(-8100, 1530, 50, 42);
574 break;
575 case 13:
576 break;
577 case 14:
578 Arygos->AI()->Talk(ARYGOS_SAY_1);
579 Merithra->SetVisible(false);
580 break;
581 case 15:
582 Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
583 Merithra->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
584 break;
585 case 16:
586 Arygos->AI()->Talk(ARYGOS_YELL_1);
587 break;
588 case 17:
589 Arygos->CastSpell(Arygos, 25107, true);
590 break;
591 case 18:
593 Arygos->SetDisableGravity(true);
594 Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 42);
595 break;
596 case 19:
597 Arygos->CastSpell(Arygos, 50505, false);
598 break;
599 case 20:
600 Arygos->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
601 break;
602 case 21:
603 break;
604 case 22:
605 Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_2, Fandral);
606 break;
607 case 23:
608 Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
609 Arygos->SetVisible(false);
610 Arygos->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 10);
611 break;
612 case 24:
613 Caelestrasz->AI()->Talk(CAELESTRASZ_YELL_1);
614 break;
615 case 25:
616 Caelestrasz->CastSpell(Caelestrasz, 25106, true);
617 break;
618 case 26:
619 Caelestrasz->HandleEmoteCommand(254);
620 Caelestrasz->SetDisableGravity(true);
621 Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 7.61f, 4);
622 break;
623 case 27:
624 Caelestrasz->CastSpell(Caelestrasz, 54293, false);
625 break;
626 case 28:
627 Talk(ANACHRONOS_SAY_2, Fandral);
628 break;
629 case 29:
630 Caelestrasz->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
631 Fandral->AI()->Talk(FANDRAL_SAY_2);
632 break;
633 case 30:
634 break;
635 case 31:
636 Talk(ANACHRONOS_SAY_3, Fandral);
637 break;
638 case 32:
639 Caelestrasz->SetVisible(false);
640 Caelestrasz->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
641 Fandral->GetMotionMaster()->MoveCharge(-8108, 1529, 2.77f, 8);
642 me->GetMotionMaster()->MoveCharge(-8113, 1525, 2.77f, 8);
643 break;//both run to the gate
644 case 33:
646 Caelestrasz->GetMotionMaster()->MoveCharge(-8050, 1473, 65, 15);
647 break; //Text: sands will stop
648 case 34:
649 DoCast(player, 23017, true);//Arcane Channeling
650 break;
651 case 35:
652 me->CastSpell(-8088, 1520.43f, 2.67f, 25158, true);
653 break;
654 case 36:
655 DoCast(player, 25159, true);
656 break;
657 case 37:
658 me->SummonGameObject(GO_GATE_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
659 break;
660 case 38:
661 DoCast(player, 25166, true);
662 me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
663 break;
664 case 39:
665 Talk(ANACHRONOS_SAY_5, Fandral);
666 break;
667 case 40:
668 Fandral->CastSpell(me, 25167, true);
669 break;
670 case 41:
671 Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
672 Fandral->AI()->Talk(FANDRAL_SAY_3);
673 break;
674 case 42:
675 me->CastStop();
676 Fandral->AI()->Talk(FANDRAL_EMOTE_1);
677 break;
678 case 43:
679 Fandral->CastStop();
680 break;
681 case 44:
683 break;
684 case 45:
686 break;
687 case 46:
689 me->GetMotionMaster()->MoveCharge(-8110, 1527, 2.77f, 4);
690 break;
691 case 47:
693 break;
694 case 48:
695 Fandral->AI()->Talk(FANDRAL_SAY_4, me);
696 break;
697 case 49:
698 Fandral->AI()->Talk(FANDRAL_SAY_5, me);
699 break;
700 case 50:
701 Fandral->AI()->Talk(FANDRAL_EMOTE_2);
702 Fandral->CastSpell(-8127, 1525, 17.5f, 33806, true);
703 break;
704 case 51:
705 {
706 uint32 entries[4] = { 15423, 15424, 15414, 15422 };
707 Unit* mob = NULL;
708 for (uint8 i = 0; i < 4; ++i)
709 {
710 mob = player->FindNearestCreature(entries[i], 50, me);
711 while (mob)
712 {
713 mob->RemoveFromWorld();
714 mob = player->FindNearestCreature(15423, 50, me);
715 }
716 }
717 break;
718 }
719 case 52:
720 Fandral->GetMotionMaster()->MoveCharge(-8028.75f, 1538.795f, 2.61f, 4);
721 Fandral->AI()->Talk(ANACHRONOS_SAY_9, me);
722 break;
723 case 53:
724 Fandral->AI()->Talk(FANDRAL_SAY_6);
725 break;
726 case 54:
728 break;
729 case 55:
730 Fandral->SetVisible(false);
731 break;
732 case 56:
734 me->GetMotionMaster()->MoveCharge(-8116, 1522, 3.65f, 4);
735 break;
736 case 57:
737 me->GetMotionMaster()->MoveCharge(-8116.7f, 1527, 3.7f, 4);
738 break;
739 case 58:
740 me->GetMotionMaster()->MoveCharge(-8112.67f, 1529.9f, 2.86f, 4);
741 break;
742 case 59:
743 me->GetMotionMaster()->MoveCharge(-8117.99f, 1532.24f, 3.94f, 4);
744 break;
745 case 60:
746 if (player)
747 Talk(ANACHRONOS_SAY_10, player);
748 me->GetMotionMaster()->MoveCharge(-8113.46f, 1524.16f, 2.89f, 4);
749 break;
750 case 61:
751 me->GetMotionMaster()->MoveCharge(-8057.1f, 1470.32f, 2.61f, 6);
752 if (player->IsInRange(me, 0, 15))
754 break;
755 case 62:
756 me->SetDisplayId(15500);
757 break;
758 case 63:
759 me->HandleEmoteCommand(254);
760 me->SetDisableGravity(true);
761 break;
762 case 64:
763 me->GetMotionMaster()->MoveCharge(-8000, 1400, 150, 9);
764 break;
765 case 65:
766 me->SetVisible(false);
767 if (Creature* AnachronosQuestTrigger = (Unit::GetCreature(*me, AnachronosQuestTriggerGUID)))
768 {
770 AnachronosQuestTrigger->AI()->EnterEvadeMode();
771 eventEnd=true;
772 }
773 break;
774 }
775 }
777 }
779 {
780 if (AnimationTimer)
781 {
782 if (AnimationTimer <= diff)
784 else AnimationTimer -= diff;
785 }
786 if (AnimationCount < 65)
787 me->CombatStop();
788 if (AnimationCount == 65 || eventEnd)
789 me->AI()->EnterEvadeMode();
790 }
791 };
792};
793
794/*######
795# npc_qiraj_war_spawn
796######*/
797
799{
800public:
801 npc_qiraj_war_spawn() : CreatureScript("npc_qiraj_war_spawn") { }
802
804 {
805 return new npc_qiraj_war_spawnAI(creature);
806 }
807
809 {
810 npc_qiraj_war_spawnAI(Creature* creature) : ScriptedAI(creature) { }
811
815 bool Timers;
817
819 {
820 MobGUID = 0;
821 PlayerGUID = 0;
822 Timers = false;
823 hasTarget = false;
824 }
825
826 void EnterCombat(Unit* /*who*/) OVERRIDE { }
827 void JustDied(Unit* /*slayer*/) OVERRIDE;
828
830 {
831 if (!Timers)
832 {
833 if (me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414) //all but Kaldorei Soldiers
834 {
835 SpellTimer1 = SpawnCast[1].Timer1;
836 SpellTimer2 = SpawnCast[2].Timer1;
837 SpellTimer3 = SpawnCast[3].Timer1;
838 }
839 if (me->GetEntry() == 15423 || me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414)
840 SpellTimer4 = SpawnCast[0].Timer1;
841 Timers = true;
842 }
843 if (me->GetEntry() == 15424 || me->GetEntry() == 15422|| me->GetEntry() == 15414)
844 {
845 if (SpellTimer1 <= diff)
846 {
847 DoCast(me, SpawnCast[1].SpellId);
848 DoCast(me, 24319);
849 SpellTimer1 = SpawnCast[1].Timer2;
850 } else SpellTimer1 -= diff;
851 if (SpellTimer2 <= diff)
852 {
853 DoCast(me, SpawnCast[2].SpellId);
854 SpellTimer2 = SpawnCast[2].Timer2;
855 } else SpellTimer2 -= diff;
856 if (SpellTimer3 <= diff)
857 {
858 DoCast(me, SpawnCast[3].SpellId);
859 SpellTimer3 = SpawnCast[3].Timer2;
860 } else SpellTimer3 -= diff;
861 }
862 if (me->GetEntry() == 15423 || me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414)
863 {
864 if (SpellTimer4 <= diff)
865 {
866 me->RemoveAllAttackers();
867 me->AttackStop();
868 DoCast(me, 15533);
869 SpellTimer4 = SpawnCast[0].Timer2;
870 } else SpellTimer4 -= diff;
871 }
872 if (!hasTarget)
873 {
874 Unit* target = NULL;
875 if (me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414)
876 target = me->FindNearestCreature(15423, 20, true);
877 if (me->GetEntry() == 15423)
878 {
879 uint8 tar = std::rand() % 2;
880
881 if (tar == 0)
882 target = me->FindNearestCreature(15422, 20, true);
883 else if (tar == 1)
884 target = me->FindNearestCreature(15424, 20, true);
885 else if (tar == 2)
886 target = me->FindNearestCreature(15414, 20, true);
887 }
888 hasTarget = true;
889 if (target)
890 me->AI()->AttackStart(target);
891 }
892 if (!(me->FindNearestCreature(15379, 60)))
893 DoCast(me, 33652);
894
895 if (!UpdateVictim())
896 {
897 hasTarget = false;
898 return;
899 }
900
902 }
903 };
904};
905
906/*#####
907# npc_anachronos_quest_trigger
908#####*/
909
911{
912public:
913 npc_anachronos_quest_trigger() : CreatureScript("npc_anachronos_quest_trigger") { }
914
916 {
917 return new npc_anachronos_quest_triggerAI(creature);
918 }
919
921 {
923
925
928
931
934 bool Failed;
935
937 {
938 PlayerGUID = 0;
939
940 WaveTimer = 2000;
941 AnnounceTimer = 1000;
942 LiveCount = 0;
943 WaveCount = 0;
944
945 EventStarted = false;
946 Announced = false;
947 Failed = false;
948
949 me->SetVisible(false);
950 }
951
953 {
954 uint8 locIndex = WavesInfo[WaveCount].UsedSpawnPoint;
955 uint8 count = locIndex + WavesInfo[WaveCount].SpawnCount;
956
957 for (uint8 i = locIndex; i <= count; ++i)
958 {
959 uint32 desptimer = WavesInfo[WaveCount].DespTimer;
960
961 if (Creature* spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, SpawnLocation[i], TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, desptimer))
962 {
963 if (spawn->GetEntry() == 15423)
964 spawn->SetUInt32Value(UNIT_FIELD_DISPLAY_ID, 15427+rand()%4);
965 if (i >= 30) WaveCount = 1;
966 if (i >= 33) WaveCount = 2;
967 if (i >= 45) WaveCount = 3;
968 if (i >= 51) WaveCount = 4;
969
970 if (WaveCount < 5) //1-4 Wave
971 {
973 {
974 spawnAI->MobGUID = me->GetGUID();
975 spawnAI->PlayerGUID = PlayerGUID;
976 }
977 }
978 }
979 }
980
981 WaveTimer = WavesInfo[WaveCount].SpawnTimer;
982 AnnounceTimer = WavesInfo[WaveCount].YellTimer;
983 }
984
986 {
988 if (!player)
989 return;
990
991 if (Group* EventGroup = player->GetGroup())
992 {
993 Player* groupMember = NULL;
994
995 uint8 GroupMemberCount = 0;
996 uint8 DeadMemberCount = 0;
997 uint8 FailedMemberCount = 0;
998
999 Group::MemberSlotList const& members = EventGroup->GetMemberSlots();
1000
1001 for (Group::member_citerator itr = members.begin(); itr!= members.end(); ++itr)
1002 {
1003 groupMember = ObjectAccessor::GetPlayer(*me, itr->guid);
1004 if (!groupMember)
1005 continue;
1007 {
1009 ++FailedMemberCount;
1010 }
1011 ++GroupMemberCount;
1012
1013 if (groupMember->isDead())
1014 ++DeadMemberCount;
1015 }
1016
1017 if (GroupMemberCount == FailedMemberCount || !player->IsWithinDistInMap(me, EVENT_AREA_RADIUS))
1018 Failed = true; //only so event can restart
1019 }
1020 }
1021
1023 {
1024 --LiveCount;
1025 if (!LiveCount)
1026 Announced = false;
1027 }
1028
1030 {
1031 if (!PlayerGUID || !EventStarted)
1032 return;
1033
1034 if (WaveCount < 4)
1035 {
1036 if (!Announced && AnnounceTimer <= diff)
1037 {
1038 Talk(WavesInfo[WaveCount].WaveTextId);
1039 Announced = true;
1040 } else AnnounceTimer -= diff;
1041
1042 if (WaveTimer <= diff)
1044 else WaveTimer -= diff;
1045 }
1047 if (WaveCount == 4 || Failed)
1049 };
1050 };
1051};
1052
1054{
1055 me->RemoveCorpse();
1056
1057 if (!MobGUID)
1058 return;
1059
1060 if (Creature* mob = Unit::GetCreature(*me, MobGUID))
1062 triggerAI->LiveCounter();
1063};
1064
1065/*#####
1066# go_crystalline_tear
1067######*/
1068
1070{
1071public:
1072 go_crystalline_tear() : GameObjectScript("go_crystalline_tear") { }
1073
1074 bool OnQuestAccept(Player* player, GameObject* go, Quest const* quest) OVERRIDE
1075 {
1076 if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD)
1077 {
1078 if (Creature* trigger = go->FindNearestCreature(15454, 100, player))
1079 {
1080 Unit* Merithra = trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1081 Unit* Caelestrasz = trigger->SummonCreature(15379, -8032.767f, 1533.148f, 2.61f, 1.5f, TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1082 Unit* Arygos = trigger->SummonCreature(15380, -8034.52f, 1537.843f, 2.61f, 5.7f, TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1083 /* Unit* Fandral = */ trigger->SummonCreature(15382, -8028.462f, 1535.843f, 2.61f, 3.141592f, TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1084 Creature* Anachronos = trigger->SummonCreature(15381, -8028.75f, 1538.795f, 2.61f, 4, TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1085
1086 if (Merithra)
1087 {
1090 Merithra->SetUInt32Value(UNIT_FIELD_DISPLAY_ID, 15420);
1091 Merithra->setFaction(35);
1092 }
1093
1094 if (Caelestrasz)
1095 {
1096 Caelestrasz->SetUInt32Value(UNIT_FIELD_NPC_FLAGS, 0);
1097 Caelestrasz->SetUInt32Value(UNIT_FIELD_ANIM_TIER, 0);
1098 Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAY_ID, 15419);
1099 Caelestrasz->setFaction(35);
1100 }
1101
1102 if (Arygos)
1103 {
1106 Arygos->SetUInt32Value(UNIT_FIELD_DISPLAY_ID, 15418);
1107 Arygos->setFaction(35);
1108 }
1109
1110 if (Anachronos)
1111 {
1113 anachronosAI->PlayerGUID = player->GetGUID();
1114
1116 {
1117 triggerAI->Failed = false;
1118 triggerAI->PlayerGUID = player->GetGUID();
1119 triggerAI->EventStarted = true;
1120 triggerAI->Announced = true;
1121 }
1122 }
1123 }
1124 }
1125 return true;
1126 }
1127};
1128
1129/*###
1130## go_wind_stone
1131###*/
1132
1160
1167
1185
1203
1204enum WS
1205{
1207 DUKE = 1,
1209
1210 FIRE = 0x1,
1211 WATER = 0x2,
1212 EARTH = 0x4,
1213 AIR = 0x8
1214};
1215
1222
1223#define GOSSIP_TEMPLAR_RANDOM "I am no cultist, you monster! Come to me and face your destruction!"
1224#define GOSSIP_TEMPLAR_FIRE "Crimson Templar! I hold your signet! Heed my call!"
1225#define GOSSIP_TEMPLAR_EARTH "Earthen Templar! I hold your signet! Heed my call!"
1226#define GOSSIP_TEMPLAR_AIR "Hoary Templar! I hold your signet! Heed my call!"
1227#define GOSSIP_TEMPLAR_WATER "Azure Templar! I hold your signet! Heed my call!"
1228
1229#define GOSSIP_DUKE_RANDOM "You will listen to this, vile duke! I am not your Twilight's Hammer lapdog! I am here to challenge you! Come! Come, and meet your death..."
1230#define GOSSIP_DUKE_FIRE "Duke of Cynders! I hold your signet! Heed my call!"
1231#define GOSSIP_DUKE_EARTH "The Duke of Shards! I hold your signet! Heed my call!"
1232#define GOSSIP_DUKE_AIR "The Duke of Zephyrs! I hold your signet! Heed my call!"
1233#define GOSSIP_DUKE_WATER "The Duke of Fathoms! I hold your signet! Heed my call!"
1234
1235#define GOSSIP_ROYAL_RANDOM "The day of the judgement has come, fiend! I challenge you to battle!"
1236#define GOSSIP_ROYAL_FIRE "Prince Skaldrenox! I hold your signet! Heed my call!"
1237#define GOSSIP_ROYAL_EARTH "Baron Kazum! I hold your signet! Heed my call!"
1238#define GOSSIP_ROYAL_AIR "High Marshal Whirlaxis! I hold your signet! Heed my call!"
1239#define GOSSIP_ROYAL_WATER "Lord Skwol! I hold your signet! Heed my call!"
1240
1242{
1243 public:
1244 go_wind_stone() : GameObjectScript("go_wind_stone") { }
1245
1246 private:
1247 uint8 GetPlayerRank(Player* player) // For random summoning
1248 {
1249 bool setAura = player->HasAura(AURA_TWILIGHT_SET);
1250 bool medallionAura = player->HasAura(AURA_MEDALLION);
1251 bool ringAura = player->HasAura(AURA_RING);
1252
1253 if (setAura && medallionAura && ringAura)
1254 return 3;
1255 else if (setAura && medallionAura)
1256 return 2;
1257 else if (setAura)
1258 return 1;
1259 else
1260 return 0;
1261 }
1262
1263 uint8 GetItems(Player* player, WS type)
1264 {
1265 uint8 result = 0x0;
1266
1267 switch (type)
1268 {
1269 case TEMPLAR:
1270 {
1271 if (player->HasItemCount(ITEM_TEMPLAR_FIRE))
1272 result |= FIRE;
1273 if (player->HasItemCount(ITEM_TEMPLAR_WATER))
1274 result |= WATER;
1275 if (player->HasItemCount(ITEM_TEMPLAR_EARTH))
1276 result |= EARTH;
1277 if (player->HasItemCount(ITEM_TEMPLAR_AIR))
1278 result |= AIR;
1279 break;
1280 }
1281 case DUKE:
1282 {
1283 if (player->HasItemCount(ITEM_DUKE_FIRE))
1284 result |= FIRE;
1285 if (player->HasItemCount(ITEM_DUKE_WATER))
1286 result |= WATER;
1287 if (player->HasItemCount(ITEM_DUKE_EARTH))
1288 result |= EARTH;
1289 if (player->HasItemCount(ITEM_DUKE_AIR))
1290 result |= AIR;
1291 break;
1292 }
1293 case ROYAL:
1294 {
1295 if (player->HasItemCount(ITEM_ROYAL_FIRE))
1296 result |= FIRE;
1297 if (player->HasItemCount(ITEM_ROYAL_WATER))
1298 result |= WATER;
1299 if (player->HasItemCount(ITEM_ROYAL_EARTH))
1300 result |= EARTH;
1301 if (player->HasItemCount(ITEM_ROYAL_AIR))
1302 result |= AIR;
1303 break;
1304 }
1305 default:
1306 break;
1307 }
1308 return result;
1309 }
1310
1311 void SummonNPC(GameObject* go, Player* player, uint32 npc, uint32 spell)
1312 {
1313 go->CastSpell(player, spell);
1315 summons->CastSpell(summons, SPELL_SPAWN_IN, false);
1316 switch (summons->GetEntry())
1317 {
1318 case NPC_TEMPLAR_FIRE:
1319 case NPC_TEMPLAR_WATER:
1320 case NPC_TEMPLAR_AIR:
1321 case NPC_TEMPLAR_EARTH:
1322 summons->AI()->Talk(SAY_TEMPLAR_AGGRO);
1323 break;
1324
1325 case NPC_DUKE_FIRE:
1326 case NPC_DUKE_WATER:
1327 case NPC_DUKE_EARTH:
1328 case NPC_DUKE_AIR:
1329 summons->AI()->Talk(SAY_DUKE_AGGRO);
1330 break;
1331 case NPC_ROYAL_FIRE:
1332 case NPC_ROYAL_AIR:
1333 case NPC_ROYAL_EARTH:
1334 case NPC_ROYAL_WATER:
1335 summons->AI()->Talk(YELL_ROYAL_AGGRO);
1336 break;
1337 }
1339 summons->SendMeleeAttackStart(player);
1340 summons->CombatStart(player);
1341 }
1342
1343 public:
1345 {
1346 uint8 rank = GetPlayerRank(player);
1347
1348 uint32 gossipId = go->GetGOInfo()->GetGossipMenuId();
1349 switch (gossipId)
1350 {
1351 case GOSSIPID_LESSER_WS:
1352 {
1353 if (rank >= 1) // 1 or 2 or 3
1355 else
1356 {
1357 go->CastSpell(player, SPELL_PUNISHMENT);
1358 break;
1359 }
1360
1361 uint8 item = GetItems(player, TEMPLAR);
1362 if (item & FIRE)
1364 if (item & WATER)
1366 if (item & EARTH)
1368 if (item & AIR)
1370 break;
1371 }
1372 case GOSSIPID_WS:
1373 {
1374 if (rank >= 2) // 2 or 3
1376 else
1377 {
1378 go->CastSpell(player, SPELL_PUNISHMENT);
1379 break;
1380 }
1381
1382 uint8 item = GetItems(player, DUKE);
1383 if (item & FIRE)
1385 if (item & WATER)
1387 if (item & EARTH)
1389 if (item & AIR)
1391 break;
1392 }
1394 {
1395 if (rank == 3) // 3
1397 else
1398 {
1399 go->CastSpell(player, SPELL_PUNISHMENT);
1400 break;
1401 }
1402
1403 uint8 item = GetItems(player, ROYAL);
1404 if (item & FIRE)
1406 if (item & WATER)
1408 if (item & EARTH)
1410 if (item & AIR)
1412 break;
1413 }
1414 default:
1415 break;
1416 }
1417
1418 player->SEND_GOSSIP_MENU(player->GetGossipTextId(gossipId, go), go->GetGUID());
1419 return true;
1420 }
1421
1422 bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) OVERRIDE
1423 {
1424 player->PlayerTalkClass->ClearMenus();
1425 player->PlayerTalkClass->SendCloseGossip();
1426
1427 switch (action)
1428 {
1429 case GOSSIP_ACTION_INFO_DEF + 1:
1431 break;
1432 case GOSSIP_ACTION_INFO_DEF + 2:
1434 break;
1435 case GOSSIP_ACTION_INFO_DEF + 3:
1437 break;
1438 case GOSSIP_ACTION_INFO_DEF + 4:
1440 break;
1441 case GOSSIP_ACTION_INFO_DEF + 5:
1443 break;
1444
1445 case GOSSIP_ACTION_INFO_DEF + 6:
1447 break;
1448 case GOSSIP_ACTION_INFO_DEF + 7:
1450 break;
1451 case GOSSIP_ACTION_INFO_DEF + 8:
1453 break;
1454 case GOSSIP_ACTION_INFO_DEF + 9:
1456 break;
1457 case GOSSIP_ACTION_INFO_DEF + 10:
1459 break;
1460
1461 case GOSSIP_ACTION_INFO_DEF + 11:
1463 break;
1464 case GOSSIP_ACTION_INFO_DEF + 12:
1466 break;
1467 case GOSSIP_ACTION_INFO_DEF + 13:
1469 break;
1470 case GOSSIP_ACTION_INFO_DEF + 14:
1472 break;
1473 case GOSSIP_ACTION_INFO_DEF + 15:
1475 break;
1476
1477 default:
1478 break;
1479 }
1480 return true;
1481 }
1482};
1483
1485{
1488 new go_wind_stone();
1489}
#define M_PI
Definition Common.h:192
const T & RAND(const T &v1, const T &v2)
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
std::int8_t int8
Definition Define.h:75
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:46
@ EQUIP_ERR_OK
Definition Item.h:28
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition Object.h:68
std::vector< ItemPosCount > ItemPosCountVec
Definition Player.h:777
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:89
@ QUEST_STATUS_NONE
Definition QuestDef.h:86
#define CAST_AI(a, b)
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
@ EMOTE_ONESHOT_LIFTOFF
@ NULL_BAG
Definition Unit.h:336
@ NULL_SLOT
Definition Unit.h:337
@ UNIT_FLAG_NON_ATTACKABLE
Definition Unit.h:626
@ UNIT_FIELD_DISPLAY_ID
@ UNIT_FIELD_NPC_FLAGS
@ UNIT_FIELD_ANIM_TIER
@ UNIT_FIELD_FLAGS
@ FACTION_HOSTILE
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
virtual void EnterEvadeMode()
void SetTarget(uint64 guid) OVERRIDE
CreatureAI * AI() const
Definition Creature.h:483
CreatureScript(const char *name)
void CastSpell(Unit *target, uint32 spell)
GameObjectScript(const char *name)
Definition Group.h:147
std::list< MemberSlot > MemberSlotList
Definition Group.h:159
MemberSlotList::const_iterator member_citerator
Definition Group.h:160
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false)
static Player * GetPlayer(WorldObject const &, uint64 guid)
uint64 GetGUID() const
Definition Object.h:119
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition Object.cpp:1280
uint32 GetEntry() const
Definition Object.h:125
void SetUInt32Value(uint16 index, uint32 value)
Definition Object.cpp:1038
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Group * GetGroup()
Definition Player.h:2972
QuestStatus GetQuestStatus(uint32 quest_id) const
void FailQuest(uint32 quest_id)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Definition Unit.h:1367
void CastStop(uint32 except_spellid=0)
void SetVisible(bool x)
Definition Unit.cpp:4163
void setFaction(uint32 faction)
Definition Unit.h:1699
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void SendMeleeAttackStart(Unit *victim)
Definition Unit.cpp:603
MotionMaster * GetMotionMaster()
Definition Unit.h:2605
void CombatStart(Unit *target, bool initialAggro=true)
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
void RemoveFromWorld() override
Definition Unit.cpp:5409
void HandleEmoteCommand(uint32 anim_id)
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition Unit.cpp:9156
bool isDead() const
Definition Unit.h:2040
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition Object.cpp:1735
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2801
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime)
Definition Object.cpp:2729
bool IsInRange(WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
Definition Object.cpp:1775
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition Object.cpp:2703
bool OnQuestAccept(Player *player, GameObject *go, Quest const *quest) OVERRIDE
void SummonNPC(GameObject *go, Player *player, uint32 npc, uint32 spell)
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
uint8 GetPlayerRank(Player *player)
uint8 GetItems(Player *player, WS type)
bool OnGossipSelect(Player *player, GameObject *go, uint32, uint32 action) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnGossipHello(Player *player, Creature *creature) OVERRIDE
bool OnGossipSelect(Player *player, Creature *creature, uint32, uint32 action) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnGossipHello(Player *player, Creature *creature) OVERRIDE
bool OnGossipSelect(Player *player, Creature *creature, uint32, uint32 action) OVERRIDE
const Position SpawnLocation[]
float GetPositionZ() const
Definition Object.h:330
float GetOrientation() const
Definition Object.h:331
float GetPositionX() const
Definition Object.h:328
float GetPositionY() const
Definition Object.h:329
Creature * me
ScriptedAI(Creature *creature)
uint32 CreatureId
uint32 DespTimer
uint8 UsedSpawnPoint
uint32 SpawnTimer
uint32 YellTimer
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void AddSC_silithus()
#define GOSSIP_ITEM3
@ YELL_ROYAL_AGGRO
@ SAY_DUKE_AGGRO
@ SAY_TEMPLAR_AGGRO
#define GOSSIP_ROYAL_AIR
RutgarAndFrankal
@ TRIGGER_RUTGAR
@ TRIGGER_FRANKAL
#define GOSSIP_DEMITRIAN6
#define GOSSIP_TEMPLAR_WATER
#define GOSSIP_DUKE_EARTH
#define GOSSIP_ITEM2
#define GOSSIP_TEMPLAR_AIR
@ AURA_MEDALLION
@ SPELL_TEMPLAR_FIRE
@ SPELL_DUKE_WATER
@ AURA_RING
@ SPELL_ROYAL_WATER
@ SPELL_ROYAL_AIR
@ SPELL_ROYAL_RANDOM
@ SPELL_DUKE_AIR
@ SPELL_ROYAL_FIRE
@ SPELL_PUNISHMENT
@ SPELL_DUKE_FIRE
@ SPELL_DUKE_RANDOM
@ SPELL_SPAWN_IN
@ SPELL_DUKE_EARTH
@ SPELL_ROYAL_EARTH
@ SPELL_TEMPLAR_AIR
@ SPELL_TEMPLAR_WATER
@ AURA_TWILIGHT_SET
@ SPELL_TEMPLAR_EARTH
@ SPELL_TEMPLAR_RANDOM
@ TEMPLAR
@ EARTH
@ ROYAL
@ WATER
#define GOSSIP_DEMITRIAN4
#define GOSSIP_DEMITRIAN1
WSCreatures
@ NPC_TEMPLAR_AIR
@ NPC_TEMPLAR_WATER
@ NPC_ROYAL_FIRE
@ NPC_DUKE_AIR
@ NPC_ROYAL_EARTH
@ NPC_TEMPLAR_EARTH
@ NPC_TEMPLAR_FIRE
@ NPC_DUKE_WATER
@ NPC_ROYAL_WATER
@ NPC_ROYAL_AIR
@ NPC_DUKE_FIRE
@ NPC_DUKE_EARTH
static QuestCinematic EventAnim[]
#define GOSSIP_TEMPLAR_FIRE
#define GOSSIP_ITEM4
@ GOSSIPID_GREATER_WS
@ GOSSIPID_LESSER_WS
@ GOSSIPID_WS
#define GOSSIP_ITEM7
#define GOSSIP_ITEM14
#define GOSSIP_ITEM6
#define GOSSIP_DEMITRIAN2
#define GOSSIP_DEMITRIAN3
static WaveData WavesInfo[5]
#define GOSSIP_ITEM11
#define GOSSIP_ROYAL_FIRE
#define GOSSIP_ROYAL_WATER
EternalBoard
@ ANACHRONOS_EMOTE_3
@ ANACHRONOS_SAY_3
@ GO_GATE_OF_AHN_QIRAJ
@ FANDRAL_SAY_6
@ ANACHRONOS_EMOTE_2
@ ANACHRONOS_SAY_6
@ ANACHRONOS_SAY_9
@ ANACHRONOS_SAY_7
@ CAELESTRASZ_YELL_1
@ ANACHRONOS_SAY_5
@ MERITHRA_SAY_2
@ ANACHRONOS_EMOTE_1
@ FACTION_FRIENDLY
@ C_ANACHRONOS
@ ANACHRONOS_SAY_8
@ FANDRAL_EMOTE_2
@ C_ARYGOS
@ ARYGOS_YELL_1
@ FANDRAL_SAY_3
@ ARYGOS_SAY_1
@ FANDRAL_SAY_1
@ C_CAELESTRASZ
@ MERITHRA_SAY_1
@ GO_ROOTS_OF_AHN_QIRAJ
@ ANACHRONOS_SAY_1
@ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD
@ ANACHRONOS_SAY_4
@ C_FANDRAL_STAGHELM
@ FANDRAL_SAY_5
@ FANDRAL_SAY_2
@ ANACHRONOS_SAY_2
@ ARYGOS_EMOTE_1
@ CAELESTRASZ_SAY_1
@ FANDRAL_SAY_4
@ C_MERITHRA
@ FANDRAL_EMOTE_1
@ GO_GLYPH_OF_AHN_QIRAJ
@ MERITHRA_EMOTE_1
@ ANACHRONOS_SAY_10
@ CAELESTRASZ_SAY_2
@ MERITHRA_YELL_1
#define GOSSIP_ITEM1
#define GOSSIP_DUKE_RANDOM
#define GOSSIP_DUKE_FIRE
#define GOSSIP_ITEM13
Position const SpawnLocation[]
#define EVENT_AREA_RADIUS
#define GOSSIP_ITEM12
#define GOSSIP_DEMITRIAN7
#define GOSSIP_DEMITRIAN5
#define GOSSIP_ITEM5
#define GOSSIP_ROYAL_RANDOM
#define GOSSIP_DUKE_WATER
#define GOSSIP_TEMPLAR_EARTH
#define GOSSIP_ITEM15
static SpawnSpells SpawnCast[4]
@ ITEM_TEMPLAR_FIRE
@ ITEM_TEMPLAR_AIR
@ ITEM_ROYAL_EARTH
@ ITEM_DUKE_AIR
@ ITEM_DUKE_EARTH
@ ITEM_ROYAL_AIR
@ ITEM_TEMPLAR_WATER
@ ITEM_DUKE_WATER
@ ITEM_ROYAL_WATER
@ ITEM_DUKE_FIRE
@ ITEM_TEMPLAR_EARTH
@ ITEM_ROYAL_FIRE
#define GOSSIP_ROYAL_EARTH
#define GOSSIP_TEMPLAR_RANDOM
#define GOSSIP_DUKE_AIR