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

◆ CanReleaseAttachment()

bool Entity::CanReleaseAttachment ( EntityAI attachment)
inlineprotected

calls this->CanReleaseAttachment(attachment)

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

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 1484

1485 {
1486 if (attachment)
1487 {
1488 GameInventory attachmentInventory = attachment.GetInventory();
1489 if (attachmentInventory)
1490 {
1491 GameInventory inventory = GetInventory();
1492 if (inventory)
1493 {
1494 InventoryLocation il = new InventoryLocation();
1495 attachmentInventory.GetCurrentInventoryLocation( il );
1496 if( il.IsValid() )
1497 {
1498 int slot = il.GetSlot();
1499 return !inventory.GetSlotLock( slot );
1500 }
1501 }
1502 }
1503 }
1504 return true;
1505 }
proto native GameInventory GetInventory()
proto native bool GetCurrentInventoryLocation(out notnull InventoryLocation loc)
returns information about current item location
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(), GameInventory::GetCurrentInventoryLocation(), GetInventory(), InventoryLocation::GetSlot(), GameInventory::GetSlotLock() и InventoryLocation::IsValid().