Core/VMaps: fixed build, vmaps extraction and some copy paste fails

This commit is contained in:
Ovahlord
2018-03-09 18:17:27 +01:00
parent 4bbdce57e2
commit fe4f86b1bc
3 changed files with 5 additions and 4 deletions

View File

@@ -91,6 +91,7 @@ namespace VMAP
int VMapManager2::loadMap(const char* basePath, unsigned int mapId, int x, int y)
{
int result = VMAP_LOAD_RESULT_IGNORED;
if (isMapLoadingEnabled())
{
if (_loadMap(mapId, basePath, x, y))
{

View File

@@ -426,7 +426,7 @@ namespace VMAP
{
if (referencedVal >= iNTreeValues)
{
VMAP_ERROR_LOG("maps", "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u) referenced in tile %s", referencedVal, iNTreeValues, tilefile.c_str());
VMAP_ERROR_LOG("maps", "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u) referenced in tile %s", referencedVal, iNTreeValues, fileResult.Name.c_str());
continue;
}

View File

@@ -603,7 +603,7 @@ int main(int argc, char ** argv)
{
map_info& m = map_ids[dbc->getRecord(x).getUInt(0)];
const char* map_name = dbc->getRecord(x).getString(6);
const char* map_name = dbc->getRecord(x).getString(1);
size_t max_map_name_length = sizeof(m.name);
if (strlen(map_name) >= max_map_name_length)
{
@@ -612,12 +612,12 @@ int main(int argc, char ** argv)
}
strncpy(m.name, map_name, max_map_name_length);
map_ids[x].name[max_map_name_length - 1] = '\0';
m.name[max_map_name_length - 1] = '\0';
m.parent_id = int16(dbc->getRecord(x).getUInt(19));
if (m.parent_id >= 0)
maps_that_are_parents.insert(m.parent_id);
printf("Map - %s\n", map_ids[x].name);
printf("Map - %s\n", m.name);
}
ParsMapFiles();