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

◆ DamageItemAttachments()

bool InventoryItem::DamageItemAttachments ( float damage)
inlineprivate

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

1560 {
1561 int attachment_count = GetInventory().AttachmentCount();
1562 if (attachment_count > 0)
1563 {
1564 int random_pick = Math.RandomInt(0, attachment_count);
1565 ItemBase attachment = ItemBase.Cast(GetInventory().GetAttachmentFromIndex(random_pick));
1566 if (!attachment.IsExplosive())
1567 {
1568 attachment.AddHealth("","",damage);
1569 return true;
1570 }
1571 }
1572 return false;
1573 }
void ItemBase()
Определения ItemBase.c:140

Перекрестные ссылки ItemBase() и Math::RandomInt().