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

◆ OnQuantityChanged()

void InventoryItem::OnQuantityChanged ( float delta)
inlineprivate

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

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

2006 {
2007 SetWeightDirty();
2008 ItemBase parent = ItemBase.Cast(GetHierarchyParent());
2009
2010 if (parent)
2011 parent.OnAttachmentQuantityChangedEx(this, delta);
2012
2013 if (IsLiquidContainer())
2014 {
2015 if (GetQuantityNormalized() <= 0.0)
2016 {
2018 }
2019 else if (GetLiquidType() == LIQUID_NONE)
2020 {
2021 ErrorEx("Undefined liquid type quantity changed, please define liquid type first! Using init value.",ErrorExSeverity.INFO);
2023 }
2024 }
2025
2026 }
bool IsLiquidContainer()
Определения ItemBase.c:906
override int GetLiquidType()
Определения ItemBase.c:3779
override void SetLiquidType(int value, bool allow_client=false)
Определения ItemBase.c:3763
void ItemBase()
Определения ItemBase.c:140
int GetLiquidTypeInit()
Определения ItemBase.c:3774
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:3319
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
const int LIQUID_NONE
Определения constants.c:527

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