Skip to content

Commit

Permalink
Fix #23
Browse files Browse the repository at this point in the history
  • Loading branch information
IzzelAliz committed Aug 24, 2019
1 parent 841a06d commit 29ad37e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public OperationResult performTransaction() {
return OperationResult.fail("trade.transaction-results.sold-out");
if (Inventories.empty(toInv, type) < count)
return OperationResult.fail("trade.transaction-results.inventory-full");
val items = Inventories.take(fromInv, count, type);

val price = BigDecimal.valueOf(count).multiply(BigDecimal.valueOf(this.price));
var sr = Util.performEconomy(fromAccount, price, false);
Expand All @@ -50,6 +49,7 @@ public OperationResult performTransaction() {
return cr;
}

val items = Inventories.take(fromInv, count, type);
var success = 0;
val iterator = items.iterator();
while (iterator.hasNext()) {
Expand Down

0 comments on commit 29ad37e

Please sign in to comment.