diff --git a/components/match2/wikis/ageofempires/match_group_input_custom.lua b/components/match2/wikis/ageofempires/match_group_input_custom.lua index 91f53137bd8..19700cdb42f 100644 --- a/components/match2/wikis/ageofempires/match_group_input_custom.lua +++ b/components/match2/wikis/ageofempires/match_group_input_custom.lua @@ -270,8 +270,8 @@ function CustomMatchGroupInput._getOpponents(match) end match['opponent' .. opponentIndex] = opponent - if opponent.type == Opponent.team and Logic.isNotEmpty(opponent.name) then - MatchGroupInput.readPlayersOfTeam(match, opponentIndex, opponent.name, { + if opponent.type == Opponent.team and Logic.isNotEmpty(opponent.template) then + MatchGroupInput.readPlayersOfTeam(match, opponentIndex, mw.ext.TeamTemplate.raw(opponent.template).page, { resolveRedirect = true, applyUnderScores = true, maxNumPlayers = MAX_NUM_PLAYERS, diff --git a/components/match2/wikis/ageofempires/match_legacy.lua b/components/match2/wikis/ageofempires/match_legacy.lua index b689e6acb54..28cf3d2789e 100644 --- a/components/match2/wikis/ageofempires/match_legacy.lua +++ b/components/match2/wikis/ageofempires/match_legacy.lua @@ -129,7 +129,7 @@ function MatchLegacy._convertParameters(match2) match[prefix .. 'flag'] = player.flag match.extradata[prefix .. 'name'] = player.displayname elseif opponent.type == Opponent.team then - match[prefix] = opponent.name + match[prefix] = mw.ext.TeamTemplate.raw(opponent.template).page match[prefix..'score'] = (tonumber(opponent.score) or 0) > 0 and opponent.score or 0 local opponentplayers = {} for i, player in pairs(opponentmatch2players) do