mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[7439] Fix wrong liquid level in some places. Need reectract maps.
Remove some log on extract maps. Add liquid status log to .gps command Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
a2bb5aa9ed
commit
071a0317f0
11 changed files with 28 additions and 11 deletions
|
|
@ -207,7 +207,7 @@ void ReadLiquidTypeTableDBC()
|
|||
|
||||
// Map file format data
|
||||
#define MAP_MAGIC 'SPAM'
|
||||
#define MAP_VERSION_MAGIC '0.1v'
|
||||
#define MAP_VERSION_MAGIC '0.1w'
|
||||
#define MAP_AREA_MAGIC 'AERA'
|
||||
#define MAP_HEIGTH_MAGIC 'TGHM'
|
||||
#define MAP_LIQUID_MAGIC 'QILM'
|
||||
|
|
@ -304,7 +304,6 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
|
|||
|
||||
memset(liquid_show, 0, sizeof(liquid_show));
|
||||
memset(liquid_type, 0, sizeof(liquid_type));
|
||||
memset(liquid_height, 0, sizeof(liquid_height));
|
||||
|
||||
// Prepare map header
|
||||
map_fileheader map;
|
||||
|
|
@ -709,6 +708,8 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
|
|||
if (maxHeight < h) maxHeight = h;
|
||||
if (minHeight > h) minHeight = h;
|
||||
}
|
||||
else
|
||||
liquid_height[y][x] = CONF_use_minHeight;
|
||||
}
|
||||
}
|
||||
map.liquidMapOffset = map.heightMapOffset + map.heightMapSize;
|
||||
|
|
@ -812,11 +813,11 @@ void ExtractMapsFromMpq()
|
|||
printf("Convert map files\n");
|
||||
for(uint32 z = 0; z < map_count; ++z)
|
||||
{
|
||||
printf("Extract %s (%d/%d) \n", map_ids[z].name, z, map_count);
|
||||
printf("Extract %s (%d/%d) \n", map_ids[z].name, z+1, map_count);
|
||||
// Loadup map grid data
|
||||
sprintf(mpq_map_name, "World\\Maps\\%s\\%s.wdt", map_ids[z].name, map_ids[z].name);
|
||||
WDT_file wdt;
|
||||
if (!wdt.loadFile(mpq_map_name))
|
||||
if (!wdt.loadFile(mpq_map_name, false))
|
||||
{
|
||||
// printf("Error loading %s map wdt data\n", map_ids[z].name);
|
||||
continue;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -17,12 +17,13 @@ FileLoader::~FileLoader()
|
|||
free();
|
||||
}
|
||||
|
||||
bool FileLoader::loadFile(char *filename)
|
||||
bool FileLoader::loadFile(char *filename, bool log)
|
||||
{
|
||||
free();
|
||||
MPQFile mf(filename);
|
||||
if(mf.isEof())
|
||||
{
|
||||
if (log)
|
||||
printf("No such file %s\n", filename);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
file_MVER *version;
|
||||
FileLoader();
|
||||
~FileLoader();
|
||||
bool loadFile(char *filename);
|
||||
bool loadFile(char *filename, bool log = true);
|
||||
virtual void free();
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
DROP TABLE IF EXISTS `db_version`;
|
||||
CREATE TABLE `db_version` (
|
||||
`version` varchar(120) default NULL,
|
||||
`required_7422_01_mangos_mangos_string` bit(1) default NULL
|
||||
`required_7439_01_mangos_mangos_string` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -2409,6 +2409,7 @@ INSERT INTO `mangos_string` VALUES
|
|||
(172,'server console command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(173,'You changed runic power of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(174,'%s changed your runic power to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(175,'Liquid level: %f, ground: %f, type: %d, status: %d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(200,'No selection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(201,'Object GUID is: lowpart %u highpart %X',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(202,'The name was too long by %i characters.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
|
|
|
|||
5
sql/updates/7439_01_mangos_mangos_string.sql
Normal file
5
sql/updates/7439_01_mangos_mangos_string.sql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_7422_01_mangos_mangos_string required_7439_01_mangos_mangos_string bit;
|
||||
|
||||
DELETE FROM mangos_string WHERE entry in (175);
|
||||
INSERT INTO mangos_string VALUES
|
||||
(175,'Liquid level: %f, ground: %f, type: %d, status: %d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
|
|
@ -196,6 +196,7 @@ pkgdata_DATA = \
|
|||
7393_01_mangos_game_event.sql \
|
||||
7399_01_mangos_mangos_string.sql \
|
||||
7422_01_mangos_mangos_string.sql \
|
||||
7439_01_mangos_mangos_string.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -372,4 +373,5 @@ EXTRA_DIST = \
|
|||
7393_01_mangos_game_event.sql \
|
||||
7399_01_mangos_mangos_string.sql \
|
||||
7422_01_mangos_mangos_string.sql \
|
||||
7439_01_mangos_mangos_string.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -170,7 +170,8 @@ enum MangosStrings
|
|||
LANG_CONSOLE_COMMAND = 172,
|
||||
LANG_YOU_CHANGE_RUNIC_POWER = 173,
|
||||
LANG_YOURS_RUNIC_POWER_CHANGED = 174,
|
||||
// Room for more level 1 175-199 not used
|
||||
LANG_LIQUID_STATUS = 175,
|
||||
// Room for more level 1 176-199 not used
|
||||
|
||||
// level 2 chat
|
||||
LANG_NO_SELECTION = 200,
|
||||
|
|
|
|||
|
|
@ -331,6 +331,12 @@ bool ChatHandler::HandleGPSCommand(const char* args)
|
|||
cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), obj->GetInstanceId(),
|
||||
zone_x, zone_y, ground_z, floor_z, have_map, have_vmap );
|
||||
|
||||
LiquidData liquid_status;
|
||||
ZLiquidStatus res = map->getLiquidStatus(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), MAP_ALL_LIQUIDS, &liquid_status);
|
||||
if (res)
|
||||
{
|
||||
PSendSysMessage(LANG_LIQUID_STATUS, liquid_status.level, liquid_status.depth_level, liquid_status.type, res);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ typedef MaNGOS::SingleThreaded<GridRWLock>::Lock NullGuard;
|
|||
// Map file format defines
|
||||
//******************************************
|
||||
#define MAP_MAGIC 'SPAM'
|
||||
#define MAP_VERSION_MAGIC '0.1v'
|
||||
#define MAP_VERSION_MAGIC '0.1w'
|
||||
#define MAP_AREA_MAGIC 'AERA'
|
||||
#define MAP_HEIGTH_MAGIC 'TGHM'
|
||||
#define MAP_LIQUID_MAGIC 'QILM'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7438"
|
||||
#define REVISION_NR "7439"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue