mirror of
https://github.com/Sheldan/gw2-tools.git
synced 2026-01-01 06:49:06 +00:00
fixing not updating slots to update when an item was removed
fixing bank display
This commit is contained in:
@@ -24,13 +24,13 @@ export function Bank() {
|
||||
|
||||
const removedItems =
|
||||
<>
|
||||
{displayAdded ? <span className={styles.spanNewLine}>Removed items</span> : ''}
|
||||
{displayRemoved ? <span className={styles.spanNewLine}>Removed items</span> : ''}
|
||||
{bank.removedSlots.map((item) => <InventoryItem item={item}/>)}
|
||||
</>
|
||||
|
||||
const addedItems =
|
||||
<>
|
||||
{displayRemoved ? <span className={styles.spanNewLine}>Added Items</span> : ''}
|
||||
{displayAdded ? <span className={styles.spanNewLine}>Added Items</span> : ''}
|
||||
{bank.addedSlots.map((item) => <InventoryItem item={item}/>)}
|
||||
</>
|
||||
|
||||
|
||||
@@ -144,6 +144,7 @@ export function calculateBankDifferences(existingBank, incomingBankSlots, mockin
|
||||
count: 0,
|
||||
changed: -slot.count
|
||||
})
|
||||
slotsToUpdate[slot.id] = -slot.count
|
||||
}
|
||||
})
|
||||
return [slotsToAdd, slotsToRemove, slotsToUpdate];
|
||||
@@ -187,6 +188,7 @@ export function calculateSharedInventoryDifferences(existingSharedInventory, inc
|
||||
count: 0,
|
||||
changed: -slot.count
|
||||
})
|
||||
slotsToUpdate[slot.id] = -slot.count
|
||||
}
|
||||
})
|
||||
return [slotsToAdd, slotsToRemove, slotsToUpdate];
|
||||
@@ -230,6 +232,7 @@ export function calculateMaterialsDifference(materials, materialSlots, mocking)
|
||||
count: 0,
|
||||
changed: -slot.count
|
||||
})
|
||||
slotsToUpdate[slot.id] = -slot.count
|
||||
}
|
||||
})
|
||||
return [slotsToAdd, slotsToRemove, slotsToUpdate];
|
||||
|
||||
Reference in New Issue
Block a user