311 {
314
315 if ( !item_a || !item_b )
316 {
317 Error(
"PerformRecipeServer - one of the items null !!");
318 return;
319 }
320
322
325
326 if ( !is_recipe_valid )
327 {
328 Error(
"PerformRecipeServer - recipe not valid !!");
329 return;
330 }
331 if ( !passed_sanity_check )
332 {
333 Error(
"PerformRecipeServer - recipe failed to pass sanity check !!");
334 return;
335 }
338
339
340 }
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 PerformRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
void Error(string err)
Messagebox with error message.