mirror of https://github.com/duggerd/KFDtool.git
SW: Revert list RSI items; fixes #31
This commit is contained in:
parent
9a1955baae
commit
08ee4287d9
|
@ -41,7 +41,22 @@ namespace KFDtool.P25.Kmm
|
|||
|
||||
public override byte[] ToBytes()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
List<byte> contents = new List<byte>();
|
||||
|
||||
/* inventory type */
|
||||
contents.Add((byte)InventoryType);
|
||||
|
||||
/* number of items */
|
||||
contents.Add((byte)((RsiItems.Count >> 8) & 0xFF));
|
||||
contents.Add((byte)(RsiItems.Count & 0xFF));
|
||||
|
||||
/* items */
|
||||
foreach (RsiItem item in RsiItems)
|
||||
{
|
||||
contents.AddRange(item.ToBytes());
|
||||
}
|
||||
|
||||
return contents.ToArray();
|
||||
}
|
||||
|
||||
public override void Parse(byte[] contents)
|
||||
|
|
Loading…
Reference in New Issue