Core/MMaps: fixed some warnings and fixed a typo that caused mmaps generation errors. please re-extract
This commit is contained in:
1 parent
457839982a
commit
3dfc062d72
2 files changed
+8
-10
No files matched your search
@@ -1979,13 +1979,13 @@ void ObjectMgr::LoadCreatures()
|
||||
|
||||
if (data.phaseUseFlags & ~PHASE_USE_FLAGS_ALL)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: " UI64FMTD " Entry: %u) has unknown `phaseUseFlags` set, removed unknown value.", guid, data.id);
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: % Entry: %u) has unknown `phaseUseFlags` set, removed unknown value.", guid, data.id);
|
||||
data.phaseUseFlags &= PHASE_USE_FLAGS_ALL;
|
||||
}
|
||||
|
||||
if (data.phaseUseFlags & PHASE_USE_FLAGS_ALWAYS_VISIBLE && data.phaseUseFlags & PHASE_USE_FLAGS_INVERSE)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: " UI64FMTD " Entry: %u) has both `phaseUseFlags` PHASE_USE_FLAGS_ALWAYS_VISIBLE and PHASE_USE_FLAGS_INVERSE,"
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: % Entry: %u) has both `phaseUseFlags` PHASE_USE_FLAGS_ALWAYS_VISIBLE and PHASE_USE_FLAGS_INVERSE,"
|
||||
" removing PHASE_USE_FLAGS_INVERSE.", guid, data.id);
|
||||
data.phaseUseFlags &= ~PHASE_USE_FLAGS_INVERSE;
|
||||
}
|
||||
@@ -2007,12 +2007,12 @@ void ObjectMgr::LoadCreatures()
|
||||
MapEntry const* terrainSwapEntry = sMapStore.LookupEntry(data.terrainSwapMap);
|
||||
if (!terrainSwapEntry)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: " UI64FMTD " Entry: %u) with `terrainSwapMap` %u does not exist, set to -1", guid, data.id, data.terrainSwapMap);
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: % Entry: %u) with `terrainSwapMap` %u does not exist, set to -1", guid, data.id, data.terrainSwapMap);
|
||||
data.terrainSwapMap = -1;
|
||||
}
|
||||
else if (terrainSwapEntry->rootPhaseMap != data.mapid)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: " UI64FMTD " Entry: %u) with `terrainSwapMap` %u which cannot be used on spawn map, set to -1", guid, data.id, data.terrainSwapMap);
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: % Entry: %u) with `terrainSwapMap` %u which cannot be used on spawn map, set to -1", guid, data.id, data.terrainSwapMap);
|
||||
data.terrainSwapMap = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
@@ -398,7 +398,6 @@ namespace MMAP
|
||||
useTerrain = true;
|
||||
useLiquid = true;
|
||||
uint8 liquidType = MAP_LIQUID_TYPE_NO_WATER;
|
||||
// FIXME: "warning: the address of ‘liquid_type’ will always evaluate as ‘true’"
|
||||
|
||||
// if there is no liquid, don't use liquid
|
||||
if (!meshData.liquidVerts.size() || !ltriangles.size())
|
||||
@@ -640,7 +639,7 @@ namespace MMAP
|
||||
/**************************************************************************/
|
||||
bool TerrainBuilder::loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData)
|
||||
{
|
||||
IVMapManager* vmapManager = new VMapManager2();
|
||||
VMapManager2* vmapManager = static_cast<VMapManager2*>(VMapFactory::createOrGetVMapManager());
|
||||
int result = vmapManager->loadMap("vmaps", mapID, tileX, tileY);
|
||||
bool retval = false;
|
||||
|
||||
@@ -650,7 +649,7 @@ namespace MMAP
|
||||
break;
|
||||
|
||||
InstanceTreeMap instanceTrees;
|
||||
((VMapManager2*)vmapManager)->getInstanceMapTree(instanceTrees);
|
||||
vmapManager->getInstanceMapTree(instanceTrees);
|
||||
|
||||
if (!instanceTrees[mapID])
|
||||
break;
|
||||
@@ -678,7 +677,7 @@ namespace MMAP
|
||||
worldModel->getGroupModels(groupModels);
|
||||
|
||||
// all M2s need to have triangle indices reversed
|
||||
bool isM2 = instance.name.find(".m2") != std::string::npos || instance.name.find(".M2") != std::string::npos;
|
||||
bool isM2 = (instance.flags & MOD_M2) != 0;
|
||||
|
||||
// transform data
|
||||
float scale = instance.iScale;
|
||||
@@ -788,7 +787,6 @@ namespace MMAP
|
||||
while (false);
|
||||
|
||||
vmapManager->unloadMap(mapID, tileX, tileY);
|
||||
delete vmapManager;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user