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

◆ SortIngredients()

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

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

634 {
635 int count = 0;
636 for (int i = 0; i < m_RecipesMatched.Count() && i < MAX_CONCURENT_RECIPES; i++)
637 {
638 int recipe_id = m_RecipesMatched.Get(i);
639
640 if (SortIngredientsInRecipe(recipe_id, num_of_ingredients, items_unsorted, m_sortedIngredients))//...and now we need to determine which item will be which ingredient number
641 {
642 resolved_recipes[count] = recipe_id;
645 //m_ingredient3[count] = m_sortedIngredients[2];
646 count++;
647 }
648 }
649 return count;
650 }
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:489

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

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