Exemplo n.º 1
0
        public static CField Load(int mapId, WvsCenter parentServer)
        {
            var wzMan   = parentServer.WzMan;
            var wz      = wzMan["Map.wz"];
            var mapPath = $"Map/Map{mapId / 100000000}/{mapId}.img";

            try
            {
                var mapNode = wz.ResolvePath(mapPath);

                var cf = new CField(mapId);
                cf.Load(mapNode);
                return(cf);
            }
            catch (KeyNotFoundException knfe)
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        public static CField Load(int mapId, WvsCenter parentServer)
        {
            var WzProvider = parentServer.WzProvider;
            var wz         = "Map";
            var path       = $"Map/Map{mapId / 100000000}/{mapId}.img";

            try
            {
                var mapNode = WzProvider.Resolve($"{wz}/{path}");

                var cf = new CField(mapId);
                cf.Load(mapNode);
                return(cf);
            }
            catch (KeyNotFoundException knfe)
            {
                return(null);
            }
        }