mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 21:07:27 +00:00
fix: live game ban pickturn in clash games
This commit is contained in:
parent
baf729e9bf
commit
69ef705adc
1 changed files with 15 additions and 2 deletions
|
|
@ -206,6 +206,10 @@ export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
clashGameBanOrder: {
|
||||||
|
100: [1, 3, 5, 8, 10],
|
||||||
|
200: [2, 4, 6, 7, 9]
|
||||||
|
},
|
||||||
customGameBanOrder: {
|
customGameBanOrder: {
|
||||||
100: [1, 3, 5, 2, 4],
|
100: [1, 3, 5, 2, 4],
|
||||||
200: [2, 4, 6, 1, 3]
|
200: [2, 4, 6, 1, 3]
|
||||||
|
|
@ -214,6 +218,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
isClash() {
|
||||||
|
return this.gamemode === 'CLASH'
|
||||||
|
},
|
||||||
isCustom() {
|
isCustom() {
|
||||||
return this.gamemode === 'Custom Game'
|
return this.gamemode === 'Custom Game'
|
||||||
},
|
},
|
||||||
|
|
@ -226,11 +233,17 @@ export default {
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
banChamp(index, teamId) {
|
banChamp(index, teamId) {
|
||||||
if (teamId === 200 && !this.isCustom) {
|
if (teamId === 200 && !this.isCustom && !this.isClash) {
|
||||||
index += 5
|
index += 5
|
||||||
}
|
}
|
||||||
|
|
||||||
const toFind = this.isCustom ? this.customGameBanOrder[teamId][index] : index + 1
|
let toFind = index + 1
|
||||||
|
if (this.isClash) {
|
||||||
|
toFind = this.clashGameBanOrder[teamId][index]
|
||||||
|
} else if (this.isCustom) {
|
||||||
|
toFind = this.customGameBanOrder[teamId][index]
|
||||||
|
}
|
||||||
|
|
||||||
return this.live.bannedChampions.find(b => b.pickTurn === toFind && b.teamId === teamId)
|
return this.live.bannedChampions.find(b => b.pickTurn === toFind && b.teamId === teamId)
|
||||||
},
|
},
|
||||||
borderChampion(id) {
|
borderChampion(id) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue