예제 #1
0
 // Token: 0x06001706 RID: 5894 RVA: 0x00028B00 File Offset: 0x00027B00
 public virtual void AccoladesFetched(XmlString xmlString)
 {
     Victory.DataLayer.Serialization.Event.Accolades accolades;
     if (!XSD2CPP.ReadAccolades(xmlString, out accolades))
     {
         accolades = new Victory.DataLayer.Serialization.Event.Accolades();
     }
     this.StoreAccolades(accolades);
     if (this.mAccoladesCallback != null)
     {
         this.mAccoladesCallback.Respond(this.accolades);
         this.mAccoladesCallback.Destroy();
         this.mAccoladesCallback = null;
     }
 }
예제 #2
0
 // Token: 0x06001702 RID: 5890 RVA: 0x000286EC File Offset: 0x000276EC
 internal virtual void StoreAccolades(Victory.DataLayer.Serialization.Event.Accolades accolades)
 {
     this.accolades = new Interop.Accolades();
     if (accolades.FinalRewards != null)
     {
         this.accolades.Reputation = accolades.FinalRewards.Rep;
         this.accolades.Tokens     = accolades.FinalRewards.Tokens;
     }
     if (accolades.OriginalRewards != null)
     {
         this.accolades.OriginalReputation = accolades.OriginalRewards.Rep;
         this.accolades.OriginalTokens     = accolades.OriginalRewards.Tokens;
     }
     this.accolades.HasLeveledUp = accolades.HasLeveledUp;
     if (accolades.LuckyDrawInfo != null)
     {
         LuckyDraw luckyDraw = this.accolades.GetLuckyDraw();
         luckyDraw.HasLuckyDraw = (accolades.LuckyDrawInfo.Items != null && accolades.LuckyDrawInfo.Items.Count > 0);
         luckyDraw.SetCardDeck(accolades.LuckyDrawInfo.CardDeck);
         luckyDraw.NumCards         = accolades.LuckyDrawInfo.NumCards;
         luckyDraw.NumBoxAnimations = accolades.LuckyDrawInfo.NumBoxAnimations;
         luckyDraw.CurrentStreak    = accolades.LuckyDrawInfo.CurrentStreak;
         luckyDraw.IsStreakBroken   = accolades.LuckyDrawInfo.IsStreakBroken;
         if (accolades.LuckyDrawInfo.Items != null)
         {
             foreach (LuckyDrawItem luckyDrawItem in accolades.LuckyDrawInfo.Items)
             {
                 LuckyItem luckyItem = new LuckyItem();
                 luckyItem.SetVirtualItem(luckyDrawItem.VirtualItem);
                 luckyItem.SetCategory(luckyDrawItem.VirtualItemType);
                 luckyItem.SetDescription(luckyDrawItem.Description);
                 luckyItem.SetIcon(luckyDrawItem.Icon);
                 luckyItem.Value    = luckyDrawItem.RemainingUseCount;
                 luckyItem.Price    = luckyDrawItem.ResellPrice;
                 luckyItem.ItemType = Inventory.GetProductTypeFromString(luckyDrawItem.VirtualItemType);
                 luckyItem.WasSold  = luckyDrawItem.WasSold;
                 luckyItem.PartID   = luckyDrawItem.Hash;
                 luckyDraw.AddItems(luckyItem);
             }
         }
         if (accolades.LuckyDrawInfo.Boxes != null)
         {
             foreach (LuckyDrawBox luckyDrawBox in accolades.LuckyDrawInfo.Boxes)
             {
                 LuckyBox luckyBox = new LuckyBox();
                 luckyBox.IsValid    = luckyDrawBox.IsValid;
                 luckyBox.CategoryId = (LuckyBoxCategory)luckyDrawBox.LuckyDrawSetCategoryId;
                 luckyBox.SetCategoryName(luckyDrawBox.LocalizationString);
                 luckyDraw.AddBoxes(luckyBox);
             }
         }
     }
     if (accolades.RewardInfo != null)
     {
         foreach (Victory.DataLayer.Serialization.Event.RewardPart rewardPart in accolades.RewardInfo)
         {
             Interop.RewardPart rewardPart2 = new Interop.RewardPart();
             rewardPart2.SetCategory(rewardPart.RewardCategory.ToString());
             if (rewardPart.RepPart != 0)
             {
                 rewardPart2.SetName(string.Format("REWARD_TYPE_{0}_REP", rewardPart.RewardType.ToString()));
                 rewardPart2.SetType("rep");
                 rewardPart2.Value = rewardPart.RepPart;
                 this.accolades.AddRewardParts(rewardPart2);
             }
             if (rewardPart.TokenPart != 0)
             {
                 rewardPart2.SetName(string.Format("REWARD_TYPE_{0}_TOKEN", rewardPart.RewardType.ToString()));
                 rewardPart2.SetType("tokens");
                 rewardPart2.Value = rewardPart.TokenPart;
                 this.accolades.AddRewardParts(rewardPart2);
             }
         }
     }
     this.ScoringMethod.AccoladesFetched(this.accolades);
 }