| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | CrossServerOneVsOnePlayerInfo.Instance.UpdatePlayerInfoEvent -= UpdatePlayerInfo;
|
| | | CrossServerOneVsOnePKSeason.Instance.updateSelfSeasonEvent -= UpdateSeason;
|
| | | TimeMgr.Instance.OnMinuteEvent -= UpdateMinute;
|
| | | dungeonModel.updateMissionEvent -= UpdateFBHelp;
|
| | | rewardModel.CrossRealmPKAwardStateUpdate -= UpdateDayAwardState;
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | CrossServerOneVsOnePlayerInfo.Instance.UpdatePlayerInfoEvent += UpdatePlayerInfo;
|
| | | CrossServerOneVsOnePKSeason.Instance.updateSelfSeasonEvent += UpdateSeason;
|
| | | TimeMgr.Instance.OnMinuteEvent += UpdateMinute;
|
| | | rewardModel.CrossRealmPKAwardStateUpdate += UpdateDayAwardState;
|
| | | CrossServerOneVsOnePlayerInfo.Instance.UpdatePlayerInfoEvent += UpdateDayAwardState;
|
| | |
| | | SendCrossMatch(1);
|
| | | }
|
| | |
|
| | | UpdateCrossArenaRedpoint();
|
| | | UpdateCrossDayAwardsRedpoint();
|
| | | UpdateCrossMatchRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | oneVsOneHistoryDict.Clear();
|
| | | }
|
| | |
|
| | |
|
| | | private void UpdateMinute()
|
| | | {
|
| | | UpdateCrossMatchRedpoint();
|
| | | if (!IsMatching) return;
|
| | |
|
| | | if(!CrossServerOneVsOnePKSeason.Instance.isSatisfyMatch)
|
| | |
| | | UpdateDayAwardsEvent();
|
| | | }
|
| | |
|
| | | UpdateCrossArenaRedpoint();
|
| | | UpdateCrossDayAwardsRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdateSeason()
|
| | | {
|
| | | UpdateCrossMatchRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdatePlayerInfo()
|
| | | {
|
| | | UpdateCrossDayAwardsRedpoint();
|
| | | UpdateCrossMatchRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdateFBHelp()
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("CrossMatching7");
|
| | | return true;
|
| | | }
|
| | |
|
| | | int remainMatchNum = CrossServerOneVsOnePlayerInfo.Instance.GetDayRemainNum();
|
| | | if(remainMatchNum <= 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("CrossMatching16");
|
| | | return true;
|
| | | }
|
| | |
|
| | | return false;
|
| | |
|
| | | }
|
| | |
| | | division = data.DanLV,
|
| | | order = data.Order,
|
| | | rewardLevel = data.AwardLV,
|
| | | score = (int)data.Score,
|
| | | score = (int)data.Score
|
| | | };
|
| | | }
|
| | | if (oneVsOneHistoryRefresh != null)
|
| | |
| | | public Redpoint crossDayAwardsRedpoint = new Redpoint(CrossArenaRedKey,CrossDayAwardsRedKey);
|
| | | public const int CrossMatchRedKey = 21301012;
|
| | | public Redpoint crossMatchRedpoint = new Redpoint(CrossArenaRedKey, CrossMatchRedKey);
|
| | | public void UpdateCrossArenaRedpoint()
|
| | | public void UpdateCrossDayAwardsRedpoint()
|
| | | {
|
| | | var playerInfo = CrossServerOneVsOnePlayerInfo.Instance;
|
| | | var pkSeason = CrossServerOneVsOnePKSeason.Instance;
|
| | |
|
| | | if(pkSeason.InPkSeason(TimeUtility.ServerNow) |
| | | && pkSeason.InOpenTime()
|
| | | && playerInfo.GetDayRemainNum() > 0)
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | |
| | | bool isReceive = false;
|
| | | for(int i = 0; i < dayAwardTypelist.Count; i++)
|
| | | {
|
| | |
| | | {
|
| | | crossDayAwardsRedpoint.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | if(crossMatchRedpoint.state != RedPointState.None)
|
| | | public void UpdateCrossMatchRedpoint()
|
| | | {
|
| | | var playerInfo = CrossServerOneVsOnePlayerInfo.Instance;
|
| | | var pkSeason = CrossServerOneVsOnePKSeason.Instance;
|
| | |
|
| | | if (pkSeason.isSatisfyMatch
|
| | | && playerInfo.GetDayRemainNum() > 0)
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if (crossMatchRedpoint.state != RedPointState.None)
|
| | | {
|
| | | crossServerRedpoint.count = playerInfo.GetDayRemainNum();
|
| | | crossServerRedpoint.state = RedPointState.Quantity;
|