mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 21:07:27 +00:00
feat(live-tab): add roles in custom games too
This commit is contained in:
parent
953267c122
commit
2f92b84426
1 changed files with 4 additions and 1 deletions
|
|
@ -38,7 +38,10 @@ class LiveMatchTransformer extends MatchTransformer {
|
|||
const redTeam: PlayerRole[] = [] // 200
|
||||
let blueRoles: FinalRoleComposition = {}
|
||||
let redRoles: FinalRoleComposition = {}
|
||||
const needsRole = this.championRoles && queuesWithRole.includes(liveMatch.gameQueueConfigId)
|
||||
const needsRole = this.championRoles &&
|
||||
(queuesWithRole.includes(liveMatch.gameQueueConfigId) ||
|
||||
(liveMatch.gameType === 'CUSTOM_GAME' && liveMatch.participants.length === 10))
|
||||
|
||||
if (needsRole) {
|
||||
liveMatch.participants.map(p => {
|
||||
const playerRole = { champion: p.championId, jungle: p.spell1Id === 11 || p.spell2Id === 11 }
|
||||
|
|
|
|||
Loading…
Reference in a new issue