Exemplo 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);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 通过地址获取武器信息
        /// </summary>
        /// <param name="addressHex"></param>
        /// <returns></returns>
        public WeaponInfo getWeapon(string addressHex)
        {
            int index = ByteHelper.Bytes2Int(ByteHelper.HexStringToByteArray(addressHex));

            return(getWeapon(index));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 通过地址获取机体信息
        /// </summary>
        /// <param name="addressHex"></param>
        /// <returns></returns>
        public GundamInfo getGundam(string addressHex)
        {
            int index = ByteHelper.Bytes2Int(ByteHelper.HexStringToByteArray(addressHex));

            return(getGundam(index));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 通过地址获取角色信息
        /// </summary>
        /// <param name="addressHex"></param>
        /// <returns></returns>
        public MasterInfo getMaster(string addressHex)
        {
            int index = ByteHelper.Bytes2Int(ByteHelper.HexStringToByteArray(addressHex));

            return(getMaster(index));
        }