Ejemplo n.º 1
0
        public void AddConvert(GundamInfo from, GundamInfo to, int action)
        {
            byte[] data = new byte[20];
            byte[] f    = ByteHelper.HexStringToByteArray(from.UUID);
            Array.Copy(f, 0, data, 0, 8);

            byte[] t = ByteHelper.HexStringToByteArray(to.UUID);
            Array.Copy(t, 0, data, 8, 8);

            byte[] a = BitConverter.GetBytes(action);
            Array.Copy(a, 0, data, 16, 4);

            GGCRPkdInnerFile file = this.GetInnerFile("MachineConversionList.cdb");
            int count             = BitConverter.ToInt32(this.Data, file.StartIndex + 8) + 1;

            //修改总数
            byte[] newCount = BitConverter.GetBytes(count);
            this.Write(file.StartIndex + 8, newCount);
            //插入数据
            this.AppendInnerFile(file, 12, data);
        }
Ejemplo n.º 2
0
 public int CompareTo(GundamInfo other)
 {
     return(this.Index - other.Index);
 }