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

◆ ShouldSplitQuantity()

bool ShouldSplitQuantity ( float quantity)
protected

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

1542 {
1543 // don't call 'CanBeSplit' here, too strict and will introduce a freeze-crash when dismantling fence with a fireplace nearby
1544 if (!IsSplitable())
1545 return false;
1546
1547 // nothing to split?
1548 if (GetQuantity() <= 1)
1549 return false;
1550
1551 // check if we should re-use the item instead of creating a new copy?
1552 // implicit cast to int, if 'IsSplitable' returns true, these values are assumed ints
1553 int delta = GetQuantity() - quantity;
1554 if (delta == 0)
1555 return false;
1556
1557 // valid to split
1558 return true;
1559 }
override bool IsSplitable()
Определения ItemBase.c:1528
override float GetQuantity()
Определения ItemBase.c:3486

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

Используется в SplitIntoStackMax(), SplitIntoStackMaxCargo(), SplitIntoStackMaxEx(), SplitIntoStackMaxHands(), SplitIntoStackMaxToInventoryLocationEx(), SplitItem() и SplitItemToInventoryLocation().