diff --git a/Hearthstone Deck Tracker/Controls/Overlay/Battlegrounds/Guides/Heroes/BattlegroundsHeroGuideListViewModel.cs b/Hearthstone Deck Tracker/Controls/Overlay/Battlegrounds/Guides/Heroes/BattlegroundsHeroGuideListViewModel.cs index a68642106..c1f8ef3fb 100644 --- a/Hearthstone Deck Tracker/Controls/Overlay/Battlegrounds/Guides/Heroes/BattlegroundsHeroGuideListViewModel.cs +++ b/Hearthstone Deck Tracker/Controls/Overlay/Battlegrounds/Guides/Heroes/BattlegroundsHeroGuideListViewModel.cs @@ -4,6 +4,7 @@ using System.Net; using System.Net.Http; using System.Threading.Tasks; +using HearthDb.Enums; using Hearthstone_Deck_Tracker.Hearthstone; using Hearthstone_Deck_Tracker.Utility.Logging; using Hearthstone_Deck_Tracker.Utility.MVVM; @@ -79,6 +80,12 @@ public void OnMulliganEnded() var heroCard = Database.GetCardFromDbfId(heroDbfid.Value, false); + // The hero ID can be a skin, so we need to get the base hero id. + var baseHeroDbfid = heroCard?.BattlegroundsSkinParentId; + + if(baseHeroDbfid is > 0) + heroCard = Database.GetCardFromDbfId(baseHeroDbfid.Value, false); + BattlegroundsHeroGuide? guide = null; if(heroCard == null) return; diff --git a/Hearthstone Deck Tracker/Controls/Overlay/Battlegrounds/Guides/Heroes/HeroGuideTooltip.xaml.cs b/Hearthstone Deck Tracker/Controls/Overlay/Battlegrounds/Guides/Heroes/HeroGuideTooltip.xaml.cs index 9db1f52a1..d66697c76 100644 --- a/Hearthstone Deck Tracker/Controls/Overlay/Battlegrounds/Guides/Heroes/HeroGuideTooltip.xaml.cs +++ b/Hearthstone Deck Tracker/Controls/Overlay/Battlegrounds/Guides/Heroes/HeroGuideTooltip.xaml.cs @@ -112,7 +112,16 @@ public Visibility HeroGuideVisibility ) return Collapsed; - return Core.Game.BattlegroundsHeroPickState.OfferedHeroDbfIds.Contains(HoveredHeroDbfid.Value) ? Visible : Collapsed; + var offeredHeroDbfIds = Core.Game.BattlegroundsHeroPickState.OfferedHeroDbfIds; + + // The offered hero IDs can be a skins, so we need to get the base hero id. + var baseHeroDbfIds = offeredHeroDbfIds.Select(dbfId => + { + var heroCard = Database.GetCardFromDbfId(dbfId, false); + return heroCard?.BattlegroundsSkinParentId > 0 ? heroCard.BattlegroundsSkinParentId : dbfId; + }).ToList(); + + return baseHeroDbfIds.Contains(HoveredHeroDbfid.Value) ? Visible : Collapsed; } } public bool IsGuidePublished => PublishedGuide != null && PublishedGuide.Any();