Skip to content

Commit

Permalink
Fix material exchange consuming more materials than needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Melledy committed Dec 16, 2023
1 parent 7777b95 commit 82ed890
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ public List<GameItem> composeItem(Player player, int composeId, int count, List<
}

// Pay items
player.getInventory().removeItemsByParams(costItems, count);
player.getInventory().removeItemsByParams(costItems);

// Create item
items.add(new GameItem(excel.getItemID(), count));
Expand Down Expand Up @@ -650,9 +650,7 @@ public List<GameItem> composeRelic(Player player, int composeId, int relicId, in

// Get relic excel
ItemExcel itemExcel = GameData.getItemExcelMap().get(relicId);
if (itemExcel == null) {
return null;
}
if (itemExcel == null) return null;

// Build cost items
List<ItemParam> costItems = new ArrayList<>();
Expand Down

0 comments on commit 82ed890

Please sign in to comment.