TrinityCore
zone_silithus.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19SDName: Silithus
20SD%Complete: 100
21SDCategory: Silithus
22EndScriptData */
23
24/* ContentData
25A Pawn on the Eternal Board - creatures, gameobjects and defines
26quest_a_pawn_on_the_eternal_board
27npc_qiraj_war_spawn : Adds that are summoned in the Qiraj gates battle.
28npc_anachronos_the_ancient : Creature that controls the event.
29npc_anachronos_quest_trigger: controls the spawning of the BG War mobs.
30go_crystalline_tear : GameObject that begins the event and hands out quest
31TO DO: get correct spell IDs and timings for spells cast upon dragon transformations
32TO DO: Dragons should use the HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF) after transformation,
33 but for some unknown reason it doesn't work.
34go_wind_stone
35EndContentData */
36
37#include "ScriptMgr.h"
38#include "CreatureAIImpl.h"
39#include "GameObject.h"
40#include "GameObjectAI.h"
41#include "Group.h"
42#include "MotionMaster.h"
43#include "ObjectAccessor.h"
44#include "Player.h"
45#include "ScriptedCreature.h"
46#include "ScriptedGossip.h"
47#include "SpellAuraEffects.h"
48#include "SpellScript.h"
49#include "TemporarySummon.h"
50
51/*#####
52# Quest: A Pawn on the Eternal Board
53#####*/
54
56{
58
59 EVENT_AREA_RADIUS = 65, // 65yds
60 EVENT_COOLDOWN = 500000, // in ms. appears after event completed or failed (should be = Adds despawn time)
61
64 NPC_ARYGOS = 15380,
67
81
90
94
98
103
106 GO_ROOTS_OF_AHN_QIRAJ = 176147
108
110{
113};
114
115// Creature 0 - Anachronos, 1 - Fandral, 2 - Arygos, 3 - Merithra, 4 - Caelestrasz
117{
118 {ANACHRONOS_SAY_1, 0, 2000},
119 {FANDRAL_SAY_1, 1, 4000},
120 {MERITHRA_EMOTE_1, 3, 500},
121 {MERITHRA_SAY_1, 3, 500},
122 {ARYGOS_EMOTE_1, 2, 2000},
123 {CAELESTRASZ_SAY_1, 4, 8000},
124 {MERITHRA_SAY_2, 3, 6000},
125 {0, 3, 2000},
126 {MERITHRA_YELL_1, 3, 2500},
127 {0, 3, 3000}, //Morph
128 {0, 3, 4000}, //EmoteLiftoff
129 {0, 3, 4000}, // spell
130 {0, 3, 1250}, //fly
131 {0, 3, 250}, //remove flags
132 {ARYGOS_SAY_1, 2, 3000},
133 {0, 3, 2000},
134 {ARYGOS_YELL_1, 2, 3000},
135 {0, 3, 3000}, //Morph
136 {0, 3, 4000}, //EmoteLiftoff
137 {0, 3, 4000}, // spell
138 {0, 3, 1000}, //fly
139 {0, 3, 1000}, //remove flags
140 {CAELESTRASZ_SAY_2, 4, 5000},
141 {0, 3, 3000},
142 {CAELESTRASZ_YELL_1, 4, 3000},
143 {0, 3, 3000}, //Morph
144 {0, 3, 4000}, //EmoteLiftoff
145 {0, 3, 2500}, // spell
146 {ANACHRONOS_SAY_2, 0, 2000},
147 {0, 3, 250}, //fly
148 {0, 3, 25}, //remove flags
149 {FANDRAL_SAY_2, 1, 3000},
150 {ANACHRONOS_SAY_3, 0, 10000}, //Both run through the armies
151 {0, 3, 2000}, // Sands will stop
152 {0, 3, 8000}, // Summon Gate
153 {ANACHRONOS_SAY_4, 0, 4000},
154 {0, 0, 2000}, //spell 1-> Arcane cosmetic (Mobs freeze)
155 {0, 0, 5000}, //Spell 2-> Arcane long cosmetic (barrier appears) (Barrier -> Glyphs)
156 {0, 0, 7000}, //BarrieR
157 {0, 0, 4000}, //Glyphs
158 {ANACHRONOS_SAY_5, 0, 2000},
159 {0, 0, 4000}, // Roots
160 {FANDRAL_SAY_3, 1, 3000}, //Root Text
161 {FANDRAL_EMOTE_1, 1, 3000}, //falls knee
162 {ANACHRONOS_SAY_6, 0, 3000},
163 {ANACHRONOS_SAY_7, 0, 3000},
164 {ANACHRONOS_SAY_8, 0, 8000},
165 {ANACHRONOS_EMOTE_1, 0, 1000}, //Give Scepter
166 {FANDRAL_SAY_4, 1, 3000},
167 {FANDRAL_SAY_5, 1, 3000}, //->Equip hammer~Scepter, throw it at door
168 {FANDRAL_EMOTE_2, 1, 3000}, //Throw hammer at door.
169 {ANACHRONOS_SAY_9, 0, 3000},
170 {FANDRAL_SAY_6, 1, 3000}, //fandral goes away
171 {ANACHRONOS_EMOTE_2, 0, 3000},
172 {ANACHRONOS_EMOTE_3, 0, 3000},
173 {0, 0, 2000},
174 {0, 0, 2000},
175 {0, 0, 4000},
176 {ANACHRONOS_SAY_10, 0, 3000},
177 {0, 0, 2000},
178 {0, 0, 3000},
179 {0, 0, 15000},
180 {0, 0, 5000},
181 {0, 0, 3500},
182 {0, 0, 5000},
183 {0, 0, 3500},
184 {0, 0, 5000},
185 {0, 0, 0}
186};
187
188//Cordinates for Spawns
190{
191 {-8085.0f, 1528.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
192 {-8080.0f, 1526.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
193 {-8085.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
194 {-8080.0f, 1522.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
195 {-8085.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
196
197 {-8085.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
198 {-8080.0f, 1522.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
199 {-8085.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
200 {-8080.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
201 {-8085.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
202
203 {-8085.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
204 {-8080.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
205 {-8080.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
206 {-8080.0f, 1424.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
207 {-8085.0f, 1422.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
208 // 2 waves of warriors
209 {-8082.0f, 1528.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
210 {-8078.0f, 1525.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
211 {-8082.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
212 {-8078.0f, 1526.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
213 {-8082.0f, 1527.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
214
215 {-8082.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
216 {-8078.0f, 1522.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
217 {-8082.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
218 {-8078.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
219 {-8082.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
220
221 {-8082.0f, 1523.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
222 {-8078.0f, 1521.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
223 {-8082.0f, 1528.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
224 {-8078.0f, 1519.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
225 {-8082.0f, 1526.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
226
227 {-8082.0f, 1524.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
228 {-8078.0f, 1522.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
229 {-8082.0f, 1520.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
230 {-8078.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
231 {-8082.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry
232
233 {-8088.0f, 1510.0f, 2.61f, 0.0f}, //Anubisath Conqueror
234 {-8084.0f, 1520.0f, 2.61f, 0.0f}, //Anubisath Conqueror
235 {-8088.0f, 1530.0f, 2.61f, 0.0f}, //Anubisath Conqueror
236
237 {-8080.0f, 1513.0f, 2.61f, 0.0f}, //Qiraj Wasp
238 {-8082.0f, 1523.0f, 2.61f, 0.0f}, //Qiraj Wasp
239 {-8085.0f, 1518.0f, 2.61f, 0.0f}, //Qiraj Wasp
240 {-8082.0f, 1516.0f, 2.61f, 0.0f}, //Qiraj Wasp
241 {-8085.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Wasp
242 {-8080.0f, 1528.0f, 2.61f, 0.0f}, //Qiraj Wasp
243
244 {-8082.0f, 1513.0f, 2.61f, 0.0f}, //Qiraj Wasp
245 {-8079.0f, 1523.0f, 2.61f, 0.0f}, //Qiraj Wasp
246 {-8080.0f, 1531.0f, 2.61f, 0.0f}, //Qiraj Wasp
247 {-8079.0f, 1516.0f, 2.61f, 0.0f}, //Qiraj Wasp
248 {-8082.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Wasp
249 {-8080.0f, 1518.0f, 2.61f, 0.0f}, //Qiraj Wasp
250
251 {-8081.0f, 1514.0f, 2.61f, 0.0f}, //Qiraj Tank
252 {-8081.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Tank
253 {-8081.0f, 1526.0f, 2.61f, 0.0f}, //Qiraj Tank
254 {-8081.0f, 1512.0f, 2.61f, 0.0f}, //Qiraj Tank
255 {-8082.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Tank
256 {-8081.0f, 1528.0f, 2.61f, 0.0f}, //Qiraj Tank
257
258 {-8082.0f, 1513.0f, 2.61f, 3.141592f}, //Anubisath Conqueror
259 {-8082.0f, 1520.0f, 2.61f, 3.141592f}, //Anubisath Conqueror
260 {-8082.0f, 1527.0f, 2.61f, 3.141592f}, //Anubisath Conqueror
261};
262
264{
272};
273
275{
276 {30, 0, 15423, 0, 0, 24s, 0}, // Kaldorei Soldier
277 { 3, 35, 15424, 0, 0, 24s, 0}, // Anubisath Conqueror
278 {12, 38, 15414, 0, 0, 24s, 0}, // Qiraji Wasps
279 { 6, 50, 15422, 0, 0, 24s, 0}, // Qiraji Tanks
280 {15, 15, 15423, 0, 0, 24s, 0} // Kaldorei Soldier
281
282};
283
285{
287};
288
290{
291 {100000, 2000, 33652}, // Stoned
292 {38500, 300000, 28528}, // Poison Cloud
293 {58000, 300000, 35871}, // Frost Debuff (need correct spell)
294 {80950, 300000, 42075}, // Fire Explosion (need correct spell however this one looks cool)
295};
296
297/*#####
298# npc_anachronos_the_ancient
299######*/
300
302{
318 SPELL_FLAME_BREATH = 54293
320
322{
323public:
324 npc_anachronos_the_ancient() : CreatureScript("npc_anachronos_the_ancient") { }
325
326 CreatureAI* GetAI(Creature* creature) const override
327 {
328 return new npc_anachronos_the_ancientAI(creature);
329 }
330
332 {
334 {
335 Initialize();
336 }
337
339 {
340 AnimationTimer = 1500;
341 AnimationCount = 0;
348 eventEnd = false;
349 }
350
353
361
362 void Reset() override
363 {
364 Initialize();
365
367 }
368
370 {
372 if (!player)
373 return;
374
375 Creature* Fandral = player->FindNearestCreature(NPC_FANDRAL_STAGHELM, 100.0f);
376 Creature* Arygos = player->FindNearestCreature(NPC_ARYGOS, 100.0f);
377 Creature* Caelestrasz = player->FindNearestCreature(NPC_CAELESTRASZ, 100.0f);
378 Creature* Merithra = player->FindNearestCreature(NPC_MERITHRA_OF_THE_DREAM, 100.0f);
379
380 if (!Fandral || !Arygos || !Caelestrasz || !Merithra)
381 return;
382
384 if (eventEnd == false)
385 {
386 switch (AnimationCount)
387 {
388 case 0:
389 Talk(ANACHRONOS_SAY_1, Fandral);
390 break;
391 case 1:
392 Fandral->SetTarget(me->GetGUID());
393 Fandral->AI()->Talk(FANDRAL_SAY_1, me);
394 break;
395 case 2:
397 Merithra->AI()->Talk(MERITHRA_EMOTE_1);
398 break;
399 case 3:
400 Merithra->AI()->Talk(MERITHRA_SAY_1);
401 break;
402 case 4:
403 Arygos->AI()->Talk(ARYGOS_EMOTE_1);
404 break;
405 case 5:
406 Caelestrasz->SetTarget(Fandral->GetGUID());
407 Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_1);
408 break;
409 case 6:
410 Merithra->AI()->Talk(MERITHRA_SAY_2);
411 break;
412 case 7:
413 Caelestrasz->SetTarget(ObjectGuid::Empty);
414 Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
415 break;
416 case 8:
417 Merithra->AI()->Talk(MERITHRA_YELL_1);
418 break;
419 case 9:
420 Merithra->CastSpell(Merithra, SPELL_GREEN_DRAGON_TRANSFORM_DND, true);
421 break;
422 case 10:
424 Merithra->SetDisableGravity(true);
425 Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 3);
426 break;
427 case 11:
428 Merithra->CastSpell(Merithra, SPELL_NOXIOUS_BREATH, false);
429 break;
430 case 12:
431 Merithra->GetMotionMaster()->MoveCharge(-8100, 1530, 50, 42);
432 break;
433 case 13:
434 break;
435 case 14:
436 Arygos->AI()->Talk(ARYGOS_SAY_1);
437 Merithra->SetVisible(false);
438 break;
439 case 15:
440 Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
441 Merithra->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
442 break;
443 case 16:
444 Arygos->AI()->Talk(ARYGOS_YELL_1);
445 break;
446 case 17:
447 Arygos->CastSpell(Arygos, SPELL_BLUE_DRAGON_TRANSFORM_DND, true);
448 break;
449 case 18:
451 Arygos->SetDisableGravity(true);
452 Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 42);
453 break;
454 case 19:
455 Arygos->CastSpell(Arygos, SPELL_FROST_BREATH, false);
456 break;
457 case 20:
458 Arygos->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
459 break;
460 case 21:
461 break;
462 case 22:
463 Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_2, Fandral);
464 break;
465 case 23:
466 Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
467 Arygos->SetVisible(false);
468 Arygos->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 10);
469 break;
470 case 24:
471 Caelestrasz->AI()->Talk(CAELESTRASZ_YELL_1);
472 break;
473 case 25:
474 Caelestrasz->CastSpell(Caelestrasz, SPELL_RED_DRAGON_TRANSFORM_DND, true);
475 break;
476 case 26:
478 Caelestrasz->SetDisableGravity(true);
479 Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 7.61f, 4);
480 break;
481 case 27:
482 Caelestrasz->CastSpell(Caelestrasz, SPELL_FLAME_BREATH, false);
483 break;
484 case 28:
485 Talk(ANACHRONOS_SAY_2, Fandral);
486 break;
487 case 29:
488 Caelestrasz->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
489 Fandral->AI()->Talk(FANDRAL_SAY_2);
490 break;
491 case 30:
492 break;
493 case 31:
494 Talk(ANACHRONOS_SAY_3, Fandral);
495 break;
496 case 32:
497 Caelestrasz->SetVisible(false);
498 Caelestrasz->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
499 Fandral->GetMotionMaster()->MoveCharge(-8108, 1529, 2.77f, 8);
500 me->GetMotionMaster()->MoveCharge(-8113, 1525, 2.77f, 8);
501 break;//both run to the gate
502 case 33:
504 Caelestrasz->GetMotionMaster()->MoveCharge(-8050, 1473, 65, 15);
505 break; //Text: sands will stop
506 case 34:
507 DoCast(player, SPELL_ARCANE_CHANNELING, true);//Arcane Channeling
508 break;
509 case 35:
510 me->CastSpell(Position(-8088, 1520.43f, 2.67f), SPELL_TIME_STOP, true);
511 break;
512 case 36:
514 break;
515 case 37:
516 me->SummonGameObject(GO_GATE_OF_AHN_QIRAJ, Position(-8130.f, 1525.f, 17.5f, 0.f), QuaternionData(), 0s);
517 break;
518 case 38:
520 me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, Position(-8130.f, 1525.f, 17.5f, 0.f), QuaternionData(), 0s);
521 break;
522 case 39:
523 Talk(ANACHRONOS_SAY_5, Fandral);
524 break;
525 case 40:
526 Fandral->CastSpell(me, SPELL_CALL_ANCIENTS, true);
527 break;
528 case 41:
529 Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ, Position(-8130.f, 1525.f, 17.5f, 0.f), QuaternionData(), 0s);
530 Fandral->AI()->Talk(FANDRAL_SAY_3);
531 break;
532 case 42:
533 me->CastStop();
534 Fandral->AI()->Talk(FANDRAL_EMOTE_1);
535 break;
536 case 43:
537 Fandral->CastStop();
538 break;
539 case 44:
541 break;
542 case 45:
544 break;
545 case 46:
547 me->GetMotionMaster()->MoveCharge(-8110, 1527, 2.77f, 4);
548 break;
549 case 47:
551 break;
552 case 48:
553 Fandral->AI()->Talk(FANDRAL_SAY_4, me);
554 break;
555 case 49:
556 Fandral->AI()->Talk(FANDRAL_SAY_5, me);
557 break;
558 case 50:
559 Fandral->AI()->Talk(FANDRAL_EMOTE_2);
560 Fandral->CastSpell(Position(-8127, 1525, 17.5f), SPELL_THROW_HAMMER, true);
561 break;
562 case 51:
563 {
565 Unit* mob = nullptr;
566 for (uint8 i = 0; i < 4; ++i)
567 {
568 mob = player->FindNearestCreature(entries[i], 50);
569 while (mob)
570 {
571 mob->RemoveFromWorld();
573 }
574 }
575 break;
576 }
577 case 52:
578 Fandral->GetMotionMaster()->MoveCharge(-8028.75f, 1538.795f, 2.61f, 4);
579 Fandral->AI()->Talk(ANACHRONOS_SAY_9, me);
580 break;
581 case 53:
582 Fandral->AI()->Talk(FANDRAL_SAY_6);
583 break;
584 case 54:
586 break;
587 case 55:
588 Fandral->SetVisible(false);
589 break;
590 case 56:
592 me->GetMotionMaster()->MoveCharge(-8116, 1522, 3.65f, 4);
593 break;
594 case 57:
595 me->GetMotionMaster()->MoveCharge(-8116.7f, 1527, 3.7f, 4);
596 break;
597 case 58:
598 me->GetMotionMaster()->MoveCharge(-8112.67f, 1529.9f, 2.86f, 4);
599 break;
600 case 59:
601 me->GetMotionMaster()->MoveCharge(-8117.99f, 1532.24f, 3.94f, 4);
602 break;
603 case 60:
604 Talk(ANACHRONOS_SAY_10, player);
605 me->GetMotionMaster()->MoveCharge(-8113.46f, 1524.16f, 2.89f, 4);
606 break;
607 case 61:
608 me->GetMotionMaster()->MoveCharge(-8057.1f, 1470.32f, 2.61f, 6);
609 if (player->IsInRange(me, 0, 15))
611 break;
612 case 62:
613 me->SetDisplayId(15500);
614 break;
615 case 63:
617 me->SetDisableGravity(true);
618 break;
619 case 64:
620 me->GetMotionMaster()->MoveCharge(-8000, 1400, 150, 9);
621 break;
622 case 65:
623 me->SetVisible(false);
624 if (Creature* AnachronosQuestTrigger = (ObjectAccessor::GetCreature(*me, AnachronosQuestTriggerGUID)))
625 {
627 AnachronosQuestTrigger->AI()->EnterEvadeMode();
628 eventEnd = true;
629 }
630 break;
631 }
632 }
634 }
635 void UpdateAI(uint32 diff) override
636 {
637 if (AnimationTimer)
638 {
639 if (AnimationTimer <= diff)
641 else AnimationTimer -= diff;
642 }
643 if (AnimationCount < 65)
644 me->CombatStop();
645 if (AnimationCount == 65 || eventEnd)
647 }
648 };
649
650};
651
652/*######
653# npc_qiraj_war_spawn
654######*/
655
657{
660 SPELL_STONED = 33652
662
664{
665public:
666 npc_qiraj_war_spawn() : CreatureScript("npc_qiraj_war_spawn") { }
667
668 CreatureAI* GetAI(Creature* creature) const override
669 {
670 return new npc_qiraj_war_spawnAI(creature);
671 }
672
674 {
676 {
677 Initialize();
678 SpellTimer1 = 0;
679 SpellTimer2 = 0;
680 SpellTimer3 = 0;
681 SpellTimer4 = 0;
682 }
683
685 {
686 MobGUID.Clear();
688 Timers = false;
689 hasTarget = false;
690 }
691
695 bool Timers;
697
698 void Reset() override
699 {
700 Initialize();
701 }
702
703 void JustEngagedWith(Unit* /*who*/) override { }
704 void JustDied(Unit* /*killer*/) override;
705
706 void UpdateAI(uint32 diff) override
707 {
708 if (!Timers)
709 {
710 if (me->GetEntry() == NPC_ANUBISATH_CONQUEROR || me->GetEntry() == NPC_QIRAJI_TANK || me->GetEntry() == NPC_QIRAJI_WASP) //all but Kaldorei Soldiers
711 {
715 }
718 Timers = true;
719 }
721 {
722 if (SpellTimer1 <= diff)
723 {
724 DoCast(me, SpawnCast[1].SpellId);
727 } else SpellTimer1 -= diff;
728 if (SpellTimer2 <= diff)
729 {
730 DoCast(me, SpawnCast[2].SpellId);
732 } else SpellTimer2 -= diff;
733 if (SpellTimer3 <= diff)
734 {
735 DoCast(me, SpawnCast[3].SpellId);
737 } else SpellTimer3 -= diff;
738 }
740 {
741 if (SpellTimer4 <= diff)
742 {
744 me->AttackStop();
747 } else SpellTimer4 -= diff;
748 }
749 if (!hasTarget)
750 {
751 Unit* target = nullptr;
753 target = me->FindNearestCreature(NPC_KALDOREI_INFANTRY, 20, true);
755 {
756 uint8 tar = urand(0, 2);
757
758 if (tar == 0)
759 target = me->FindNearestCreature(NPC_QIRAJI_TANK, 20, true);
760 else if (tar == 1)
762 else if (tar == 2)
763 target = me->FindNearestCreature(NPC_QIRAJI_WASP, 20, true);
764 }
765 hasTarget = true;
766 if (target)
767 AttackStart(target);
768 }
771
772 if (!UpdateVictim())
773 {
774 hasTarget = false;
775 return;
776 }
777 }
778 };
779
780};
781
782/*#####
783# npc_anachronos_quest_trigger
784#####*/
785
787{
788public:
789 npc_anachronos_quest_trigger() : CreatureScript("npc_anachronos_quest_trigger") { }
790
791 CreatureAI* GetAI(Creature* creature) const override
792 {
793 return new npc_anachronos_quest_triggerAI(creature);
794 }
795
797 {
799 {
800 Initialize();
801 }
802
804 {
806
807 WaveTimer = 2000;
808 AnnounceTimer = 1000;
809 LiveCount = 0;
810 WaveCount = 0;
811
812 EventStarted = false;
813 Announced = false;
814 Failed = false;
815 }
816
818
821
824
827 bool Failed;
828
829 void Reset() override
830 {
831 Initialize();
832
833 me->SetVisible(false);
834 }
835
837 {
839 uint8 count = locIndex + WavesInfo[WaveCount].SpawnCount;
840
841 for (uint8 i = locIndex; i <= count; ++i)
842 {
844
846 {
847 if (spawn->GetEntry() == NPC_KALDOREI_INFANTRY)
848 spawn->SetDisplayId(15427 + rand32() % 4);
849 if (i >= 30) WaveCount = 1;
850 if (i >= 33) WaveCount = 2;
851 if (i >= 45) WaveCount = 3;
852 if (i >= 51) WaveCount = 4;
853
854 if (WaveCount < 5) //1-4 Wave
855 {
857 {
858 spawnAI->MobGUID = me->GetGUID();
859 spawnAI->PlayerGUID = PlayerGUID;
860 }
861 }
862 }
863 }
864
867 }
868
870 {
872 if (!player)
873 return;
874
875 if (Group* EventGroup = player->GetGroup())
876 {
877 Player* groupMember = nullptr;
878
879 uint8 GroupMemberCount = 0;
880 //uint8 DeadMemberCount = 0;
881 uint8 FailedMemberCount = 0;
882
883 Group::MemberSlotList const& members = EventGroup->GetMemberSlots();
884
885 for (Group::member_citerator itr = members.begin(); itr!= members.end(); ++itr)
886 {
887 groupMember = ObjectAccessor::GetPlayer(*me, itr->guid);
888 if (!groupMember)
889 continue;
891 {
893 ++FailedMemberCount;
894 }
895 ++GroupMemberCount;
896
897 //if (groupMember->isDead())
898 // ++DeadMemberCount;
899 }
900
901 if (GroupMemberCount == FailedMemberCount || !player->IsWithinDistInMap(me, EVENT_AREA_RADIUS))
902 Failed = true; //only so event can restart
903 }
904 }
905
907 {
908 --LiveCount;
909 if (!LiveCount)
910 Announced = false;
911 }
912
913 void UpdateAI(uint32 diff) override
914 {
915 if (!PlayerGUID || !EventStarted)
916 return;
917
918 if (WaveCount < 4)
919 {
920 if (!Announced && AnnounceTimer <= diff)
921 {
922 Talk(WavesInfo[WaveCount].WaveTextId);
923 Announced = true;
924 } else AnnounceTimer -= diff;
925
926 if (WaveTimer <= diff)
928 else WaveTimer -= diff;
929 }
931 if (WaveCount == 4 || Failed)
933 };
934 };
935
936};
937
939{
941
942 if (!MobGUID)
943 return;
944
947 triggerAI->LiveCounter();
948
949}
950
951/*#####
952# go_crystalline_tear
953######*/
954
956{
962
964{
965public:
966 go_crystalline_tear() : GameObjectScript("go_crystalline_tear") { }
967
969 {
971
972 void OnQuestAccept(Player* player, Quest const* quest) override
973 {
975 {
977 {
978 Unit* Merithra = trigger->SummonCreature(NPC_MERITHRA_OF_THE_DREAM, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220s);
979 Unit* Caelestrasz = trigger->SummonCreature(NPC_CAELESTRASZ, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220s);
980 Unit* Arygos = trigger->SummonCreature(NPC_ARYGOS, -8034.52f, 1537.843f, 2.61f, 5.7f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220s);
981 /* Unit* Fandral = */ trigger->SummonCreature(NPC_FANDRAL_STAGHELM, -8028.462f, 1535.843f, 2.61f, 3.141592f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220s);
982 Creature* Anachronos = trigger->SummonCreature(NPC_ANACHRONOS, -8028.75f, 1538.795f, 2.61f, 4, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220s);
983
984 if (Merithra)
985 {
989 Merithra->SetFaction(FACTION_FRIENDLY);
990 }
991
992 if (Caelestrasz)
993 {
997 Caelestrasz->SetFaction(FACTION_FRIENDLY);
998 }
999
1000 if (Arygos)
1001 {
1006 }
1007
1008 if (Anachronos)
1009 {
1011 anachronosAI->PlayerGUID = player->GetGUID();
1012
1014 {
1015 triggerAI->Failed = false;
1016 triggerAI->PlayerGUID = player->GetGUID();
1017 triggerAI->EventStarted = true;
1018 triggerAI->Announced = true;
1019 }
1020 }
1021 }
1022 }
1023 }
1024 };
1025
1026 GameObjectAI* GetAI(GameObject* go) const override
1027 {
1028 return new go_crystalline_tearAI(go);
1029 }
1030};
1031
1032/*###
1033## go_wind_stone
1034###*/
1035
1037{
1040 AURA_RING = 24782,
1041
1047
1053
1059
1060 SPELL_PUNISHMENT = 24803
1062
1064{
1082
1084{
1089
1094
1098 NPC_ROYAL_WATER = 15305
1100
1102{
1107
1112
1116 ITEM_ROYAL_WATER = 20450
1118
1119enum WS
1120{
1122 DUKE = 1,
1124
1125 FIRE = 0x1,
1126 WATER = 0x2,
1127 EARTH = 0x4,
1128 AIR = 0x8
1130
1132{
1133 public:
1134 go_wind_stone() : GameObjectScript("go_wind_stone") { }
1135
1137 {
1139
1140 private:
1141 bool isSummoning = false;
1142
1143 uint8 GetPlayerTwilightSetRank(Player* player) // For random summoning
1144 {
1145 bool setAura = player->HasAura(AURA_TWILIGHT_SET);
1146 bool medallionAura = player->HasAura(AURA_MEDALLION);
1147 bool ringAura = player->HasAura(AURA_RING);
1148
1149 if (setAura && medallionAura && ringAura)
1150 return 3;
1151 else if (setAura && medallionAura)
1152 return 2;
1153 else if (setAura)
1154 return 1;
1155 else
1156 return 0;
1157 }
1158
1160 {
1161 uint8 result = 0x0;
1162
1163 switch (type)
1164 {
1165 case TEMPLAR:
1166 {
1167 if (player->HasItemCount(ITEM_TEMPLAR_FIRE))
1168 result |= FIRE;
1169 if (player->HasItemCount(ITEM_TEMPLAR_WATER))
1170 result |= WATER;
1171 if (player->HasItemCount(ITEM_TEMPLAR_EARTH))
1172 result |= EARTH;
1173 if (player->HasItemCount(ITEM_TEMPLAR_AIR))
1174 result |= AIR;
1175 break;
1176 }
1177 case DUKE:
1178 {
1179 if (player->HasItemCount(ITEM_DUKE_FIRE))
1180 result |= FIRE;
1181 if (player->HasItemCount(ITEM_DUKE_WATER))
1182 result |= WATER;
1183 if (player->HasItemCount(ITEM_DUKE_EARTH))
1184 result |= EARTH;
1185 if (player->HasItemCount(ITEM_DUKE_AIR))
1186 result |= AIR;
1187 break;
1188 }
1189 case ROYAL:
1190 {
1191 if (player->HasItemCount(ITEM_ROYAL_FIRE))
1192 result |= FIRE;
1193 if (player->HasItemCount(ITEM_ROYAL_WATER))
1194 result |= WATER;
1195 if (player->HasItemCount(ITEM_ROYAL_EARTH))
1196 result |= EARTH;
1197 if (player->HasItemCount(ITEM_ROYAL_AIR))
1198 result |= AIR;
1199 break;
1200 }
1201 default:
1202 break;
1203 }
1204 return result;
1205 }
1206
1207 void SummonNPC(GameObject* go, Player* player, uint32 npc, uint32 spell)
1208 {
1209 isSummoning = true;
1210
1211 player->SummonCreature(npc, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), player->GetOrientation() - float(M_PI), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5min);
1212 me->CastSpell(player, spell);
1213 me->DespawnOrUnsummon(1100ms);
1214 }
1215
1216 public:
1217 bool OnGossipHello(Player* player) override
1218 {
1219 // fix possible exploit
1220 if (isSummoning)
1221 {
1222 return true;
1223 }
1224 uint8 rank = GetPlayerTwilightSetRank(player);
1225
1226 uint32 gossipId = me->GetGOInfo()->GetGossipMenuId();
1227
1228 switch (gossipId)
1229 {
1231 {
1233 if (rank >= 1) // 1 or 2 or 3
1235 else
1236 {
1237 player->CastSpell(player, SPELL_PUNISHMENT, true);
1238 break;
1239 }
1240
1241 uint8 item = GetSummonItems(player, TEMPLAR);
1242 if (item & FIRE)
1244 if (item & WATER)
1246 if (item & EARTH)
1248 if (item & AIR)
1250 break;
1251 }
1253 {
1255 if (rank >= 2) // 2 or 3
1257 else
1258 {
1259 player->CastSpell(player, SPELL_PUNISHMENT, true);
1260 break;
1261 }
1262
1263 uint8 item = GetSummonItems(player, DUKE);
1264 if (item & FIRE)
1266 if (item & WATER)
1268 if (item & EARTH)
1270 if (item & AIR)
1272 break;
1273 }
1275 {
1277 if (rank == 3) // 3
1279 else
1280 {
1281 player->CastSpell(player, SPELL_PUNISHMENT, true);
1282 break;
1283 }
1284
1285 uint8 item = GetSummonItems(player, ROYAL);
1286 if (item & FIRE)
1288 if (item & WATER)
1290 if (item & EARTH)
1292 if (item & AIR)
1294 break;
1295 }
1296 default:
1297 break;
1298 }
1299
1300 SendGossipMenuFor(player, player->GetGossipTextId(gossipId, me), me->GetGUID());
1301 return true;
1302 }
1303
1304 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
1305 {
1306 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
1307 ClearGossipMenuFor(player);
1308 player->PlayerTalkClass->SendCloseGossip();
1309
1310 // fix possible exploit
1311 if (isSummoning)
1312 {
1313 return true;
1314 }
1315
1316 uint8 rank = GetPlayerTwilightSetRank(player);
1317
1318 switch (action)
1319 {
1320 case GOSSIP_ACTION_INFO_DEF + 1:
1321 if (rank >= 1)
1322 {
1324 }
1325 break;
1326 case GOSSIP_ACTION_INFO_DEF + 2:
1327 if (rank >= 1)
1328 {
1329 SummonNPC(me, player, NPC_TEMPLAR_FIRE, SPELL_TEMPLAR_FIRE);
1330 }
1331 break;
1332 case GOSSIP_ACTION_INFO_DEF + 3:
1333 if (rank >= 1)
1334 {
1335 SummonNPC(me, player, NPC_TEMPLAR_WATER, SPELL_TEMPLAR_WATER);
1336 }
1337 break;
1338 case GOSSIP_ACTION_INFO_DEF + 4:
1339 if (rank >= 1)
1340 {
1341 SummonNPC(me, player, NPC_TEMPLAR_EARTH, SPELL_TEMPLAR_EARTH);
1342 }
1343 break;
1344 case GOSSIP_ACTION_INFO_DEF + 5:
1345 if (rank >= 1)
1346 {
1347 SummonNPC(me, player, NPC_TEMPLAR_AIR, SPELL_TEMPLAR_AIR);
1348 }
1349 break;
1350
1351 case GOSSIP_ACTION_INFO_DEF + 6:
1352 if (rank >= 2)
1353 {
1355 }
1356 break;
1357 case GOSSIP_ACTION_INFO_DEF + 7:
1358 if (rank >= 2)
1359 {
1360 SummonNPC(me, player, NPC_DUKE_FIRE, SPELL_DUKE_FIRE);
1361 }
1362 break;
1363 case GOSSIP_ACTION_INFO_DEF + 8:
1364 if (rank >= 2)
1365 {
1366 SummonNPC(me, player, NPC_DUKE_WATER, SPELL_DUKE_WATER);
1367 }
1368 break;
1369 case GOSSIP_ACTION_INFO_DEF + 9:
1370 if (rank >= 2)
1371 {
1372 SummonNPC(me, player, NPC_DUKE_EARTH, SPELL_DUKE_EARTH);
1373 }
1374 break;
1375 case GOSSIP_ACTION_INFO_DEF + 10:
1376 if (rank >= 2)
1377 {
1378 SummonNPC(me, player, NPC_DUKE_AIR, SPELL_DUKE_AIR);
1379 }
1380 break;
1381
1382 case GOSSIP_ACTION_INFO_DEF + 11:
1383 if (rank == 3)
1384 {
1386 }
1387 break;
1388 case GOSSIP_ACTION_INFO_DEF + 12:
1389 if (rank == 3)
1390 {
1391 SummonNPC(me, player, NPC_ROYAL_FIRE, SPELL_ROYAL_FIRE);
1392 }
1393 break;
1394 case GOSSIP_ACTION_INFO_DEF + 13:
1395 if (rank == 3)
1396 {
1397 SummonNPC(me, player, NPC_ROYAL_WATER, SPELL_ROYAL_WATER);
1398 }
1399 break;
1400 case GOSSIP_ACTION_INFO_DEF + 14:
1401 if (rank == 3)
1402 {
1403 SummonNPC(me, player, NPC_ROYAL_EARTH, SPELL_ROYAL_EARTH);
1404 }
1405 break;
1406 case GOSSIP_ACTION_INFO_DEF + 15:
1407 if (rank == 3)
1408 {
1409 SummonNPC(me, player, NPC_ROYAL_AIR, SPELL_ROYAL_AIR);
1410 }
1411 break;
1412
1413 default:
1414 break;
1415 }
1416 return true;
1417 }
1418
1419 void Reset() override
1420 {
1421 // Allow despawning
1422 me->RemoveFlag(GO_FLAG_NODESPAWN);
1423 isSummoning = false;
1424 }
1425 };
1426
1427 GameObjectAI* GetAI(GameObject* go) const override
1428 {
1429 return new go_wind_stoneAI(go);
1430 }
1431};
1432
1433// 24745 - Summon Templar, Trigger
1434// 24747 - Summon Templar Fire, Trigger
1435// 24757 - Summon Templar Air, Trigger
1436// 24759 - Summon Templar Earth, Trigger
1437// 24761 - Summon Templar Water, Trigger
1438// 24762 - Summon Duke, Trigger
1439// 24766 - Summon Duke Fire, Trigger
1440// 24769 - Summon Duke Air, Trigger
1441// 24771 - Summon Duke Earth, Trigger
1442// 24773 - Summon Duke Water, Trigger
1443// 24785 - Summon Royal, Trigger
1444// 24787 - Summon Royal Fire, Trigger
1445// 24791 - Summon Royal Air, Trigger
1446// 24792 - Summon Royal Earth, Trigger
1447// 24793 - Summon Royal Water, Trigger
1448// 46595 - Summon Ice Stone Lieutenant, Trigger
1450{
1451 bool Validate(SpellInfo const* spellInfo) override
1452 {
1453 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
1454 }
1455
1456 void PeriodicTick(AuraEffect const* aurEff)
1457 {
1458 PreventDefaultAction();
1459
1460 // All these spells trigger a spell that requires reagents; if the
1461 // triggered spell is cast as "triggered", reagents are not consumed
1462 GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST).SetTriggeringAura(aurEff));
1463 }
1464
1465 void Register() override
1466 {
1468 }
1469};
1470
1472{
1473 new go_crystalline_tear();
1476 new npc_qiraj_war_spawn();
1477 new go_wind_stone();
1479}
#define M_PI
Definition: Common.h:115
First const & RAND(First const &first, Second const &second, Rest const &... rest)
uint8_t uint8
Definition: Define.h:144
int8_t int8
Definition: Define.h:140
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:29
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: ObjectDefines.h:66
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: ObjectDefines.h:63
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:145
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
uint32 rand32()
Definition: Random.cpp:70
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
void AddGossipItemFor(Player *player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action)
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const &guid)
void ClearGossipMenuFor(Player *player)
void InitGossipMenuFor(Player *player, uint32 menuId)
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
@ EFFECT_0
Definition: SharedDefines.h:30
@ EMOTE_ONESHOT_LIFTOFF
@ GO_FLAG_NODESPAWN
@ FACTION_FRIENDLY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ TRIGGERED_IGNORE_POWER_AND_REAGENT_COST
Will ignore power and reagent cost.
Definition: SpellDefines.h:249
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define CAST_AI(a, b)
Definition: UnitAI.h:28
@ UNIT_STAND_STATE_STAND
Definition: UnitDefines.h:42
@ UNIT_NPC_FLAG_NONE
Definition: UnitDefines.h:296
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
SpellEffectInfo const & GetSpellEffectInfo() const
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:219
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
void SetTarget(ObjectGuid const &guid) override
Definition: Creature.cpp:3419
void SetDisplayId(uint32 displayId, bool setNative=false) override
Definition: Creature.cpp:3402
CreatureAI * AI() const
Definition: Creature.h:214
Definition: Group.h:197
std::list< MemberSlot > MemberSlotList
Definition: Group.h:210
MemberSlotList::const_iterator member_citerator
Definition: Group.h:211
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false, Unit const *target=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
void Clear()
Definition: ObjectGuid.h:286
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: Player.cpp:9888
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition: Player.cpp:16598
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: Player.cpp:16050
void FailQuest(uint32 quest_id)
Definition: Player.cpp:15446
Group * GetGroup(Optional< uint8 > partyIndex)
Definition: Player.h:2606
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: Player.cpp:14367
std::unique_ptr< PlayerMenu > PlayerTalkClass
Definition: Player.h:2380
uint32 GetQuestId() const
Definition: QuestDef.h:587
uint32 TriggerSpell
Definition: SpellInfo.h:237
uint32 const Id
Definition: SpellInfo.h:325
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:577
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void CastStop(uint32 except_spellid=0)
Definition: Unit.cpp:1135
void SetVisible(bool x)
Definition: Unit.cpp:8351
void CombatStop(bool includingCast=false, bool mutualPvP=true, bool(*unitFilter)(Unit const *otherUnit)=nullptr)
Definition: Unit.cpp:5827
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:10100
void SetFaction(uint32 faction) override
Definition: Unit.h:859
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition: Unit.cpp:12725
void RemoveAllAttackers()
Definition: Unit.cpp:5881
void RemoveFromWorld() override
Definition: Unit.cpp:9611
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition: Unit.cpp:1598
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
void ReplaceAllNpcFlags(NPCFlags flags)
Definition: Unit.h:984
bool AttackStop()
Definition: Unit.cpp:5781
virtual void SetDisplayId(uint32 displayId, bool setNative=false)
Definition: Unit.cpp:10148
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2065
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2148
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition: Object.cpp:1147
bool IsInRange(WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
Definition: Object.cpp:1238
GameObjectAI * GetAI(GameObject *go) const override
GameObjectAI * GetAI(GameObject *go) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
bool Validate(SpellInfo const *spellInfo) override
void PeriodicTick(AuraEffect const *aurEff)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
constexpr float GetPositionX() const
Definition: Position.h:76
constexpr float GetPositionY() const
Definition: Position.h:77
constexpr float GetOrientation() const
Definition: Position.h:79
constexpr float GetPositionZ() const
Definition: Position.h:78
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
uint32 CreatureId
int32 WaveTextId
uint8 UsedSpawnPoint
Milliseconds DespTimer
uint32 SpawnTimer
uint32 YellTimer
uint8 SpawnCount
void OnQuestAccept(Player *player, Quest const *quest) override
uint8 GetPlayerTwilightSetRank(Player *player)
bool OnGossipHello(Player *player) override
void SummonNPC(GameObject *go, Player *player, uint32 npc, uint32 spell)
uint8 GetSummonItems(Player *player, WS type)
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
void AddSC_silithus()
AnachronosTheAncient
@ SPELL_CALL_ANCIENTS
@ SPELL_BLUE_DRAGON_TRANSFORM_DND
@ SPELL_FROST_BREATH
@ NPC_QIRAJI_WASP
@ SPELL_CALL_PRISMATIC_BARRIER
@ SPELL_TIME_STOP
@ SPELL_CALL_GLYPHS_OF_WARDING
@ SPELL_FLAME_BREATH
@ SPELL_ARCANE_CHANNELING
@ NPC_QIRAJI_TANK
@ SPELL_GREEN_DRAGON_TRANSFORM_DND
@ SPELL_RED_DRAGON_TRANSFORM_DND
@ NPC_KALDOREI_INFANTRY
@ SPELL_THROW_HAMMER
@ NPC_ANUBISATH_CONQUEROR
@ SPELL_NOXIOUS_BREATH
WSSpells
@ 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_DUKE_EARTH
@ SPELL_ROYAL_EARTH
@ SPELL_TEMPLAR_AIR
@ SPELL_TEMPLAR_WATER
@ AURA_TWILIGHT_SET
@ SPELL_TEMPLAR_EARTH
@ SPELL_TEMPLAR_RANDOM
@ DUKE
@ AIR
@ TEMPLAR
@ FIRE
@ EARTH
@ ROYAL
@ WATER
CrystallineTear
@ ARYGOS_GNOME_FORM
@ ANACHRONOS_QUEST_TRIGGER_INVISIBLE
@ MERITHRA_NIGHT_ELF_FORM
@ CAELESTRASZ_NIGHT_ELF_FORM
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[]
QirajWarSpawn
@ SPELL_STONED_CHANNEL_CAST_VISUAL
@ SPELL_SUMMON_POISON_CLOUD
@ SPELL_STONED
WSGossip
@ OPTION_ID_3_KAZUM
@ OPTION_ID_3_SHARDS
@ OPTION_ID_4_ZEPHYRS
@ GOSSIP_ID_LESSER_WS
@ OPTION_ID_2_AZURE
@ GOSSIP_ID_WIND_STONE
@ OPTION_ID_2_FATHOMS
@ OPTION_ID_2_SKWOL
@ OPTION_ID_1_SKALDRENOX
@ OPTION_ID_4_HOARY
@ GOSSIP_ID_GREATER_WS
@ OPTION_ID_WS_RANDOM
@ OPTION_ID_1_CYNDERS
@ OPTION_ID_3_EARTHEN
@ OPTION_ID_4_WHIRLAXIS
@ OPTION_ID_1_CRIMSON
static WaveData WavesInfo[5]
EternalBoard
@ ANACHRONOS_EMOTE_3
@ ANACHRONOS_SAY_3
@ GO_GATE_OF_AHN_QIRAJ
@ FANDRAL_SAY_6
@ EVENT_COOLDOWN
@ ANACHRONOS_EMOTE_2
@ ANACHRONOS_SAY_6
@ NPC_ARYGOS
@ ANACHRONOS_SAY_9
@ ANACHRONOS_SAY_7
@ CAELESTRASZ_YELL_1
@ ANACHRONOS_SAY_5
@ NPC_FANDRAL_STAGHELM
@ MERITHRA_SAY_2
@ ANACHRONOS_EMOTE_1
@ NPC_MERITHRA_OF_THE_DREAM
@ ANACHRONOS_SAY_8
@ FANDRAL_EMOTE_2
@ ARYGOS_YELL_1
@ FANDRAL_SAY_3
@ ARYGOS_SAY_1
@ FANDRAL_SAY_1
@ MERITHRA_SAY_1
@ EVENT_AREA_RADIUS
@ NPC_CAELESTRASZ
@ GO_ROOTS_OF_AHN_QIRAJ
@ ANACHRONOS_SAY_1
@ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD
@ ANACHRONOS_SAY_4
@ FANDRAL_SAY_5
@ FANDRAL_SAY_2
@ ANACHRONOS_SAY_2
@ ARYGOS_EMOTE_1
@ CAELESTRASZ_SAY_1
@ FANDRAL_SAY_4
@ FANDRAL_EMOTE_1
@ GO_GLYPH_OF_AHN_QIRAJ
@ NPC_ANACHRONOS
@ MERITHRA_EMOTE_1
@ ANACHRONOS_SAY_10
@ CAELESTRASZ_SAY_2
@ MERITHRA_YELL_1
Position const SpawnLocation[]
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