예제 #1
0
 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 };
 }
예제 #2
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));
            }
예제 #3
0
 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)));
     }
 }
예제 #4
0
 public ItemSlotInfo(byte[] value)
 {
     position       = value[0];
     itemInfo       = new ItemInfo(ByteUtils.SlicedBytes(value, 1, 8));
     itemOptionInfo = new ItemOptionInfo(ByteUtils.SlicedBytes(value, 8, value.Length));
 }