mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
feat: add role identification in spellbook games
This commit is contained in:
parent
cdfdb814ca
commit
e07ae8f359
2 changed files with 9 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { PlayerRole, queuesWithRole } from 'App/helpers'
|
||||
import { PlayerRole, queuesWithRole, smiteIds } from 'App/helpers'
|
||||
import CDragonService from 'App/Services/CDragonService'
|
||||
import { CurrentGameInfoDTO } from 'App/Services/Jax/src/Endpoints/SpectatorEndpoint'
|
||||
import { RoleComposition } from 'App/Services/RoleIdentificationService'
|
||||
|
|
@ -25,7 +25,7 @@ class LiveMatchSerializer extends MatchSerializer {
|
|||
liveMatch.participants.map((p) => {
|
||||
const playerRole = {
|
||||
champion: p.championId,
|
||||
jungle: p.spell1Id === 11 || p.spell2Id === 11,
|
||||
jungle: smiteIds.includes(p.spell1Id) || smiteIds.includes(p.spell2Id),
|
||||
}
|
||||
p.teamId === 100 ? blueTeam.push(playerRole) : redTeam.push(playerRole)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ export const queuesWithRole = [
|
|||
430, // Blind,
|
||||
440, // Flex
|
||||
700, // Clash
|
||||
1400, // Ultimate Spellbook
|
||||
]
|
||||
|
||||
/**
|
||||
|
|
@ -91,6 +92,12 @@ export const seasons = {
|
|||
*/
|
||||
export const supportItems = [3850, 3851, 3853, 3854, 3855, 3857, 3858, 3859, 3860, 3862, 3863, 3864]
|
||||
|
||||
/**
|
||||
* League of Legends summoner spell Smite ids
|
||||
* Note: 55 is for Ultimate Spellbook gamemode
|
||||
*/
|
||||
export const smiteIds = [11, 55]
|
||||
|
||||
/**
|
||||
* Get season number for a match
|
||||
* @param timestamp
|
||||
|
|
|
|||
Loading…
Reference in a new issue