Skip to content

Commit

Permalink
Fix #3480 Replace hardcoded gossip strings with database entries for …
Browse files Browse the repository at this point in the history
…localization
  • Loading branch information
Scarabol authored and killerwife committed Jan 10, 2024
1 parent 0b4f22c commit 8e524e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
6 changes: 5 additions & 1 deletion sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4642,7 +4642,11 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES
(-3000109,'I am ready, Oronok. Let us destroy Cyrukh and free the elements!','oronok torn-heart GOSSIP_ITEM_FIGHT'),
(-3000110,'Why... yes, of course. I''ve something to show you right inside this building, Mr. Anvilward.','prospector anvilward GOSSIP_ITEM_SHOW'),
(-3000111,'I am ready, Anchorite. Let us begin the exorcism.','anchorite barada GOSSIP_ITEM_EXORCISM'),
(-3000112,'Turn the key to start the machine.','threshwackonator GOSSIP_ITEM_TURN_KEY');
(-3000112,'Turn the key to start the machine.','threshwackonator GOSSIP_ITEM_TURN_KEY'),
(-3000120,'Pardon the intrusion, Lady Prestor, but Highlord Bolvar suggested that I seek your advice.','npc_lady_katrana_prestor GOSSIP_ITEM_KAT_1'),
(-3000121,'My apologies, Lady Prestor.','npc_lady_katrana_prestor GOSSIP_ITEM_KAT_2'),
(-3000122,'Begging your pardon','npc_lady_katrana_prestor GOSSIP_ITEM_KAT_3'),
(-3000122,'Thank you for your time','npc_lady_katrana_prestor GOSSIP_ITEM_KAT_4');

-- -3 033 000 SHADOWFANG KEEP
INSERT INTO gossip_texts (entry,content_default,comment) VALUES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,21 @@ bool QuestAccept_npc_dashel_stonefist(Player* player, Creature* creature, const
## npc_lady_katrana_prestor
######*/

#define GOSSIP_ITEM_KAT_1 "Pardon the intrusion, Lady Prestor, but Highlord Bolvar suggested that I seek your advice."
#define GOSSIP_ITEM_KAT_2 "My apologies, Lady Prestor."
#define GOSSIP_ITEM_KAT_3 "Begging your pardon, Lady Prestor. That was not my intent."
#define GOSSIP_ITEM_KAT_4 "Thank you for your time, Lady Prestor."
enum
{
GOSSIP_ITEM_KAT_1 = -3000120,
GOSSIP_ITEM_KAT_2 = -3000121,
GOSSIP_ITEM_KAT_3 = -3000122,
GOSSIP_ITEM_KAT_4 = -3000123,
};

bool GossipHello_npc_lady_katrana_prestor(Player* player, Creature* creature)
{
if (creature->isQuestGiver())
player->PrepareQuestMenu(creature->GetObjectGuid());

if (player->GetQuestStatus(4185) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);

player->SEND_GOSSIP_MENU(2693, creature->GetObjectGuid());

Expand All @@ -219,15 +222,15 @@ bool GossipSelect_npc_lady_katrana_prestor(Player* player, Creature* creature, u
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(2694, creature->GetObjectGuid());
break;
case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(2695, creature->GetObjectGuid());
break;
case GOSSIP_ACTION_INFO_DEF+2:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(2696, creature->GetObjectGuid());
break;
case GOSSIP_ACTION_INFO_DEF+3:
Expand Down

0 comments on commit 8e524e3

Please sign in to comment.