diff options
| -rw-r--r-- | src/tools/map_extractor/System.cpp | 13 | ||||
| -rw-r--r-- | src/tools/vmap4_extractor/vmapexport.cpp | 11 | 
2 files changed, 23 insertions, 1 deletions
| diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index 63132d269b2..c5241cad933 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -90,6 +90,7 @@ char const* CONF_mpq_list[]=  uint32 const Builds[] = {13164, 13205, 13287, 13329, 13596, 13623, 13914, 14007, 14333, 14480, 14545, 15005, 15050, 15211, 15354, 15595, 0};  #define LAST_DBC_IN_DATA_BUILD 13623    // after this build mpqs with dbc are back to locale folder +#define NEW_BASE_SET_BUILD  15211  char* const Locales[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU"};  TCHAR* const LocalesT[] = @@ -1114,6 +1115,11 @@ bool LoadLocaleMPQFile(int locale)      char const* prefix = NULL;      for (int i = 0; Builds[i] && Builds[i] <= CONF_TargetBuild; ++i)      { +        // Do not attempt to read older MPQ patch archives past this build, they were merged with base +        // and trying to read them together with new base will not end well +        if (CONF_TargetBuild >= NEW_BASE_SET_BUILD && Builds[i] < NEW_BASE_SET_BUILD) +            continue; +          memset(buff, 0, sizeof(buff));          if (Builds[i] > LAST_DBC_IN_DATA_BUILD)          { @@ -1151,7 +1157,7 @@ void LoadCommonMPQFiles(uint32 build)      int count = sizeof(CONF_mpq_list) / sizeof(char*);      for (int i = 1; i < count; ++i)      { -        if (build < 15211 && !strcmp("world2.MPQ", CONF_mpq_list[i]))   // 4.3.2 and higher MPQ +        if (build < NEW_BASE_SET_BUILD && !strcmp("world2.MPQ", CONF_mpq_list[i]))   // 4.3.2 and higher MPQ              continue;          _stprintf(filename, _T("%s/Data/%s"), input_path, CONF_mpq_list[i]); @@ -1170,6 +1176,11 @@ void LoadCommonMPQFiles(uint32 build)      char const* prefix = NULL;      for (int i = 0; Builds[i] && Builds[i] <= CONF_TargetBuild; ++i)      { +        // Do not attempt to read older MPQ patch archives past this build, they were merged with base +        // and trying to read them together with new base will not end well +        if (CONF_TargetBuild >= NEW_BASE_SET_BUILD && Builds[i] < NEW_BASE_SET_BUILD) +            continue; +          memset(filename, 0, sizeof(filename));          if (Builds[i] > LAST_DBC_IN_DATA_BUILD)          { diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp index eebc763f2f2..050ec790dbb 100644 --- a/src/tools/vmap4_extractor/vmapexport.cpp +++ b/src/tools/vmap4_extractor/vmapexport.cpp @@ -75,6 +75,7 @@ char const* CONF_mpq_list[]=  uint32 const Builds[] = {13164, 13205, 13287, 13329, 13596, 13623, 13914, 14007, 14333, 14480, 14545, 15005, 15050, 15211, 15354, 15595, 0};  #define LAST_DBC_IN_DATA_BUILD 13623    // after this build mpqs with dbc are back to locale folder +#define NEW_BASE_SET_BUILD  15211  char* const Locales[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU"};  TCHAR* const LocalesT[] = @@ -123,6 +124,11 @@ bool LoadLocaleMPQFile(int locale)      char const* prefix = NULL;      for (int i = 0; Builds[i] && Builds[i] <= CONF_TargetBuild; ++i)      { +        // Do not attempt to read older MPQ patch archives past this build, they were merged with base +        // and trying to read them together with new base will not end well +        if (CONF_TargetBuild >= NEW_BASE_SET_BUILD && Builds[i] < NEW_BASE_SET_BUILD) +            continue; +          memset(buff, 0, sizeof(buff));          if (Builds[i] > LAST_DBC_IN_DATA_BUILD)          { @@ -200,6 +206,11 @@ void LoadCommonMPQFiles(uint32 build)      char const* prefix = NULL;      for (int i = 0; Builds[i] && Builds[i] <= CONF_TargetBuild; ++i)      { +        // Do not attempt to read older MPQ patch archives past this build, they were merged with base +        // and trying to read them together with new base will not end well +        if (CONF_TargetBuild >= NEW_BASE_SET_BUILD && Builds[i] < NEW_BASE_SET_BUILD) +            continue; +          memset(filename, 0, sizeof(filename));          if (Builds[i] > LAST_DBC_IN_DATA_BUILD)          { | 
