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

◆ CanReleaseAttachment()

bool Entity::CanReleaseAttachment ( EntityAI attachment)
inlineprotected

calls this->CanReleaseAttachment(attachment)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, attachment, "CanReleaseAttachment");

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

1465 {
1466 if( attachment && attachment.GetInventory() && GetInventory() )
1467 {
1468 InventoryLocation il = new InventoryLocation();
1469 attachment.GetInventory().GetCurrentInventoryLocation( il );
1470 if( il.IsValid() )
1471 {
1472 int slot = il.GetSlot();
1473 return !GetInventory().GetSlotLock( slot );
1474 }
1475 }
1476 return true;
1477 }
proto native GameInventory GetInventory()
proto native bool GetSlotLock(int slot)
proto native bool IsValid()
verify current set inventory location
proto native int GetSlot()
returns slot id if current type is Attachment

Перекрестные ссылки EntityAI(), GetInventory(), InventoryLocation::GetSlot() и InventoryLocation::IsValid().