diff --git a/Hearthstone Deck Tracker/Live/BoardStateWatcher.cs b/Hearthstone Deck Tracker/Live/BoardStateWatcher.cs index 72fecb7b5..d55e2da79 100644 --- a/Hearthstone Deck Tracker/Live/BoardStateWatcher.cs +++ b/Hearthstone Deck Tracker/Live/BoardStateWatcher.cs @@ -128,6 +128,16 @@ private int DbfId(Entity? e) return player.QuestRewards.FirstOrDefault(x => x.HasTag(GameTag.BACON_IS_HEROPOWER_QUESTREWARD) == heroPower)?.Card.DbfId; } + private int? BgsAnomaly(Entity game) + { + var anomaly = game.GetTag(GameTag.BACON_GLOBAL_ANOMALY_DBID); + if (anomaly != 0) + { + return anomaly; + } + return null; + } + // Return the dbf id for an entity, but blacklisted against common hero cards we don't want want to show in the overlay. private int HeroDbfId(Entity? entity) { @@ -242,6 +252,7 @@ private int HeroDbfId(Entity? entity) Fatigue = Core.Game.OpponentEntity.GetTag(GameTag.FATIGUE) }, GameType = gameType, + BattlegroundsAnomaly = BgsAnomaly(Core.Game.GameEntity), BobsBuddyOutput = gameType == BnetGameType.BGT_BATTLEGROUNDS ? GetBobsBuddyState() : null }; } diff --git a/Hearthstone Deck Tracker/Live/Data/BoardState.cs b/Hearthstone Deck Tracker/Live/Data/BoardState.cs index 0d5546a27..8d5f4ba96 100644 --- a/Hearthstone Deck Tracker/Live/Data/BoardState.cs +++ b/Hearthstone Deck Tracker/Live/Data/BoardState.cs @@ -35,6 +35,9 @@ public class BoardState [JsonProperty("game_type")] public BnetGameType GameType { get; set; } + [JsonProperty("battlegrounds_anomaly", DefaultValueHandling = DefaultValueHandling.Ignore)] + public int? BattlegroundsAnomaly { get; set; } + [JsonProperty("bobs_buddy_state", DefaultValueHandling = DefaultValueHandling.Ignore)] public BobsBuddyState? BobsBuddyOutput { get; set; }