feat(Core/Vmaps): Changed error message when loading outdated vmaps (#10490)

This commit is contained in:
IntelligentQuantum
2022-04-01 14:26:04 +04:30
committed by GitHub
parent e8e8c34590
commit cc5f26db7f
6 changed files with 35 additions and 17 deletions

View File

@@ -37,6 +37,13 @@ namespace VMAP
VMAP_LOAD_RESULT_IGNORED
};
enum class LoadResult : uint8
{
Success,
FileNotFound,
VersionMismatch
};
#define VMAP_INVALID_HEIGHT -100000.0f // for check
#define VMAP_INVALID_HEIGHT_VALUE -200000.0f // real assigned value in unknown height case
@@ -79,7 +86,7 @@ namespace VMAP
virtual int loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
virtual bool existsMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
virtual LoadResult existsMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
virtual void unloadMap(unsigned int pMapId, int x, int y) = 0;
virtual void unloadMap(unsigned int pMapId) = 0;

View File

@@ -379,7 +379,7 @@ namespace VMAP
}
}
bool VMapMgr2::existsMap(const char* basePath, unsigned int mapId, int x, int y)
LoadResult VMapMgr2::existsMap(const char* basePath, unsigned int mapId, int x, int y)
{
return StaticMapTree::CanLoadMap(std::string(basePath), mapId, x, y);
}

View File

@@ -128,7 +128,7 @@ namespace VMAP
{
return getMapFileName(mapId);
}
bool existsMap(const char* basePath, unsigned int mapId, int x, int y) override;
LoadResult existsMap(const char* basePath, unsigned int mapId, int x, int y) override;
void GetInstanceMapTree(InstanceTreeMap& instanceMapTree);
typedef uint32(*GetLiquidFlagsFn)(uint32 liquidType);