diff options
author | tkrokli <tkrokli@hotmail.com> | 2016-01-12 07:27:27 +0100 |
---|---|---|
committer | tkrokli <tkrokli@hotmail.com> | 2016-01-12 09:50:04 +0100 |
commit | 95a2eec9232afdb1614e648dc4d587e307515d34 (patch) | |
tree | 1d9a6848663d844d1d41cf4f4d1472a090e73281 | |
parent | 8ef9ea9157ca6c04194888a2118be7daf303856f (diff) |
Core/Scripts: move npc_shadowfang_prisoner gossip option to DB
Getting rid of one more incorrect and hardcoded text
which now will be read correct and from the DB instead.
Wrong text: "Thanks, I'll follow you to the door." (core)
Correct text: "Please unlock the courtyard door." (DB)
Thanks to @Aokromes, @r00ty, @velinath, @Nayd, @Treeston, @Zedron
and lots of other regular TrinityCore developers and members for the
inspiration and motivation, as well as helpfulness along the way.
-rw-r--r-- | sql/updates/world/2016_01_12_12_world335.sql | 5 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sql/updates/world/2016_01_12_12_world335.sql b/sql/updates/world/2016_01_12_12_world335.sql new file mode 100644 index 00000000000..c3206e70ac4 --- /dev/null +++ b/sql/updates/world/2016_01_12_12_world335.sql @@ -0,0 +1,5 @@ +-- Insert missing gossip_menu_option 21213 for Sorcerer Ashcrombe and 21214 for Deathstalker Adamant: +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (21213,21214) AND `OptionBroadcastTextID`= 2802; +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 +(21213,0,0,'Please unlock the courtyard door.',2802,1,1,0,0,0,0,'',0), +(21214,0,0,'Please unlock the courtyard door.',2802,1,1,0,0,0,0,'',0); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 47a6c0b6a21..94cf2825e60 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -63,8 +63,6 @@ enum Creatures NPC_ASH = 3850 }; -#define GOSSIP_ITEM_DOOR "Thanks, I'll follow you to the door." - class npc_shadowfang_prisoner : public CreatureScript { public: @@ -93,7 +91,7 @@ public: InstanceScript* instance = creature->GetInstanceScript(); if (instance && instance->GetData(TYPE_FREE_NPC) != DONE && instance->GetData(TYPE_RETHILGORE) == DONE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->ADD_GOSSIP_ITEM_DB(Player::GetDefaultGossipMenuForSource(creature), 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); |