aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2015-12-06 20:04:13 +0100
committerKillyana <morphone1@gmail.com>2015-12-06 20:04:13 +0100
commite60bbaa7d39c690a759c96ee83ab8311e700a8e1 (patch)
tree7ebd41fa6657e446f34724526391da545609b3fb
parent39a77effd78f3f72f6010e3971b17de5716ba483 (diff)
DB/Quest: Great Bear Spirit
Closes #15950
-rw-r--r--sql/updates/world/2015_12_06_00_world.sql35
-rw-r--r--src/server/scripts/Kalimdor/zone_moonglade.cpp59
2 files changed, 35 insertions, 59 deletions
diff --git a/sql/updates/world/2015_12_06_00_world.sql b/sql/updates/world/2015_12_06_00_world.sql
new file mode 100644
index 00000000000..b60d4d3e88c
--- /dev/null
+++ b/sql/updates/world/2015_12_06_00_world.sql
@@ -0,0 +1,35 @@
+--
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=11956;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=11956 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(11956, 0, 0, 0, 62, 0, 100, 0, 3884, 0, 0, 0, 15, 5930, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Great Bear Spirit - On Gossip Select - Quest explored'),
+(11956, 0, 1, 0, 62, 0, 100, 0, 3884, 1, 0, 0, 15, 5929, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Great Bear Spirit - On Gossip Select - Quest explored');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3884;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,3884,0,0,9,5930,0,0,0,0,'','Show the gossip option if the quest 5930 is taken'),
+(15,3884,1,0,9,5929,0,0,0,0,'','Show the gossip option if the quest 5929 is taken');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=3882;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`Comment`) VALUES
+(14,3882,4719,0,9,5929,0,0,0,"Only show text_id 4719 if the quest 5929 is taken"),
+(14,3882,4719,1,9,5930,0,0,0,"Only show text_id 4719 if the quest 5930 is taken");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3882;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,3882,0,0,9,5930,0,0,0,0,'','Show the gossip option if the quest 5930 is taken'),
+(15,3882,0,1,9,5929,0,0,0,0,'','Show the gossip option if the quest 5929 is taken');
+
+DELETE FROM `gossip_menu` WHERE `entry`=3882 AND `text_id`=4719;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (3882, 4719);
+
+DELETE FROM `gossip_menu` WHERE `entry`=3882 AND `text_id`=4719;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (3882, 4719);
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (3881, 3882, 3883, 3884);
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES
+(3882,0,0,'What do you represent, spirit?',7439,1,1,3881,0,0,0,'',0),
+(3881,0,0,'I seek to understand the importance of strength of the body.',7442,1,1,3883,0,0,0,'',0),
+(3883,0,0,'I seek to understand the importance of strength of the heart.',7444,1,1,3884,0,0,0,'',0),
+(3884,0,0,'I have heard your words, Great Bear Spirit, and I understand. I now seek your blessings to fully learn the way of the Claw.',7446,1,1,3885,0,0,0,'',0),
+(3884,1,0,'I have heard your words, Great Bear Spirit, and I understand. I now seek your blessings to fully learn the way of the Claw.',7446,1,1,3885,0,0,0,'',0);
diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp
index 163620230ef..c7decd3e286 100644
--- a/src/server/scripts/Kalimdor/zone_moonglade.cpp
+++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp
@@ -108,64 +108,6 @@ public:
};
/*######
-## npc_great_bear_spirit
-######*/
-
-#define GOSSIP_BEAR1 "What do you represent, spirit?"
-#define GOSSIP_BEAR2 "I seek to understand the importance of strength of the body."
-#define GOSSIP_BEAR3 "I seek to understand the importance of strength of the heart."
-#define GOSSIP_BEAR4 "I have heard your words, Great Bear Spirit, and I understand. I now seek your blessings to fully learn the way of the Claw."
-
-class npc_great_bear_spirit : public CreatureScript
-{
-public:
- npc_great_bear_spirit() : CreatureScript("npc_great_bear_spirit") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(4721, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(4733, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(4734, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 3:
- player->SEND_GOSSIP_MENU(4735, creature->GetGUID());
- if (player->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE)
- player->AreaExploredOrEventHappens(5929);
- if (player->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE)
- player->AreaExploredOrEventHappens(5930);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- //ally or horde quest
- if (player->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- player->SEND_GOSSIP_MENU(4719, creature->GetGUID());
- }
- else
- player->SEND_GOSSIP_MENU(4718, creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
## npc_silva_filnaveth
######*/
@@ -712,7 +654,6 @@ public:
void AddSC_moonglade()
{
new npc_bunthen_plainswind();
- new npc_great_bear_spirit();
new npc_silva_filnaveth();
new npc_clintar_spirit();
new npc_omen();