Jump to content

[Bug][8951] Wrong gossip locales loaded


Guest Qowyn

Recommended Posts

Mangos Version: 8947

SD2 Version: 1513

Database Name and Version : UDB 0.11.6 385

How it SHOULD work: locales for gossips should display option_text_loc in gossip menu and box_text_loc in confirmation box

How it DOES work: locales for gossips display box_text_loc from prev language in gossip menu and option_text_loc in confirmation box

Cause:

Wrong starting offset for fields array in ObjectMgr::LoadGossipMenuItemsLocales()

Solution:

diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 117cd08..d4caed9 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -376,7 +376,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()

        for(int i = 1; i < MAX_LOCALE; ++i)
        {
-            std::string str = fields[1+2*(i-1)].GetCppString();
+            std::string str = fields[2+2*(i-1)].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -388,7 +388,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
                    data.OptionText[idx] = str;
                }
            }
-            str = fields[1+2*(i-1)+1].GetCppString();
+            str = fields[2+2*(i-1)+1].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));

Link to comment
Share on other sites

confirm seems there's problem with locales_gossip_menu_option - on click on gossip display wrong option_text_loc.

sample when click on inkeeper "make this inn my home" (single inkeeper no scriptdev script/scriptname) display "bring me back to life" & works fine when this table empty

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use