public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { node.Parser = this; var result = new FactsTable(); reader.Skip(4); //skip Id var count = reader.ReadPackedInt(); var tmpFactList = new uint[count]; for (int i = 0; i < count; i++) { tmpFactList[i] = reader.ReadUInt32(); } for (int i = 0; i < count; i++) { result.FactEntries.Add(new FactsTable.FactEntry { Hash = tmpFactList[i], Value = reader.ReadUInt32() }); } ParserUtils.ParseChildren(node.Children, reader, parsers); result.Node = node; return(result); }
public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { var result = new FactsTable(); reader.Skip(4); //skip Id var count = ParserUtils.ReadPackedLong(reader); var tmpFactList = new uint[count]; for (int i = 0; i < count; i++) { tmpFactList[i] = reader.ReadUInt32(); } result.FactEntries = new FactsTable.FactEntry[count]; for (int i = 0; i < count; i++) { result.FactEntries[i] = new FactsTable.FactEntry() { Hash = tmpFactList[i], Value = reader.ReadUInt32() }; } ParserUtils.ParseChildren(node.Children, reader, parsers); return(result); }
public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { ParserUtils.ParseChildren(node.Children, reader, parsers); return(new NodeRepresentation { Node = node }); }
public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { reader.Skip(4); // Skip Id var result = new DefaultRepresentation(); result.Blob = reader.ReadBytes(node.TrueSize - 4); ParserUtils.ParseChildren(node.Children, reader, parsers); return(result); }
public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { reader.Skip(4); // Skip Id var result = new DefaultRepresentation(); result.HeaderBlob = reader.ReadBytes(node.DataSize - 4); ParserUtils.ParseChildren(node.Children, reader, parsers); Debug.Assert(node.TrailingSize >= 0); result.TrailingBlob = reader.ReadBytes(node.TrailingSize); result.Node = node; return(result); }
public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { var result = new PersistencySystem(); reader.Skip(4); // Skip Id var entryCount = reader.ReadUInt32(); for (int i = 0; i < entryCount; i++) { result.Unk_HashList.Add(reader.ReadUInt32()); } ParserUtils.ParseChildren(node.Children, reader, parsers); result.Node = node; return(result); }
public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { reader.Skip(4); var result = new FactsDB(); result.FactsTableCount = reader.ReadByte(); ParserUtils.ParseChildren(node.Children, reader, parsers); // There is a blob between the last factstable and the next node in questsystem var nextNode = node.GetNextNode(); var toRead = nextNode.Offset - reader.BaseStream.Position; Debug.Assert(toRead >= 0); result.TrailingBytes = reader.ReadBytes((int)toRead); return(result); }