| | |
| | | {
|
| | | onStateUpate(0);
|
| | | }
|
| | | if (inImpactRankUpdate != null)
|
| | | {
|
| | | inImpactRankUpdate();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnServerOpenDayRefresh()
|
| | | {
|
| | | UpdateRedpoint();
|
| | | if (inImpactRankUpdate != null)
|
| | | {
|
| | | inImpactRankUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnRefreshRank(int type)
|
| | |
| | | public Dictionary<int, OSCbillBoardCondition> impactRankTypeOpenDict { get; private set; }
|
| | | public Dictionary<int, List<OSCBillTagAwardConfig>> billTagSortCfgDict { get; private set; }
|
| | | public int openServerActivityDays { get; private set; }
|
| | | public int openServerRankDays { get; private set; }
|
| | | public int gotoImpactRankType { get; set; }
|
| | | private void ParseConfig()
|
| | | {
|
| | |
| | | _json = LitJson.JsonMapper.ToObject(_funcCfg.Numerical1);
|
| | | openServerActivityDays = int.Parse(_funcCfg.Numerical2);
|
| | | impactRankTypeOpenDict = new Dictionary<int, OSCbillBoardCondition>();
|
| | | openServerRankDays = 0;
|
| | | foreach (var _key in _json.Keys)
|
| | | {
|
| | | var _type = int.Parse(_key);
|
| | |
| | | start = _array[1],
|
| | | end = _array[2]
|
| | | };
|
| | | if (_condition.end > openServerRankDays)
|
| | | {
|
| | | openServerRankDays = _condition.end;
|
| | | }
|
| | | impactRankTypeOpenDict.Add(_type, _condition);
|
| | | m_Redpoints.Add(_type, new Redpoint(Redpoint_Key_ImpactRank, Redpoint_Key_ImpactRank * 100 + _type));
|
| | | }
|
| | |
| | | #region 协议
|
| | | public event Action OnAwardGetEvent;
|
| | | public event Action<int> onStateUpate;
|
| | | public event Action inImpactRankUpdate;
|
| | |
|
| | | private Dictionary<int, OpenServerPlayerData> impactAwardGetDict = new Dictionary<int, OpenServerPlayerData>();
|
| | | public void UpdateGetState(HAB17_tagMCOpenServerCampaignAwardList _package)
|
| | |
| | | return state == RedPointState.Simple || state == RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsInImpactRank
|
| | | {
|
| | | get
|
| | | {
|
| | | return TimeUtility.OpenDay < openServerRankDays && FuncOpen.Instance.IsFuncOpen(125);
|
| | | }
|
| | | }
|
| | | #endregion
|
| | | }
|
| | |
|