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

◆ OnQuantityChanged()

void OnQuantityChanged ( float delta)
protected

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

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

1988 {
1989 SetWeightDirty();
1990 ItemBase parent = ItemBase.Cast(GetHierarchyParent());
1991
1992 if (parent)
1993 parent.OnAttachmentQuantityChangedEx(this, delta);
1994
1995 if (IsLiquidContainer())
1996 {
1997 if (GetQuantityNormalized() <= 0.0)
1998 {
2000 }
2001 else if (GetLiquidType() == LIQUID_NONE)
2002 {
2003 ErrorEx("Undefined liquid type quantity changed, please define liquid type first! Using init value.",ErrorExSeverity.INFO);
2005 }
2006 }
2007 }
bool IsLiquidContainer()
Определения ItemBase.c:825
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:3416
int GetLiquidTypeInit()
Определения ItemBase.c:3878
override int GetLiquidType()
Определения ItemBase.c:3883
override void SetLiquidType(int value, bool allow_client=false)
Определения ItemBase.c:3867
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
const int LIQUID_NONE
Определения 3_Game/DayZ/constants.c:566

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

Используется в SetQuantity().