| | |
| | | }
|
| | | }
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(213, 21303);
|
| | | readonly Redpoint entranceRedpoint = new Redpoint(21303, 2130301);
|
| | | readonly Redpoint incidentRedpoint = new Redpoint(21303, 2130302);
|
| | |
|
| | | int cacheMapId = 0;
|
| | |
|
| | | public event Action selectIncidentRefresh;
|
| | |
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | AdventureStage.Instance.onLoadAdventureStage += OnLoadAdventureStage;
|
| | | AdventureStage.Instance.onExitAdventureStage += OnExitAdventureStage;
|
| | | findPreciousModel.bossInfoUpdateEvent += BossInfoUpdateEvent;
|
| | | DailyQuestActionTimer.Instance.RefreshDailyQuestState += RefreshDailyQuestState;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | {
|
| | | ClientDungeonStageUtility.RequestStartClientDungeon(0, 0); |
| | | }
|
| | |
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | AdventureStage.Instance.onExitAdventureStage -= OnExitAdventureStage;
|
| | | AdventureStage.Instance.onLoadAdventureStage -= OnLoadAdventureStage;
|
| | | findPreciousModel.bossInfoUpdateEvent -= BossInfoUpdateEvent;
|
| | | DailyQuestActionTimer.Instance.RefreshDailyQuestState -= RefreshDailyQuestState;
|
| | | }
|
| | |
|
| | | private void OnLoadAdventureStage()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void BossInfoUpdateEvent(int obj)
|
| | | {
|
| | | if (isServerPrepare)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshDailyQuestState()
|
| | | {
|
| | | if (isServerPrepare)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_TryOpenHazyRegionWin()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS1000;
|
| | |
| | | return m_Incidents.TryGetValue(id, out incident);
|
| | | }
|
| | |
|
| | | public bool TryGotoIncident(int id, out int error)
|
| | | public bool TryGotoIncident(int id, bool careDungeon, out int error)
|
| | | {
|
| | | error = 0;
|
| | | var config = HazyRegionConfig.Get(id);
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | if (!TryGotoDungeon(id, out error))
|
| | | if (!InFakeHazyRegion)
|
| | | {
|
| | | var questState = dailyQuestModel.GetQuestState((int)DailyQuestType.HazyRegion);
|
| | | if (questState == DailyQuestModel.DailyQuestState.OutTime)
|
| | | {
|
| | | error = 6;
|
| | | return false;
|
| | | }
|
| | | }
|
| | | if (careDungeon && !TryGotoDungeon(id, out error))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | break;
|
| | | case 5:
|
| | | SysNotifyMgr.Instance.ShowTip("EnterHazyIncidentError_5");
|
| | | break;
|
| | | case 6:
|
| | | DailyQuestOpenTime dailyQuestOpenTime;
|
| | | if (dailyQuestModel.TryGetOpenTime((int)DailyQuestType.HazyRegion, out dailyQuestOpenTime))
|
| | | {
|
| | | HourMinute hourMinute;
|
| | | if (dailyQuestOpenTime.TryGetTodayNearestOpenTime(out hourMinute))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("OpenHazyRegionError_1",
|
| | | hourMinute.hourBegin.ToString("D2"),
|
| | | hourMinute.hourEnd.ToString("D2"));
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | onHazyRegionStateRefresh(2);
|
| | | }
|
| | | }
|
| | |
|
| | | if (isServerPrepare)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA307_tagMCFairyAdventuresInfo package)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void UpdateRedpoint()
|
| | | {
|
| | | var satisfyEntrance = false;
|
| | | var satisfyIncident = false;
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HazyRegion) || InFakeHazyRegion)
|
| | | {
|
| | | if (InFakeHazyRegion)
|
| | | {
|
| | | satisfyEntrance = satisfyFakeOpen;
|
| | | }
|
| | | else
|
| | | {
|
| | | var questState = dailyQuestModel.GetQuestState((int)DailyQuestType.HazyRegion);
|
| | | satisfyEntrance = !playing && questState == DailyQuestModel.DailyQuestState.Normal;
|
| | | }
|
| | |
|
| | | if (playing)
|
| | | {
|
| | | var error = 0;
|
| | | foreach (var id in m_Incidents.Keys)
|
| | | {
|
| | | if (TryGotoIncident(id, false, out error))
|
| | | {
|
| | | satisfyIncident = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | entranceRedpoint.state = satisfyEntrance ? RedPointState.Simple : RedPointState.None;
|
| | | incidentRedpoint.state = satisfyIncident ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | |
|
| | | public enum IncidentState
|
| | | {
|
| | | UnStart = 1,
|