Skip to content

Commit

Permalink
Add initial support for Mercenaries
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Oct 13, 2021
1 parent 7301167 commit 77198e4
Show file tree
Hide file tree
Showing 19 changed files with 204 additions and 30 deletions.
3 changes: 3 additions & 0 deletions Hearthstone Deck Tracker/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,9 @@ public class Config
[DefaultValue(true)]
public bool HsReplayUploadDuels = true;

[DefaultValue(true)]
public bool HsReplayUploadMercenaries = true;

[DefaultValue(null)]
public bool? HsReplayUploadPacks = null;

Expand Down
12 changes: 6 additions & 6 deletions Hearthstone Deck Tracker/Controls/CardImage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
<controls:CardImageSizeConverter x:Key="CardImageSizeConverter"/>
</UserControl.Resources>
<Grid x:Name="CardImageGrid" RenderTransformOrigin="0.5,0.5"
Width="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Width}}"
Height="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Height}}">
MaxWidth="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Width}}"
MaxHeight="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Height}}">
<Grid.RenderTransform>
<ScaleTransform/>
</Grid.RenderTransform>
<hearthstoneDeckTracker:HearthstoneTextBlock x:Name="CreatedByInfo" HorizontalAlignment="Center" VerticalAlignment="Top" Visibility="{Binding CreatedByVisibility}" Text="{Binding CreatedByText}" FontSize="16"/>
<Image HorizontalAlignment="Center" Margin="0 12 0 0"
Width="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Width}}"
Height="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Height}}"
MaxWidth="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Width}}"
MaxHeight="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Height}}"
Source="{Binding LoadingImageSource, TargetNullValue={x:Null}}" RenderOptions.BitmapScalingMode="Fant">
</Image>
<Image x:Name="CardImageDisplay" HorizontalAlignment="Center" Margin="0 12 0 0"
Width="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Width}}"
Height="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Height}}"
MaxWidth="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Width}}"
MaxHeight="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeConverter}, ConverterParameter={x:Static controls:CardImageSizeType.Height}}"
Source="{Binding CardImagePath, TargetNullValue={x:Null}}" RenderOptions.BitmapScalingMode="Fant">
</Image>
</Grid>
Expand Down
1 change: 1 addition & 0 deletions Hearthstone Deck Tracker/Controls/CardImage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public async void SetCardIdFromCard(Hearthstone.Card card)
try
{
CardImagePath = AssetDownloaders.cardImageDownloader.StoragePathFor(card);
LoadingImageSource = null;
if (hasAsset)
ExpandAnimation?.Begin();
}
Expand Down
2 changes: 2 additions & 0 deletions Hearthstone Deck Tracker/Enums/GameMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public enum GameMode
Spectator,
[LocDescription("Enum_GameMode_Duels")]
Duels,
[LocDescription("Enum_GameMode_Mercenaries")]
Mercenaries,
[LocDescription("Enum_GameMode_None")]
None
}
Expand Down
12 changes: 11 additions & 1 deletion Hearthstone Deck Tracker/Enums/Hearthstone/Mode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ public enum Mode
FIRESIDE_GATHERING,
BACON,
GAME_MODE,
PVP_DUNGEON_RUN
PVP_DUNGEON_RUN,
BACON_COLLECTION,
LETTUCE_VILLAGE,
LETTUCE_BOUNTY_BOARD,
LETTUCE_MAP,
LETTUCE_PLAY,
LETTUCE_COLLECTION,
LETTUCE_COOP,
LETTUCE_FRIENDLY,
LETTUCE_BOUNTY_TEAM_SELECT,
LETTUCE_PACK_OPENING
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<CheckBox Content="{lex:Loc Options_Tracker_Replays_CheckBox_Friendly}" Margin="20,5,0,0" IsChecked="{Binding HsReplayUploadFriendly, Source={StaticResource ConfigWrapper}}" IsEnabled="{Binding IsChecked, ElementName=CheckBoxAutoUpload}"/>
<CheckBox Content="{lex:Loc Options_Tracker_Replays_CheckBox_AdventurePractice}" Margin="20,5,0,0" IsChecked="{Binding HsReplayUploadPractice, Source={StaticResource ConfigWrapper}}" IsEnabled="{Binding IsChecked, ElementName=CheckBoxAutoUpload}"/>
<CheckBox Content="{lex:Loc Options_Tracker_Replays_CheckBox_Duels}" Margin="20,5,0,0" IsChecked="{Binding HsReplayUploadDuels, Source={StaticResource ConfigWrapper}}" IsEnabled="{Binding IsChecked, ElementName=CheckBoxAutoUpload}"/>
<CheckBox Content="{lex:Loc Options_Tracker_Replays_CheckBox_Mercenaries}" Margin="20,5,0,0" IsChecked="{Binding HsReplayUploadMercenaries, Source={StaticResource ConfigWrapper}}" IsEnabled="{Binding IsChecked, ElementName=CheckBoxAutoUpload}"/>
<CheckBox Content="{lex:Loc Options_Tracker_Replays_CheckBox_Spectator}" Margin="20,5,0,0" IsChecked="{Binding HsReplayUploadSpectator, Source={StaticResource ConfigWrapper}}" IsEnabled="{Binding IsChecked, ElementName=CheckBoxAutoUpload}"/>
<CheckBox Name="CheckBoxShowToast" Content="{lex:Loc Options_Tracker_Replays_CheckBox_ShareNotification}" Margin="0,5,0,0" IsChecked="{Binding HsReplayShareToast, Source={StaticResource ConfigWrapper}}"/>
</StackPanel>
Expand Down
19 changes: 16 additions & 3 deletions Hearthstone Deck Tracker/GameEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public GameEventHandler(GameV2 game)
|| _game.CurrentGameMode == Casual && Config.Instance.HsReplayUploadCasual
|| _game.CurrentGameMode == Spectator && Config.Instance.HsReplayUploadSpectator
|| _game.IsBattlegroundsMatch && Config.Instance.HsReplayUploadBattlegrounds
|| _game.CurrentGameMode == Duels && Config.Instance.HsReplayUploadDuels;
|| _game.CurrentGameMode == Duels && Config.Instance.HsReplayUploadDuels
|| _game.IsMercenariesMatch && Config.Instance.HsReplayUploadMercenaries;

public void HandleInMenu()
{
Expand Down Expand Up @@ -563,6 +564,13 @@ public async void HandleGameEnd(bool stateComplete)
{
_game.CurrentGameStats.BattlegroundsRating = _game.BattlegroundsRatingInfo.Rating;
}
else if (_game.IsMercenariesMatch)
{
if(_game.IsMercenariesPvpMatch && _game.MercenariesRatingInfo != null)
_game.CurrentGameStats.MercenariesRating = _game.MercenariesRatingInfo.Rating;
if(_game.IsMercenariesPveMatch)
_game.CurrentGameStats.MercenariesBountyRunId = _game.MercenariesMapInfo?.Seed.ToString();
}
_game.CurrentGameStats.GameType = _game.CurrentGameType;
_game.CurrentGameStats.ServerInfo = _game.MetaData.ServerInfo;
_game.CurrentGameStats.PlayerCardbackId = _game.MatchInfo?.LocalPlayer.CardBackId ?? 0;
Expand Down Expand Up @@ -669,8 +677,13 @@ public async void HandleGameEnd(bool stateComplete)
{
try
{
DefaultDeckStats.Instance.GetDeckStats(_game.Player.Class).AddGameResult(_game.CurrentGameStats);
Log.Info($"Assigned current deck to default {_game.Player.Class} deck.");
if(!string.IsNullOrEmpty(_game.Player.Class))
{
DefaultDeckStats.Instance.GetDeckStats(_game.Player.Class).AddGameResult(_game.CurrentGameStats);
Log.Info($"Assigned current deck to default {_game.Player.Class} deck.");
}
else
Log.Debug("Not assigning a deck, no player class found.");
}
catch(Exception ex)
{
Expand Down
8 changes: 7 additions & 1 deletion Hearthstone Deck Tracker/Hearthstone/Entities/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ public Entity Clone()

public bool IsInZone(Zone zone) => HasTag(GameTag.ZONE) && GetTag(GameTag.ZONE) == (int)zone;

public bool IsControlledBy(int controllerId) => HasTag(GameTag.CONTROLLER) && GetTag(GameTag.CONTROLLER) == controllerId;
public bool IsControlledBy(int controllerId)
{
var lettuceController = GetTag(GameTag.LETTUCE_CONTROLLER);
if(lettuceController > 0)
return lettuceController == controllerId;
return HasTag(GameTag.CONTROLLER) && GetTag(GameTag.CONTROLLER) == controllerId;
}

public bool IsAttachedTo(int entityId) => GetTag(GameTag.ATTACHED) == entityId;

Expand Down
18 changes: 15 additions & 3 deletions Hearthstone Deck Tracker/Hearthstone/GameV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class GameV2 : IGame
private Mode _currentMode;
private BrawlInfo _brawlInfo;
private BattlegroundRatingInfo _battlegroundsRatingInfo;
private MercenariesRatingInfo _mercenariesRatingInfo;
private BattlegroundsBoardState _battlegroundsBoardState;
Regex BattlegroundsHeroRegex = new Regex(@"(TB_BaconShop_HERO_\d\d)|(BG20_HERO_\d\d)");

Expand Down Expand Up @@ -110,6 +111,11 @@ public bool IsOpponentMinionInPlay
: CurrentGameType == GameType.GT_VS_AI && DungeonRun.IsDungeonBoss(CurrentGameStats.OpponentHeroCardId);

public bool IsBattlegroundsMatch => CurrentGameType == GameType.GT_BATTLEGROUNDS || CurrentGameType == GameType.GT_BATTLEGROUNDS_FRIENDLY;
public bool IsMercenariesMatch => CurrentGameType == GameType.GT_MERCENARIES_AI_VS_AI || CurrentGameType == GameType.GT_MERCENARIES_FRIENDLY
|| CurrentGameType == GameType.GT_MERCENARIES_PVE || CurrentGameType == GameType.GT_MERCENARIES_PVP
|| CurrentGameType == GameType.GT_MERCENARIES_PVE_COOP;
public bool IsMercenariesPvpMatch => CurrentGameType == GameType.GT_MERCENARIES_PVP;
public bool IsMercenariesPveMatch => CurrentGameType == GameType.GT_MERCENARIES_PVE || CurrentGameType == GameType.GT_MERCENARIES_PVE_COOP;
public bool IsConstructedMatch => CurrentGameType == GameType.GT_RANKED
|| CurrentGameType == GameType.GT_CASUAL
|| CurrentGameType == GameType.GT_VS_FRIEND;
Expand Down Expand Up @@ -185,10 +191,14 @@ public GameMode CurrentGameMode

public BattlegroundRatingInfo BattlegroundsRatingInfo => _battlegroundsRatingInfo ?? (_battlegroundsRatingInfo = HearthMirror.Reflection.GetBattlegroundRatingInfo());

private bool IsValidPlayerInfo(MatchInfo.Player playerInfo)
public MercenariesRatingInfo MercenariesRatingInfo => _mercenariesRatingInfo ?? (_mercenariesRatingInfo = HearthMirror.Reflection.GetMercenariesRatingInfo());

public MercenariesMapInfo MercenariesMapInfo => HearthMirror.Reflection.GetMercenariesMapInfo();

private bool IsValidPlayerInfo(MatchInfo.Player playerInfo, bool allowMissing = true)
{
var name = playerInfo?.Name ?? playerInfo?.BattleTag?.Name;
var valid = name != null;
var valid = allowMissing || name != null;
Log.Debug($"valid={valid}, gameMode={CurrentGameMode}, player={name}, starLevel={playerInfo?.Standard?.StarLevel}");
return valid;
}
Expand All @@ -198,7 +208,7 @@ internal async void CacheMatchInfo()
if(!_matchInfoCacheInvalid)
return;
MatchInfo matchInfo;
while((matchInfo = HearthMirror.Reflection.GetMatchInfo()) == null || !IsValidPlayerInfo(matchInfo.LocalPlayer) || !IsValidPlayerInfo(matchInfo.OpposingPlayer))
while((matchInfo = HearthMirror.Reflection.GetMatchInfo()) == null || !IsValidPlayerInfo(matchInfo.LocalPlayer) || !IsValidPlayerInfo(matchInfo.OpposingPlayer, IsMercenariesMatch))
{
Log.Info($"Waiting for matchInfo... (matchInfo={matchInfo}, localPlayer={matchInfo?.LocalPlayer?.Name}, opposingPlayer={matchInfo?.OpposingPlayer?.Name})");
await Task.Delay(1000);
Expand Down Expand Up @@ -235,6 +245,8 @@ internal async void CacheGameType()

internal void CacheBattlegroundRatingInfo() => _battlegroundsRatingInfo = HearthMirror.Reflection.GetBattlegroundRatingInfo();

internal void CacheMercenariesRatingInfo() => _mercenariesRatingInfo = HearthMirror.Reflection.GetMercenariesRatingInfo();

internal void InvalidateMatchInfoCache() => _matchInfoCacheInvalid = true;

public void Reset(bool resetStats = true)
Expand Down
16 changes: 16 additions & 0 deletions Hearthstone Deck Tracker/Hearthstone/HearthDbConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ public static GameMode GetGameMode(GameType gameType)
return GameMode.Duels;
case GameType.GT_PVPDR_PAID:
return GameMode.Duels;
case GameType.GT_MERCENARIES_AI_VS_AI:
case GameType.GT_MERCENARIES_FRIENDLY:
case GameType.GT_MERCENARIES_PVE:
case GameType.GT_MERCENARIES_PVP:
case GameType.GT_MERCENARIES_PVE_COOP:
return GameMode.Mercenaries;
default:
return GameMode.None;
}
Expand Down Expand Up @@ -206,6 +212,16 @@ public static BnetGameType GetBnetGameType(GameType gameType, Format? format)
return BGT_PVPDR;
case GameType.GT_PVPDR_PAID:
return BGT_PVPDR_PAID;
case GameType.GT_MERCENARIES_AI_VS_AI:
return BGT_UNKNOWN; // Does not exist in BGT
case GameType.GT_MERCENARIES_FRIENDLY:
return BGT_MERCENARIES_FRIENDLY;
case GameType.GT_MERCENARIES_PVE:
return BGT_MERCENARIES_PVE;
case GameType.GT_MERCENARIES_PVP:
return BGT_MERCENARIES_PVP;
case GameType.GT_MERCENARIES_PVE_COOP:
return BGT_MERCENARIES_PVE_COOP;
default:
return BGT_UNKNOWN;
}
Expand Down
11 changes: 10 additions & 1 deletion Hearthstone Deck Tracker/HsReplay/UploadMetaDataGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static UploadMetaData Generate(GameMetaData gameMetaData, GameStats game)
var players = GetPlayerInfo(game);
if (players != null)
{
if (game.GameMode == GameMode.Battlegrounds)
if (game.GameMode == GameMode.Battlegrounds || game.GameMode == GameMode.Mercenaries)
metaData.Players = players;
else
{
Expand Down Expand Up @@ -122,6 +122,15 @@ public static UploadMetaData Generate(GameMetaData gameMetaData, GameStats game)
if(game.BattlegroundsRatingAfter > 0)
friendly.BattlegroundsRatingAfter = game.BattlegroundsRatingAfter;
}
else if(game.GameMode == GameMode.Mercenaries)
{
if(game.MercenariesRating > 0)
friendly.MercenariesRating = game.MercenariesRating;
if(game.MercenariesRatingAfter > 0)
friendly.MercenariesRatingAfter = game.MercenariesRatingAfter;
if(!string.IsNullOrEmpty(game.MercenariesBountyRunId))
friendly.MercenariesBountyRunId = game.MercenariesBountyRunId;
}
else if(game.PlayerCards.Sum(x => x.Count) == 30 || game.IsPVPDungeonMatch || game.IsDungeonMatch == true && game.DeckId != Guid.Empty)
{
friendly.DeckList = game.PlayerCards.Where(x => x.Id != Database.UnknownCardId).SelectMany(x => Enumerable.Repeat(x.Id, x.Count)).ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public void Handle(LogLine logLine, IHsGameState gameState, IGame game)
if(game.CurrentMode == Mode.BACON)
Core.Game.CacheBattlegroundRatingInfo();

if(game.CurrentMode == Mode.LETTUCE_PLAY)
Core.Game.CacheMercenariesRatingInfo();

if(game.CurrentMode == Mode.ADVENTURE || game.PreviousMode == Mode.ADVENTURE && game.CurrentMode == Mode.GAMEPLAY)
Watchers.DungeonRunWatcher.Run();
else
Expand Down
28 changes: 23 additions & 5 deletions Hearthstone Deck Tracker/Stats/GameStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class GameStats : INotifyPropertyChanged
private int _rank;
private int _starLevel;
private int _battlegroundsRating;
private int _mercenariesRating;
private int _stars;
private int _legendRank;
private Region _region;
Expand Down Expand Up @@ -136,7 +137,7 @@ public string Note
get { return _note; }
set
{
_note = value;
_note = value;
OnPropertyChanged();
}
}
Expand Down Expand Up @@ -220,6 +221,20 @@ public int BattlegroundsRating

public int BattlegroundsRatingAfter { get; set; }

public int MercenariesRating
{
get { return _mercenariesRating; }
set
{
_mercenariesRating = value;
OnPropertyChanged();
}
}

public int MercenariesRatingAfter { get; set; }

public string MercenariesBountyRunId { get; set; }

public HashSet<Race> BattlegroundsRaces { get; set; }

public int OpponentLegendRank
Expand All @@ -242,7 +257,7 @@ public int OpponentLegendRank
public int StarMultiplier { get; set; }

public int? HearthstoneBuild { get; set; }

public int PlayerCardbackId { get; set; }

public int OpponentCardbackId { get; set; }
Expand Down Expand Up @@ -329,7 +344,7 @@ public string DeckNameAndVersion
{
get
{
if (!string.IsNullOrEmpty(_deckNameAndVersion))
if(!string.IsNullOrEmpty(_deckNameAndVersion))
return _deckNameAndVersion;
var deck = DeckList.Instance.Decks.FirstOrDefault(d => d.DeckId == DeckId)?.GetVersion(PlayerDeckVersion);
_deckNameAndVersion = deck?.NameAndVersion ?? "none";
Expand Down Expand Up @@ -380,7 +395,7 @@ public SolidColorBrush ResultTextColor
public string PlayerDeckVersionString => PlayerDeckVersion != null ? PlayerDeckVersion.ToString("v{M}.{m}") : SerializableVersion.Default.ToString("v{M}.{m}");

[XmlIgnore]
public ToolTip ResultToolTip => new ToolTip {Content = "conceded", Visibility = (WasConceded ? Visibility.Visible : Visibility.Hidden)};
public ToolTip ResultToolTip => new ToolTip { Content = "conceded", Visibility = (WasConceded ? Visibility.Visible : Visibility.Hidden) };

[XmlIgnore]
public bool HasReplayFile => ReplayFile != null && File.Exists(Path.Combine(Config.Instance.ReplayDir, ReplayFile));
Expand Down Expand Up @@ -486,7 +501,7 @@ public void GameEnd()

public void SetPlayerCards(HearthMirror.Objects.Deck deck, List<Card> revealedCards)
{
var cards = deck?.Cards.Select(c => new Card {Id = c.Id, Count = c.Count});
var cards = deck?.Cards.Select(c => new Card { Id = c.Id, Count = c.Count });
SetPlayerCards(cards, revealedCards);
}

Expand Down Expand Up @@ -561,6 +576,9 @@ public void SetOpponentCards(List<Card> revealedCards)
public bool ShouldSerializeBrawlLosses() => BrawlLosses > 0;
public bool ShouldSerializeBattlegroundsRating() => BattlegroundsRating > 0;
public bool ShouldSerializeBattlegroundsRatingAfter() => BattlegroundsRatingAfter > 0;
public bool ShouldSerializeMercenariesRating() => MercenariesRating > 0;
public bool ShouldSerializeMercenariesRatingAfter() => MercenariesRatingAfter > 0;
public bool ShouldSerializeMercenariesBountyRunId() => !string.IsNullOrEmpty(MercenariesBountyRunId);
public bool ShouldSerializeStarLevel() => StarLevel > 0;
public bool ShouldSerializeStarLevelAfter() => StarLevelAfter > 0;
public bool ShouldSerializeOpponentStarLevel() => OpponentStarLevel > 0;
Expand Down
10 changes: 10 additions & 0 deletions Hearthstone Deck Tracker/Utility/ConfigWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,16 @@ public static bool HsReplayUploadDuels
}
}

public static bool HsReplayUploadMercenaries
{
get { return Config.Instance.HsReplayUploadMercenaries; }
set
{
Config.Instance.HsReplayUploadMercenaries = value;
Config.Save();
}
}

public static Visibility ShowDateOnDeckVisibility => Config.Instance.ShowDateOnDeck ? Visibility.Visible : Visibility.Collapsed;

public static Visibility UseButtonVisiblity => Config.Instance.AutoUseDeck ? Visibility.Collapsed : Visibility.Visible;
Expand Down
15 changes: 15 additions & 0 deletions Hearthstone Deck Tracker/Utility/RemoteConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ internal class ConfigData
[JsonProperty("update_info")]
public UpdateData UpdateInfo { get; set; }

[JsonProperty("mercenary_abilities")]
public List<Mercenary> MercenaryAbilities { get; set; }

internal class NewsData
{
[JsonProperty("id")]
Expand Down Expand Up @@ -147,6 +150,18 @@ internal class UpdateData
[JsonProperty("image_update_hearthstone_version")]
public int Version { get; set; }
}

internal class Mercenary
{
[JsonProperty("card_id")]
public string CardId { get; set; }

[JsonProperty("skins")]
public List<string> Skins { get; set; }

[JsonProperty("abilities")]
public List<string> Abilities { get; set; }
}
}
}
}
Loading

0 comments on commit 77198e4

Please sign in to comment.