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

◆ OnQuantityChanged()

void InventoryItem::OnQuantityChanged ( float delta)
inlineprotected

Called on server side when this item's quantity is changed. Call super.OnQuantityChanged(); first when overriding this event.

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

2053 {
2054 SetWeightDirty();
2055 ItemBase parent = ItemBase.Cast(GetHierarchyParent());
2056
2057 if (parent)
2058 parent.OnAttachmentQuantityChangedEx(this, delta);
2059
2060 if (IsLiquidContainer())
2061 {
2062 if (GetQuantityNormalized() <= 0.0)
2063 {
2065 }
2066 else if (GetLiquidType() == LIQUID_NONE)
2067 {
2068 ErrorEx("Undefined liquid type quantity changed, please define liquid type first! Using init value.",ErrorExSeverity.INFO);
2070 }
2071 }
2072 }
bool IsLiquidContainer()
Определения ItemBase.c:916
override int GetLiquidType()
Определения ItemBase.c:3904
override void SetLiquidType(int value, bool allow_client=false)
Определения ItemBase.c:3888
void ItemBase()
Определения ItemBase.c:148
int GetLiquidTypeInit()
Определения ItemBase.c:3899
override float GetQuantityNormalized()
Gets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config...
Определения ItemBase.c:3440
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
const int LIQUID_NONE
Определения 3_Game/DayZ/constants.c:532

Перекрестные ссылки ErrorEx, GetLiquidType(), GetLiquidTypeInit(), GetQuantityNormalized(), IsLiquidContainer(), ItemBase(), LIQUID_NONE и SetLiquidType().