static Verdata() { string path = Path.Combine(FileManager.UoFolderPath, "verdata.mul"); if (!System.IO.File.Exists(path)) { Patches = new UOFileIndex5D[0]; File = null; } else { File = new UOFileMul(path); Patches = new UOFileIndex5D[File.ReadInt()]; Patches = File.ReadArray <UOFileIndex5D>(File.ReadInt()); /* for (int i = 0; i < Patches.Length; i++) * { * Patches[i].File = File.ReadInt(); * Patches[i].Index = File.ReadInt(); * Patches[i].Offset = File.ReadInt(); * Patches[i].Length = File.ReadInt(); * Patches[i].Extra = File.ReadInt(); * }*/ } }
static Verdata() { string path = UOFileManager.GetUOFilePath("verdata.mul"); if (!System.IO.File.Exists(path)) { Patches = new UOFileIndex5D[0]; File = null; } else { File = new UOFileMul(path); // the scope of this try/catch is to avoid unexpected crashes if servers redestribuite wrong verdata try { Patches = File.ReadArray <UOFileIndex5D>(File.ReadInt()); } catch { Patches = new UOFileIndex5D[0]; } } }