Skip to content

Commit

Permalink
fix(match2): error on clash royale
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Nov 6, 2024
1 parent 39c1abe commit b4d69e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/match2/commons/match_group_input_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ end
---@class MatchParserInterface
---@field extractMaps fun(match: table, opponents: table[]): table[]
---@field getBestOf fun(bestOfInput: string|integer, maps: table[]): integer
---@field calculateMatchScore fun(maps: table[]): fun(opponentIndex: integer): integer
---@field calculateMatchScore fun(maps: table[], opponents: table[]): fun(opponentIndex: integer): integer
---@field removeUnsetMaps? fun(maps: table[]): table[]
---@field getExtraData? fun(match: table, games: table[], opponents: table[]): table
---@field DEFAULT_MODE? string
Expand All @@ -1092,7 +1092,7 @@ end
--- The Parser injection must have the following functions:
--- - extractMaps(match, opponents): table[]
--- - getBestOf(bestOfInput, maps): integer
--- - calculateMatchScore(maps): fun(opponentIndex): integer
--- - calculateMatchScore(maps, opponents): fun(opponentIndex): integer
---
--- It may optionally have the following functions:
--- - removeUnsetMaps(maps): table[]
Expand Down Expand Up @@ -1122,7 +1122,7 @@ function MatchGroupInputUtil.standardProcessMatch(match, Parser)
match.links = MatchGroupInputUtil.getLinks(match)

local autoScoreFunction = MatchGroupInputUtil.canUseAutoScore(match, games)
and Parser.calculateMatchScore(games)
and Parser.calculateMatchScore(games, opponents)
or nil
Array.forEach(opponents, function(opponent, opponentIndex)
opponent.score, opponent.status = MatchGroupInputUtil.computeOpponentScore({
Expand Down

0 comments on commit b4d69e7

Please sign in to comment.