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

◆ GetIngredientMaskForItem()

int GetIngredientMaskForItem ( string item)
protected

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 строка 622

623 {
624 int mask = 0;
625
626 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
627 {
629
630 for (int x = 0; x < ptr.Count(); x++)
631 {
632 if (ptr.Get(x) == item)
633 {
634 mask = ((int)Math.Pow(2, i)) | mask;
635 }
636 }
637 }
638 return mask;
639 }
Param3 int
Icon x
ref array< string > m_Ingredients[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:24
const int MAX_NUMBER_OF_INGREDIENTS
Определения RecipeBase.c:1
Определения EnMath.c:7
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto float Pow(float v, float power)
Return power of v ^ power.

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