少年修仙传客户端代码仓库
wuxijin999
2019-07-19 1e5238f31da649660c13799dade65cd90b26c9a0
3335 添加全民冲榜获取途径的vip等级限制
3个文件已修改
98 ■■■■■ 已修改文件
System/OpenServerActivity/ImpactRankModel.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/ImpactRankPromoteCell.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/ImpactRankWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/ImpactRankModel.cs
@@ -1,7 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Text.RegularExpressions;
using System;
using System.Linq;
@@ -107,13 +107,35 @@
        public Dictionary<int, List<RankAwardItem>> billRankAwardDict { get; private set; }
        public Dictionary<int, List<OSCBillTagAwardConfig>> billTagCfgDict { get; private set; }
        public Dictionary<int, List<RankAwardItem>> billTagAwardDict { get; private set; }
        public Dictionary<int, int[]> billRankPromotePathDict { get; private set; }
        public Dictionary<int, Int2[]> billRankPromotePathDict { get; private set; }
        public Dictionary<int, OSCbillBoardCondition> impactRankTypeOpenDict { get; private set; }
        public Dictionary<int, List<OSCBillTagAwardConfig>> billTagSortCfgDict { get; private set; }
        public List<int> impactRankSorts = new List<int>();
        public int openServerActivityDays { get; private set; }
        public int openServerRankDays { get; private set; }
        public int gotoImpactRankType { get; set; }
        public List<Int2> GetBillRankPromotePaths(int type)
        {
            if (!billRankPromotePathDict.ContainsKey(type))
            {
                return null;
            }
            var paths = billRankPromotePathDict[type];
            var filtratePaths = new List<Int2>();
            foreach (var path in paths)
            {
                if (PlayerDatas.Instance.baseData.VIPLv >= path.y)
                {
                    filtratePaths.Add(path);
                }
            }
            return filtratePaths;
        }
        private void ParseConfig()
        {
            billRankCfgDict = new Dictionary<int, List<OSCBillRankAwardConfig>>();
@@ -198,15 +220,25 @@
                }
            }
            billRankPromotePathDict = new Dictionary<int, int[]>();
            billRankPromotePathDict = new Dictionary<int, Int2[]>();
            var _funcCfg = FuncConfigConfig.Get("OSCBillRankTypePromote");
            var _json = LitJson.JsonMapper.ToObject(_funcCfg.Numerical1);
            foreach (var _key in _json.Keys)
            {
                var _type = int.Parse(_key);
                var _wayArray = LitJson.JsonMapper.ToObject<int[]>(_json[_key].ToJson());
                billRankPromotePathDict.Add(_type, _wayArray);
                var subJson = _json[_key];
                billRankPromotePathDict[_type] = new Int2[subJson.Keys.Count];
                var index = 0;
                foreach (var subKey in subJson.Keys)
                {
                    var path = int.Parse(subKey);
                    var vipLevel = int.Parse(subJson[subKey].ToString());
                    billRankPromotePathDict[_type][index] = new Int2(path, vipLevel);
                    index++;
                }
            }
            _funcCfg = FuncConfigConfig.Get("OSCBillboardOpen");
            _json = LitJson.JsonMapper.ToObject(_funcCfg.Numerical1);
            openServerActivityDays = int.Parse(_funcCfg.Numerical2);
@@ -237,7 +269,7 @@
            return x.Condition.CompareTo(y.Condition);
        }
        public ImpactRankAwardType GetAwardType(int _type,int _index)
        public ImpactRankAwardType GetAwardType(int _type, int _index)
        {
            if (_index >= billRankCfgDict[_type].Count)
            {
@@ -417,11 +449,9 @@
        #endregion
        public event Action OnSelectRankTypeEvent;
        private int m_PresentSelectType = 0;
        public int presentSelectType
        {
        public int presentSelectType {
            get { return m_PresentSelectType; }
            set
            {
            set {
                m_PresentSelectType = value;
                if (OnSelectRankTypeEvent != null)
                {
@@ -439,8 +469,7 @@
        public class RankAwardItem
        {
            private Dictionary<int, List<Item>> m_AwardDict = new Dictionary<int, List<Item>>();
            public Dictionary<int, List<Item>> AwardDic
            {
            public Dictionary<int, List<Item>> AwardDic {
                get { return m_AwardDict; }
            }
            public List<Item> GetAwardItem(int _job)
@@ -463,11 +492,9 @@
        }
        private RankType m_PresentBillRankType = RankType.OpenServerMount;
        public RankType presentBillRankType
        {
        public RankType presentBillRankType {
            get { return m_PresentBillRankType; }
            set
            {
            set {
                m_PresentBillRankType = value;
                if (CoroutineMgr.Instance.CanBegRank((int)m_PresentBillRankType))
                {
@@ -626,7 +653,7 @@
            {
                var awardType = GetAwardType(_type, i);
                var _index = GetBillIndex(_type, i);
                if (awardType==ImpactRankAwardType.Target)
                if (awardType == ImpactRankAwardType.Target)
                {
                    var _cfg = GetTagAwardConfig(_type, i);
                    if (!_playerData.IsTagGet(GetTagIndex(_type, _index)))
@@ -717,35 +744,27 @@
        #region 主界面特效
        public bool OSCEffectOpen { get; set; }
        public bool IsOpen
        {
            get
            {
        public bool IsOpen {
            get {
                return TimeUtility.OpenDay < openServerActivityDays && FuncOpen.Instance.IsFuncOpen(125);
            }
        }
        public bool priorityOpen
        {
            get
            {
        public bool priorityOpen {
            get {
                var state = impactRankRedpoint.state;
                return state == RedPointState.Simple || state == RedPointState.GetReward;
            }
        }
        public bool IsInImpactRank
        {
            get
            {
        public bool IsInImpactRank {
            get {
                return TimeUtility.OpenDay < openServerRankDays && FuncOpen.Instance.IsFuncOpen(125);
            }
        }
        public bool IsAdvance
        {
            get
            {
        public bool IsAdvance {
            get {
                return false;
            }
        }
System/OpenServerActivity/ImpactRankPromoteCell.cs
@@ -26,15 +26,15 @@
        public override void Refresh(CellView cell)
        {
            var _line = cell.index;
            var _array = model.billRankPromotePathDict[model.presentSelectType];
            var _array = model.GetBillRankPromotePaths(model.presentSelectType);
            for (int i = 0; i < 2; i++)
            {
                int _index = _line * 2 + i;
                if (_index < _array.Length)
                if (_index < _array.Count)
                {
                    m_WayCells[i].gameObject.SetActive(true);
                    var _way = _array[_index];
                    m_WayCells[i].Display(0, _way);
                    m_WayCells[i].Display(0, _way.x);
                }
                else
                {
@@ -42,6 +42,8 @@
                }
            }
        }
    }
}
System/OpenServerActivity/ImpactRankWin.cs
@@ -276,8 +276,8 @@
            m_PromotePathCtrl.Refresh();
            if (model.billRankPromotePathDict.ContainsKey(model.presentSelectType))
            {
                var _array = model.billRankPromotePathDict[model.presentSelectType];
                var _line = Mathf.CeilToInt((float)_array.Length / 2);
                var _array = model.GetBillRankPromotePaths(model.presentSelectType);
                var _line = Mathf.CeilToInt((float)_array.Count / 2);
                for (int i = 0; i < _line; i++)
                {
                    m_PromotePathCtrl.AddCell(ScrollerDataType.Header, i);
@@ -309,6 +309,7 @@
                    });
                }
            }
            var _tip = string.Empty;
            _cell.getBtn.gameObject.SetActive(false);
            _cell.unCompleteImg.gameObject.SetActive(false);