Beispiel #1
0
    private int GetDisplayBannerId()
    {
        int @int = Vars.Key("Events.BannerIdOverride").GetInt(0);

        if (@int != 0)
        {
            return(@int);
        }
        NetCache.NetCacheProfileProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheProfileProgress>();
        return((netObject != null) ? netObject.DisplayBanner : 0);
    }
 public void CheckForTutorialComplete(List <CardRewardData> cardRewards)
 {
     NetCache.NetCacheProfileProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheProfileProgress>();
     if (netObject == null)
     {
         Debug.LogWarning(string.Format("FixedRewardsMgr.CheckForTutorialComplete(): null == NetCache.NetCacheProfileProgress", new object[0]));
     }
     else
     {
         this.TriggerTutorialProgressAction(false, (int)netObject.CampaignProgress, cardRewards);
     }
 }
 public static bool AreAllTutorialsComplete()
 {
     NetCache.NetCacheProfileProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheProfileProgress>();
     if (netObject == null)
     {
         return(false);
     }
     if (!AreAllTutorialsComplete(netObject.CampaignProgress))
     {
         return(false);
     }
     return(true);
 }
Beispiel #4
0
 private bool AcknowledgeBanner(int banner)
 {
     this.m_seenBanners.Add(banner);
     if ((banner != this.GetDisplayBannerId()) || this.m_bannerWasAcknowledged)
     {
         return(false);
     }
     this.m_bannerWasAcknowledged = true;
     NetCache.NetCacheProfileProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheProfileProgress>();
     if (netObject != null)
     {
         netObject.DisplayBanner = banner;
         NetCache.Get().NetCacheChanged <NetCache.NetCacheProfileProgress>();
     }
     Network.AcknowledgeBanner(banner);
     return(true);
 }
 public void SetAdventureOptions(int id, ulong options)
 {
     if (id != 0)
     {
         NetCache.NetCacheProfileProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheProfileProgress>();
         if ((netObject != null) && (netObject.AdventureOptions != null))
         {
             foreach (AdventureOption option in netObject.AdventureOptions)
             {
                 if (option.AdventureID == id)
                 {
                     option.Options = options;
                     NetCache.Get().NetCacheChanged <NetCache.NetCacheProfileProgress>();
                     break;
                 }
             }
         }
         Network.SetAdventureOptions(id, options);
     }
 }
 public AdventureOption[] GetAdventureOptions()
 {
     NetCache.NetCacheProfileProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheProfileProgress>();
     return((netObject != null) ? netObject.AdventureOptions : null);
 }