少年修仙传客户端代码仓库
client_Wu Xijin
2018-09-18 85dbbfe4afb6998394640d086d60fdc7ba105aaf
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
3个文件已修改
180 ■■■■ 已修改文件
System/Vip/VipInvest/VipInvestModel.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/VipInvestWin.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowJump/WindowJumpMgr.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/VipInvestModel.cs
@@ -121,19 +121,18 @@
            VipInvestRedPoint();
            VipInvestWin.VipInvestRedPointEvent -= VipInvestRedPointEvent;
            VipInvestWin.VipInvestRedPointEvent += VipInvestRedPointEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
            FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
            FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
            IsShowRedPointSimple();
        }
        private void Updatefighting(PlayerDataRefresh _tCDBPlayerRefresh)
        private void OnFuncStateChangeEvent(int funcOpenID)
        {
            if (_tCDBPlayerRefresh == PlayerDataRefresh.LV)
            if (funcOpenID == 120)
            {
                IsShowRedPointSimple();
            }
        }
        private void VipInvestRedPointEvent()
        {
            RedPointSate();
@@ -411,23 +410,10 @@
        private List<InvestConfig> configlist;
        private const int Redpoint_key1 = 20911;
        public Redpoint redPointStre1 = new Redpoint(209, Redpoint_key1);//Vip 投资红点
        private const int Redpoint_key1_Week1 = 2091101;
        private const int Redpoint_key1_Week2 = 2091102;
        private const int Redpoint_key1_Week3 = 2091103;
        private const int Redpoint_key1_Week4 = 2091104;
        public Redpoint redPointStre1_v1 = new Redpoint(Redpoint_key1, Redpoint_key1_Week1);
        public Redpoint redPointStre1_v2 = new Redpoint(Redpoint_key1, Redpoint_key1_Week2);
        public Redpoint redPointStre1_v3 = new Redpoint(Redpoint_key1, Redpoint_key1_Week3);
        public Redpoint redPointStre1_v4 = new Redpoint(Redpoint_key1, Redpoint_key1_Week4);
        public int JumpIndex = 0;
        private void VipInvestRedPoint()//Vip 投资红点
        {
            JumpIndex = 0;
            redPointStre1_v1.state = RedPointState.None;
            redPointStre1_v2.state = RedPointState.None;
            redPointStre1_v3.state = RedPointState.None;
            redPointStre1_v4.state = RedPointState.None;
            redPointStre1.state = RedPointState.None;
            InvestInfo = GetInvestInfoByType((int)InvestType.Vip);
            cycle = GetInvestCycle(InvestInfo.curDay);
            if (InvestInfo.investGold <= 0)
@@ -445,24 +431,7 @@
                RewardRecordState recordState = GetRecordByIndex((int)InvestType.Vip, config.needDay);
                if (recordState == RewardRecordState.NoReceive)
                {
                    switch (cycle)
                    {
                        case 1:
                            redPointStre1_v1.state = RedPointState.GetReward;
                            break;
                        case 2:
                            redPointStre1_v2.state = RedPointState.GetReward;
                            break;
                        case 3:
                            redPointStre1_v3.state = RedPointState.GetReward;
                            break;
                        case 4:
                            redPointStre1_v4.state = RedPointState.GetReward;
                            break;
                        default:
                            break;
                    }
                    // redPointStre1.state = RedPointState.Simple;
                    redPointStre1.state = RedPointState.GetReward;
                    JumpIndex = i;
                    return;
                }
@@ -483,7 +452,7 @@
        }
        private void RedPointSate()//Vip投资红点前三天
        private void RedPointSate()//为投资红点
        {
            if (InvestInfo.investGold > 0)
            {
@@ -506,18 +475,15 @@
            int day = LocalSave.GetInt(strKey);
            if (day != GetDayOfYear)
            {
                if (TimeUtility.CreateDays <= DisplayDays && redPointStre1.state == RedPointState.None
                    && PlayerDatas.Instance.baseData.LV >= DisplayLevel)
                if (redPointStre1.state == RedPointState.None
                    && FuncOpen.Instance.IsFuncOpen(120))
                {
                    LocalSave.SetInt(strKey, GetDayOfYear);
                    IsRedpoint = true;
                    RedPointSate();
                }
            }
        }
    }
System/Vip/VipInvest/VipInvestWin.cs
@@ -13,13 +13,6 @@
        [SerializeField] Button investBtn;
        [SerializeField] GameObject m_Realized_BGM;
        [SerializeField] Text m_RemainingDays;//剩余天数
        //---------------------------------
        [SerializeField] Transform m_ButtonGroup;//按钮组
        [SerializeField] Button m_Button_one;
        [SerializeField] Button m_Button_Two;
        [SerializeField] Button m_Button_Three;
        [SerializeField] Button m_Button_Four;
        [SerializeField] Button m_GoToVipBoss;
        VipInvestModel _investModel;
        VipInvestModel investModel { get { return _investModel ?? (_investModel = ModelCenter.Instance.GetModel<VipInvestModel>()); } }
@@ -35,14 +28,11 @@
        {
            ctrl.OnRefreshCell += RefreshRewardCell;
            ctrl.lockType = EnhanceLockType.KeepVertical;
            investBtn.AddListener(ClickInvestBtn);
        }
        protected override void AddListeners()
        {
            m_Button_one.AddListener(OnclickButtonOne);
            m_Button_Two.AddListener(OnClickButtonTwo);
            m_Button_Three.AddListener(OnClickButtonThree);
            m_Button_Four.AddListener(OnClickButtonFour);
            investBtn.AddListener(ClickInvestBtn);
            m_GoToVipBoss.AddListener(OnClickVipBossWin);
        }
@@ -59,7 +49,7 @@
            }
            else
            {
                m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, (28 - InvestInfo.curDay).ToString(), true));
                m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, (7 - InvestInfo.curDay).ToString(), true));
            }
            if (InvestInfo.investGold <= 0)
@@ -73,15 +63,14 @@
                m_Realized_BGM.SetActive(true);
                investBtn.gameObject.SetActive(false);
            }
            SwithWeek(cycle);
            //configlist = investModel.GetInvestConfiglistByCycle(cycle);
            //CreateRewardCell();
            configlist = investModel.GetInvestConfiglistByCycle(cycle);
            CreateRewardCell();
            investModel.RefreshInvestAct += RefreshInvestState;
        }
        protected override void OnAfterOpen()
        {
            if (investModel.redPointStre1.state==RedPointState.Simple)
            if (investModel.redPointStre1.state == RedPointState.Simple)
            {
                investModel.IsRedpoint = false;
                if (VipInvestRedPointEvent != null)
@@ -91,7 +80,6 @@
            }
        }
        protected override void OnPreClose()
        {
            investModel.RefreshInvestAct -= RefreshInvestState;
@@ -100,8 +88,6 @@
        protected override void OnAfterClose()
        {
        }
        private void RefreshInvestState(int obj)
        {
            if (obj == 2)
@@ -125,7 +111,7 @@
                }
                else
                {
                    m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, (28 - InvestInfo.curDay).ToString(), true));
                    m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, (7 - InvestInfo.curDay).ToString(), true));
                }
            }
        }
@@ -148,7 +134,7 @@
                }
                ctrl.Restart();
            }
            int a_Week= investModel.GetInvestCycle(InvestInfo.curDay);
            int a_Week = investModel.GetInvestCycle(InvestInfo.curDay);
            if (a_Week == cycle)
            {
                ctrl.JumpIndex(investModel.JumpIndex);
@@ -157,7 +143,7 @@
            {
                ctrl.JumpIndex(0);
            }
        }
        private void RefreshRewardCell(ScrollerDataType type, CellView cell)
@@ -197,7 +183,6 @@
                    itemBaisc.gameObject.SetActive(false);
                }
            }
            button.RemoveAllListeners();
            RewardRecordState recordState = investModel.GetRecordByIndex((int)InvestType.Vip, config.needDay);
            switch (recordState)
@@ -263,7 +248,6 @@
            }
        }
        private void ClickReceiveBtn(InvestConfig config)
        {
            investModel.SendGetInvestRewardQuest((int)InvestType.Vip, config.needDay);
@@ -271,19 +255,17 @@
        private void ClickInvestBtn()
        {
            if (PlayerDatas.Instance.baseData.VIPLv < 4)
            if (PlayerDatas.Instance.baseData.VIPLv < 3)
            {
                SysNotifyMgr.Instance.ShowTip("VipInvestmentLimit");
                return;
            }
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("WhetherToInvest_Z"), (bool isOk) =>
            {
                if (isOk)
                {
                    int getFairyJade = (int)UIHelper.GetMoneyCnt(1);
                    if (getFairyJade >= 300)
                    if (getFairyJade >= 98)
                    {
                        investModel.SendInvestQuest((int)InvestType.Vip, 0);
                    }
@@ -294,96 +276,10 @@
                }
            });
        }
        private void CloseAllSelected()
        {
            for (int i = 0; i < m_ButtonGroup.childCount; i++)
            {
                var selected = m_ButtonGroup.GetChild(i).transform.Find("Selected").gameObject;
                if (selected.activeSelf)
                {
                    selected.SetActive(false);
                }
            }
        }
        private void OnclickButtonOne()
        {
            CloseAllSelected();
            var selected = m_Button_one.transform.Find("Selected").gameObject;
            if (!selected.activeSelf)
            {
                selected.SetActive(true);
            }
            cycle = 1;
            configlist = investModel.GetInvestConfiglistByCycle(cycle);
            CreateRewardCell();
        }
        private void OnClickButtonTwo()
        {
            CloseAllSelected();
            var selected = m_Button_Two.transform.Find("Selected").gameObject;
            if (!selected.activeSelf)
            {
                selected.SetActive(true);
            }
            cycle = 2;
            configlist = investModel.GetInvestConfiglistByCycle(cycle);
            CreateRewardCell();
        }
        private void OnClickButtonThree()
        {
            CloseAllSelected();
            var selected = m_Button_Three.transform.Find("Selected").gameObject;
            if (!selected.activeSelf)
            {
                selected.SetActive(true);
            }
            cycle = 3;
            configlist = investModel.GetInvestConfiglistByCycle(cycle);
            CreateRewardCell();
        }
        private void OnClickButtonFour()
        {
            CloseAllSelected();
            var selected = m_Button_Four.transform.Find("Selected").gameObject;
            if (!selected.activeSelf)
            {
                selected.SetActive(true);
            }
            cycle = 4;
            configlist = investModel.GetInvestConfiglistByCycle(cycle);
            CreateRewardCell();
        }
        private void OnClickVipBossWin()
        {
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FindPreciousFrameFunc3);
        }
        private void SwithWeek(int cycle_int)
        {
            switch (cycle_int)
            {
                case 1:
                    OnclickButtonOne();
                    break;
                case 2:
                    OnClickButtonTwo();
                    break;
                case 3:
                    OnClickButtonThree();
                    break;
                case 4:
                    OnClickButtonFour();
                    break;
                default:
                    break;
            }
        }
    }
}
System/WindowJump/WindowJumpMgr.cs
@@ -377,6 +377,7 @@
                break;
            case JumpUIType.PetFunc1:
            case JumpUIType.PetFunc2:
            case JumpUIType.FairyGrabBoss:
                SetJumpLogic<PetWin>(_tagWinSearchModel.TABID);
                break;
            case JumpUIType.PetStone:
@@ -520,9 +521,6 @@
                SetJumpLogic<FindPreciousFrameWin>(_tagWinSearchModel.TABID);
                break;
            case JumpUIType.LootPreciousFrameFunc1:
                SetJumpLogic<LootPreciousFrameWin>(_tagWinSearchModel.TABID);
                break;
            case JumpUIType.FairyGrabBoss:
                SetJumpLogic<LootPreciousFrameWin>(_tagWinSearchModel.TABID);
                break;
            case JumpUIType.LootPreciousFrameSpec: