318 {
321
322 if ( !item_a || !item_b )
323 {
324 Error(
"PerformRecipeServer - one of the items null !!");
325 return;
326 }
327
329
332
333 if ( !is_recipe_valid )
334 {
335 Error(
"PerformRecipeServer - recipe not valid !!");
336 return;
337 }
338 if ( !passed_sanity_check )
339 {
340 Error(
"PerformRecipeServer - recipe failed to pass sanity check !!");
341 return;
342 }
345
346
347 }
ItemBase m_sortedIngredients[MAX_NUMBER_OF_INGREDIENTS]
ref array< ref RecipeBase > m_RecipeList
bool CheckRecipe(int id, ItemBase item1, ItemBase item2, PlayerBase player)
bool RecipeSanityCheck(int num_of_ingredients, InventoryItemBase items[], PlayerBase player)
ItemBase m_Ingredients[MAX_INGREDIENTS]
bool SortIngredientsInRecipe(int id, int num_of_ingredients, ItemBase ingredients_unsorted[], ItemBase ingredients_sorted[])
sorts ingredients correctly as either first or second ingredient based on their masks
void Error(string err)
Messagebox with error message.