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

◆ PerformRecipeServer()

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

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

318 {
319 m_Ingredients[0] = item_a;
320 m_Ingredients[1] = item_b;
321
322 if ( !item_a || !item_b )
323 {
324 Error("PerformRecipeServer - one of the items null !!");
325 return;
326 }
327
329
330 bool is_recipe_valid = CheckRecipe(id,m_sortedIngredients[0],m_sortedIngredients[1],player);
331 bool passed_sanity_check = RecipeSanityCheck(2,m_sortedIngredients,player);
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 }
343 RecipeBase ptrRecipe = m_RecipeList[id];
344 ptrRecipe.PerformRecipe(m_sortedIngredients[0],m_sortedIngredients[1],player);
345 //player.RequestCraftingDisable();
346
347 }
void RecipeBase()
Определения RecipeBase.c:67
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:477
bool RecipeSanityCheck(int num_of_ingredients, InventoryItemBase items[], PlayerBase player)
Определения PluginRecipesManager.c:407
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:496
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

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