aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkrokli <tkrokli@users.noreply.github.com>2016-08-17 05:12:04 +0200
committerAokromes <Aokromes@users.noreply.github.com>2016-08-17 05:12:04 +0200
commit730680430dea199a952f116432dd7d01af9c728d (patch)
treee9e295e29315747eb00a33e68588dbdaa3e69513
parentc5549ac7e9f23a4af8650a41c9974310ffc3fdea (diff)
[3.3.5] Core/Scripts: move npc_loramus_thalipedes to DB
Another chapter in core script hardcoded text removal: - remove core script `npc_loramus_thalipedes` from zone_azshara.cpp - add gossip, SAI script and conditions to database - remove redundant SD2 comments from file header
-rw-r--r--sql/updates/world/3.3.5/2016_08_17_00_world_335.sql38
-rw-r--r--src/server/scripts/Kalimdor/zone_azshara.cpp87
2 files changed, 38 insertions, 87 deletions
diff --git a/sql/updates/world/3.3.5/2016_08_17_00_world_335.sql b/sql/updates/world/3.3.5/2016_08_17_00_world_335.sql
new file mode 100644
index 00000000000..d538a3c8ec7
--- /dev/null
+++ b/sql/updates/world/3.3.5/2016_08_17_00_world_335.sql
@@ -0,0 +1,38 @@
+-- NPC ID 7783 Loramus Thalipedes, Quest 2744 'The Demon Hunter' and 3141 'Loramus'
+UPDATE `creature_template` SET `AIName`= 'SmartAI', `ScriptName`= '' WHERE `entry`= 7783;
+
+DELETE FROM `gossip_menu` WHERE `entry` IN (1212,1213,1214,1215,1216,1217);
+INSERT INTO `gossip_menu` (`entry`,`text_id`,`VerifiedBuild`) VALUES
+(1212, 1812, 0),
+(1213, 1813, 0),
+(1214, 1814, 0),
+(1215, 1815, 0),
+(1216, 1816, 0),
+(1217, 1817, 0);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (11487,1212,1213,1214,1215,1216,1217);
+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`,`VerifiedBuild`) VALUES
+(11487,0,0,'Hail, Loramus. I bring word from the Blasted Lands.',4230,1,1,1212,0,0,0,'',0,0),
+(1212, 0,0,'Will you help?', 4245,1,1, 0,0,0,0,'',0,0),
+(11487,1,0,'I wish to hear your story.', 4257,1,1,1213,0,0,0,'',0,0),
+(1213, 0,0,'Please continue.', 4247,1,1,1214,0,0,0,'',0,0),
+(1214, 0,0,'I do not understand.', 4249,1,1,1215,0,0,0,'',0,0),
+(1215, 0,0,'Indeed.', 4251,1,1,1216,0,0,0,'',0,0),
+(1216, 0,0,'I will do this with or without your help, Loramus.', 4254,1,1,1217,0,0,0,'',0,0),
+(1217, 0,0,'Yes.', 4256,1,1, 0,0,0,0,'',0,0);
+
+DELETE FROM `npc_text` WHERE `ID`= 1812;
+INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`BroadcastTextID0`,`lang0`,`Probability0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`BroadcastTextID1`,`lang1`,`Probability1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`BroadcastTextID2`,`lang2`,`Probability2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`BroadcastTextID3`,`lang3`,`Probability3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`BroadcastTextID4`,`lang4`,`Probability4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`BroadcastTextID5`,`lang5`,`Probability5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`BroadcastTextID6`,`lang6`,`Probability6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`BroadcastTextID7`,`lang7`,`Probability7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`VerifiedBuild`) VALUES
+(1812,"You freed Kirith from his suffering? Inconceivable -- and now Trebor has sent you here to learn of demons and their minions?$B$B<Loramus laughs.>$B$BBe thankful the arcane pangs have finally dissipated, $r.$b$b",'',4228,0,1,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,0);
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 7783 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
+(7783,0,0,1,62,0,100,0,1212,0,0,0,72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Loramus Thalipedes - On gossip menu_id 1212 selected - Close gossip"),
+(7783,0,1,0,61,0,100,0, 0,0,0,0,15,2744,0,0,0,0,0,7,0,0,0,0,0,0,0,"Loramus Thalipedes - On gossip menu_id 1212 selected - Credit quest 'The Demon Hunter'"),
+(7783,0,2,3,62,0,100,0,1217,0,0,0,72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Loramus Thalipedes - On gossip menu_id 1217 selected - Close gossip"),
+(7783,0,3,0,61,0,100,0, 0,0,0,0,15,3141,0,0,0,0,0,7,0,0,0,0,0,0,0,"Loramus Thalipedes - On gossip menu_id 1217 selected - Credit quest 'Loramus'");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 11487 AND `SourceEntry` IN (0,1);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 11487, 0,0,0, 9,0, 2744,0,0,0,0,0,'',"Show gossip menu 11487 option id 0 if quest 'The Demon Hunter' has been taken."),
+(15, 11487, 1,0,0, 9,0, 3141,0,0,0,0,0,'',"Show gossip menu 11487 option id 1 if quest 'Loramus' has been taken.");
diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp
index 4847ac46542..ccc430c8dba 100644
--- a/src/server/scripts/Kalimdor/zone_azshara.cpp
+++ b/src/server/scripts/Kalimdor/zone_azshara.cpp
@@ -16,20 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Azshara
-SD%Complete: 90
-SDComment: Quest support: 2744, 3141, 9364, 10994
-SDCategory: Azshara
-EndScriptData */
-
-/* ContentData
-npc_spitelashes
-npc_loramus_thalipedes
-npc_rizzle_sprysprocket
-npc_depth_charge
-EndContentData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
@@ -134,78 +120,6 @@ public:
}
};
-/*######
-## npc_loramus_thalipedes
-######*/
-
-#define GOSSIP_HELLO_LT1 "Can you help me?"
-#define GOSSIP_HELLO_LT2 "Tell me your story"
-#define GOSSIP_SELECT_LT1 "Please continue"
-#define GOSSIP_SELECT_LT2 "I do not understand"
-#define GOSSIP_SELECT_LT3 "Indeed"
-#define GOSSIP_SELECT_LT4 "I will do this with or your help, Loramus"
-#define GOSSIP_SELECT_LT5 "Yes"
-
-class npc_loramus_thalipedes : public CreatureScript
-{
-public:
- npc_loramus_thalipedes() : CreatureScript("npc_loramus_thalipedes") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF+1:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(2744);
- break;
-
- case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_LT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
- player->SEND_GOSSIP_MENU(1813, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+21:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_LT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
- player->SEND_GOSSIP_MENU(1814, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+22:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_LT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
- player->SEND_GOSSIP_MENU(1815, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+23:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_LT4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
- player->SEND_GOSSIP_MENU(1816, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+24:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_LT5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25);
- player->SEND_GOSSIP_MENU(1817, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+25:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(3141);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestStatus(2744) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_LT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
-
- if (player->GetQuestStatus(3141) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_LT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- return true;
- }
-};
-
/*####
# npc_rizzle_sprysprocket
####*/
@@ -552,7 +466,6 @@ public:
void AddSC_azshara()
{
new npc_spitelashes();
- new npc_loramus_thalipedes();
new npc_rizzle_sprysprocket();
new npc_depth_charge();
}