Skip to content

Commit f910515

Browse files
committed
chore: remove unused comp stats code from hero picking and ApiWrapper
1 parent f85bbab commit f910515

2 files changed

Lines changed: 0 additions & 42 deletions

File tree

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
11
using System;
22
using System.Linq;
3-
using System.Windows;
4-
using Hearthstone_Deck_Tracker.Controls.Overlay.Battlegrounds.Composition;
5-
using Hearthstone_Deck_Tracker.Hearthstone;
6-
using Hearthstone_Deck_Tracker.Utility;
73
using Hearthstone_Deck_Tracker.Utility.MVVM;
84
using HSReplay.Responses;
9-
using static System.Windows.Visibility;
105

116
namespace Hearthstone_Deck_Tracker.Controls.Overlay.Battlegrounds.HeroPicking
127
{
138
public class BattlegroundsSingleHeroViewModel : ViewModel
149
{
1510
public BattlegroundsHeroHeaderViewModel BgsHeroHeaderVM { get; }
16-
public BattlegroundsCompositionPopularityViewModel? BgsCompsPopularityVM { get; }
17-
public Visibility CompositionsVisibility { get; }
1811

1912
public int? HeroDbfId { get; }
2013

2114
public BattlegroundsSingleHeroViewModel(BattlegroundsHeroPickStats.BattlegroundsSingleHeroPickStats? stats, Action<bool> onPlacementHover)
2215
{
2316
HeroDbfId = stats?.HeroDbfId;
2417
BgsHeroHeaderVM = new(stats?.Tier, stats?.AvgPlacement, stats?.PickRate, stats?.PlacementDistribution ?? Enumerable.Repeat(0.0, 8).ToArray(), onPlacementHover);
25-
BgsCompsPopularityVM = stats?.FirstPlaceCompPopularity != null ? new(stats.FirstPlaceCompPopularity) : null;
26-
// Hide the "No composition data" message in Duos (unless we start having Comp data there).
27-
CompositionsVisibility = Core.Game.IsBattlegroundsDuosMatch && BgsCompsPopularityVM == null ? Collapsed : Visible;
2818
}
2919
}
3020
}

Hearthstone Deck Tracker/HsReplay/ApiWrapper.cs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using HSReplay;
1111
using HSReplay.Requests;
1212
using HSReplay.Responses;
13-
using Newtonsoft.Json;
1413
using Newtonsoft.Json.Linq;
1514

1615
namespace Hearthstone_Deck_Tracker.HsReplay
@@ -157,37 +156,6 @@ public static async Task UploadLog(LogUploadRequest uploadRequest, string[] logL
157156
}
158157
}
159158

160-
public class CompData
161-
{
162-
[JsonProperty("id")]
163-
public int Id { get; set; }
164-
165-
[JsonProperty("popularity")]
166-
public double Popularity { get; set; }
167-
168-
[JsonProperty("name")]
169-
public string? Name { get; set; }
170-
171-
[JsonProperty("key_minions_top3")]
172-
public List<int>? KeyMinionsTop3 { get; set; }
173-
174-
[JsonProperty("avg_final_placement")]
175-
public double AvgFinalPlacement { get; set; }
176-
}
177-
178-
public class DataItem
179-
{
180-
[JsonProperty("first_place_comps_lobby_races")]
181-
public List<CompData>? FirstPlaceCompsLobbyRaces { get; set; }
182-
183-
}
184-
185-
public class MockData
186-
{
187-
[JsonProperty("data")]
188-
public DataItem? Data { get; set; }
189-
}
190-
191159
internal static async Task<BattlegroundsCompStats?> GetTier7CompStats(string token, BattlegroundsCompStatsParams parameters)
192160
{
193161
Log.Info("Fetching tier7 comp stats");

0 commit comments

Comments
 (0)