[9311] Switch to support client 3.2.2 (build 11403)

Merge branch '330'

You need regenerate dbc/map/vmap files. Use updated ad.exe for this.
This commit is contained in:
VladimirMangos 2010-02-05 21:58:17 +03:00
commit 7c20d0a1d8
10 changed files with 35 additions and 30 deletions

2
NEWS
View file

@ -15,7 +15,7 @@ http://mangos.lighthouseapp.com/
Version 0.16 Version 0.16
* Under discussion. * Under discussion.
* Upgrade to client version 3.3.0a (build 11159). * Upgrade to client version 3.3.2 (build 11403).
Version 0.15 Version 0.15

View file

@ -275,16 +275,17 @@ void ReadLiquidTypeTableDBC()
// //
// Map file format data // Map file format data
#define MAP_MAGIC 'SPAM' static char const* MAP_MAGIC = "MAPS";
#define MAP_VERSION_MAGIC '0.1w' static char const* MAP_VERSION_MAGIC = "v1.1";
#define MAP_AREA_MAGIC 'AERA' static char const* MAP_AREA_MAGIC = "AREA";
#define MAP_HEIGHT_MAGIC 'TGHM' static char const* MAP_HEIGHT_MAGIC = "MHGT";
#define MAP_LIQUID_MAGIC 'QILM' static char const* MAP_LIQUID_MAGIC = "MLIQ";
struct map_fileheader struct map_fileheader
{ {
uint32 mapMagic; uint32 mapMagic;
uint32 versionMagic; uint32 versionMagic;
uint32 buildMagic;
uint32 areaMapOffset; uint32 areaMapOffset;
uint32 areaMapSize; uint32 areaMapSize;
uint32 heightMapOffset; uint32 heightMapOffset;
@ -362,7 +363,7 @@ uint8 liquid_type[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE]; bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE];
float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1]; float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1];
bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x) bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x, uint32 build)
{ {
ADT_file adt; ADT_file adt;
@ -381,8 +382,9 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
// Prepare map header // Prepare map header
map_fileheader map; map_fileheader map;
map.mapMagic = MAP_MAGIC; map.mapMagic = *(uint32 const*)MAP_MAGIC;
map.versionMagic = MAP_VERSION_MAGIC; map.versionMagic = *(uint32 const*)MAP_VERSION_MAGIC;
map.buildMagic = build;
// Get area flags data // Get area flags data
for (int i=0;i<ADT_CELLS_PER_GRID;i++) for (int i=0;i<ADT_CELLS_PER_GRID;i++)
@ -424,7 +426,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
map.areaMapSize = sizeof(map_areaHeader); map.areaMapSize = sizeof(map_areaHeader);
map_areaHeader areaHeader; map_areaHeader areaHeader;
areaHeader.fourcc = MAP_AREA_MAGIC; areaHeader.fourcc = *(uint32 const*)MAP_AREA_MAGIC;
areaHeader.flags = 0; areaHeader.flags = 0;
if (fullAreaData) if (fullAreaData)
{ {
@ -553,7 +555,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
map.heightMapSize = sizeof(map_heightHeader); map.heightMapSize = sizeof(map_heightHeader);
map_heightHeader heightHeader; map_heightHeader heightHeader;
heightHeader.fourcc = MAP_HEIGHT_MAGIC; heightHeader.fourcc = *(uint32 const*)MAP_HEIGHT_MAGIC;
heightHeader.flags = 0; heightHeader.flags = 0;
heightHeader.gridHeight = minHeight; heightHeader.gridHeight = minHeight;
heightHeader.gridMaxHeight = maxHeight; heightHeader.gridMaxHeight = maxHeight;
@ -788,7 +790,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
} }
map.liquidMapOffset = map.heightMapOffset + map.heightMapSize; map.liquidMapOffset = map.heightMapOffset + map.heightMapSize;
map.liquidMapSize = sizeof(map_liquidHeader); map.liquidMapSize = sizeof(map_liquidHeader);
liquidHeader.fourcc = MAP_LIQUID_MAGIC; liquidHeader.fourcc = *(uint32 const*)MAP_LIQUID_MAGIC;
liquidHeader.flags = 0; liquidHeader.flags = 0;
liquidHeader.liquidType = 0; liquidHeader.liquidType = 0;
liquidHeader.offsetX = minX; liquidHeader.offsetX = minX;
@ -867,7 +869,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
return true; return true;
} }
void ExtractMapsFromMpq() void ExtractMapsFromMpq(uint32 build)
{ {
char mpq_filename[1024]; char mpq_filename[1024];
char output_filename[1024]; char output_filename[1024];
@ -905,7 +907,7 @@ void ExtractMapsFromMpq()
continue; continue;
sprintf(mpq_filename, "World\\Maps\\%s\\%s_%u_%u.adt", map_ids[z].name, map_ids[z].name, x, y); sprintf(mpq_filename, "World\\Maps\\%s\\%s_%u_%u.adt", map_ids[z].name, map_ids[z].name, x, y);
sprintf(output_filename, "%s/maps/%03u%02u%02u.map", output_path, map_ids[z].id, y, x); sprintf(output_filename, "%s/maps/%03u%02u%02u.map", output_path, map_ids[z].id, y, x);
ConvertADT(mpq_filename, output_filename, y, x); ConvertADT(mpq_filename, output_filename, y, x, build);
} }
// draw progress bar // draw progress bar
printf("Processing........................%d%%\r", (100 * (y+1)) / WDT_MAP_SIZE); printf("Processing........................%d%%\r", (100 * (y+1)) / WDT_MAP_SIZE);
@ -1075,7 +1077,7 @@ int main(int argc, char * arg[])
LoadCommonMPQFiles(); LoadCommonMPQFiles();
// Extract maps // Extract maps
ExtractMapsFromMpq(); ExtractMapsFromMpq(build);
// Close MPQs // Close MPQs
CloseMPQFiles(); CloseMPQFiles();

Binary file not shown.

View file

@ -617,13 +617,13 @@ void LoadDBCStores(const std::string& dataPath)
} }
// Check loaded DBC files proper version // Check loaded DBC files proper version
if( !sSpellStore.LookupEntry(73190) || // last added spell in 3.3.0a if( !sSpellStore.LookupEntry(74445) || // last added spell in 3.3.2
!sMapStore.LookupEntry(718) || // last map added in 3.3.0a !sMapStore.LookupEntry(718) || // last map added in 3.3.2
!sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.3.0a !sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.3.2
!sItemExtendedCostStore.LookupEntry(2935) || // last item extended cost added in 3.3.0a !sItemExtendedCostStore.LookupEntry(2982) || // last item extended cost added in 3.3.2
!sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.0a !sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.2
!sAreaStore.LookupEntry(3460) || // last area (areaflag) added in 3.3.0a !sAreaStore.LookupEntry(3461) || // last area (areaflag) added in 3.3.2
!sItemStore.LookupEntry(52062) ) // last client known item added in 3.3.0a !sItemStore.LookupEntry(52686) ) // last client known item added in 3.3.2
{ {
sLog.outError("\nYou have mixed version DBC files. Please re-extract DBC files for one from client build: %s",AcceptableClientBuildsListStr().c_str()); sLog.outError("\nYou have mixed version DBC files. Please re-extract DBC files for one from client build: %s",AcceptableClientBuildsListStr().c_str());
exit(1); exit(1);

View file

@ -45,7 +45,7 @@
GridState* si_GridStates[MAX_GRID_STATE]; GridState* si_GridStates[MAX_GRID_STATE];
static char const* MAP_MAGIC = "MAPS"; static char const* MAP_MAGIC = "MAPS";
static char const* MAP_VERSION_MAGIC = "w1.0"; static char const* MAP_VERSION_MAGIC = "v1.1";
static char const* MAP_AREA_MAGIC = "AREA"; static char const* MAP_AREA_MAGIC = "AREA";
static char const* MAP_HEIGHT_MAGIC = "MHGT"; static char const* MAP_HEIGHT_MAGIC = "MHGT";
static char const* MAP_LIQUID_MAGIC = "MLIQ"; static char const* MAP_LIQUID_MAGIC = "MLIQ";
@ -85,7 +85,8 @@ bool Map::ExistMap(uint32 mapid,int gx,int gy)
map_fileheader header; map_fileheader header;
fread(&header, sizeof(header), 1, pf); fread(&header, sizeof(header), 1, pf);
if (header.mapMagic != *((uint32 const*)(MAP_MAGIC)) || if (header.mapMagic != *((uint32 const*)(MAP_MAGIC)) ||
header.versionMagic != *((uint32 const*)(MAP_VERSION_MAGIC))) header.versionMagic != *((uint32 const*)(MAP_VERSION_MAGIC)) ||
!IsAcceptableClientBuild(header.buildMagic))
{ {
sLog.outError("Map file '%s' is non-compatible version (outdated?). Please, create new using ad.exe program.",tmp); sLog.outError("Map file '%s' is non-compatible version (outdated?). Please, create new using ad.exe program.",tmp);
delete [] tmp; delete [] tmp;
@ -1193,7 +1194,8 @@ bool GridMap::loadData(char *filename)
return true; return true;
fread(&header, sizeof(header),1,in); fread(&header, sizeof(header),1,in);
if (header.mapMagic == *((uint32 const*)(MAP_MAGIC)) && if (header.mapMagic == *((uint32 const*)(MAP_MAGIC)) &&
header.versionMagic == *((uint32 const*)(MAP_VERSION_MAGIC))) header.versionMagic == *((uint32 const*)(MAP_VERSION_MAGIC)) ||
!IsAcceptableClientBuild(header.buildMagic))
{ {
// loadup area data // loadup area data
if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize)) if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize))

View file

@ -54,6 +54,7 @@ struct map_fileheader
{ {
uint32 mapMagic; uint32 mapMagic;
uint32 versionMagic; uint32 versionMagic;
uint32 buildMagic;
uint32 areaMapOffset; uint32 areaMapOffset;
uint32 areaMapSize; uint32 areaMapSize;
uint32 heightMapOffset; uint32 heightMapOffset;

View file

@ -367,7 +367,7 @@ enum Opcodes
SMSG_ATTACKERSTATEUPDATE = 0x14A, SMSG_ATTACKERSTATEUPDATE = 0x14A,
SMSG_BATTLEFIELD_PORT_DENIED = 0x14B, SMSG_BATTLEFIELD_PORT_DENIED = 0x14B,
SMSG_DAMAGE_DONE_OBSOLETE = 0x14C, SMSG_DAMAGE_DONE_OBSOLETE = 0x14C,
SMSG_DAMAGE_TAKEN_OBSOLETE = 0x14D, SMSG_UNIT_SPELLCAST_START = 0x14D,
SMSG_CANCEL_COMBAT = 0x14E, SMSG_CANCEL_COMBAT = 0x14E,
SMSG_SPELLBREAKLOG = 0x14F, SMSG_SPELLBREAKLOG = 0x14F,
SMSG_SPELLHEALLOG = 0x150, SMSG_SPELLHEALLOG = 0x150,

View file

@ -2647,9 +2647,9 @@ enum PetTameFailureReason
// we need to stick to 1 version or half of the stuff will work for someone // we need to stick to 1 version or half of the stuff will work for someone
// others will not and opposite // others will not and opposite
// will only support WoW, WoW:TBC and WoW:WotLK 3.3.0a client build 11159... // will only support WoW, WoW:TBC and WoW:WotLK 3.3.2 client build 11403...
#define EXPECTED_MANGOSD_CLIENT_BUILD {11159, 0} #define EXPECTED_MANGOSD_CLIENT_BUILD {11403, 0}
// max supported expansion level in mangosd // max supported expansion level in mangosd
// NOTE: not set it more that supported by targeted client version with all expansions installed // NOTE: not set it more that supported by targeted client version with all expansions installed

View file

@ -19,7 +19,7 @@
#ifndef _UPDATEFIELDS_AUTO_H #ifndef _UPDATEFIELDS_AUTO_H
#define _UPDATEFIELDS_AUTO_H #define _UPDATEFIELDS_AUTO_H
// Auto generated for version 3, 3, 0, 11159 // Auto generated for version 3, 3, 2, 11403
enum EObjectFields enum EObjectFields
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9310" #define REVISION_NR "9311"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__