Skip to content

Commit

Permalink
fix(battlegrounds): wrong banned minion types
Browse files Browse the repository at this point in the history
Fixes #4532
  • Loading branch information
beheh committed Feb 19, 2024
1 parent 178dc23 commit ccd862e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public void UpdateSectionsVisibilities()

private void UpdateBannedTribes()
{
var allRaces = _db.Value.Races;
var availableRaces = BattlegroundsUtils.GetAvailableRaces(Core.Game.CurrentGameStats?.GameId) ?? allRaces;
var unavailableRaces = allRaces.Where(x => !availableRaces.Contains(x) && x != Race.INVALID && x != Race.ALL)
var allRaces = _db.Value.Races.Where(x => x != Race.INVALID && x != Race.ALL).ToList();
var availableRaces = BattlegroundsUtils.GetAvailableRaces(Core.Game.CurrentGameStats?.GameId)?.ToList() ?? allRaces;
var unavailableRaces = allRaces.Where(x => !availableRaces.Contains(x))
.OrderBy(t => HearthDbConverter.GetLocalizedRace(t) ?? "")
.ToList();

Expand Down
3 changes: 3 additions & 0 deletions Hearthstone Deck Tracker/GameEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ private void HandleTurnStart(Tuple<ActivePlayer, int> turn)
Core.Game.Player.MulliganCardStats = null;
Core.Overlay.BattlegroundsHeroPickingViewModel.Reset();
Core.Overlay.HideBattlegroundsHeroPanel();
Core.Overlay.BattlegroundsSessionViewModelVM.Update();

if(_game.IsBattlegroundsMatch)
{
Expand Down Expand Up @@ -1352,6 +1353,8 @@ private async void HandleBattlegroundsStart()
}
else
Core.Overlay.ShowBgsTopBarAndBobsBuddyPanel();

Core.Overlay.BattlegroundsSessionViewModelVM.Update();
OpponentDeadForTracker.ResetOpponentDeadForTracker();
}

Expand Down

0 comments on commit ccd862e

Please sign in to comment.