Skip to content

Commit

Permalink
remove "remove" from "appendItemChnages" for the cost behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
p4535992 committed Jan 13, 2024
1 parent b6ff05f commit 670a55a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/helpers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export default class Transaction {
const incomingQuantity = set
? Math.abs(data.quantity ?? Utilities.getItemQuantity(itemData))
: Math.abs(data.quantity ?? Utilities.getItemQuantity(itemData)) * (remove ? -1 : 1);
const incomingCost = set
? Math.abs(data.cost ?? Utilities.getItemCost(itemData))
: Math.abs(data.cost ?? Utilities.getItemCost(itemData)) * (remove ? -1 : 1);
// Remove is ignored because when you remove a item the cost cannot change
const incomingCost = Math.abs(data.cost ?? Utilities.getItemCost(itemData));

let itemId = itemData._id ?? itemData.id;
let actorHasItem = false;
let actorExistingItem = false;
Expand Down

0 comments on commit 670a55a

Please sign in to comment.