public NpcName(string file) { try { using (L2BinaryReader reader = new L2BinaryReader(File.OpenRead(file))) { Data = new NpcData[reader.ReadInt32()]; for (uint i = 0; i < Data.Length; i++) { NpcData data = new NpcData(); data.Id = reader.ReadUInt32(); data.Name = reader.ReadString(); data.Description = reader.ReadString(); data.RGB = reader.ReadBytes(3); data.Reserved = reader.ReadChar(); Data[i] = data; } reader.Validate(); } } catch (Exception) { Data = null; throw new InvalidDataException(ParsingFailed); } }
public CommandName(string file) { try { using (L2BinaryReader reader = new L2BinaryReader(File.OpenRead(file))) { Data = new CommandData[reader.ReadInt32()]; for (uint i = 0; i < Data.Length; i++) { CommandData data = new CommandData(); data.Number = reader.ReadUInt32(); data.Id = reader.ReadUInt32(); data.Name = reader.ReadString(); Data[i] = data; } reader.Validate(); } } catch (Exception) { Data = null; throw new InvalidDataException(ParsingFailed); } }
public SkillName(string file) { try { using (L2BinaryReader reader = new L2BinaryReader(File.OpenRead(file))) { Data = new SkillData[reader.ReadInt32()]; for (uint i = 0; i < Data.Length; i++) { SkillData data = new SkillData(); data.Id = reader.ReadUInt32(); data.Level = reader.ReadUInt32(); data.Name = reader.ReadString(); data.Description = reader.ReadString(); data.AdditionalDescription = reader.ReadString(); data.AdditionalDescription2 = reader.ReadString(); Data[i] = data; } reader.Validate(); } } catch (Exception) { Data = null; throw new InvalidDataException(ParsingFailed); } }
public _24hzSchema(string file) { try { using (L2BinaryReader reader = new L2BinaryReader(File.OpenRead(file))) { Xml = reader.ReadString(); reader.Validate(); } } catch (Exception) { throw new InvalidDataException(ParsingFailed); } }
public ItemName(string file) { try { using (L2BinaryReader reader = new L2BinaryReader(File.OpenRead(file))) { Data = new ItemData[reader.ReadInt32()]; for (uint i = 0; i < Data.Length; i++) { ItemData data = new ItemData(); data.Id = reader.ReadUInt32(); data.Name = reader.ReadUString(); data.AdditionalName = reader.ReadUString(); data.Description = reader.ReadString(); data.Popup = reader.ReadInt32(); data.Class = reader.ReadTable<uint>(reader.ReadUInt32); data.SetId1 = reader.ReadArray<string>(reader.ReadString); data.SetId2 = reader.ReadTable<uint>(reader.ReadUInt32); data.SetId3 = reader.ReadArray<string>(reader.ReadString); data.Unknown1 = reader.ReadUInt32(); data.Unknown2 = reader.ReadUInt32(); data.SetEnchantCount = reader.ReadUInt32(); data.SetEnchantEffect = reader.ReadString(); data.Color = reader.ReadUInt32(); Data[i] = data; } reader.Validate(); } } catch (Exception) { Data = null; throw new InvalidDataException(ParsingFailed); } }