public Node(Node parentNode, Node goalNode, int gCost, ushort x, ushort y, PhoenixProject.Game.Map Map) { this.Map = Map; this.parentNode = parentNode; this._goalNode = goalNode; this.gCost = gCost; this.x=x; this.y=y; InitNode(); }
public static bool CreateDynamicMap2(ulong mapadd, ushort mapneed, uint ownerid, uint level) { bool addedmap = false; if (!ServerBase.Kernel.Maps.ContainsKey(3024)) new PhoenixProject.Game.Map(3024, Database.DMaps.MapPaths[3024]); PhoenixProject.Game.Map origMap = ServerBase.Kernel.Maps[3024]; dynamicMap = origMap.MakeDynamicMap2(ownerid); return addedmap; }
public static void Load() { if (File.Exists(ServerBase.Constants.DataHolderPath + "GameMap.dat")) { Time32 start = Time32.Now; FileStream FS = new FileStream(ServerBase.Constants.DataHolderPath + "GameMap.dat", FileMode.Open); BinaryReader BR = new BinaryReader(FS); uint MapCount = BR.ReadUInt32(); for (uint i = 0; i < MapCount; i++) { ulong MapID = BR.ReadUInt32(); string Path = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadInt32())); if (MapID >= 1712 && MapID <= 1720) { BR.ReadUInt32(); continue; } if (Path.EndsWith(".7z")) { Path = Path.Remove(Path.Length - 3, 3); Path += ".dmap"; } if (!File.Exists(ServerBase.Constants.DMapsPath + "\\maps\\" + MapID + ".map")) { Game.Map map = new PhoenixProject.Game.Map(MapID, Path); Console.WriteLine("add map " + MapID + ""); } MapPaths.Add(MapID, Path); BR.ReadInt32(); } BR.Close(); FS.Close(); //// FS.Dispose(); ////BR.Dispose(); Console.WriteLine("Game map loaded successfully."); } else Console.WriteLine("The specified Conquer Online folder doesn't exist. Game map couldn't be loaded."); }