Skip to content

Commit 28038f4

Browse files
committed
feat(bgs): change tag overrides from remote config to hsreplay tag overrides
1 parent 02ab92a commit 28038f4

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

Hearthstone Deck Tracker/Hearthstone/BattlegroundsDb.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ public class BattlegroundsDb
2626

2727
public BattlegroundsDb()
2828
{
29-
Update(Remote.Config.Data?.BattlegroundsTagOverrides);
30-
Remote.Config.Loaded += d => Update(d?.BattlegroundsTagOverrides);
29+
Update(Remote.BattlegroundsTagOverrides.Data);
30+
Remote.BattlegroundsTagOverrides.Loaded += d => Update(d);
3131
CardDefsManager.CardsChanged += () =>
3232
{
33-
Update(Remote.Config.Data?.BattlegroundsTagOverrides);
33+
Update(Remote.BattlegroundsTagOverrides.Data);
3434
};
3535
}
3636

Hearthstone Deck Tracker/Utility/RemoteData/Remote.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ internal static class Remote
1212

1313
public static DataLoader<RemoteData.LiveSecrets?> LiveSecrets { get; }
1414
= DataLoader<RemoteData.LiveSecrets>.JsonFromWeb("https://hsreplay.net/api/v1/live/secrets/");
15+
16+
public static DataLoader<List<RemoteData.TagOverride>?> BattlegroundsTagOverrides { get; }
17+
= DataLoader<List<RemoteData.TagOverride>>.JsonFromWeb("https://hsreplay.net/api/v1/battlegrounds/tag_overrides/");
1518
}
1619
}

Hearthstone Deck Tracker/Utility/RemoteData/RemoteData.Config.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ internal class Config
1717
[JsonProperty("battlegrounds_short_names")]
1818
public List<CardShortName>? BattlegroundsShortNames { get; set; }
1919

20-
[JsonProperty("battlegrounds_tag_overrides")]
21-
public List<TagOverride>? BattlegroundsTagOverrides { get; set; }
22-
2320
[JsonProperty("bobs_buddy")]
2421
public BobsBuddyData? BobsBuddy { get; set; }
2522

0 commit comments

Comments
 (0)