diff --git a/components/CharacterResult/index.tsx b/components/CharacterResult/index.tsx index f2395019..582bdf2c 100644 --- a/components/CharacterResult/index.tsx +++ b/components/CharacterResult/index.tsx @@ -19,9 +19,19 @@ const CharacterResult = (props: Props) => { const character = props.data - return( + const characterUrl = () => { + let url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}chara-grid/${character.granblue_id}_01.jpg` + + if (character.granblue_id === '3030182000') { + url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}chara-grid/${character.granblue_id}_01_01.jpg` + } + + return url + } + + return (
  • - {character.name[locale]} + {character.name[locale]}
    {character.name[locale]}
    { const { t } = useTranslation('common') + const { party, grid } = useSnapshot(appState) + const router = useRouter() const locale = (router.locale && ['en', 'ja'].includes(router.locale)) ? router.locale : 'en' @@ -55,7 +60,19 @@ const CharacterUnit = (props: Props) => { else if (props.gridCharacter.uncap_level > 2) suffix = '02' - imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/chara-main/${character.granblue_id}_${suffix}.jpg` + // Special casing for Lyria (and Young Cat eventually) + if (props.gridCharacter.object.granblue_id === '3030182000') { + let element = 1 + if (grid.weapons.mainWeapon && grid.weapons.mainWeapon.element) { + element = grid.weapons.mainWeapon.element + } else if (party.element != 0) { + element = party.element + } + + suffix = `${suffix}_0${element}` + } + + imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}chara-main/${character.granblue_id}_${suffix}.jpg` } setImageUrl(imgSrc) diff --git a/components/WeaponUnit/index.tsx b/components/WeaponUnit/index.tsx index ad740df8..faecf00f 100644 --- a/components/WeaponUnit/index.tsx +++ b/components/WeaponUnit/index.tsx @@ -76,7 +76,7 @@ const WeaponUnit = (props: Props) => { const weapon = gridWeapon.object return weapon.ax > 0 || - (weapon.series) && [2, 3, 17, 22].includes(weapon.series) + (weapon.series) && [2, 3, 17, 22, 24].includes(weapon.series) } const image = (