It goes like this:
- The check is done with RecipeController$RecipeItemMaker.listItems(boolean remove) method, with the "remove" parameter indicating if ingredients shall be taken out of the inventory or not.
- First time, it's run in RecipeItemMaker constructor ("remove" parameter = false), as one of verification steps.
- Second time, it's run just before the success/fail check, in RecipeItemMaker.finishCrafting() method, this time with "remove" parameter = true.
Code: Select all
foreach (ingredient in ingredients) check if there is enough items in player's inventoryif (remove) remove items from player's inventoryI believe introducing synchronization to the critical section mentioned is required. Please correct me if I'm wrong, I'm definitely not an L2j guru.
