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

◆ SortIngredients()

int PluginRecipesManagerBase::SortIngredients ( int num_of_ingredients,
ItemBase items_unsorted[],
int resolved_recipes[] )
inlineprotected

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

641 {
642 int count = 0;
643 for (int i = 0; i < m_RecipesMatched.Count() && i < MAX_CONCURENT_RECIPES; i++)
644 {
645 int recipe_id = m_RecipesMatched.Get(i);
646
647 if (SortIngredientsInRecipe(recipe_id, num_of_ingredients, items_unsorted, m_sortedIngredients))//...and now we need to determine which item will be which ingredient number
648 {
649 resolved_recipes[count] = recipe_id;
652 //m_ingredient3[count] = m_sortedIngredients[2];
653 count++;
654 }
655 }
656 return count;
657 }
ItemBase m_sortedIngredients[MAX_NUMBER_OF_INGREDIENTS]
Определения PluginRecipesManager.c:37
ItemBase m_ingredient1[MAX_CONCURENT_RECIPES]
Определения PluginRecipesManager.c:33
const int MAX_CONCURENT_RECIPES
Определения PluginRecipesManager.c:20
ref array< int > m_RecipesMatched
Определения PluginRecipesManager.c:39
ItemBase m_ingredient2[MAX_CONCURENT_RECIPES]
Определения PluginRecipesManager.c:34
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

Перекрестные ссылки m_ingredient1, m_ingredient2, m_RecipesMatched, m_sortedIngredients, MAX_CONCURENT_RECIPES и SortIngredientsInRecipe().

Используется в GetValidRecipesProper().