Change image for transcended weapons

This commit is contained in:
Justin Edmund 2024-01-25 02:49:39 -08:00
parent 3efe8424a0
commit fdcbecf527
2 changed files with 40 additions and 4 deletions

View file

@ -209,10 +209,23 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => {
(w) => w && w.object.id === mainhand.id
)
let suffix = ''
if (
weapon &&
weapon.object.uncap.transcendence &&
weapon.uncap_level == 6
) {
if (weapon.transcendence_step >= 1 && weapon.transcendence_step < 5) {
suffix = '_02'
} else if (weapon.transcendence_step === 5) {
suffix = '_03'
}
}
if (mainhand.element == 0 && weapon && weapon.element) {
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${mainhand.granblue_id}_${weapon.element}.jpg`
} else {
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${mainhand.granblue_id}.jpg`
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${mainhand.granblue_id}${suffix}.jpg`
}
}
@ -230,10 +243,22 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => {
const gridWeapon = weaponGrid[position]
if (weapon && gridWeapon) {
let suffix = ''
if (weapon.uncap.transcendence && gridWeapon.uncap_level == 6) {
if (
gridWeapon.transcendence_step >= 1 &&
gridWeapon.transcendence_step < 5
) {
suffix = '_02'
} else if (gridWeapon.transcendence_step === 5) {
suffix = '_03'
}
}
if (weapon.element == 0 && gridWeapon.element) {
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}_${gridWeapon.element}.jpg`
} else {
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}${suffix}.jpg`
}
}

View file

@ -201,16 +201,27 @@ const WeaponUnit = ({
if (gridWeapon) {
const weapon = gridWeapon.object!
let suffix = ''
if (weapon.uncap.transcendence && gridWeapon.uncap_level == 6) {
if (
gridWeapon.transcendence_step >= 1 &&
gridWeapon.transcendence_step < 5
) {
suffix = '_02'
} else if (gridWeapon.transcendence_step === 5) {
suffix = '_03'
}
}
if (unitType == 0) {
if (gridWeapon.object.element == 0 && gridWeapon.element)
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}_${gridWeapon.element}.jpg`
else
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}.jpg`
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}${suffix}.jpg`
} else {
if (gridWeapon.object.element == 0 && gridWeapon.element)
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}_${gridWeapon.element}.jpg`
else
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}${suffix}.jpg`
}
}