*/
if(!ignore_rollback && gamedef->rollback())
{
- IRollbackReportSink *rollback = gamedef->rollback();
+ IRollbackManager *rollback = gamedef->rollback();
// If source is not infinite, record item take
if(src_can_take_count != -1){
loc = os.str();
}
action.setModifyInventoryStack(loc, from_list, from_i, false,
- src_item.getItemString());
+ src_item);
rollback->reportAction(action);
}
// If destination is not infinite, record item put
loc = os.str();
}
action.setModifyInventoryStack(loc, to_list, to_i, true,
- src_item.getItemString());
+ src_item);
rollback->reportAction(action);
}
}
*/
if(!ignore_src_rollback && gamedef->rollback())
{
- IRollbackReportSink *rollback = gamedef->rollback();
+ IRollbackManager *rollback = gamedef->rollback();
// If source is not infinite, record item take
if(src_can_take_count != -1){
loc = os.str();
}
action.setModifyInventoryStack(loc, from_list, from_i,
- false, src_item.getItemString());
+ false, src_item);
rollback->reportAction(action);
}
}
ItemStack crafted;
ItemStack craftresultitem;
int count_remaining = count;
- bool found = getCraftingResult(inv_craft, crafted, false, gamedef);
+ getCraftingResult(inv_craft, crafted, false, gamedef);
PLAYER_TO_SA(player)->item_CraftPredict(crafted, player, list_craft, craft_inv);
- found = !crafted.empty();
+ bool found = !crafted.empty();
while(found && list_craftresult->itemFits(0, crafted))
{