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

◆ HasItemQuantity()

static int QuantityConversions::HasItemQuantity ( notnull EntityAI item)
inlinestaticprivate

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

144 {
145 ItemBase ib;
146 if ( Class.CastTo(ib, item) )
147 {
148 if ( item.IsMagazine() )
149 return QUANTITY_COUNT;
150
151 ItemBaseType itemBaseType = ItemBaseType.Cast(ib.GetEntityType());
152
153 if (!itemBaseType.m_CanShowQuantity)
154 return QUANTITY_HIDDEN;
155
156 int max = item.GetQuantityMax();
157 if (max > 0)
158 {
159 if (itemBaseType.m_HasQuantityBar)
160 {
161 return QUANTITY_PROGRESS;
162 }
163 else
164 {
165 if (max == 1)
166 {
167 return QUANTITY_HIDDEN;
168 }
169 else
170 {
171 return QUANTITY_COUNT;
172 }
173 }
174 }
175 }
176
177 return QUANTITY_HIDDEN;
178 }
class GP5GasMask extends MaskBase ItemBase
bool m_CanShowQuantity
Определения ItemBaseType.c:6
bool m_HasQuantityBar
Определения ItemBaseType.c:7
const int QUANTITY_PROGRESS
Определения 3_Game/DayZ/constants.c:555
const int QUANTITY_COUNT
Определения 3_Game/DayZ/constants.c:554
const int QUANTITY_HIDDEN
Определения 3_Game/DayZ/constants.c:553

Перекрестные ссылки Class::CastTo(), ItemBaseType::m_CanShowQuantity, ItemBaseType::m_HasQuantityBar, QUANTITY_COUNT, QUANTITY_HIDDEN и QUANTITY_PROGRESS.

Используется в SlotsIconBase::CheckHasQuantity(), Icon::CheckHasQuantityEx(), ActionTargetsCursor::GetItemQuantity(), ScriptedWidgetEventHandler::GetItemQuantity(), InventoryGridController::HasItemQuantity(), Attachments::IsItemActive(), HandsContainer::IsItemActive(), Attachments::IsItemWithQuantityActive(), Container::IsItemWithQuantityActive(), HandsContainer::IsItemWithQuantityActive(), PlayerContainer::IsItemWithQuantityActive(), VicinitySlotsContainer::IsItemWithQuantityActive(), ZombieContainer::IsItemWithQuantityActive(), Icon::SetQuantity(), SetQuantity(), SlotsIconBase::SetQuantity() и UIScriptedMenu::UpdateQuickbarItemCard().