少年修仙传客户端代码仓库
client_linchunjie
2018-12-03 ace147921f7fa5b09a5d374e389472e35d65e15a
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
4个文件已修改
81 ■■■■ 已修改文件
Core/NetworkPackage/ClientPack/ClientToMapServer/CA3_Item/CA32C_tagCMEquipDecompose.cs 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/EquipDevourWin.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PlayerPackModels.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/BagWin.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA3_Item/CA32C_tagCMEquipDecompose.cs
@@ -1,20 +1,45 @@
using UnityEngine;
using System.Collections;
//A3 2C 装备分解 #tagCMEquipDecompose
public class CA32C_tagCMEquipDecompose : GameNetPackBasic {
    public byte IndexCount;    //材料所在背包索引的数量
    public  byte[] IndexList;    //材料所在背包索引列表
    public CA32C_tagCMEquipDecompose () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA32C;
    }
    public override void WriteToBytes () {
        WriteBytes (IndexCount, NetDataType.BYTE);
        WriteBytes (IndexList, NetDataType.BYTE, IndexCount);
    }
}
//A3 2C 装备分解 #tagCMEquipDecompose
public class CA32C_tagCMEquipDecompose : GameNetPackBasic {
    public byte Count;    //材料所在背包索引的数量
    public  ushort[] IndexList;    //材料所在背包索引列表
    public  uint[] ItemIDList;    //材料所在背包物品ID列表
    public byte IsAuto;    //是否自动分解
    public CA32C_tagCMEquipDecompose () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA32C;
    }
    public override void WriteToBytes () {
        WriteBytes (Count, NetDataType.BYTE);
        WriteBytes (IndexList, NetDataType.WORD, Count);
        WriteBytes (ItemIDList, NetDataType.DWORD, Count);
        WriteBytes (IsAuto, NetDataType.BYTE);
    }
}
System/KnapSack/Logic/EquipDevourWin.cs
@@ -593,13 +593,17 @@
            playerPack.isAutoDecompose = false;
            SettingEffectMgr.Instance.isStartDecompose = true;
            CA32C_tagCMEquipDecompose _petEat = new CA32C_tagCMEquipDecompose();
            byte[] _petIndex = new byte[realDevourlist.Count];
            var _petIndex = new ushort[realDevourlist.Count];
            var idlist = new uint[realDevourlist.Count];
            for (int i = 0; i < realDevourlist.Count; i++)
            {
                _petIndex[i] = (byte)realDevourlist[i].itemInfo.ItemPlace;
                _petIndex[i] = (ushort)realDevourlist[i].itemInfo.ItemPlace;
                idlist[i] = (uint)realDevourlist[i].itemId;
            }
            _petEat.IndexCount = (byte)_petIndex.Length;
            _petEat.Count = (byte)_petIndex.Length;
            _petEat.IndexList = _petIndex;
            _petEat.ItemIDList = idlist;
            _petEat.IsAuto = 0;
            GameNetSystem.Instance.SendInfo(_petEat);
        }
System/KnapSack/Logic/PlayerPackModels.cs
@@ -1727,18 +1727,22 @@
            isAutoDecompose = true;
            recordAutoDecomNum = itemModels.Count;
            CA32C_tagCMEquipDecompose _petEat = new CA32C_tagCMEquipDecompose();
            byte[] _petIndex = new byte[recordAutoDecomNum];
            var _petIndex = new ushort[recordAutoDecomNum];
            var idlist = new uint[recordAutoDecomNum];
            for (int i = 0; i < recordAutoDecomNum; i++)
            {
                _petIndex[i] = (byte)itemModels[i].itemInfo.ItemPlace;
                _petIndex[i] = (ushort)itemModels[i].itemInfo.ItemPlace;
                idlist[i] = (uint)itemModels[i].itemId;
                if (itemModels[i].chinItemModel.StarLevel >= 2 
                    || (itemModels[i].chinItemModel.EquipPlace == 0 && itemModels[i].chinItemModel.Type != 29))
                {
                    return;
                }
            }
            _petEat.IndexCount = (byte)_petIndex.Length;
            _petEat.Count = (byte)_petIndex.Length;
            _petEat.IndexList = _petIndex;
            _petEat.ItemIDList = idlist;
            _petEat.IsAuto = 1;
            GameNetSystem.Instance.SendInfo(_petEat);
        }
System/KnapSack/New/BagWin.cs
@@ -71,6 +71,8 @@
        }
        protected override void OnAfterOpen() {
            Transform parent = WindowCenter.Instance.Get<KnapSackWin>().transform;
            this.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
            this.transform.SetAsLastSibling();
            OnRefrenshUIModel();
            if(KnapSackWin.titleType == KnapsackFuncTitle.bag