Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
go_scripts.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/* ContentData
7go_cat_figurine (the "trap" version of GO, two different exist)
8go_barov_journal
9go_ethereum_prison
10go_ethereum_stasis
11go_sacred_fire_of_life
12go_shrine_of_the_birds
13go_southfury_moonstone
14go_field_repair_bot_74A
15go_orb_of_command
16go_resonite_cask
17go_tablet_of_madness
18go_tablet_of_the_seven
19go_tele_to_dalaran_crystal
20go_tele_to_violet_stand
21go_scourge_cage
22go_jotunheim_cage
23go_table_theka
24go_bashir_crystalforge
25go_ethereal_teleport_pad
26go_dragonflayer_cage
27go_tadpole_cage
28go_amberpine_outhouse
29go_hive_pod
30go_gjalerbron_cage
31go_large_gjalerbron_cage
32go_veil_skith_cage
33EndContentData */
34
35#include "ScriptMgr.h"
36#include "ScriptedCreature.h"
37#include "ScriptedGossip.h"
38#include "GameObjectAI.h"
39#include "Spell.h"
40#include "Player.h"
41#include "WorldSession.h"
42
43/*######
44## go_cat_figurine
45######*/
46
51
53{
54public:
55 go_cat_figurine() : GameObjectScript("go_cat_figurine") { }
56
57 bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
58 {
59 player->CastSpell(player, SPELL_SUMMON_GHOST_SABER, true);
60 return false;
61 }
62};
63
64/*######
65## go_barov_journal
66######*/
67
69{
70public:
71 go_barov_journal() : GameObjectScript("go_barov_journal") { }
72
73 bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
74 {
75 if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !player->HasSpell(26086))
76 player->CastSpell(player, 26095, false);
77
78 return true;
79 }
80};
81
82/*######
83## go_field_repair_bot_74A
84######*/
85
87{
88public:
89 go_field_repair_bot_74A() : GameObjectScript("go_field_repair_bot_74A") { }
90
91 bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
92 {
93 if (player->HasSkill(SKILL_ENGINEERING) && player->GetBaseSkillValue(SKILL_ENGINEERING) >= 300 && !player->HasSpell(22704))
94 player->CastSpell(player, 22864, false);
95
96 return true;
97 }
98};
99
100/*######
101## go_gilded_brazier (Paladin First Trail quest (9678))
102######*/
103
105{
107};
108
110{
111public:
112 go_gilded_brazier() : GameObjectScript("go_gilded_brazier") { }
113
115 {
116 if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
117 {
118 if (player->GetQuestStatus(9678) == QUEST_STATUS_INCOMPLETE)
119 {
120 if (Creature* Stillblade = player->SummonCreature(NPC_STILLBLADE, 8106.11f, -7542.06f, 151.775f, 3.02598f, TempSummonType::TEMPSUMMON_DEAD_DESPAWN, 60000))
121 Stillblade->AI()->AttackStart(player);
122 }
123 }
124 return true;
125 }
126};
127
128/*######
129## go_orb_of_command
130######*/
131
133{
134public:
135 go_orb_of_command() : GameObjectScript("go_orb_of_command") { }
136
138 {
139 if (player->GetQuestRewardStatus(7761))
140 player->CastSpell(player, 23460, true);
141
142 return true;
143 }
144};
145
146/*######
147## go_tablet_of_madness
148######*/
149
151{
152public:
153 go_tablet_of_madness() : GameObjectScript("go_tablet_of_madness") { }
154
156 {
157 if (player->HasSkill(SKILL_ALCHEMY) && player->GetSkillValue(SKILL_ALCHEMY) >= 300 && !player->HasSpell(24266))
158 player->CastSpell(player, 24267, false);
159
160 return true;
161 }
162};
163
164/*######
165## go_tablet_of_the_seven
166######*/
167
169{
170public:
171 go_tablet_of_the_seven() : GameObjectScript("go_tablet_of_the_seven") { }
172
175 {
176 if (go->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
177 return true;
178
179 if (player->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE)
180 player->CastSpell(player, 15065, false);
181
182 return true;
183 }
184};
185
186/*#####
187## go_jump_a_tron
188######*/
189
191{
192public:
193 go_jump_a_tron() : GameObjectScript("go_jump_a_tron") { }
194
196 {
197 if (player->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
198 player->CastSpell(player, 33382, true);
199
200 return true;
201 }
202};
203
204/*######
205## go_ethereum_prison
206######*/
207
217
219{
220 22810, 22811, 22812, 22813, 22814, 22815, //good guys
221 20783, 20784, 20785, 20786, 20788, 20789, 20790 //bad guys
222};
223
225{
226public:
227 go_ethereum_prison() : GameObjectScript("go_ethereum_prison") { }
228
230 {
231 go->UseDoorOrButton();
232 int Random = rand() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
233
234 if (Creature* creature = player->SummonCreature(NpcPrisonEntry[Random], go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player),
236 {
237 if (!creature->IsHostileTo(player))
238 {
239 if (FactionTemplateEntry const* pFaction = creature->GetFactionTemplateEntry())
240 {
241 uint32 Spell = 0;
242
243 switch (pFaction->faction)
244 {
245 case 1011: Spell = SPELL_REP_LC; break;
246 case 935: Spell = SPELL_REP_SHAT; break;
247 case 942: Spell = SPELL_REP_CE; break;
248 case 933: Spell = SPELL_REP_CON; break;
249 case 989: Spell = SPELL_REP_KT; break;
250 case 970: Spell = SPELL_REP_SPOR; break;
251 }
252
253 if (Spell)
254 creature->CastSpell(player, Spell, false);
255 else
256 SF_LOG_ERROR("scripts", "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction());
257 }
258 }
259 }
260
261 return false;
262 }
263};
264
265/*######
266## go_ethereum_stasis
267######*/
268
270{
271 22825, 20888, 22827, 22826, 22828
272};
273
275{
276public:
277 go_ethereum_stasis() : GameObjectScript("go_ethereum_stasis") { }
278
280 {
281 go->UseDoorOrButton();
282 int Random = rand() % (sizeof(NpcStasisEntry) / sizeof(uint32));
283
284 player->SummonCreature(NpcStasisEntry[Random], go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player),
286
287 return false;
288 }
289};
290
291/*######
292## go_resonite_cask
293######*/
294
296{
298};
299
301{
302public:
303 go_resonite_cask() : GameObjectScript("go_resonite_cask") { }
304
306 {
307 if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
308 go->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TempSummonType::TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
309
310 return false;
311 }
312};
313
314/*######
315## go_sacred_fire_of_life
316######*/
317
319{
321};
322
324{
325public:
326 go_sacred_fire_of_life() : GameObjectScript("go_sacred_fire_of_life") { }
327
329 {
330 if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
331 player->SummonCreature(NPC_ARIKARA, -5008.338f, -2118.894f, 83.657f, 0.874f, TempSummonType::TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
332
333 return true;
334 }
335};
336
337/*######
338## go_shrine_of_the_birds
339######*/
340
350
352{
353public:
354 go_shrine_of_the_birds() : GameObjectScript("go_shrine_of_the_birds") { }
355
357 {
358 uint32 BirdEntry = 0;
359
360 float fX, fY, fZ;
361 go->GetClosePoint(fX, fY, fZ, go->GetObjectSize(), INTERACTION_DISTANCE);
362
363 switch (go->GetEntry())
364 {
365 case GO_SHRINE_HAWK:
366 BirdEntry = NPC_HAWK_GUARD;
367 break;
368 case GO_SHRINE_EAGLE:
369 BirdEntry = NPC_EAGLE_GUARD;
370 break;
371 case GO_SHRINE_FALCON:
372 BirdEntry = NPC_FALCON_GUARD;
373 break;
374 }
375
376 if (BirdEntry)
377 player->SummonCreature(BirdEntry, fX, fY, fZ, go->GetOrientation(), TempSummonType::TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
378
379 return false;
380 }
381};
382
383/*######
384## go_southfury_moonstone
385######*/
386
388{
389 NPC_RIZZLE = 23002,
390 SPELL_BLACKJACK = 39865, //stuns player
392};
393
395{
396public:
397 go_southfury_moonstone() : GameObjectScript("go_southfury_moonstone") { }
398
400 {
401 //implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose
402 //player->CastSpell(player, SPELL_SUMMON_RIZZLE, false);
403
404 if (Creature* creature = player->SummonCreature(NPC_RIZZLE, 0.0f, 0.0f, 0.0f, 0.0f, TempSummonType::TEMPSUMMON_DEAD_DESPAWN, 0))
405 creature->CastSpell(player, SPELL_BLACKJACK, false);
406
407 return false;
408 }
409};
410
411/*######
412## go_tele_to_dalaran_crystal
413######*/
414
420
421#define GO_TELE_TO_DALARAN_CRYSTAL_FAILED "This teleport crystal cannot be used until the teleport crystal in Dalaran has been used at least once."
422
424{
425public:
426 go_tele_to_dalaran_crystal() : GameObjectScript("go_tele_to_dalaran_crystal") { }
427
429 {
430 if (player->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG))
431 return false;
432
433 player->GetSession()->SendNotification(GO_TELE_TO_DALARAN_CRYSTAL_FAILED);
434
435 return true;
436 }
437};
438
439/*######
440## go_tele_to_violet_stand
441######*/
442
444{
445public:
446 go_tele_to_violet_stand() : GameObjectScript("go_tele_to_violet_stand") { }
447
449 {
450 if (player->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || player->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE)
451 return false;
452
453 return true;
454 }
455};
456
457/*######
458## go_fel_crystalforge
459######*/
460
461#define GOSSIP_FEL_CRYSTALFORGE_TEXT 31000
462#define GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN 31001
463#define GOSSIP_FEL_CRYSTALFORGE_ITEM_1 "Purchase 1 Unstable Flask of the Beast for the cost of 10 Apexis Shards"
464#define GOSSIP_FEL_CRYSTALFORGE_ITEM_5 "Purchase 5 Unstable Flask of the Beast for the cost of 50 Apexis Shards"
465#define GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN "Use the fel crystalforge to make another purchase."
466
472
474{
475public:
476 go_fel_crystalforge() : GameObjectScript("go_fel_crystalforge") { }
477
479 {
480 if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
481 player->PrepareQuestMenu(go->GetGUID()); /* return true*/
482
485
486 player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, go->GetGUID());
487
488 return true;
489 }
490
491 bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) OVERRIDE
492 {
493 player->PlayerTalkClass->ClearMenus();
494 switch (action)
495 {
497 player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_BEAST, false);
499 player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
500 break;
501 case GOSSIP_ACTION_INFO_DEF + 1:
502 player->CastSpell(player, SPELL_CREATE_5_FLASK_OF_BEAST, false);
504 player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
505 break;
506 case GOSSIP_ACTION_INFO_DEF + 2:
509 player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, go->GetGUID());
510 break;
511 }
512 return true;
513 }
514};
515
516/*######
517## go_bashir_crystalforge
518######*/
519
520#define GOSSIP_BASHIR_CRYSTALFORGE_TEXT 31100
521#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN 31101
522#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1 "Purchase 1 Unstable Flask of the Sorcerer for the cost of 10 Apexis Shards"
523#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5 "Purchase 5 Unstable Flask of the Sorcerer for the cost of 50 Apexis Shards"
524#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN "Use the bashir crystalforge to make another purchase."
525
531
533{
534public:
535 go_bashir_crystalforge() : GameObjectScript("go_bashir_crystalforge") { }
536
538 {
539 if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
540 player->PrepareQuestMenu(go->GetGUID()); /* return true*/
541
544
545 player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_TEXT, go->GetGUID());
546
547 return true;
548 }
549
550 bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) OVERRIDE
551 {
552 player->PlayerTalkClass->ClearMenus();
553 switch (action)
554 {
556 player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_SORCERER, false);
558 player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
559 break;
560 case GOSSIP_ACTION_INFO_DEF + 1:
561 player->CastSpell(player, SPELL_CREATE_5_FLASK_OF_SORCERER, false);
563 player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
564 break;
565 case GOSSIP_ACTION_INFO_DEF + 2:
568 player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_TEXT, go->GetGUID());
569 break;
570 }
571 return true;
572 }
573};
574
575/*######
576## matrix_punchograph
577######*/
578
595
597{
598public:
599 go_matrix_punchograph() : GameObjectScript("go_matrix_punchograph") { }
600
602 {
603 switch (go->GetEntry())
604 {
606 if (player->HasItemCount(ITEM_WHITE_PUNCH_CARD))
607 {
608 player->DestroyItemCount(ITEM_WHITE_PUNCH_CARD, 1, true);
609 player->CastSpell(player, SPELL_YELLOW_PUNCH_CARD, true);
610 }
611 break;
613 if (player->HasItemCount(ITEM_YELLOW_PUNCH_CARD))
614 {
615 player->DestroyItemCount(ITEM_YELLOW_PUNCH_CARD, 1, true);
616 player->CastSpell(player, SPELL_BLUE_PUNCH_CARD, true);
617 }
618 break;
620 if (player->HasItemCount(ITEM_BLUE_PUNCH_CARD))
621 {
622 player->DestroyItemCount(ITEM_BLUE_PUNCH_CARD, 1, true);
623 player->CastSpell(player, SPELL_RED_PUNCH_CARD, true);
624 }
625 break;
627 if (player->HasItemCount(ITEM_RED_PUNCH_CARD))
628 {
629 player->DestroyItemCount(ITEM_RED_PUNCH_CARD, 1, true);
630 player->CastSpell(player, SPELL_PRISMATIC_PUNCH_CARD, true);
631 }
632 break;
633 default:
634 break;
635 }
636 return false;
637 }
638};
639
640/*######
641## go_scourge_cage
642######*/
643
645{
647};
648
650{
651public:
652 go_scourge_cage() : GameObjectScript("go_scourge_cage") { }
653
655 {
656 go->UseDoorOrButton();
657 if (Creature* pNearestPrisoner = go->FindNearestCreature(NPC_SCOURGE_PRISONER, 5.0f, true))
658 {
659 player->KilledMonsterCredit(NPC_SCOURGE_PRISONER, pNearestPrisoner->GetGUID());
660 pNearestPrisoner->DisappearAndDie();
661 }
662
663 return true;
664 }
665};
666
667/*######
668## go_arcane_prison
669######*/
670
676
678{
679public:
680 go_arcane_prison() : GameObjectScript("go_arcane_prison") { }
681
683 {
684 if (player->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE)
685 {
686 go->SummonCreature(25318, 3485.089844f, 6115.7422188f, 70.966812f, 0, TempSummonType::TEMPSUMMON_TIMED_DESPAWN, 60000);
687 player->CastSpell(player, SPELL_ARCANE_PRISONER_KILL_CREDIT, true);
688 return true;
689 }
690 return false;
691 }
692};
693
694/*######
695## go_blood_filled_orb
696######*/
697
699{
701};
702
704{
705public:
706 go_blood_filled_orb() : GameObjectScript("go_blood_filled_orb") { }
707
709 {
710 if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
711 player->SummonCreature(NPC_ZELEMAR, -369.746f, 166.759f, -21.50f, 5.235f, TempSummonType::TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
712
713 return true;
714 }
715};
716
717/*######
718## go_jotunheim_cage
719######*/
720
733
735{
736public:
737 go_jotunheim_cage() : GameObjectScript("go_jotunheim_cage") { }
738
740 {
741 go->UseDoorOrButton();
742 Creature* pPrisoner = go->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true);
743 if (!pPrisoner)
744 {
745 pPrisoner = go->FindNearestCreature(NPC_EBON_BLADE_PRISONER_TROLL, 5.0f, true);
746 if (!pPrisoner)
747 {
748 pPrisoner = go->FindNearestCreature(NPC_EBON_BLADE_PRISONER_ORC, 5.0f, true);
749 if (!pPrisoner)
750 pPrisoner = go->FindNearestCreature(NPC_EBON_BLADE_PRISONER_NE, 5.0f, true);
751 }
752 }
753 if (!pPrisoner || !pPrisoner->IsAlive())
754 return false;
755
756 pPrisoner->DisappearAndDie();
757 player->KilledMonsterCredit(NPC_EBON_BLADE_PRISONER_HUMAN, 0);
758 switch (pPrisoner->GetEntry())
759 {
761 player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_H, true);
762 break;
764 player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_NE, true);
765 break;
767 player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_TROLL, true);
768 break;
770 player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_ORC, true);
771 break;
772 }
773 return true;
774 }
775};
776
778{
780
782};
783
785{
786public:
787 go_table_theka() : GameObjectScript("go_table_theka") { }
788
790 {
791 if (player->GetQuestStatus(QUEST_SPIDER_GOLD) == QUEST_STATUS_INCOMPLETE)
792 player->AreaExploredOrEventHappens(QUEST_SPIDER_GOLD);
793
794 player->SEND_GOSSIP_MENU(GOSSIP_TABLE_THEKA, go->GetGUID());
795
796 return true;
797 }
798};
799
800/*######
801## go_inconspicuous_landmark
802######*/
803
809
811{
812public:
813 go_inconspicuous_landmark() : GameObjectScript("go_inconspicuous_landmark") { }
814
816 {
817 if (player->HasItemCount(ITEM_CUERGOS_KEY))
818 return false;
819
820 player->CastSpell(player, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true);
821
822 return true;
823 }
824};
825
826/*######
827## go_ethereal_teleport_pad
828######*/
829
835
837{
838public:
839 go_ethereal_teleport_pad() : GameObjectScript("go_ethereal_teleport_pad") { }
840
842 {
843 if (!player->HasItemCount(ITEM_TELEPORTER_POWER_PACK))
844 return false;
845
846 go->SummonCreature(NPC_IMAGE_WIND_TRADER, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player), TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
847
848 return true;
849 }
850};
851
852/*######
853## Quest 11255: Prisoners of Wyrmskull
854## go_dragonflayer_cage
855######*/
856
865
867{
868public:
869 go_dragonflayer_cage() : GameObjectScript("go_dragonflayer_cage") { }
870
872 {
873 go->UseDoorOrButton();
874 if (player->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) != QUEST_STATUS_INCOMPLETE)
875 return true;
876
877 Creature* pPrisoner = go->FindNearestCreature(NPC_PRISONER_PRIEST, 2.0f);
878 if (!pPrisoner)
879 {
880 pPrisoner = go->FindNearestCreature(NPC_PRISONER_MAGE, 2.0f);
881 if (!pPrisoner)
882 {
883 pPrisoner = go->FindNearestCreature(NPC_PRISONER_WARRIOR, 2.0f);
884 if (!pPrisoner)
885 pPrisoner = go->FindNearestCreature(NPC_PRISONER_PALADIN, 2.0f);
886 }
887 }
888
889 if (!pPrisoner || !pPrisoner->IsAlive())
890 return true;
891
892 Quest const* qInfo = sObjectMgr->GetQuestTemplate(QUEST_PRISONERS_OF_WYRMSKULL);
893 if (qInfo)
894 {
896 player->KilledMonsterCredit(qInfo->GetQuestObjectiveXIndex(0)->ObjectId);
897 pPrisoner->DisappearAndDie();
898 }
899 return true;
900 }
901};
902
903/*######
904## Quest 11560: Oh Noes, the Tadpoles!
905## go_tadpole_cage
906######*/
907
913
915{
916public:
917 go_tadpole_cage() : GameObjectScript("go_tadpole_cage") { }
918
920 {
921 go->UseDoorOrButton();
922 if (player->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE)
923 {
925 if (pTadpole)
926 {
927 pTadpole->DisappearAndDie();
928 player->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE, 0);
929 //FIX: Summon minion tadpole
930 }
931 }
932 return true;
933 }
934};
935
936/*######
937## go_amberpine_outhouse
938######*/
939
940#define GOSSIP_USE_OUTHOUSE "Use the outhouse."
941#define GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND "Quest item Anderhol's Slider Cider not found."
942
954
956{
957public:
958 go_amberpine_outhouse() : GameObjectScript("go_amberpine_outhouse") { }
959
961 {
962 QuestStatus status = player->GetQuestStatus(QUEST_DOING_YOUR_DUTY);
963 if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
964 {
966 player->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_VACANT, go->GetGUID());
967 }
968 else
969 player->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_INUSE, go->GetGUID());
970
971 return true;
972 }
973
974 bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) OVERRIDE
975 {
976 player->PlayerTalkClass->ClearMenus();
977 if (action == GOSSIP_ACTION_INFO_DEF +1)
978 {
979 player->CLOSE_GOSSIP_MENU();
981 if (target)
982 {
983 target->AI()->SetData(1, player->getGender());
984 go->CastSpell(target, SPELL_INDISPOSED_III);
985 }
986 go->CastSpell(player, SPELL_INDISPOSED);
987 if (player->HasItemCount(ITEM_ANDERHOLS_SLIDER_CIDER))
988 go->CastSpell(player, SPELL_CREATE_AMBERSEEDS);
989 return true;
990 }
991 else
992 {
993 player->CLOSE_GOSSIP_MENU();
994 player->GetSession()->SendNotification(GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND);
995 return false;
996 }
997 }
998};
999
1000/*######
1001## Quest 1126: Hive in the Tower
1002## go_hive_pod
1003######*/
1004
1010
1012{
1013public:
1014 go_hive_pod() : GameObjectScript("go_hive_pod") { }
1015
1017 {
1018 player->SendLoot(go->GetGUID(), LootType::LOOT_CORPSE);
1019 go->SummonCreature(NPC_HIVE_AMBUSHER, go->GetPositionX()+1, go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player), TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
1020 go->SummonCreature(NPC_HIVE_AMBUSHER, go->GetPositionX(), go->GetPositionY()+1, go->GetPositionZ(), go->GetAngle(player), TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
1021 return true;
1022 }
1023};
1024
1026{
1027 public:
1028 go_massive_seaforium_charge() : GameObjectScript("go_massive_seaforium_charge") { }
1029
1031 {
1032 go->SetLootState(LootState::GO_JUST_DEACTIVATED);
1033 return true;
1034 }
1035};
1036
1037/*######
1038## go_gjalerbron_cage
1039######*/
1040
1048
1050{
1051 public:
1052 go_gjalerbron_cage() : GameObjectScript("go_gjalerbron_cage") { }
1053
1055 {
1056 go->UseDoorOrButton();
1057 if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) ||
1058 (player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE))
1059 {
1060 if (Creature* prisoner = go->FindNearestCreature(NPC_GJALERBRON_PRISONER, 5.0f))
1061 {
1062 player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, 0);
1063
1064 prisoner->AI()->Talk(SAY_FREE);
1065 prisoner->DespawnOrUnsummon(6000);
1066 }
1067 }
1068 return true;
1069 }
1070};
1071
1072/*########
1073## go_large_gjalerbron_cage
1074#####*/
1075
1077{
1078 public:
1079 go_large_gjalerbron_cage() : GameObjectScript("go_large_gjalerbron_cage") { }
1080
1082 {
1083 go->UseDoorOrButton();
1084 if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) ||
1085 (player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE))
1086 {
1087 std::list<Creature*> prisonerList;
1089 for (std::list<Creature*>::const_iterator itr = prisonerList.begin(); itr != prisonerList.end(); ++itr)
1090 {
1091 player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, (*itr)->GetGUID());
1092 (*itr)->DespawnOrUnsummon(6000);
1093 (*itr)->AI()->Talk(SAY_FREE);
1094 }
1095 }
1096 return false;
1097 }
1098};
1099
1100/*########
1101#### go_veil_skith_cage
1102#####*/
1103
1110
1112{
1113 public:
1114 go_veil_skith_cage() : GameObjectScript("go_veil_skith_cage") { }
1115
1117 {
1118 go->UseDoorOrButton();
1119 if (player->GetQuestStatus(QUEST_MISSING_FRIENDS) == QUEST_STATUS_INCOMPLETE)
1120 {
1121 std::list<Creature*> childrenList;
1123 for (std::list<Creature*>::const_iterator itr = childrenList.begin(); itr != childrenList.end(); ++itr)
1124 {
1125 player->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID());
1126 (*itr)->DespawnOrUnsummon(5000);
1127 (*itr)->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ());
1128 (*itr)->AI()->Talk(SAY_FREE_0);
1129 (*itr)->GetMotionMaster()->Clear();
1130 }
1131 }
1132 return false;
1133 }
1134};
1135
1136/*######
1137## go_frostblade_shrine
1138######*/
1139
1147
1149{
1150public:
1151 go_frostblade_shrine() : GameObjectScript("go_frostblade_shrine") { }
1152
1154 {
1155 go->UseDoorOrButton(10);
1156 if (!player->HasAura(SPELL_RECENT_MEDITATION))
1157 {
1158 if (player->GetQuestStatus(QUEST_THE_CLEANSING_HORDE) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(QUEST_THE_CLEANSING_ALLIANCE) == QUEST_STATUS_INCOMPLETE)
1159 {
1160 player->CastSpell(player, SPELL_CLEANSING_SOUL);
1161 player->SetStandState(UNIT_STAND_STATE_SIT);
1162 }
1163 }
1164 return true;
1165 }
1166};
1167
1168/*######
1169## go_midsummer_bonfire
1170######*/
1171
1176
1178{
1179public:
1180 go_midsummer_bonfire() : GameObjectScript("go_midsummer_bonfire") { }
1181
1182 bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
1183 {
1184 player->CastSpell(player, STAMP_OUT_BONFIRE_QUEST_COMPLETE, true);
1185 player->CLOSE_GOSSIP_MENU();
1186 return false;
1187 }
1188};
1189
1191{
1192 new go_cat_figurine();
1193 new go_barov_journal();
1195 new go_gilded_brazier();
1196 new go_orb_of_command();
1201 new go_jump_a_tron();
1202 new go_ethereum_prison();
1203 new go_ethereum_stasis();
1204 new go_resonite_cask();
1208 new go_fel_crystalforge();
1211 new go_scourge_cage();
1212 new go_arcane_prison();
1213 new go_blood_filled_orb();
1214 new go_jotunheim_cage();
1215 new go_table_theka();
1218 new go_tadpole_cage();
1221 new go_hive_pod();
1223 new go_gjalerbron_cage();
1225 new go_veil_skith_cage();
1228}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ GO_JUST_DEACTIVATED
Definition GameObject.h:619
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:46
#define SF_LOG_ERROR(filterType__,...)
Definition Log.h:143
@ LOOT_CORPSE
Definition LootMgr.h:67
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition Object.h:71
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:70
@ TEMPSUMMON_DEAD_DESPAWN
Definition Object.h:74
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition Object.h:68
#define INTERACTION_DISTANCE
Definition Object.h:21
#define sObjectMgr
Definition ObjectMgr.h:1617
QuestStatus
Definition QuestDef.h:85
@ QUEST_STATUS_REWARDED
Definition QuestDef.h:92
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:89
@ QUEST_STATUS_COMPLETE
Definition QuestDef.h:87
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
@ GAMEOBJECT_TYPE_QUESTGIVER
@ GAMEOBJECT_TYPE_GOOBER
@ TEAM_ALLIANCE
@ TEAM_HORDE
@ SKILL_TAILORING
@ SKILL_ENGINEERING
@ SKILL_ALCHEMY
@ UNIT_STAND_STATE_SIT
Definition Unit.h:163
CreatureAI * AI() const
Definition Creature.h:483
void DisappearAndDie()
Definition Creature.cpp:206
GameObjectScript(const char *name)
uint32 GetEntry() const
Definition Object.h:125
QuestObjective const * GetQuestObjectiveXIndex(uint8 index) const
Definition QuestDef.cpp:302
Definition Spell.h:289
virtual void SetData(uint32, uint32)
Definition UnitAI.h:128
bool IsAlive() const
Definition Unit.h:2032
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2801
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 OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipSelect(Player *player, GameObject *go, uint32, uint32 action) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipSelect(Player *player, GameObject *go, uint32, uint32 action) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipSelect(Player *player, GameObject *go, uint32, uint32 action) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipSelect(Player *player, GameObject *, uint32, uint32) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
AmberpineOuthouse
@ NPC_OUTHOUSE_BUNNY
@ QUEST_DOING_YOUR_DUTY
@ SPELL_INDISPOSED_III
@ SPELL_INDISPOSED
@ ITEM_ANDERHOLS_SLIDER_CIDER
@ GOSSIP_OUTHOUSE_INUSE
@ GOSSIP_OUTHOUSE_VACANT
@ SPELL_CREATE_AMBERSEEDS
JotunheimCage
@ NPC_EBON_BLADE_PRISONER_TROLL
@ SPELL_SUMMON_BLADE_KNIGHT_NE
@ NPC_EBON_BLADE_PRISONER_NE
@ SPELL_SUMMON_BLADE_KNIGHT_H
@ SPELL_SUMMON_BLADE_KNIGHT_ORC
@ NPC_EBON_BLADE_PRISONER_ORC
@ NPC_EBON_BLADE_PRISONER_HUMAN
@ SPELL_SUMMON_BLADE_KNIGHT_TROLL
MatrixPunchograph
@ ITEM_PRISMATIC_PUNCH_CARD
@ ITEM_BLUE_PUNCH_CARD
@ MATRIX_PUNCHOGRAPH_3005_C
@ SPELL_RED_PUNCH_CARD
@ MATRIX_PUNCHOGRAPH_3005_D
@ ITEM_YELLOW_PUNCH_CARD
@ SPELL_BLUE_PUNCH_CARD
@ ITEM_RED_PUNCH_CARD
@ MATRIX_PUNCHOGRAPH_3005_B
@ MATRIX_PUNCHOGRAPH_3005_A
@ SPELL_YELLOW_PUNCH_CARD
@ SPELL_PRISMATIC_PUNCH_CARD
@ ITEM_WHITE_PUNCH_CARD
#define GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND
BloodFilledOrb
@ NPC_ZELEMAR
#define GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN
FelCrystalforge
@ SPELL_CREATE_5_FLASK_OF_BEAST
@ SPELL_CREATE_1_FLASK_OF_BEAST
#define GO_TELE_TO_DALARAN_CRYSTAL_FAILED
void AddSC_go_scripts()
Hives
@ NPC_HIVE_AMBUSHER
@ QUEST_HIVE_IN_THE_TOWER
GildedBrazier
@ NPC_STILLBLADE
EtherealTeleportPad
@ ITEM_TELEPORTER_POWER_PACK
@ NPC_IMAGE_WIND_TRADER
#define GOSSIP_USE_OUTHOUSE
#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN
BashirCrystalforge
@ SPELL_CREATE_5_FLASK_OF_SORCERER
@ SPELL_CREATE_1_FLASK_OF_SORCERER
PrisonersOfWyrmskull
@ NPC_PRISONER_PALADIN
@ NPC_PRISONER_MAGE
@ QUEST_PRISONERS_OF_WYRMSKULL
@ NPC_PRISONER_WARRIOR
@ NPC_PRISONER_PRIEST
Tadpoles
@ NPC_WINTERFIN_TADPOLE
@ QUEST_OH_NOES_THE_TADPOLES
TableTheka
@ GOSSIP_TABLE_THEKA
@ QUEST_SPIDER_GOLD
EthereumPrison
@ SPELL_REP_KT
@ SPELL_REP_CON
@ SPELL_REP_SPOR
@ SPELL_REP_LC
@ SPELL_REP_SHAT
@ SPELL_REP_CE
const uint32 NpcPrisonEntry[]
SacredFireOfLife
@ NPC_ARIKARA
TheCleansing
@ QUEST_THE_CLEANSING_ALLIANCE
@ QUEST_THE_CLEANSING_HORDE
@ SPELL_CLEANSING_SOUL
@ SPELL_RECENT_MEDITATION
#define GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN
#define GOSSIP_BASHIR_CRYSTALFORGE_TEXT
#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN
OfKeysAndCages
@ SAY_FREE
@ NPC_GJALERBRON_PRISONER
@ QUEST_ALLIANCE_OF_KEYS_AND_CAGES
@ QUEST_HORDE_OF_KEYS_AND_CAGES
#define GOSSIP_FEL_CRYSTALFORGE_ITEM_1
ArcanePrison
@ QUEST_PRISON_BREAK
@ SPELL_ARCANE_PRISONER_KILL_CREDIT
#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1
ShrineOfTheBirds
@ NPC_HAWK_GUARD
@ NPC_FALCON_GUARD
@ GO_SHRINE_HAWK
@ GO_SHRINE_FALCON
@ GO_SHRINE_EAGLE
@ NPC_EAGLE_GUARD
InconspicuousLandmark
@ SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB
@ ITEM_CUERGOS_KEY
#define GOSSIP_FEL_CRYSTALFORGE_ITEM_5
#define GOSSIP_FEL_CRYSTALFORGE_TEXT
ScourgeCage
@ NPC_SCOURGE_PRISONER
ResoniteCask
@ NPC_GOGGEROC
Southfury
@ SPELL_BLACKJACK
@ SPELL_SUMMON_RIZZLE
@ NPC_RIZZLE
MidsummerBonfire
@ STAMP_OUT_BONFIRE_QUEST_COMPLETE
const uint32 NpcStasisEntry[]
DalaranCrystal
@ QUEST_TELE_CRYSTAL_FLAG
@ QUEST_LEARN_LEAVE_RETURN
#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5
MissingFriends
@ NPC_CAPTIVE_CHILD
@ SAY_FREE_0
@ QUEST_MISSING_FRIENDS
CatFigurine
@ SPELL_SUMMON_GHOST_SABER
@ SPELL_ARCANE_PRISONER_KILL_CREDIT
uint32 ObjectId
Definition QuestDef.h:242