public ZoneMediator(EventDispatcher eventDispatcher, DailyChallengeService dailyChallengeService, ContentSchedulerService contentSchedulerService, PartyGameManager partyGameManager) { this.dailyChallengeService = dailyChallengeService; this.partyGameManager = partyGameManager; this.contentSchedulerService = contentSchedulerService; eventDispatcher.AddListener <ZoneTransitionEvents.ZoneTransition>(onZoneTransition); eventDispatcher.AddListener <WorldServiceEvents.ContentDateChanged>(onContentDateChanged); }
public new void Start() { base.Start(); claimableRewardDefinition = Service.Get <GameData>().Get <Dictionary <int, ClaimableRewardDefinition> >(); dataEntityCollection = Service.Get <CPDataEntityCollection>(); contentSchedulerService = Service.Get <ContentSchedulerService>(); Service.Get <EventDispatcher>().AddListener <RewardServiceEvents.ClaimedReward>(onClaimedReward); Service.Get <EventDispatcher>().AddListener <RewardServiceEvents.ClaimableRewardFail>(onClaimableRewardFail); }
public override IEnumerator PerformFirstPass() { string dailyChallengesScheduleManifestPath = DailyChallengeService.GetDateManifestMapPath(); AssetRequest <DatedManifestMap> scheduleAssetRequest = Content.LoadAsync <DatedManifestMap>(dailyChallengesScheduleManifestPath); yield return(scheduleAssetRequest); Dictionary <int, ScheduledEventDateDefinition> events = Service.Get <IGameData>().Get <Dictionary <int, ScheduledEventDateDefinition> >(); ScheduledEventDateDefinition def = null; events.TryGetValue(SupportWindow.Id, out def); ContentSchedulerService service = new ContentSchedulerService(scheduleAssetRequest.Asset.Map.Keys, PenguinStandardTimeOffsetHours, def); Service.Set(service); bool offlineMode = service.HasSupportEndded(); string offline_mode = CommandLineArgs.GetValueForKey("offline_mode"); if (!string.IsNullOrEmpty(offline_mode)) { offlineMode = offline_mode.ToLower().Trim() == "true"; } Service.Get <GameSettings>().SetOfflineMode(offlineMode); }
public new void Start() { base.Start(); contentSchedulerService = Service.Get <ContentSchedulerService>(); gameStateController = Service.Get <GameStateController>(); }