mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[12771] Fixed possible path mismatch on UNIX system in vmap extractor
also initialized work for clang compiler
This commit is contained in:
parent
5b69c5ba98
commit
6dbe82b20a
4 changed files with 12 additions and 15 deletions
|
|
@ -113,7 +113,7 @@ bool LoadLocaleMPQFile(int locale)
|
|||
{
|
||||
TCHAR buff[512];
|
||||
memset(buff, 0, sizeof(buff));
|
||||
_stprintf(buff, _T("%s%s/locale-%s.MPQ"), input_path, LocalesT[locale], LocalesT[locale]);
|
||||
_stprintf(buff, _T("%s/Data/%s/locale-%s.MPQ"), input_path, LocalesT[locale], LocalesT[locale]);
|
||||
if (!SFileOpenArchive(buff, 0, MPQ_OPEN_READ_ONLY, &LocaleMpq))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
|
|
@ -128,12 +128,12 @@ bool LoadLocaleMPQFile(int locale)
|
|||
if (Builds[i] > LAST_DBC_IN_DATA_BUILD)
|
||||
{
|
||||
prefix = "";
|
||||
_stprintf(buff, _T("%s%s/wow-update-%s-%u.MPQ"), input_path, LocalesT[locale], LocalesT[locale], Builds[i]);
|
||||
_stprintf(buff, _T("%s/Data/%s/wow-update-%s-%u.MPQ"), input_path, LocalesT[locale], LocalesT[locale], Builds[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix = Locales[locale];
|
||||
_stprintf(buff, _T("%swow-update-%u.MPQ"), input_path, Builds[i]);
|
||||
_stprintf(buff, _T("%s/Data/wow-update-%u.MPQ"), input_path, Builds[i]);
|
||||
}
|
||||
|
||||
if (!SFileOpenPatchArchive(LocaleMpq, buff, prefix, 0))
|
||||
|
|
@ -150,7 +150,7 @@ bool LoadLocaleMPQFile(int locale)
|
|||
void LoadCommonMPQFiles(uint32 build)
|
||||
{
|
||||
TCHAR filename[512];
|
||||
_stprintf(filename, _T("%sworld.MPQ"), input_path);
|
||||
_stprintf(filename, _T("%s/Data/world.MPQ"), input_path);
|
||||
if (!SFileOpenArchive(filename, 0, MPQ_OPEN_READ_ONLY, &WorldMpq))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
|
|
@ -164,7 +164,7 @@ void LoadCommonMPQFiles(uint32 build)
|
|||
if (build < 15211 && !strcmp("world2.MPQ", CONF_mpq_list[i])) // 4.3.2 and higher MPQ
|
||||
continue;
|
||||
|
||||
_stprintf(filename, _T("%s%s"), input_path, CONF_mpq_list[i]);
|
||||
_stprintf(filename, _T("%s/Data/%s"), input_path, CONF_mpq_list[i]);
|
||||
if (!SFileOpenPatchArchive(WorldMpq, filename, "", 0))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
|
|
@ -205,12 +205,12 @@ void LoadCommonMPQFiles(uint32 build)
|
|||
if (Builds[i] > LAST_DBC_IN_DATA_BUILD)
|
||||
{
|
||||
prefix = "";
|
||||
_stprintf(filename, _T("%swow-update-base-%u.MPQ"), input_path, Builds[i]);
|
||||
_stprintf(filename, _T("%s/Data/wow-update-base-%u.MPQ"), input_path, Builds[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix = "base";
|
||||
_stprintf(filename, _T("%swow-update-%u.MPQ"), input_path, Builds[i]);
|
||||
_stprintf(filename, _T("%s/Data/wow-update-%u.MPQ"), input_path, Builds[i]);
|
||||
}
|
||||
|
||||
if (!SFileOpenPatchArchive(WorldMpq, filename, prefix, 0))
|
||||
|
|
@ -247,7 +247,6 @@ void LoadCommonMPQFiles(uint32 build)
|
|||
printf("Scanned %d files, found patch = %d\n", count, found);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -277,7 +276,7 @@ void ReadLiquidTypeTableDBC()
|
|||
{
|
||||
printf("Read LiquidType.dbc file...");
|
||||
|
||||
DBCFile dbc(LocaleMpq, "DBFilesClient\\LiquidType.dbc");
|
||||
DBCFile dbc(LocaleMpq, "DBFilesClient/LiquidType.dbc");
|
||||
if (!dbc.open())
|
||||
{
|
||||
printf("Fatal error: Invalid LiquidType.dbc file format!\n");
|
||||
|
|
@ -411,7 +410,7 @@ void ParsMapFiles()
|
|||
for (unsigned int i = 0; i < map_count; ++i)
|
||||
{
|
||||
sprintf(id, "%03u", map_ids[i].id);
|
||||
sprintf(fn, "World\\Maps\\%s\\%s.wdt", map_ids[i].name, map_ids[i].name);
|
||||
sprintf(fn, "World/Maps/%s/%s.wdt", map_ids[i].name, map_ids[i].name);
|
||||
WDTFile WDT(fn, map_ids[i].name);
|
||||
if (WDT.init(id, map_ids[i].id))
|
||||
{
|
||||
|
|
@ -539,9 +538,6 @@ bool processArgv(int argc, char** argv)
|
|||
printf(" -? : This message.\n");
|
||||
}
|
||||
|
||||
if (!hasInputPathParam)
|
||||
getGamePath();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c0b82a9b0637a9f510c0164df3c6173420ef73b9
|
||||
Subproject commit d6f85bdd312ca4704c7ad45dd35ebecfef54c313
|
||||
|
|
@ -42,6 +42,7 @@
|
|||
#define COMPILER_GNU 1
|
||||
#define COMPILER_BORLAND 2
|
||||
#define COMPILER_INTEL 3
|
||||
#define COMPILER_CLANG 4
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define COMPILER COMPILER_MICROSOFT
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12770"
|
||||
#define REVISION_NR "12771"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue