Skip to content

Commit

Permalink
fix(match2): finished handling in hearthstone's legacy wrapper (#5153)
Browse files Browse the repository at this point in the history
* fix finished

* ..

* reset is a different key so we dont need this here
  • Loading branch information
LuckeLucky authored Dec 1, 2024
1 parent d983ce9 commit bc79777
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ function MatchGroupLegacyDefault:getMap()
}
end

---@param isReset boolean
---@param match table
function MatchGroupLegacyDefault:handleFinished(isReset, match)
match.finished = Logic.readBool(match.finished) or Logic.isNotEmpty(match.win)
end

---@param isReset boolean?
---@param match table
function MatchGroupLegacyDefault:handleOtherMatchParams(isReset, match)
match['winner'] = Table.extract(match, 'win')
match['finished'] = Table.extract(match, 'finished') or Logic.isNotEmpty(match['winner'])
match.winner = Table.extract(match, 'win')
end

---@param frame Frame
Expand Down

0 comments on commit bc79777

Please sign in to comment.