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

◆ ShouldSplitQuantity()

bool InventoryItem::ShouldSplitQuantity ( float quantity)
inlineprotected

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

1614 {
1615 // don't call 'CanBeSplit' here, too strict and will introduce a freeze-crash when dismantling fence with a fireplace nearby
1616 if (!IsSplitable())
1617 return false;
1618
1619 // nothing to split?
1620 if (GetQuantity() <= 1)
1621 return false;
1622
1623 // check if we should re-use the item instead of creating a new copy?
1624 // implicit cast to int, if 'IsSplitable' returns true, these values are assumed ints
1625 int delta = GetQuantity() - quantity;
1626 if (delta == 0)
1627 return false;
1628
1629 // valid to split
1630 return true;
1631 }
override float GetQuantity()
Определения ItemBase.c:3508
override bool IsSplitable()
Определения ItemBase.c:1600

Перекрестные ссылки GetQuantity() и IsSplitable().