| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | CrossServerOneVsOnePKSeason.Instance.updateSelfSeasonEvent -= UpdateSeason;
|
| | | TimeMgr.Instance.OnMinuteEvent -= UpdateMinute;
|
| | | dungeonModel.updateMissionEvent -= UpdateFBHelp;
|
| | | rewardModel.CrossRealmPKAwardStateUpdate -= UpdateDayAwardState;
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | CrossServerOneVsOnePKSeason.Instance.updateSelfSeasonEvent += UpdateSeason;
|
| | | TimeMgr.Instance.OnMinuteEvent += UpdateMinute;
|
| | | rewardModel.CrossRealmPKAwardStateUpdate += UpdateDayAwardState;
|
| | | CrossServerOneVsOnePlayerInfo.Instance.UpdatePlayerInfoEvent += UpdateDayAwardState;
|
| | |
| | | SendCrossMatch(1);
|
| | | }
|
| | |
|
| | | UpdateCrossArenaRedpoint();
|
| | | UpdateCrossDayAwardsRedpoint();
|
| | | UpdateCrossMatchRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | |
|
| | | private void UpdateMinute()
|
| | | {
|
| | | UpdateCrossMatchRedpoint();
|
| | | if (!IsMatching) return;
|
| | |
|
| | | if(!CrossServerOneVsOnePKSeason.Instance.isSatisfyMatch)
|
| | |
| | | UpdateDayAwardsEvent();
|
| | | }
|
| | |
|
| | | UpdateCrossArenaRedpoint();
|
| | | UpdateCrossDayAwardsRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdateSeason()
|
| | | {
|
| | | 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;
|
| | |
|
| | | }
|
| | |
| | | public int order;
|
| | | public int division;
|
| | | public int rewardLevel;
|
| | | public int score;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | #endregion
|
| | |
|
| | | #region 红点
|
| | | public const int CrossServerRedKey = 213;
|
| | | public Redpoint crossServerRedpoint = new Redpoint(CrossServerRedKey);
|
| | | public const int CrossOneVsOneRedKey = 21301;
|
| | | public Redpoint crossOneVsOneRedpoint = new Redpoint(CrossOneVsOneRedKey);
|
| | | public Redpoint crossOneVsOneRedpoint = new Redpoint(CrossServerRedKey,CrossOneVsOneRedKey);
|
| | | public const int CrossArenaRedKey = 2130101;
|
| | | public Redpoint crossArenaRedpoint = new Redpoint(CrossOneVsOneRedKey, CrossArenaRedKey);
|
| | | public const int CrossDayAwardsRedKey = 21301011;
|
| | | 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;
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateCrossMatchRedpoint()
|
| | | {
|
| | | 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;
|
| | | }
|
| | |
|
| | | if (crossMatchRedpoint.state != RedPointState.None)
|
| | | {
|
| | | crossServerRedpoint.count = playerInfo.GetDayRemainNum();
|
| | | crossServerRedpoint.state = RedPointState.Quantity;
|
| | | }
|
| | | else
|
| | | {
|
| | | crossServerRedpoint.count = 0;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | | }
|
| | | }
|