DayZ 1.30
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 строка 1512

1513 {
1514 if (attachment)
1515 {
1516 GameInventory attachmentInventory = attachment.GetInventory();
1517 if (attachmentInventory)
1518 {
1519 GameInventory inventory = GetInventory();
1520 if (inventory)
1521 {
1522 InventoryLocation il = new InventoryLocation();
1523 attachmentInventory.GetCurrentInventoryLocation( il );
1524 if( il.IsValid() )
1525 {
1526 int slot = il.GetSlot();
1527 return !inventory.GetSlotLock( slot );
1528 }
1529 }
1530 }
1531 }
1532 return true;
1533 }
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().