public ItemInfo(byte[] value) { code = ByteUtils.SlicedBytes(value, 0, 2); itemCount = value[2]; //serial = ByteUtils.SlicedBytes(value, 3, 7); serial = new byte[] { 0, 0, 0, 0 }; }
public byte[] ToBytesSmall() { List <byte> result = new List <byte>(); result.Add((byte)position); result.AddRange(itemInfo.ToBytes()); result.AddRange(itemOptionInfo.ToBytes()); return(ByteUtils.SlicedBytes(result.ToArray(), 0, 5)); }
public EquipInfo(byte[] value) { count = value[0]; for (int i = 0; i < count; i++) { itemSlotInfos.AddRange(new ItemSlotInfo(ByteUtils.SlicedBytes(value, 1 + i * 28, 29 + i * 28)).ToBytes()); //itemSlotInfos.Add(new ItemSlotInfo(ByteUtils.SlicedBytes(value,1+i*28,29+i*28))); } }
public ItemSlotInfo(byte[] value) { position = value[0]; itemInfo = new ItemInfo(ByteUtils.SlicedBytes(value, 1, 8)); itemOptionInfo = new ItemOptionInfo(ByteUtils.SlicedBytes(value, 8, value.Length)); }