mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +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
|
const redTeam: PlayerRole[] = [] // 200
|
||||||
let blueRoles: FinalRoleComposition = {}
|
let blueRoles: FinalRoleComposition = {}
|
||||||
let redRoles: 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) {
|
if (needsRole) {
|
||||||
liveMatch.participants.map(p => {
|
liveMatch.participants.map(p => {
|
||||||
const playerRole = { champion: p.championId, jungle: p.spell1Id === 11 || p.spell2Id === 11 }
|
const playerRole = { champion: p.championId, jungle: p.spell1Id === 11 || p.spell2Id === 11 }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue