diff --git a/server/app/Serializers/LiveMatchSerializer.ts b/server/app/Serializers/LiveMatchSerializer.ts index 3c5a336..a20a788 100644 --- a/server/app/Serializers/LiveMatchSerializer.ts +++ b/server/app/Serializers/LiveMatchSerializer.ts @@ -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) }) diff --git a/server/app/helpers.ts b/server/app/helpers.ts index 2937962..57cfe1a 100644 --- a/server/app/helpers.ts +++ b/server/app/helpers.ts @@ -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