Skip to content

Commit

Permalink
Consume material.
Browse files Browse the repository at this point in the history
  • Loading branch information
ImmuState authored and Melledy committed Jun 8, 2022
1 parent a668bd6 commit 28a8475
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ public void startForging(ForgeStartReqOuterClass.ForgeStartReq req) {
continue;
}

this.player.getInventory().removeItem(material.getItemId(), material.getCount() * req.getForgeCount());
GameItem item = this.player.getInventory().getInventoryTab(ItemType.ITEM_MATERIAL).getItemById(material.getItemId());
this.player.getInventory().removeItem(item, material.getCount() * req.getForgeCount());
}

this.player.setMora(this.player.getMora() - forgeData.getScoinCost() * req.getForgeCount());
Expand Down

0 comments on commit 28a8475

Please sign in to comment.