bool _loadMap(uint mapId, uint tileX, uint tileY) { var instanceTree = iInstanceMapTrees.LookupByKey(mapId); if (instanceTree == null) { string filename = string.Format("{0}{1:D4}.vmtree", VMapPath, mapId); StaticMapTree newTree = new StaticMapTree(mapId); if (!newTree.InitMap(filename, this)) { return(false); } iInstanceMapTrees.Add(mapId, newTree); instanceTree = newTree; } return(instanceTree.LoadMapTile(tileX, tileY, this)); }
bool loadSingleMap(uint mapId, uint tileX, uint tileY) { var instanceTree = iInstanceMapTrees.LookupByKey(mapId); if (instanceTree == null) { string filename = VMapPath + getMapFileName(mapId); StaticMapTree newTree = new StaticMapTree(mapId); if (!newTree.InitMap(filename)) { return(false); } iInstanceMapTrees.Add(mapId, newTree); instanceTree = newTree; } return(instanceTree.LoadMapTile(tileX, tileY, this)); }
LoadResult LoadSingleMap(uint mapId, uint tileX, uint tileY) { var instanceTree = iInstanceMapTrees.LookupByKey(mapId); if (instanceTree == null) { string filename = VMapPath + GetMapFileName(mapId); StaticMapTree newTree = new StaticMapTree(mapId); LoadResult treeInitResult = newTree.InitMap(filename); if (treeInitResult != LoadResult.Success) { return(treeInitResult); } iInstanceMapTrees.Add(mapId, newTree); instanceTree = newTree; } return(instanceTree.LoadMapTile(tileX, tileY, this)); }