少年修仙传客户端代码仓库
client_Wu Xijin
2019-03-14 6fc92185abdf81a1b1009552f76f3906dafdd14e
3335 代码维护
7个文件已修改
161 ■■■■ 已修改文件
System/Dungeon/DungeonRewardItem.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/BestXBWin.cs 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/RuneXBWin.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/XBGetItemCell.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HeavenBattle/XMZZCampVicRewardWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/ChooseCell.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/CommonItemBaisc.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonRewardItem.cs
@@ -38,17 +38,18 @@
        private void RequestSfx()
        {
            RecycleSfx();
            if (base.itemConfig == null)
            var config = ItemConfig.Get(itemId);
            if (config != null)
            {
                return;
                var effect = config.ItemColor == 3 ? 1136 :
                                   config.ItemColor == 4 ? 1137 :
                                   config.ItemColor == 5 ? 1138 : 0;
                if (effect != 0)
                {
                    itemColorSfx = EffectMgr.Instance.PlayUIEffect(effect, 2500, transform, true);
                }
            }
            var _effect = itemConfig.ItemColor == 3 ? 1136 :
                itemConfig.ItemColor == 4 ? 1137 :
                itemConfig.ItemColor == 5 ? 1138 : 0;
            if (_effect != 0)
            {
                itemColorSfx = EffectMgr.Instance.PlayUIEffect(_effect, 2500, transform, true);
            }
        }
        private void RecycleSfx()
System/HappyXB/BestXBWin.cs
@@ -57,7 +57,7 @@
        [Header("闪烁次数")]
        [SerializeField] public int flashingTimes = 10;
        [Header("单次闪烁时间")]
        [SerializeField] public  float flashingTime = 0.2f;
        [SerializeField] public float flashingTime = 0.2f;
        [Header("得到物品停留时间")]
        [SerializeField] float stopTime = 2f;
        [Header("寻宝得到物品动画时间")]
@@ -84,7 +84,7 @@
        {
            xbItemlist.Clear();
            int length = horTopContent.childCount;
            for(int i = 0; i < length; i++)
            for (int i = 0; i < length; i++)
            {
                XBItemCell xbItem = horTopContent.GetChild(i).GetComponent<XBItemCell>();
                xbItemlist.Add(xbItem);
@@ -96,7 +96,7 @@
                xbItemlist.Add(xbItem);
            }
            length = horBottomContent.childCount;
            for (int i = length - 1; i > - 1; i--)
            for (int i = length - 1; i > -1; i--)
            {
                XBItemCell xbItem = horBottomContent.GetChild(i).GetComponent<XBItemCell>();
                xbItemlist.Add(xbItem);
@@ -142,20 +142,20 @@
        protected override void OnAfterOpen()
        {
        }
        protected override void LateUpdate()
        {
            base.LateUpdate();
            if(IsStartPlayAudio)
            if (IsStartPlayAudio)
            {
                if(playeAudioTime <= 0)
                if (playeAudioTime <= 0)
                {
                    SoundPlayer.Instance.PlayUIAudio(66);
                }
                playeAudioTime += Time.deltaTime;
                if(playeAudioTime > minPlayeAudioTime)
                if (playeAudioTime > minPlayeAudioTime)
                {
                    playeAudioTime = 0;
                    IsStartPlayAudio = false;
@@ -179,10 +179,10 @@
        private void RefreshSecond()
        {
            if(XBModel.isXBCoolTime)
            if (XBModel.isXBCoolTime)
            {
                coolTime -= 1;
                if(coolTime < 0)
                if (coolTime < 0)
                {
                    XBModel.isXBCoolTime = false;
                    ResetXBItemState();
@@ -198,9 +198,9 @@
        private void InitUI()
        {
            for(int i = 0; i < xbItemlist.Count;i++)
            for (int i = 0; i < xbItemlist.Count; i++)
            {
                if(getItemlist.Count > i)
                if (getItemlist.Count > i)
                {
                    xbItemlist[i].gameObject.SetActive(true);
                    xbItemlist[i].SetModel(getItemlist[i].itemId, getItemlist[i].count, getItemlist[i].gridIndex);
@@ -209,7 +209,7 @@
                {
                    xbItemlist[i].gameObject.SetActive(false);
                }
            }
            playeAudioTime = 0;
@@ -220,7 +220,7 @@
            xbResultObj.SetActive(false);
            freeXbBtn.gameObject.SetActive(false);
            funcSet = XBModel.GetXBFuncSet(1);
            if(funcSet != null)
            if (funcSet != null)
            {
                xbBtnText.text = Language.Get("HappyXB101", funcSet.xbNums[0]);
                xbManyBtnText.text = Language.Get("HappyXB101", funcSet.xbNums[1]);
@@ -232,7 +232,7 @@
                xbManyDesText.text = Language.Get("HappyXB106", funcSet.costToolNums[1]);
                ItemConfig itemConfig1 = ItemConfig.Get(funcSet.costToolIds[0]);
                ItemConfig itemConfig2 = ItemConfig.Get(funcSet.costToolIds[1]);
                if(itemConfig1 != null)
                if (itemConfig1 != null)
                {
                    toolImg1.SetSprite(itemConfig1.IconKey);
                }
@@ -250,7 +250,7 @@
        private void RefreshFreeTime(float time)
        {
            if(isHaveFreeTime)
            if (isHaveFreeTime)
            {
                if (XBModel.IsHaveFreeXB(1))
                {
@@ -270,7 +270,7 @@
            {
                freeXBTimeText.gameObject.SetActive(false);
            }
        }
        private void RefreshSkipUI()
@@ -300,7 +300,7 @@
        {
            int xbToolCnt = 0;
            int needToolCnt = 0;
            if (XBModel.IsHaveManyXBTool(1,out xbToolCnt,out needToolCnt))
            if (XBModel.IsHaveManyXBTool(1, out xbToolCnt, out needToolCnt))
            {
                toolXBShowObj.SetActive(true);
                toolNumText.text = StringUtility.Contact("x", xbToolCnt);
@@ -314,12 +314,12 @@
        bool isXBMany = false;
        private void ClickXBManyBtn()
        {
            XBModel.SendXBManyQuest(PackType.Treasure,1);
            XBModel.SendXBManyQuest(PackType.Treasure, 1);
        }
        private void OnStartXB(int oneOrMany)
        {
            if(oneOrMany == 0)
            if (oneOrMany == 0)
            {
                maskObj.SetActive(true);
                isXBMany = false;
@@ -329,7 +329,7 @@
                maskObj.SetActive(true);
                isXBMany = true;
            }
        }
        private void ClickFreeXbBtn()
@@ -355,7 +355,7 @@
        private void RefreshXBResult()
        {
            if(XBModel.isJumpBestXB)
            if (XBModel.isJumpBestXB)
            {
                ResetXBItemState();
                WindowCenter.Instance.Open<HappyXBGetItemWin>();
@@ -403,7 +403,7 @@
            if (index < xbResultItemBasiclist.Count)
            {
                xbResultItemBasiclist[index].gameObject.SetActive(true);
                xbResultItemBasiclist[index].transform.DOScale(new Vector3(1, 1, 1), scaleTime).OnComplete(()=>
                xbResultItemBasiclist[index].transform.DOScale(new Vector3(1, 1, 1), scaleTime).OnComplete(() =>
                {
                    if (index == xbResultItemBasiclist.Count - 1)
                    {
@@ -411,10 +411,8 @@
                        WindowCenter.Instance.Open<HappyXBGetItemWin>();
                    }
                });
                if (xbResultItemBasiclist[index].itemConfig != null)
                {
                    XBModel.GetNotifyResult(xbResultItemBasiclist[index].itemConfig.ID, int.Parse(xbResultItemBasiclist[index].countText.text));
                }
                XBModel.GetNotifyResult(xbResultItemBasiclist[index].itemId, int.Parse(xbResultItemBasiclist[index].countText.text));
            }
        }
@@ -426,7 +424,7 @@
            }
        }
        IEnumerator PlayXBAni(int targetIndex,int curSelectIndex)
        IEnumerator PlayXBAni(int targetIndex, int curSelectIndex)
        {
            int cycle = 1;
            float xbSpeed1 = startDelayTime;
@@ -440,7 +438,7 @@
                IsStartPlayAudio = true;
                curSelectIndex += 1;
                curSelectIndex %= xbItemlist.Count;
                if(curSelectIndex <= 0)
                if (curSelectIndex <= 0)
                {
                    curSelectIndex = xbItemlist.Count;
                }
@@ -451,7 +449,7 @@
                int remainIndex = targetIndexs[targetIndex].gridIndex - curSelectIndex;
                if(remainIndex < 0)
                if (remainIndex < 0)
                {
                    remainIndex = xbItemlist.Count + remainIndex;
                }
@@ -462,7 +460,7 @@
                    {
                        for (int i = 0; i < xbItemlist.Count; i++)
                        {
                            xbItemlist[i].CheckToFlashing(1,curSelectIndex);
                            xbItemlist[i].CheckToFlashing(1, curSelectIndex);
                        }
                        for (int i = 0; i < xbItemlist.Count; i++)
                        {
@@ -476,8 +474,8 @@
                            }
                            else
                            {
                                StartCoroutine(PlaySelectItemAni(false,targetIndex,curSelectIndex));
                                StartCoroutine(PlaySelectItemAni(false, targetIndex, curSelectIndex));
                            }
                        }
                        else
@@ -488,8 +486,8 @@
                    }
                    cycle += 1;
                }
                switch(targetIndex)
                switch (targetIndex)
                {
                    case 0:
                        xbSpeed1 -= xbA1 * 0.05f;
@@ -500,7 +498,7 @@
                        yield return new WaitForSeconds(xbSpeed1);
                        break;
                    case 9:
                        if(cycle > cycleTimes && remainIndex <= 4)
                        if (cycle > cycleTimes && remainIndex <= 4)
                        {
                            xbSpeed2 += XbA2 * 0.05f;
                            if (xbSpeed2 >= maxTimeInter)
@@ -523,23 +521,23 @@
                        yield return new WaitForSeconds(xbSpeed3);
                        break;
                }
            }
        }
        IEnumerator PlaySelectItemAni(bool isEndXB,int targetIndex = 0,int curSelectIndex = 0)
        IEnumerator PlaySelectItemAni(bool isEndXB, int targetIndex = 0, int curSelectIndex = 0)
        {
            XBGetItemConfig getItemConfig = XBModel.GetXBItemConfigByType(1);
            if(getItemConfig != null && getItemConfig.LuckyGridNum == curSelectIndex)
            if (getItemConfig != null && getItemConfig.LuckyGridNum == curSelectIndex)
            {
                yield return new WaitForSeconds(flashingTime*flashingTimes);
                yield return new WaitForSeconds(flashingTime * flashingTimes);
            }
            else
            {
                yield return new WaitForSeconds(stopTime);
            }
            if(isEndXB)
            if (isEndXB)
            {
                if (targetIndexs.Count > 1)
                {
System/HappyXB/RuneXBWin.cs
@@ -89,7 +89,7 @@
        {
            xbItemlist.Clear();
            int length = horTopContent.childCount;
            for(int i = 0; i < length; i++)
            for (int i = 0; i < length; i++)
            {
                XBItemCell xbItem = horTopContent.GetChild(i).GetComponent<XBItemCell>();
                xbItemlist.Add(xbItem);
@@ -101,7 +101,7 @@
                xbItemlist.Add(xbItem);
            }
            length = horBottomContent.childCount;
            for (int i = length - 1; i > - 1; i--)
            for (int i = length - 1; i > -1; i--)
            {
                XBItemCell xbItem = horBottomContent.GetChild(i).GetComponent<XBItemCell>();
                xbItemlist.Add(xbItem);
@@ -155,7 +155,7 @@
        protected override void OnAfterOpen()
        {
        }
        protected override void LateUpdate()
        {
@@ -210,10 +210,10 @@
        private void InitUI()
        {
            for (int i = 0; i < xbItemlist.Count;i++)
            for (int i = 0; i < xbItemlist.Count; i++)
            {
                if(getItemlist.Count > i)
                if (getItemlist.Count > i)
                {
                    xbItemlist[i].gameObject.SetActive(true);
                    xbItemlist[i].SetModel(getItemlist[i].itemId, getItemlist[i].count, getItemlist[i].gridIndex);
@@ -222,7 +222,7 @@
                {
                    xbItemlist[i].gameObject.SetActive(false);
                }
            }
            playeAudioTime = 0;
            IsStartPlayAudio = false;
@@ -232,7 +232,7 @@
            xbResultObj.SetActive(false);
            freeXbBtn.gameObject.SetActive(false);
            funcSet = XBModel.GetXBFuncSet(2);
            if(funcSet != null)
            if (funcSet != null)
            {
                xbBtnText.text = Language.Get("HappyXB101", funcSet.xbNums[0]);
                xbManyBtnText.text = Language.Get("HappyXB101", funcSet.xbNums[1]);
@@ -261,7 +261,7 @@
        private void RefreshFreeTime(float time)
        {
            if(isHaveFreeTime)
            if (isHaveFreeTime)
            {
                if (XBModel.IsHaveFreeXB(2))
                {
@@ -281,7 +281,7 @@
            {
                freeXBTimeText.gameObject.SetActive(false);
            }
        }
        private void RefreshSkipUI()
@@ -311,7 +311,7 @@
        {
            int xbToolCnt = 0;
            int needToolCnt = 0;
            if (XBModel.IsHaveManyXBTool(2, out xbToolCnt,out needToolCnt))
            if (XBModel.IsHaveManyXBTool(2, out xbToolCnt, out needToolCnt))
            {
                toolXBShowObj.SetActive(true);
                toolNumText.text = StringUtility.Contact("x", xbToolCnt);
@@ -426,11 +426,9 @@
                        ResetXBItemState();
                        WindowCenter.Instance.Open<HappyXBGetItemWin>();
                    }
                }); ;
                if(xbResultItemBasiclist[index].itemConfig != null)
                {
                    XBModel.GetNotifyResult(xbResultItemBasiclist[index].itemConfig.ID, int.Parse(xbResultItemBasiclist[index].countText.text));
                }
                });
                XBModel.GetNotifyResult(xbResultItemBasiclist[index].itemId, int.Parse(xbResultItemBasiclist[index].countText.text));
            }
        }
System/HappyXB/XBGetItemCell.cs
@@ -11,9 +11,10 @@
        {
            if (effect != null)
            {
                if (itemConfig != null)
                var config = ItemConfig.Get(itemId);
                if (config != null)
                {
                    switch ((TextColType)itemConfig.ItemColor)
                    switch ((TextColType)config.ItemColor)
                    {
                        case TextColType.Purple:
                            effect.effect = 1136;
System/HeavenBattle/XMZZCampVicRewardWin.cs
@@ -74,7 +74,7 @@
                item.transform.localScale = Vector3.one;
                item.name = StringUtility.Contact("RewardCell", id);
                item.gameObject.SetActive(true);
                item.InitModel(heavenModel.campVicRewardDict[id], id);
                item.InitModel(heavenModel.campVicRewardDict[id]);
                GetList.Add(item);
                item.button.RemoveAllListeners();
                item.button.AddListener(() =>
@@ -92,7 +92,7 @@
                item.transform.localScale = Vector3.one;
                item.name = StringUtility.Contact("RewardCell", id);
                item.gameObject.SetActive(true);
                item.InitModel(heavenModel.campFailRewardDict[id], id);
                item.InitModel(heavenModel.campFailRewardDict[id]);
                GetList.Add(item);
                item.button.RemoveAllListeners();
                item.button.AddListener(() =>
System/KnapSack/New/ChooseCell.cs
@@ -8,25 +8,23 @@
    {
        [SerializeField] GameObject chooseImage;
        [SerializeField] Text nameText;
        public int ItemId = 0;
        private void Awake()
        {
            ChooseItemWin.RefreshChooseCellAct += RefreshChooseImage;
            
        }
        public void InitModel(ItemCellModel model,int id)
        public void InitModel(ItemCellModel model)
        {
            base.Init(model);
            this.ItemId = id;
            nameText.text = itemConfig.ItemName;
            var config = ItemConfig.Get( itemId);
            nameText.text = config.ItemName;
            SetIsChoose(false);
        }
        private void RefreshChooseImage(int id)
        {
            if (id == ItemId)
            if (id == this.itemId)
            {
                SetIsChoose(true);
            }
System/KnapSack/New/CommonItemBaisc.cs
@@ -72,9 +72,9 @@
            }
        }
        public ItemConfig itemConfig;
        public int itemId { get; private set; }
        protected PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
        /// <summary>
@@ -84,7 +84,7 @@
        /// <param name="isCompare"></param>
        public virtual void Init(ItemModel model, bool isCompare = false)
        {
            itemConfig = model.config;
            itemId = model.itemId;
            InitUI(model.guid, model.itemId, (ulong)model.count, model.equipScore, model.isAuction, model.packType, isCompare, model.useDataDict);
        }
@@ -94,17 +94,18 @@
        /// <param name="model"></param>
        public virtual void Init(ItemCellModel model)
        {
            itemConfig = model.itemConfig;
            itemId = model.itemId;
            InitUI(model.guid, model.itemId, model.count, model.score, false, model.packType, model.isCompare, model.useDataDic);
        }
        private void InitUI(string guid, int itemId, ulong count, int score, bool isAuction, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic)
        {
            if (itemConfig == null) return;
            var config = ItemConfig.Get(itemId);
            if (config == null) return;
            itemIcon.gameObject.SetActive(true);
            bgIcon.gameObject.SetActive(true);
            itemIcon.SetSprite(itemConfig.IconKey);
            itemIcon.SetSprite(config.IconKey);
            bgIcon.SetItemBackGround(ItemLogicUtility.Instance.GetItemQuality(itemId, useDataDic));
            auctionIcon.gameObject.SetActive(isAuction);