DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ PerformRecipeServer()

void PluginRecipesManagerBase::PerformRecipeServer ( int id,
ItemBase item_a,
ItemBase item_b,
PlayerBase player )
inlineprotected

См. определение в файле PluginRecipesManager.c строка 310

311 {
312 m_Ingredients[0] = item_a;
313 m_Ingredients[1] = item_b;
314
315 if ( !item_a || !item_b )
316 {
317 Error("PerformRecipeServer - one of the items null !!");
318 return;
319 }
320
322
323 bool is_recipe_valid = CheckRecipe(id,m_sortedIngredients[0],m_sortedIngredients[1],player);
324 bool passed_sanity_check = RecipeSanityCheck(2,m_sortedIngredients,player);
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 }
336 RecipeBase ptrRecipe = m_RecipeList[id];
338 //player.RequestCraftingDisable();
339
340 }
ItemBase m_sortedIngredients[MAX_NUMBER_OF_INGREDIENTS]
Определения PluginRecipesManager.c:37
ref array< ref RecipeBase > m_RecipeList
Определения PluginRecipesManager.c:42
bool CheckRecipe(int id, ItemBase item1, ItemBase item2, PlayerBase player)
Определения PluginRecipesManager.c:470
bool RecipeSanityCheck(int num_of_ingredients, InventoryItemBase items[], PlayerBase player)
Определения PluginRecipesManager.c:400
ItemBase m_Ingredients[MAX_INGREDIENTS]
Определения PluginRecipesManager.c:27
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
Определения PluginRecipesManager.c:489
void PerformRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
Определения RecipeBase.c:507
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки CheckRecipe(), Error(), m_Ingredients, m_RecipeList, m_sortedIngredients, RecipeBase::PerformRecipe(), RecipeSanityCheck() и SortIngredientsInRecipe().