少年修仙传客户端代码仓库
2196 【1.1】【1.2】 把过期守护放仓库,上线显示守护过期提示弹框,点击查看后,显示错误
1个文件已修改
27 ■■■■■ 已修改文件
System/KnapSack/Logic/ItemOverdueModel.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemOverdueModel.cs
@@ -62,6 +62,7 @@
        {
            isdelay = true;
            GlobalTimeEvent.Instance.secondEvent -= UpdateSecond;
            playerPack.ItemCntReduceAct -= UpdateItemCount;
            itemStack.Clear();
            itemGuids.Clear();
            currentShowItem = default(OverdueItem);
@@ -74,6 +75,7 @@
    
        public void OnPlayerLoginOk()
        {
            playerPack.ItemCntReduceAct += UpdateItemCount;
            GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
            time = 0;
        }
@@ -162,6 +164,31 @@
            }
        }
        private void UpdateItemCount(PackType type, int index, int id)
        {
            if (type != PackType.rptItem) return;
            for(int i = 0; i < itemGuids.Count; i++)
            {
                string guid = itemGuids[i];
                ItemModel itemModel = playerPack.GetItemModelByGUID(guid);
                if(itemModel == null)
                {
                    if (itemGuids.Contains(guid))
                    {
                        itemGuids.Remove(guid);
                    }
                    if (itemStack.ContainsKey(guid))
                    {
                        itemStack.Remove(guid);
                    }
                }
            }
            RefreshCurrrentShowUseItem();
        }
        private void OnGetOverdueItem(int itemId, string guid,int index)
        {
            var overdueItem = new OverdueItem(itemId,guid,index);