Set grid weapon element when downloaded

This commit is contained in:
Justin Edmund 2023-07-03 19:07:56 -07:00
parent 932dfe231f
commit c35f954048

View file

@ -340,8 +340,11 @@ const Party = (props: Props) => {
if (gridObject.mainhand) { if (gridObject.mainhand) {
appState.grid.weapons.mainWeapon = gridObject appState.grid.weapons.mainWeapon = gridObject
appState.party.element = gridObject.object.element appState.party.element = gridObject.object.element
} else if (!gridObject.mainhand && gridObject.position != null) { } else if (!gridObject.mainhand && gridObject.position !== null) {
appState.grid.weapons.allWeapons[gridObject.position] = gridObject let weapon = clonedeep(gridObject)
weapon.element = gridObject.object.element
appState.grid.weapons.allWeapons[gridObject.position] = weapon
} }
}) })
} }