private void PopulateBannerList() { this.listViewEx2BannerSelection.Items.Clear(); this.myMiscInfo = new FFRKViewGacha2.MiscDropInfo(); if (this.myBanners == null || this.myBanners.ToList <KeyValuePair <Key, Data> >().Count == 0) { return; } foreach (KeyValuePair <Key, Data> banner in this.myBanners) { this.listViewEx2BannerSelection.Items.Add(new ListViewItem(new string[3] { banner.Value.BannerId.ToString(), banner.Value.isJP ? "JP" : "GL", banner.Value.BannerName })); } foreach (ColumnHeader column in this.listViewEx2BannerSelection.Columns) { column.Width = -2; } }
private void ConsolidateRelicDrawList(Dictionary <long, BasicRelicDropInfo> draws) { this.myMiscInfo = new FFRKViewGacha2.MiscDropInfo(); bool flag1 = true; if (this.comboBoxPullTypeFilter.SelectedIndex == 1) { flag1 = false; } bool flag2 = true; if (this.comboBoxPullTypeFilter.SelectedIndex == 0) { flag2 = false; } Dictionary <uint, FilteredRelicDropInfo> dictionary1 = new Dictionary <uint, FilteredRelicDropInfo>(); Dictionary <long, bool> dictionary2 = new Dictionary <long, bool>(); foreach (BasicRelicDropInfo basicRelicDropInfo in draws.Values) { BasicRelicDropInfo dropInfo = basicRelicDropInfo; if ((dropInfo.ItemTotal != (ushort)11 || flag1) && (dropInfo.ItemTotal == (ushort)11 || flag2)) { long key = this.HashTimeAndUser(dropInfo.ServerTime, dropInfo.UserHash); if (!dictionary2.ContainsKey(key)) { this.myMiscInfo.totalPulls += (int)dropInfo.ItemTotal; dictionary2.Add(key, true); } switch (dropInfo.Rarity) { case 1: this.myMiscInfo.count1 += (int)dropInfo.DropNum; break; case 2: this.myMiscInfo.count2 += (int)dropInfo.DropNum; break; case 3: this.myMiscInfo.count3 += (int)dropInfo.DropNum; break; case 4: this.myMiscInfo.count4 += (int)dropInfo.DropNum; break; case 5: this.myMiscInfo.count5 += (int)dropInfo.DropNum; break; case 6: this.myMiscInfo.count6 += (int)dropInfo.DropNum; break; case 7: this.myMiscInfo.count7 += (int)dropInfo.DropNum; break; } if (dropInfo.Rarity > (byte)4) { if (dictionary1.ContainsKey(dropInfo.ItemID)) { dictionary1[dropInfo.ItemID].DropNum += dropInfo.DropNum; } else if (this.myFeaturedItems.Values.ToList <BasicFeaturedItemInfo>().Exists((Predicate <BasicFeaturedItemInfo>)(x => (int)x.ItemID == (int)dropInfo.ItemID))) { FilteredRelicDropInfo filteredRelicDropInfo = new FilteredRelicDropInfo(); filteredRelicDropInfo.DropNum = dropInfo.DropNum; filteredRelicDropInfo.ItemID = dropInfo.ItemID; filteredRelicDropInfo.ItemName = dropInfo.ItemName; filteredRelicDropInfo.Rarity = dropInfo.Rarity; BasicFeaturedItemInfo featuredItemInfo = this.myFeaturedItems.Values.First <BasicFeaturedItemInfo>((Func <BasicFeaturedItemInfo, bool>)(x => (int)x.ItemID == (int)dropInfo.ItemID)); filteredRelicDropInfo.DisplayOrder = featuredItemInfo.DisplayOrder; filteredRelicDropInfo.AssumedRate = featuredItemInfo.Rate; dictionary1.Add(dropInfo.ItemID, filteredRelicDropInfo); } else { switch (dropInfo.Rarity) { case 5: this.myMiscInfo.offBanner5count += (int)dropInfo.DropNum; break; case 6: this.myMiscInfo.offBanner6count += (int)dropInfo.DropNum; break; case 7: this.myMiscInfo.offBanner7count += (int)dropInfo.DropNum; break; } } } } } FiddlerApplication.Log.LogString(dictionary1.Values.Count.ToString()); this.myConsolidatedRelicDrops = dictionary1; }