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

◆ ShouldSplitQuantity()

bool InventoryItem::ShouldSplitQuantity ( float quantity)
inlineprotected

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

1589 {
1590 // don't call 'CanBeSplit' here, too strict and will introduce a freeze-crash when dismantling fence with a fireplace nearby
1591 if (!IsSplitable())
1592 return false;
1593
1594 // nothing to split?
1595 if (GetQuantity() <= 1)
1596 return false;
1597
1598 // check if we should re-use the item instead of creating a new copy?
1599 // implicit cast to int, if 'IsSplitable' returns true, these values are assumed ints
1600 int delta = GetQuantity() - quantity;
1601 if (delta == 0)
1602 return false;
1603
1604 // valid to split
1605 return true;
1606 }
override float GetQuantity()
Определения ItemBase.c:3456
override bool IsSplitable()
Определения ItemBase.c:1575

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