예제 #1
0
        public ActionResult Destiny1Index(bool noLayout = false)
        {
            if (CacheExpired)
            {
                var featuredRaid       = VendorManager.GetFeaturedRaid();
                var weekly             = NfManager.GetWeekly();
                var weeklyBounties     = BountyManager.GetBounties("Strike");
                var raidChallenges     = VendorManager.GetRaidChallenges();
                var challengeElders    = PrisonManager.GetDetailedChallenge();
                var weeklyCrucible     = NfManager.GetDetailedCrucibleWeekly();
                var ironBannerBounties = BountyManager.GetWeeklyBounties("IronBanner");
                var ironBannerRewards  = BountyManager.GetWeeklyRewards("IronBanner");
                var weeklyPlaylist     = NfManager.GetWeeklyStory();

                Cache = new WeeklyDataModel()
                {
                    ThisWeekly         = weekly,
                    StrikeBounties     = weeklyBounties,
                    RaidChallenges     = raidChallenges,
                    EldersChallenge    = challengeElders,
                    WeeklyCrucible     = weeklyCrucible,
                    IronBannerBounties = ironBannerBounties,
                    IronBannerRewards  = ironBannerRewards,
                    FeaturedRaid       = featuredRaid,
                    WeeklyPlaylist     = weeklyPlaylist,
                    ExpiryTime         = DateTime.Now.AddHours(1),
                    StartTime          = DateTime.Now
                };
            }

            if (noLayout)
            {
                return(View("Destiny1/PartialIndex", Cache));
            }
            else
            {
                ViewBag.HtmlTagOverride = @"data-redirect=""/#weekly""";
                return(View("Destiny1/Index", Cache));
            }
        }