mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Add extractors and assembler - EXTRACTION OF NEW MAPS IS REQUIRED!
This will allow for easier testing of functionality between different projects, ie. one set of maps/vmaps instead of 2 (saves space, saves time and saves us some confusion). --HG-- branch : trunk
This commit is contained in:
@@ -94,10 +94,9 @@ bool Map::ExistMap(uint32 mapid,int gx,int gy)
|
||||
|
||||
map_fileheader header;
|
||||
fread(&header, sizeof(header), 1, pf);
|
||||
if (header.mapMagic != uint32(MAP_MAGIC) ||
|
||||
header.versionMagic != uint32(MAP_VERSION_MAGIC))
|
||||
if (header.mapMagic != uint32(MAP_MAGIC) || header.versionMagic != uint32(MAP_VERSION_MAGIC))
|
||||
{
|
||||
sLog.outError("Map file '%s' is non-compatible version (outdated?). Please, create new using ad.exe program.",tmp);
|
||||
sLog.outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.",tmp);
|
||||
delete [] tmp;
|
||||
fclose(pf); //close file before return
|
||||
return false;
|
||||
@@ -1209,8 +1208,7 @@ bool GridMap::loadData(char *filename)
|
||||
if (!in)
|
||||
return true;
|
||||
fread(&header, sizeof(header),1,in);
|
||||
if (header.mapMagic == uint32(MAP_MAGIC) &&
|
||||
header.versionMagic == uint32(MAP_VERSION_MAGIC))
|
||||
if (header.mapMagic == uint32(MAP_MAGIC) && header.versionMagic == uint32(MAP_VERSION_MAGIC))
|
||||
{
|
||||
// loadup area data
|
||||
if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize))
|
||||
@@ -1236,7 +1234,7 @@ bool GridMap::loadData(char *filename)
|
||||
fclose(in);
|
||||
return true;
|
||||
}
|
||||
sLog.outError("Map file '%s' is a non-compatible version (outdated?). Please, create new using the ad.exe program.", filename);
|
||||
sLog.outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename);
|
||||
fclose(in);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user