Skip to content

Commit

Permalink
chore: stop sending trinket to obsoleted Twitch Extension weapon slot
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed Aug 27, 2024
1 parent 067ed52 commit 7484c60
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Hearthstone Deck Tracker/Live/BoardStateWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ private Tuple<BoardStatePlayer, BoardStatePlayer> GetBattlegroundsSoloPlayerBoar
HeroPower = BgsQuestReward(player, true) ?? BgsTrinket(player, TrinketHeroPowerSlot) ?? DbfId(FindHeroPower(player)),
Weapon = playerWeapon != 0 ? playerWeapon :
BgsQuestReward(player, false) ??
BgsTrinket(player, TrinketSecondSlot) ??
BgsTrinket(player, TrinketFirstSlot) ??
BuddyDbfId(player) ?? 0,
FirstTrinket = BgsTrinket(player, TrinketFirstSlot),
SecondTrinket = BgsTrinket(player, TrinketSecondSlot),
Expand All @@ -342,8 +340,6 @@ private Tuple<BoardStatePlayer, BoardStatePlayer> GetBattlegroundsSoloPlayerBoar
HeroPower = BgsQuestReward(opponent, true) ?? BgsTrinket(opponent, TrinketHeroPowerSlot) ?? DbfId(FindHeroPower(opponent)),
Weapon = opponentWeapon != 0 ? opponentWeapon :
BgsQuestReward(opponent, false) ??
BgsTrinket(opponent, TrinketSecondSlot) ??
BgsTrinket(opponent, TrinketFirstSlot) ??
BuddyDbfId(opponent) ?? 0,
FirstTrinket = BgsTrinket(opponent, TrinketFirstSlot),
SecondTrinket = BgsTrinket(opponent, TrinketSecondSlot),
Expand Down Expand Up @@ -386,8 +382,7 @@ int controller
?? inPlay.FirstOrDefault(entity => GetTag(entity, GameTag.CARDTYPE) == (int)CardType.BATTLEGROUND_TRINKET && GetTag(entity, GameTag.TAG_SCRIPT_DATA_NUM_6) == TrinketHeroPowerSlot);

var weapon = inPlay.FirstOrDefault(entity => GetTag(entity, GameTag.CARDTYPE) == (int)CardType.WEAPON)
?? inPlay.FirstOrDefault(entity => GetTag(entity, GameTag.CARDTYPE) == (int)CardType.BATTLEGROUND_QUEST_REWARD)
?? lesserTrinket;
?? inPlay.FirstOrDefault(entity => GetTag(entity, GameTag.CARDTYPE) == (int)CardType.BATTLEGROUND_QUEST_REWARD);

var buddyDbfId = 0;
if(Core.Game.BattlegroundsBuddiesEnabled)
Expand Down

0 comments on commit 7484c60

Please sign in to comment.