diff --git a/client/src/components/Summoner/Live/LiveTeam.vue b/client/src/components/Summoner/Live/LiveTeam.vue index 585d3b0..18f34ba 100644 --- a/client/src/components/Summoner/Live/LiveTeam.vue +++ b/client/src/components/Summoner/Live/LiveTeam.vue @@ -126,8 +126,8 @@ class="absolute ban-order w-4 h-4 flex items-center justify-center text-xs font-bold rounded-full" >{{ banChamp(index, player.teamId).pickTurn }} -
-
-
+
+
-
@@ -185,10 +185,26 @@ export default { ally: { type: Boolean, default: true, + }, + gamemode: { + type: String, + default: '', + } + }, + + data() { + return { + customGameBanOrder: { + 100: [1, 3, 5, 2, 4], + 200: [2, 4, 6, 1, 3] + } } }, computed: { + isCustom() { + return this.gamemode === 'Custom Game' + }, ...mapState({ account: state => state.summoner.basic.account, live: state => state.summoner.live.match, @@ -198,12 +214,12 @@ export default { methods: { banChamp(index, teamId) { - index++ - - if (teamId === 200) { + if (teamId === 200 && !this.isCustom) { index += 5 } - return this.live.bannedChampions.find(b => b.pickTurn === index) + + const toFind = this.isCustom ? this.customGameBanOrder[teamId][index] : index + 1 + return this.live.bannedChampions.find(b => b.pickTurn === toFind && b.teamId === teamId) }, borderChampion(id) { if (id === this.account.id) { diff --git a/client/src/mixins/liveGame.js b/client/src/mixins/liveGame.js index 7567994..87b80d7 100644 --- a/client/src/mixins/liveGame.js +++ b/client/src/mixins/liveGame.js @@ -22,7 +22,11 @@ export const liveGame = { return this.current && this.current.participants ? this.current.participants.filter(p => p.teamId !== this.teamColor) : [] }, gamemode() { - return gameModes[this.current.gameQueueConfigId] + if (this.current.participants) { + return this.current.gameType === 'CUSTOM_GAME' ? { type: '', name: 'Custom Game' } : gameModes[this.current.gameQueueConfigId] + } else { + return { type: '', name: '' } + } }, gameStartTime() { return this.current ? this.current.gameStartTime : 0 diff --git a/client/src/views/SummonerLive.vue b/client/src/views/SummonerLive.vue index f076bc2..c18566d 100644 --- a/client/src/views/SummonerLive.vue +++ b/client/src/views/SummonerLive.vue @@ -12,8 +12,8 @@
- - + +