DayZ 1.28
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 строка 2025

2026 {
2027 SetWeightDirty();
2028 ItemBase parent = ItemBase.Cast(GetHierarchyParent());
2029
2030 if (parent)
2031 parent.OnAttachmentQuantityChangedEx(this, delta);
2032
2033 if (IsLiquidContainer())
2034 {
2035 if (GetQuantityNormalized() <= 0.0)
2036 {
2038 }
2039 else if (GetLiquidType() == LIQUID_NONE)
2040 {
2041 ErrorEx("Undefined liquid type quantity changed, please define liquid type first! Using init value.",ErrorExSeverity.INFO);
2043 }
2044 }
2045
2046 }
bool IsLiquidContainer()
Определения ItemBase.c:906
override int GetLiquidType()
Определения ItemBase.c:3849
override void SetLiquidType(int value, bool allow_client=false)
Определения ItemBase.c:3833
void ItemBase()
Определения ItemBase.c:140
int GetLiquidTypeInit()
Определения ItemBase.c:3844
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:3389
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
const int LIQUID_NONE
Определения 3_Game/constants.c:529

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