mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Creature/script: Add locales to innkeepers gossip options
This commit is contained in:
@@ -42,7 +42,14 @@ enum Spells
|
||||
#define LOCALE_TRICK_OR_TREAT_6 "¡Truco o trato!"
|
||||
|
||||
#define LOCALE_INNKEEPER_0 "Make this inn my home."
|
||||
#define LOCALE_INNKEEPER_2 "Faites de cette auberge votre foyer."
|
||||
#define LOCALE_INNKEEPER_3 "Ich möchte dieses Gasthaus zu meinem Heimatort machen."
|
||||
#define LOCALE_INNKEEPER_6 "Fija tu hogar en esta taberna."
|
||||
|
||||
#define LOCALE_VENDOR_0 "I want to browse your goods."
|
||||
#define LOCALE_VENDOR_2 "Je voudrais regarder vos articles."
|
||||
#define LOCALE_VENDOR_3 "Ich sehe mich nur mal um."
|
||||
#define LOCALE_VENDOR_6 "Quiero ver tus mercancías."
|
||||
|
||||
class npc_innkeeper : public CreatureScript
|
||||
{
|
||||
@@ -72,14 +79,26 @@ public:
|
||||
player->PrepareQuestMenu(me->GetGUID());
|
||||
|
||||
if (me->IsVendor())
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
{
|
||||
char const* localizedEntry;
|
||||
switch (player->GetSession()->GetSessionDbcLocale())
|
||||
{
|
||||
case LOCALE_frFR: localizedEntry = LOCALE_VENDOR_2; break;
|
||||
case LOCALE_deDE: localizedEntry = LOCALE_VENDOR_3; break;
|
||||
case LOCALE_esES: localizedEntry = LOCALE_VENDOR_6; break;
|
||||
case LOCALE_enUS: default: localizedEntry = LOCALE_VENDOR_0;
|
||||
}
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
}
|
||||
|
||||
if (me->IsInnkeeper())
|
||||
{
|
||||
char const* localizedEntry;
|
||||
switch (player->GetSession()->GetSessionDbcLocale())
|
||||
{
|
||||
case LOCALE_frFR: localizedEntry = LOCALE_INNKEEPER_2; break;
|
||||
case LOCALE_deDE: localizedEntry = LOCALE_INNKEEPER_3; break;
|
||||
case LOCALE_esES: localizedEntry = LOCALE_INNKEEPER_6; break;
|
||||
case LOCALE_enUS: default: localizedEntry = LOCALE_INNKEEPER_0;
|
||||
}
|
||||
AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INN);
|
||||
|
||||
Reference in New Issue
Block a user