少年修仙传客户端代码仓库
client_Wu Xijin
2018-10-25 dc934f9735d6f0b337412ed791c0d443c752d4de
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
7个文件已修改
78 ■■■■■ 已修改文件
System/KnapSack/ItemOverdueBehaviour.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/GuardOverdueWin.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemOverdueModel.cs 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackSendQuestMgr.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/WishGroupCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/WishingPoolWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/ItemOverdueBehaviour.cs
@@ -23,7 +23,6 @@
        ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        ItemOverdueModel model { get { return ModelCenter.Instance.GetModel<ItemOverdueModel>(); } }
        private void OnEnable()
        {
            m_Close.AddListener(CloseItemShow);
@@ -62,7 +61,6 @@
                        WindowCenter.Instance.Open<VipOverdueWin>();
                        break;
                    case ItemType.SpiritAnimal:
                        model.guardOverdueIndex = model.currentShowItem.index;
                        WindowCenter.Instance.Open<GuardOverdueWin>();
                        break;
                }
System/KnapSack/Logic/GuardOverdueWin.cs
@@ -55,6 +55,7 @@
        ItemConfig itemConfig;
        TimeSpan guardTime;
        public static string guid;
        protected override void BindController()
        {
@@ -80,7 +81,7 @@
        protected override void OnPreClose()
        {
            guid = string.Empty;
        }
        protected override void OnAfterClose()
@@ -91,7 +92,8 @@
        private void InitUI()
        {
            itemOverduelist = null;
            itemModel = playerPack.GetItemModelByIndex(PackType.rptItem,itemOverdue.guardOverdueIndex);
            guid = string.IsNullOrEmpty(guid) || guid == "" ? itemOverdue.currentShowItem.guid : guid;
            itemModel = playerPack.GetItemModelByGUID(guid);
            if (itemModel == null) return;
            itemBG.SetItemBackGround(modelInterface.GetItemQuality(itemModel.itemInfo.ItemID,itemModel.useDataDict));
@@ -140,7 +142,7 @@
                    if (isOk)
                    {
                        itemOverdue.SendRenewalQuest(itemOverdue.guardOverdueIndex,2);
                        itemOverdue.SendRenewalQuest(itemModel.itemInfo.ItemPlace,2);
                        CloseWin();
                    }
                });
@@ -169,7 +171,7 @@
                    if(isOk)
                    {
                        itemOverdue.SendRenewalQuest(itemOverdue.guardOverdueIndex, 1);
                        itemOverdue.SendRenewalQuest(itemModel.itemInfo.ItemPlace, 1);
                        CloseWin();
                    }
                });
System/KnapSack/Logic/ItemOverdueModel.cs
@@ -25,9 +25,6 @@
        {
            get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
        }
        public int guardOverdueIndex { get; set; }
        public Dictionary<int, string> guardOverdueIconDict { get; private set;}
        Dictionary<string,OverdueItem> itemStack = new Dictionary<string,OverdueItem>();
@@ -65,7 +62,7 @@
        {
            isdelay = true;
            GlobalTimeEvent.Instance.secondEvent -= UpdateSecond;
            guardOverdueIndex = -1;
            playerPack.ItemCntReduceAct -= UpdateItemCount;
            itemStack.Clear();
            itemGuids.Clear();
            currentShowItem = default(OverdueItem);
@@ -78,6 +75,7 @@
    
        public void OnPlayerLoginOk()
        {
            playerPack.ItemCntReduceAct += UpdateItemCount;
            GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
            time = 0;
        }
@@ -166,6 +164,31 @@
            }
        }
        private void UpdateItemCount(PackType type, int index, int id)
        {
            if (type != PackType.rptItem || type != PackType.rptWarehouse) return;
            for(int i = 0; i < itemGuids.Count; i++)
            {
                string guid = itemGuids[i];
                ItemModel itemModel = playerPack.GetItemModelByGUID(guid);
                if(itemModel == null || itemModel.packType != PackType.rptItem)
                {
                    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);
@@ -212,8 +235,8 @@
                    if (list.Count > 1)
                    {
                        SetAllGuardIdlist();
                        guardOverdueIndex = int.Parse(list[1].ToString());
                        ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, guardOverdueIndex);
                        int index = int.Parse(list[1].ToString());
                        ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, index);
                        if (itemModel != null)
                        {
                            List<int> renewallist = GetRenewallist(itemModel.itemId);
@@ -244,15 +267,10 @@
                                        if (models != null && models.Count > 0)
                                        {
                                            ItemModel overdueModel = models[0];
                                            guardOverdueIndex = overdueModel.itemInfo.ItemPlace;
                                            OnGetOverdueItem(overdueModel.itemInfo.ItemID, overdueModel.itemInfo.ItemGUID, overdueModel.itemInfo.ItemPlace);
                                            break;
                                        }
                                    }
                                }
                                else
                                {
                                    guardOverdueIndex = -1;
                                }
                            }
                        }
@@ -310,9 +328,15 @@
                    for (int i = idlist.Count - 1; i > -1; i--)
                    {
                        models = allGuardDict[type][idlist[i]];
                        if(models != null && models.Count > 0)
                        if(models != null)
                        {
                            ItemModel itemModel = models[0];
                            bool isHave = false;
                            for(int j = 0; j < models.Count; j++)
                            {
                                ItemModel itemModel = models[j];
                                if(itemModel.packType == PackType.rptItem)
                                {
                                    isHave = true;
                            if (!overdueGuardPushlist.Contains(itemModel))
                            {
                                overdueGuardPushlist.Add(itemModel);
@@ -320,6 +344,12 @@
                            break;
                        }
                    }
                            if(isHave)
                            {
                                break;
                            }
                        }
                    }
                }
            }
            for(int i = 0; i < overdueGuardPushlist.Count; i++)
System/KnapSack/Logic/ItemTipsModel.cs
@@ -779,7 +779,7 @@
                {
                    if(isOverdue)
                    {
                        attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendRenewalQuest(ItemWinBtnType.renewal, attrData.index); });
                        attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendRenewalQuest(ItemWinBtnType.renewal, attrData.guid); });
                    }
                }
            }
System/KnapSack/Logic/PackSendQuestMgr.cs
@@ -1146,9 +1146,9 @@
        #endregion
        #region 发送续费请求 
        public void SendRenewalQuest(ItemWinBtnType btnType,int index)
        public void SendRenewalQuest(ItemWinBtnType btnType,string guid)
        {
            itemOverdue.guardOverdueIndex = index;
            GuardOverdueWin.guid = guid;
            WindowCenter.Instance.Open<GuardOverdueWin>();
        }
        #endregion
System/OpenServerActivity/WishGroupCell.cs
@@ -29,7 +29,7 @@
                    var info = items[i];
                    ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(info.itemId);
                    poolItem.nameText.text = itemConfig.ItemName;
                    poolItem.nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor);
                    poolItem.nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor,true);
                    ItemCellModel cellModel = new ItemCellModel(info.itemId,true,(ulong)info.itemCount,info.isBind);
                    poolItem.itemBaisc.Init(cellModel);
                    if(i == 0)
System/OpenServerActivity/WishingPoolWin.cs
@@ -181,7 +181,7 @@
            if (isPoolData)
            {
                dragItem.dragItemRect.gameObject.SetActive(true);
                dragItem.dragBestIcon.SetActive(false);
                dragItem.dragBestIcon.SetActive(wellItem.isBest == 0 ? false : true);
                ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount,wellItem.isBind);
                dragItem.dragItemBasic.Init(cellModel);
                poolItemCells[wishingModel.dragIndex].gameObject.SetActive(false);