aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortreeston <treeston.mmoc@gmail.com>2016-06-09 12:45:13 +0200
committertreeston <treeston.mmoc@gmail.com>2016-06-09 12:45:13 +0200
commit2910fa67d3830c3e624fcbf63dd777faa878a1fa (patch)
tree94c4c7dca186fef5aa4e1746eb4d0f26d1c59975
parent7c25f3cffd0c4e15a9ff08982914fd95d5cafe2f (diff)
parent25881de7d3547c22eb76b2e0746f3c57484bca7a (diff)
Merge remote-tracking branch 'tkrokli/zone_loch_modan' into 3.3.5 (PR #16715).
-rw-r--r--sql/updates/world/3.3.5/2016_06_09_00_world.sql33
-rw-r--r--src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_loch_modan.cpp106
3 files changed, 33 insertions, 108 deletions
diff --git a/sql/updates/world/3.3.5/2016_06_09_00_world.sql b/sql/updates/world/3.3.5/2016_06_09_00_world.sql
new file mode 100644
index 00000000000..f3a8ec3d6e8
--- /dev/null
+++ b/sql/updates/world/3.3.5/2016_06_09_00_world.sql
@@ -0,0 +1,33 @@
+-- Mountaineer Pebblebitty (creature_template.entry 3836)
+SET @ENTRY := 3836;
+
+UPDATE `creature_template` SET `AIName`= "SmartAI", `ScriptName`= '' WHERE `entry`= @ENTRY;
+
+-- Correct gossip_menu_options for Quest 3181 gossip
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1201,1202,1203,1204,1205,1206) AND `id` = 0;
+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
+(1201, 0,0, "What's the worst that could happen?", 4266, 1,1, 1202, 0,0,0,'',0),
+(1202, 0,0, "Another way? Do tell...", 4268, 1,1, 1203, 0,0,0,'',0),
+(1203, 0,0, "Orcs? Badlands? I'm invulnerable!", 4270, 1,1, 1204, 0,0,0,'',0),
+(1204, 0,0, "Absolutely!", 4272, 1,1, 1205, 0,0,0,'',0),
+(1205, 0,0, "My apologies, Pebblebitty.", 4274, 1,1, 1206, 0,0,0,'',0),
+(1206, 0,0, "Done, done, and done.", 4276, 1,1, 0, 0,0,0,'',0);
+
+-- Link gossip_menu_option.menu_id to npc_text.ID (1201,1833 already in TDB)
+DELETE FROM `gossip_menu` WHERE `entry` IN (1202,1203,1204,1205,1206);
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(1202,1834),
+(1203,1835),
+(1204,1836),
+(1205,1837),
+(1206,1838);
+
+-- Mountaineer Pebblebitty gossip SAI for quest 3181 (gossip has to be closed)
+DELETE FROM `smart_scripts` WHERE `entryorguid`= @ENTRY 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
+(@ENTRY,0,0,0,62,0,100,0,1206,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Mountaineer Pebblebitty - on Gossip Menu Option 1206 selected - Close Gossip");
+
+-- Condition for gossip_menu_option 1201 and Quest 3181 (The Horn of the Beast)
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 1201;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15, 1201,0, 0,0, 28,0, 3181,0,0, 0,0,0, '', 'Show gossip menu option 1201 only if Quest 3181 is completed');
diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
index b794a653791..adcb4f9fc9a 100644
--- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
+++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
@@ -179,7 +179,6 @@ void AddSC_eastern_plaguelands();
void AddSC_ghostlands();
void AddSC_hinterlands();
void AddSC_isle_of_queldanas();
-void AddSC_loch_modan();
void AddSC_redridge_mountains();
void AddSC_silverpine_forest();
void AddSC_stormwind_city();
@@ -357,7 +356,6 @@ void AddEasternKingdomsScripts()
AddSC_ghostlands();
AddSC_hinterlands();
AddSC_isle_of_queldanas();
- AddSC_loch_modan();
AddSC_redridge_mountains();
AddSC_silverpine_forest();
AddSC_stormwind_city();
diff --git a/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp b/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp
deleted file mode 100644
index 151f8270c47..00000000000
--- a/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* ScriptData
-SDName: Loch_Modan
-SD%Complete: 100
-SDComment: Quest support: 3181
-SDCategory: Loch Modan
-EndScriptData */
-
-/* ContentData
-npc_mountaineer_pebblebitty
-EndContentData */
-
-#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "ScriptedGossip.h"
-#include "Player.h"
-
-/*######
-## npc_mountaineer_pebblebitty
-######*/
-
-#define GOSSIP_MP "Open the gate please, i need to get to Searing Gorge"
-
-#define GOSSIP_MP1 "But i need to get there, now open the gate!"
-#define GOSSIP_MP2 "Ok, so what is this other way?"
-#define GOSSIP_MP3 "Doesn't matter, i'm invulnerable."
-#define GOSSIP_MP4 "Yes..."
-#define GOSSIP_MP5 "Ok, i'll try to remember that."
-#define GOSSIP_MP6 "A key? Ok!"
-
-class npc_mountaineer_pebblebitty : public CreatureScript
-{
-public:
- npc_mountaineer_pebblebitty() : CreatureScript("npc_mountaineer_pebblebitty") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(1833, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(1834, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
- player->SEND_GOSSIP_MENU(1835, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
- player->SEND_GOSSIP_MENU(1836, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
- player->SEND_GOSSIP_MENU(1837, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+6:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
- player->SEND_GOSSIP_MENU(1838, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+7:
- player->CLOSE_GOSSIP_MENU();
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (!player->GetQuestRewardStatus(3181) == 1)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- return true;
- }
-};
-
-void AddSC_loch_modan()
-{
- new npc_mountaineer_pebblebitty();
-}