mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[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:
commit
7c20d0a1d8
10 changed files with 35 additions and 30 deletions
2
NEWS
2
NEWS
|
|
@ -15,7 +15,7 @@ http://mangos.lighthouseapp.com/
|
|||
|
||||
Version 0.16
|
||||
* Under discussion.
|
||||
* Upgrade to client version 3.3.0a (build 11159).
|
||||
* Upgrade to client version 3.3.2 (build 11403).
|
||||
|
||||
Version 0.15
|
||||
|
||||
|
|
|
|||
|
|
@ -275,16 +275,17 @@ void ReadLiquidTypeTableDBC()
|
|||
//
|
||||
|
||||
// Map file format data
|
||||
#define MAP_MAGIC 'SPAM'
|
||||
#define MAP_VERSION_MAGIC '0.1w'
|
||||
#define MAP_AREA_MAGIC 'AERA'
|
||||
#define MAP_HEIGHT_MAGIC 'TGHM'
|
||||
#define MAP_LIQUID_MAGIC 'QILM'
|
||||
static char const* MAP_MAGIC = "MAPS";
|
||||
static char const* MAP_VERSION_MAGIC = "v1.1";
|
||||
static char const* MAP_AREA_MAGIC = "AREA";
|
||||
static char const* MAP_HEIGHT_MAGIC = "MHGT";
|
||||
static char const* MAP_LIQUID_MAGIC = "MLIQ";
|
||||
|
||||
struct map_fileheader
|
||||
{
|
||||
uint32 mapMagic;
|
||||
uint32 versionMagic;
|
||||
uint32 buildMagic;
|
||||
uint32 areaMapOffset;
|
||||
uint32 areaMapSize;
|
||||
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];
|
||||
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;
|
||||
|
||||
|
|
@ -381,8 +382,9 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
|
|||
|
||||
// Prepare map header
|
||||
map_fileheader map;
|
||||
map.mapMagic = MAP_MAGIC;
|
||||
map.versionMagic = MAP_VERSION_MAGIC;
|
||||
map.mapMagic = *(uint32 const*)MAP_MAGIC;
|
||||
map.versionMagic = *(uint32 const*)MAP_VERSION_MAGIC;
|
||||
map.buildMagic = build;
|
||||
|
||||
// Get area flags data
|
||||
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_areaHeader areaHeader;
|
||||
areaHeader.fourcc = MAP_AREA_MAGIC;
|
||||
areaHeader.fourcc = *(uint32 const*)MAP_AREA_MAGIC;
|
||||
areaHeader.flags = 0;
|
||||
if (fullAreaData)
|
||||
{
|
||||
|
|
@ -553,7 +555,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
|
|||
map.heightMapSize = sizeof(map_heightHeader);
|
||||
|
||||
map_heightHeader heightHeader;
|
||||
heightHeader.fourcc = MAP_HEIGHT_MAGIC;
|
||||
heightHeader.fourcc = *(uint32 const*)MAP_HEIGHT_MAGIC;
|
||||
heightHeader.flags = 0;
|
||||
heightHeader.gridHeight = minHeight;
|
||||
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.liquidMapSize = sizeof(map_liquidHeader);
|
||||
liquidHeader.fourcc = MAP_LIQUID_MAGIC;
|
||||
liquidHeader.fourcc = *(uint32 const*)MAP_LIQUID_MAGIC;
|
||||
liquidHeader.flags = 0;
|
||||
liquidHeader.liquidType = 0;
|
||||
liquidHeader.offsetX = minX;
|
||||
|
|
@ -867,7 +869,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
|
|||
return true;
|
||||
}
|
||||
|
||||
void ExtractMapsFromMpq()
|
||||
void ExtractMapsFromMpq(uint32 build)
|
||||
{
|
||||
char mpq_filename[1024];
|
||||
char output_filename[1024];
|
||||
|
|
@ -905,7 +907,7 @@ void ExtractMapsFromMpq()
|
|||
continue;
|
||||
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);
|
||||
ConvertADT(mpq_filename, output_filename, y, x);
|
||||
ConvertADT(mpq_filename, output_filename, y, x, build);
|
||||
}
|
||||
// draw progress bar
|
||||
printf("Processing........................%d%%\r", (100 * (y+1)) / WDT_MAP_SIZE);
|
||||
|
|
@ -1075,7 +1077,7 @@ int main(int argc, char * arg[])
|
|||
LoadCommonMPQFiles();
|
||||
|
||||
// Extract maps
|
||||
ExtractMapsFromMpq();
|
||||
ExtractMapsFromMpq(build);
|
||||
|
||||
// Close MPQs
|
||||
CloseMPQFiles();
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -617,13 +617,13 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
}
|
||||
|
||||
// Check loaded DBC files proper version
|
||||
if( !sSpellStore.LookupEntry(73190) || // last added spell in 3.3.0a
|
||||
!sMapStore.LookupEntry(718) || // last map added in 3.3.0a
|
||||
!sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.3.0a
|
||||
!sItemExtendedCostStore.LookupEntry(2935) || // last item extended cost added in 3.3.0a
|
||||
!sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.0a
|
||||
!sAreaStore.LookupEntry(3460) || // last area (areaflag) added in 3.3.0a
|
||||
!sItemStore.LookupEntry(52062) ) // last client known item added in 3.3.0a
|
||||
if( !sSpellStore.LookupEntry(74445) || // last added spell in 3.3.2
|
||||
!sMapStore.LookupEntry(718) || // last map added in 3.3.2
|
||||
!sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.3.2
|
||||
!sItemExtendedCostStore.LookupEntry(2982) || // last item extended cost added in 3.3.2
|
||||
!sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.2
|
||||
!sAreaStore.LookupEntry(3461) || // last area (areaflag) added in 3.3.2
|
||||
!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());
|
||||
exit(1);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
GridState* si_GridStates[MAX_GRID_STATE];
|
||||
|
||||
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_HEIGHT_MAGIC = "MHGT";
|
||||
static char const* MAP_LIQUID_MAGIC = "MLIQ";
|
||||
|
|
@ -85,7 +85,8 @@ bool Map::ExistMap(uint32 mapid,int gx,int gy)
|
|||
map_fileheader header;
|
||||
fread(&header, sizeof(header), 1, pf);
|
||||
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);
|
||||
delete [] tmp;
|
||||
|
|
@ -1193,7 +1194,8 @@ bool GridMap::loadData(char *filename)
|
|||
return true;
|
||||
fread(&header, sizeof(header),1,in);
|
||||
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
|
||||
if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize))
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ struct map_fileheader
|
|||
{
|
||||
uint32 mapMagic;
|
||||
uint32 versionMagic;
|
||||
uint32 buildMagic;
|
||||
uint32 areaMapOffset;
|
||||
uint32 areaMapSize;
|
||||
uint32 heightMapOffset;
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ enum Opcodes
|
|||
SMSG_ATTACKERSTATEUPDATE = 0x14A,
|
||||
SMSG_BATTLEFIELD_PORT_DENIED = 0x14B,
|
||||
SMSG_DAMAGE_DONE_OBSOLETE = 0x14C,
|
||||
SMSG_DAMAGE_TAKEN_OBSOLETE = 0x14D,
|
||||
SMSG_UNIT_SPELLCAST_START = 0x14D,
|
||||
SMSG_CANCEL_COMBAT = 0x14E,
|
||||
SMSG_SPELLBREAKLOG = 0x14F,
|
||||
SMSG_SPELLHEALLOG = 0x150,
|
||||
|
|
|
|||
|
|
@ -2647,9 +2647,9 @@ enum PetTameFailureReason
|
|||
|
||||
// we need to stick to 1 version or half of the stuff will work for someone
|
||||
// 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
|
||||
// NOTE: not set it more that supported by targeted client version with all expansions installed
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#ifndef _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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9310"
|
||||
#define REVISION_NR "9311"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue