Extract the correct AX skills for display
This commit is contained in:
parent
4a87326307
commit
c56c7981d9
1 changed files with 12 additions and 2 deletions
|
|
@ -123,8 +123,18 @@ const WeaponUnit = (props: Props) => {
|
||||||
props.gridWeapon.ax
|
props.gridWeapon.ax
|
||||||
) {
|
) {
|
||||||
const axOptions = axData[props.gridWeapon.object.ax - 1]
|
const axOptions = axData[props.gridWeapon.object.ax - 1]
|
||||||
const weaponAxSkill: SimpleAxSkill = props.gridWeapon.ax[index]
|
const weaponAxSkill: SimpleAxSkill = props.gridWeapon.ax[0]
|
||||||
return axOptions.find((ax) => ax.id === weaponAxSkill.modifier)
|
|
||||||
|
let axSkill = axOptions.find((ax) => ax.id === weaponAxSkill.modifier)
|
||||||
|
|
||||||
|
if (index !== 0 && axSkill && axSkill.secondary) {
|
||||||
|
const weaponSubAxSkill: SimpleAxSkill = props.gridWeapon.ax[1]
|
||||||
|
axSkill = axSkill.secondary.find(
|
||||||
|
(ax) => ax.id === weaponSubAxSkill.modifier
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return axSkill
|
||||||
} else return
|
} else return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue