Skip to content

Commit

Permalink
fix(match2): extradata for 1v1 maps in team matches incomplete on cra…
Browse files Browse the repository at this point in the history
…ft wikis (#5168)
  • Loading branch information
hjpalpha authored Dec 6, 2024
1 parent c1fc5dd commit 1d6d573
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ function MapFunctions.getExtraData(match, map, opponents)

---@type table[]
local players = {
Array.extractValues(map.opponents[1].players)[1],
Array.extractValues(map.opponents[2].players)[1],
Array.filter(Array.extractValues(map.opponents[1].players or {}), Logic.isNotEmpty)[1],
Array.filter(Array.extractValues(map.opponents[2].players or {}), Logic.isNotEmpty)[1],
}

extradata.opponent1 = players[1].player
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ function MapFunctions.getExtraData(match, map, opponents)

---@type table[]
local players = {
Array.extractValues(map.opponents[1].players)[1],
Array.extractValues(map.opponents[2].players)[1],
Array.filter(Array.extractValues(map.opponents[1].players or {}), Logic.isNotEmpty)[1],
Array.filter(Array.extractValues(map.opponents[2].players or {}), Logic.isNotEmpty)[1],
}

extradata.opponent1 = players[1].player
Expand Down
4 changes: 2 additions & 2 deletions components/match2/wikis/warcraft/match_group_input_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ function MapFunctions.getExtraData(match, map, opponents)

---@type table[]
local players = {
Array.extractValues(map.opponents[1].players)[1],
Array.extractValues(map.opponents[2].players)[1],
Array.filter(Array.extractValues(map.opponents[1].players or {}), Logic.isNotEmpty)[1],
Array.filter(Array.extractValues(map.opponents[2].players or {}), Logic.isNotEmpty)[1],
}

extradata.opponent1 = players[1].player
Expand Down

0 comments on commit 1d6d573

Please sign in to comment.