mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/VMaps: fixed build, vmaps extraction and some copy paste fails
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user