少年修仙传客户端代码仓库
client_linchunjie
2019-06-11 51abb5e97a801826086a81933fac828c4e1a1c24
7202 子 【2.0】【开发】周卡、月卡功能 / 【2.0】【前端】周卡、月卡功能
5个文件已修改
105 ■■■■■ 已修改文件
System/DailyQuest/DayRemind.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/FairyJadeInvestmentModel.cs 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/MonthWeekInvestCell.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/MonthWeekInvestModel.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/MonthWeekInvestWin.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DailyQuest/DayRemind.cs
@@ -113,7 +113,7 @@
        SetDayRemind(EQUIPSTRENGTH_REDPOINT);
    }
    private void SetDayRemind(string _key)
    public void SetDayRemind(string _key)
    {
        var intarray = LocalSave.GetIntArray(StringUtility.Contact(_key, PlayerDatas.Instance.baseData.PlayerID));
        if (dayRemindDic.ContainsKey(_key))
System/Vip/FairyJadeInvestmentModel.cs
@@ -287,55 +287,61 @@
        int playerLevel = PlayerDatas.Instance.baseData.LV;
        int investGear = fairyInvestInfos.ContainsKey(fairyInvestType) ? fairyInvestInfos[fairyInvestType].gear : 0;
        var investItems = fairyInvestItems[fairyInvestType];
        var index = 0;
        foreach (var investItem in investItems.Values)
        if (fairyInvestLevelLimits.ContainsKey(fairyInvestType))
        {
            if (playerLevel >= investItem.levelLimit)
            int investGear = fairyInvestInfos.ContainsKey(fairyInvestType) ? fairyInvestInfos[fairyInvestType].gear : 0;
            var investItems = fairyInvestItems[fairyInvestType];
            var index = 0;
            foreach (var investItem in investItems.Values)
            {
                if (investGear != 0)
                if (playerLevel >= investItem.levelLimit)
                {
                    var gear = fairyInvestSingleInfos[fairyInvestType][investItem.id];
                    if (gear == 0)
                    if (investGear != 0)
                    {
                        redpointAble = true;
                        prioritySelectIndex = index;
                        break;
                    }
                    else
                    {
                        var currentItems = investItem.items.ContainsKey(investGear) ? investItem.items[investGear] : null;
                        var items = investItem.items.ContainsKey(gear) ? investItem.items[gear] : null;
                        if (currentItems[0].count > items[0].count)
                        var gear = fairyInvestSingleInfos[fairyInvestType][investItem.id];
                        if (gear == 0)
                        {
                            redpointAble = true;
                            prioritySelectIndex = index;
                            break;
                        }
                        else
                        {
                            var currentItems = investItem.items.ContainsKey(investGear) ? investItem.items[investGear] : null;
                            var items = investItem.items.ContainsKey(gear) ? investItem.items[gear] : null;
                            if (currentItems[0].count > items[0].count)
                            {
                                redpointAble = true;
                                prioritySelectIndex = index;
                                break;
                            }
                        }
                    }
                }
                index++;
            }
            index++;
            index = 0;
            if (!redpointAble && investGear != 0)
            {
                foreach (var investItem in investItems.Values)
                {
                    if (investItem.levelLimit > playerLevel)
                    {
                        prioritySelectIndex = index;
                        return;
                    }
                    index++;
                }
            }
        }
        redpoint.state = redpointAble ? RedPointState.GetReward : RedPointState.None;
        index = 0;
        if (!redpointAble && investGear != 0)
        {
            foreach (var investItem in investItems.Values)
            {
                if (investItem.levelLimit > playerLevel)
                {
                    prioritySelectIndex = index;
                    return;
                }
                index++;
            }
        }
    }
    private void RedPointSate()//月卡投资创角前三天红点
    {
System/Vip/VipInvest/MonthWeekInvestCell.cs
@@ -48,9 +48,9 @@
                m_ContainerOverdue.gameObject.SetActive(state == 4);
                var rate = model.GetIncomeRate(model.selectType, config.needDay);
                var lastRate = model.GetIncomeRate(model.selectType, config.needDay - 1);
                var lastRate = (int)model.GetIncomeRate(model.selectType, config.needDay - 1);
                if (rate != lastRate)
                if ((int)rate != lastRate)
                {
                    m_Income.text = Language.Get("MonthWeekIncomeRate", rate);
                }
System/Vip/VipInvest/MonthWeekInvestModel.cs
@@ -75,6 +75,11 @@
        public void OnPlayerLoginOk()
        {
            foreach (var type in investTypes)
            {
                DayRemind.Instance.SetDayRemind("MonthWeekInvest_" + type);
            }
            UpdateRedpoint();
        }
@@ -230,11 +235,11 @@
            return 0;
        }
        public int GetIncomeRate(int type, int day)
        public float GetIncomeRate(int type, int day)
        {
            var orderInfoId = GetOrderInfoId(type);
            var orderInfoConfig = OrderInfoConfig.Get(orderInfoId);
            var money = orderInfoConfig.PayRMBNum * 10;
            var money = (int)orderInfoConfig.PayRMBNum * 10;
            var income = 0;
            if (m_InvestItems.ContainsKey(type))
            {
@@ -247,7 +252,7 @@
                    }
                }
            }
            return income / (int)money;
            return (float)Math.Round((float)income / money, 2);
        }
        public bool TryGetItems(int type, int id, out List<Item> items)
@@ -308,6 +313,12 @@
            vipModel.CTG(config);
        }
        public void SetDayRemind(int type)
        {
            DayRemind.Instance.SetDayRemind("MonthWeekInvest_" + type, true);
            UpdateRedpoint();
        }
        public void OnReceivePackage(HA337_tagMCGoldInvestInfo package)
        {
            if (!investTypes.Contains(package.InvestType))
@@ -345,12 +356,17 @@
        void UpdateRedpoint()
        {
            List<int> redpointTypes = new List<int>();
            List<int> dayReminds = new List<int>();
            if (IsOpen)
            {
                foreach (var type in investTypes)
                {
                    if (!IsInvested(type))
                    {
                        if (!DayRemind.Instance.GetDayRemind("MonthWeekInvest_" + type))
                        {
                            dayReminds.Add(type);
                        }
                        continue;
                    }
                    foreach (var id in m_InvestItems[type].Keys)
@@ -365,7 +381,7 @@
            }
            foreach (var type in m_Redpoints.Keys)
            {
                m_Redpoints[type].state = redpointTypes.Contains(type) ? RedPointState.GetReward : RedPointState.None;
                m_Redpoints[type].state = redpointTypes.Contains(type) ? RedPointState.GetReward : dayReminds.Contains(type) ? RedPointState.Simple : RedPointState.None;
            }
        }
System/Vip/VipInvest/MonthWeekInvestWin.cs
@@ -50,6 +50,8 @@
        {
            base.OnActived();
            Display();
            model.SetDayRemind(model.selectType);
        }
        protected override void OnAfterOpen()
@@ -145,6 +147,7 @@
        private void OnSelectUpdate()
        {
            Display();
            model.SetDayRemind(model.selectType);
        }
        private void OnInvestUpdate()