Change the weapon's image for null element weapons
This commit is contained in:
parent
a161a1b63a
commit
47ff412c2b
1 changed files with 11 additions and 4 deletions
|
|
@ -43,10 +43,17 @@ const WeaponUnit = (props: Props) => {
|
||||||
if (props.gridWeapon) {
|
if (props.gridWeapon) {
|
||||||
const weapon = props.gridWeapon.object!
|
const weapon = props.gridWeapon.object!
|
||||||
|
|
||||||
if (props.unitType == 0)
|
if (props.unitType == 0) {
|
||||||
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}.jpg`
|
if (props.gridWeapon.object.element == 0 && props.gridWeapon.element)
|
||||||
else
|
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}_${props.gridWeapon.element}.jpg`
|
||||||
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
|
else
|
||||||
|
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}.jpg`
|
||||||
|
} else {
|
||||||
|
if (props.gridWeapon.object.element == 0 && props.gridWeapon.element)
|
||||||
|
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}_${props.gridWeapon.element}.jpg`
|
||||||
|
else
|
||||||
|
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setImageUrl(imgSrc)
|
setImageUrl(imgSrc)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue