Jump to content

[9305] Locales_quest loading


Recommended Posts

Posted

This patch has been created for Mangos rev. 9302.

NoFantasy's commit http://github.com/mangos/mangos/commit/2524c60fb8d2c8a96ab0299116d89021b1c5d4eb didn't fix this issue. The problem is that now we have 11 fields instead of 10.

diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 258308c..9049ce8 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -3973,7 +3973,7 @@ void ObjectMgr::LoadQuestLocales()

        for(int i = 1; i < MAX_LOCALE; ++i)
        {
-            std::string str = fields[1+10*(i-1)].GetCppString();
+            std::string str = fields[1+11*(i-1)].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -3985,7 +3985,7 @@ void ObjectMgr::LoadQuestLocales()
                    data.Title[idx] = str;
                }
            }
-            str = fields[1+10*(i-1)+1].GetCppString();
+            str = fields[1+11*(i-1)+1].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -3997,7 +3997,7 @@ void ObjectMgr::LoadQuestLocales()
                    data.Details[idx] = str;
                }
            }
-            str = fields[1+10*(i-1)+2].GetCppString();
+            str = fields[1+11*(i-1)+2].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4009,7 +4009,7 @@ void ObjectMgr::LoadQuestLocales()
                    data.Objectives[idx] = str;
                }
            }
-            str = fields[1+10*(i-1)+3].GetCppString();
+            str = fields[1+11*(i-1)+3].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4021,7 +4021,7 @@ void ObjectMgr::LoadQuestLocales()
                    data.OfferRewardText[idx] = str;
                }
            }
-            str = fields[1+10*(i-1)+4].GetCppString();
+            str = fields[1+11*(i-1)+4].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4033,7 +4033,7 @@ void ObjectMgr::LoadQuestLocales()
                    data.RequestItemsText[idx] = str;
                }
            }
-            str = fields[1+10*(i-1)+5].GetCppString();
+            str = fields[1+11*(i-1)+5].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4045,7 +4045,7 @@ void ObjectMgr::LoadQuestLocales()
                    data.EndText[idx] = str;
                }
            }
-            str = fields[1+10*(i-1)+6].GetCppString();
+            str = fields[1+11*(i-1)+6].GetCppString();
            if(!str.empty())
            {
                int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4059,7 +4059,7 @@ void ObjectMgr::LoadQuestLocales()
            }
            for(int k = 0; k < 4; ++k)
            {
-                str = fields[1+10*(i-1)+7+k].GetCppString();
+                str = fields[1+11*(i-1)+7+k].GetCppString();
                if(!str.empty())
                {
                    int idx = GetOrNewIndexForLocale(LocaleConstant(i));

×
×
  • 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