Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case DailyQuestType.CrossServerPk:
|
| | | {
|
| | | if(TimeUtility.OpenDay < ModelCenter.Instance.GetModel<CrossServerOneVsOneModel>().afterOpenDayOpenCross)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | if (config.UnLockFuncID != 0)
|
| | | {
|
| | |
| | | {
|
| | | SendCrossMatch(1);
|
| | | }
|
| | |
|
| | | UpdateCrossArenaRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | {
|
| | | UpdateDayAwardsEvent();
|
| | | }
|
| | |
|
| | | UpdateCrossArenaRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdateFBHelp()
|
| | |
| | | #endregion
|
| | |
|
| | | #region 红点
|
| | | public const int CrossOneVsOneRedKey = 21301;
|
| | | public Redpoint crossOneVsOneRedpoint = new Redpoint(CrossOneVsOneRedKey);
|
| | | public const int CrossArenaRedKey = 2130101;
|
| | | public Redpoint crossArenaRedpoint = new Redpoint(CrossArenaRedKey);
|
| | | public Redpoint crossArenaRedpoint = new Redpoint(CrossOneVsOneRedKey, CrossArenaRedKey);
|
| | | public const int CrossDayAwardsRedKey = 21301011;
|
| | | public Redpoint crossDayAwardsRedpoint = new Redpoint(CrossArenaRedKey,CrossDayAwardsRedKey);
|
| | | public const int CrossMatchRedKey = 21301012;
|
| | |
| | | DailyQuestOpenTime _openTime = null;
|
| | | dailyQuestModel.TryGetOpenTime((int)DailyQuestType.CrossServerPk, out _openTime);
|
| | | var dayOfWeek = (int)TimeUtility.ServerNow.DayOfWeek;
|
| | | return _openTime != null ? _openTime.GetHourMinuteByWeek(dayOfWeek) : null;
|
| | | Dictionary<int, List<HourMinute>> keyValues = null;
|
| | | if(_openTime != null)
|
| | | {
|
| | | keyValues = _openTime.NormalOpenTimes;
|
| | | if(keyValues.ContainsKey(dayOfWeek))
|
| | | {
|
| | | return keyValues[dayOfWeek];
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public int IndexOfDays(DateTime time)
|
| | |
| | | this.DayPKCount = playerInfo.DayPKCount;
|
| | | this.DayBuyCount = playerInfo.DayBuyCount;
|
| | | this.DayWinCount = playerInfo.DayWinCount;
|
| | | if(UpdatePlayerInfoEvent != null)
|
| | | crossServerModel.UpdateCrossArenaRedpoint();
|
| | | if (UpdatePlayerInfoEvent != null)
|
| | | {
|
| | | UpdatePlayerInfoEvent();
|
| | | }
|
| | |
| | |
|
| | | //常规的活动时间,key是星期x
|
| | | Dictionary<int, List<HourMinute>> openTimes = new Dictionary<int, List<HourMinute>>();
|
| | | public Dictionary<int, List<HourMinute>> NormalOpenTimes { get { return openTimes; }}
|
| | | //开服前2周的活动时间,key1是开服日的星期,key2是开服第几天
|
| | | Dictionary<int, Dictionary<int, List<HourMinute>>> specialOpenTimes = new Dictionary<int, Dictionary<int, List<HourMinute>>>();
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | DisplayWear();
|
| | |
|
| | | model.treasureWearRefresh -= TreasureWearRefresh;
|
| | | model.treasureWearRefresh += TreasureWearRefresh;
|
| | | }
|
| | |
|
| | | void DisplayWear()
|
| | | {
|
| | | Treasure treasure;
|
| | | if(treasureModel.TryGetTreasure(treasureId, out treasure))
|
| | | if (treasureModel.TryGetTreasure(displayTreasureId, out treasure))
|
| | | {
|
| | | m_ContainerWearToggle.gameObject.SetActive(treasure.state == TreasureState.Collected);
|
| | | m_WearCheck.gameObject.SetActive(model.IsWear(treasureId));
|
| | | m_WearCheck.gameObject.SetActive(model.IsWear(displayTreasureId));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContainerWearToggle.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | model.treasureWearRefresh -= TreasureWearRefresh;
|
| | | model.treasureWearRefresh += TreasureWearRefresh;
|
| | | }
|
| | |
|
| | | public void OnWear()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void TreasureWearRefresh(int id)
|
| | | private void TreasureWearRefresh()
|
| | | {
|
| | | if (id == displayTreasureId)
|
| | | {
|
| | | Display(id);
|
| | | }
|
| | | DisplayWear();
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | |
| | | Dictionary<int, Dictionary<int, Division>> treasureDivisionDict = new Dictionary<int, Dictionary<int, Division>>();
|
| | | Dictionary<int, int> treasureSeasonDict = new Dictionary<int, int>();
|
| | |
|
| | | public event Action<int> treasureWearRefresh;
|
| | | public event Action treasureWearRefresh;
|
| | |
|
| | | public int wearCountLimit { get; private set; }
|
| | | public string scoreFormula { get; private set; }
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | |
|
| | | if (treasureWearRefresh != null)
|
| | | {
|
| | | treasureWearRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | continue;
|
| | | }
|
| | | treasureWearDict[(int)data.MWID] = data.IsWear == 1;
|
| | | if (treasureWearRefresh != null)
|
| | | {
|
| | | treasureWearRefresh((int)data.MWID);
|
| | | }
|
| | | }
|
| | | if (treasureWearRefresh != null)
|
| | | {
|
| | | treasureWearRefresh();
|
| | | }
|
| | | }
|
| | |
|