public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; Field0 = new RequiredMessageHeader(); Field0.FileRead(stream, stream.Position); stream.Position = offset + 8; ActorID = stream.ReadValueS32(); stream.Position = offset + 12; ActorSNOId = stream.ReadValueS32(); stream.Position = offset + 16; _Field3 = stream.ReadValueS32(); stream.Position = offset + 20; _Field4 = stream.ReadValueS32(); stream.Position = offset + 24; // WorldLocation: type DT_OPTIONAL[WorldLocationMessageData] hasnt a deserializer implemented throw new Exception("some fields arent going to be decoded."); stream.Position = offset + 64; // InventoryLocation: type DT_OPTIONAL[InventoryLocationMessageData] hasnt a deserializer implemented throw new Exception("some fields arent going to be decoded."); stream.Position = offset + 84; Field7 = new GBHandle(); Field7.FileRead(stream, stream.Position); stream.Position = offset + 92; Field8 = stream.ReadValueS32(); stream.Position = offset + 96; NameSNOId = stream.ReadValueS32(); stream.Position = offset + 100; _Qualilty = stream.ReadValueS32(); stream.Position = offset + 104; Field11 = (byte)stream.ReadByte(); stream.Position = offset + 121; // : type DT_OPTIONAL[int] hasnt a deserializer implemented throw new Exception("some fields arent going to be decoded."); stream.Position = offset + 105; // MarkerSetSNO: type DT_OPTIONAL[int] hasnt a deserializer implemented throw new Exception("some fields arent going to be decoded."); stream.Position = offset + 113; // MarketSetIndex: type DT_OPTIONAL[int] hasnt a deserializer implemented throw new Exception("some fields arent going to be decoded."); }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; Field0 = new RequiredMessageHeader(); Field0.FileRead(stream, stream.Position); stream.Position = offset + 8; Field1 = stream.ReadValueS32(); stream.Position = offset + 12; Field2 = new GBHandle(); Field2.FileRead(stream, stream.Position); }