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

◆ GetIngredientMaskForItem()

int RecipeBase::GetIngredientMaskForItem ( string item)
inlineprotected

returns a mask which marks ingredient positions for a given item in this recipe(for example mask of value 3 [....000011] means this item is both ingredient 1 and 2 in this recipe[from right to left])

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

609 {
610 int mask = 0;
611
612 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
613 {
614 array<string> ptr = m_Ingredients[i];
615
616 for (int x = 0; x < ptr.Count(); x++)
617 {
618 if (ptr.Get(x) == item)
619 {
620 mask = ((int)Math.Pow(2, i)) | mask;
621 }
622 }
623 }
624 return mask;
625 }
Param3 int
Icon x
const int MAX_NUMBER_OF_INGREDIENTS
Определения RecipeBase.c:1
ref array< string > m_Ingredients[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:8

Перекрестные ссылки m_Ingredients, MAX_NUMBER_OF_INGREDIENTS, Math::Pow() и x.