少年修仙传客户端代码仓库
2196 【1.1】【1.2】 把过期守护放仓库,上线显示守护过期提示弹框,点击查看后,显示错误
1个文件已修改
16 ■■■■■ 已修改文件
System/KnapSack/Logic/ItemOverdueModel.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemOverdueModel.cs
@@ -62,7 +62,7 @@
        {
            isdelay = true;
            GlobalTimeEvent.Instance.secondEvent -= UpdateSecond;
            playerPack.ItemCntReduceAct -= UpdateItemCount;
            playerPack.RefreshItemCountAct -= UpdateItemCount;
            itemStack.Clear();
            itemGuids.Clear();
            currentShowItem = default(OverdueItem);
@@ -75,7 +75,7 @@
    
        public void OnPlayerLoginOk()
        {
            playerPack.ItemCntReduceAct += UpdateItemCount;
            playerPack.RefreshItemCountAct += UpdateItemCount;
            GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
            time = 0;
        }
@@ -166,14 +166,18 @@
        private void UpdateItemCount(PackType type, int index, int id)
        {
            if (type != PackType.rptItem || type != PackType.rptWarehouse) return;
            if (type != PackType.rptItem && type != PackType.rptWarehouse) return;
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(id);
            if (itemConfig == null || itemConfig.EquipPlace != (int)RoleEquipType.retSpiritAnimal) return;
            bool isRemove = false;
            for(int i = 0; i < itemGuids.Count; i++)
            {
                string guid = itemGuids[i];
                ItemModel itemModel = playerPack.GetItemModelByGUID(guid);
                if(itemModel == null || itemModel.packType != PackType.rptItem)
                {
                    isRemove = true;
                    if (itemGuids.Contains(guid))
                    {
                        itemGuids.Remove(guid);
@@ -185,8 +189,10 @@
                    }
                }
            }
            RefreshCurrrentShowUseItem();
            if(isRemove)
            {
                RefreshCurrrentShowUseItem();
            }
        }
        private void OnGetOverdueItem(int itemId, string guid,int index)