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

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI attachment,
int slotId )
protected

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

4175 {
4176 //removed 15.06. coz of loading from storage -> after load items in cargo was lost -> waiting for proper solution
4177 //if (GetHealthLevel() == GameConstants.STATE_RUINED)
4178 // return false;
4179
4180 GameInventory attachmentInv = attachment.GetInventory();
4181 if (attachmentInv && attachmentInv.GetCargo() && attachmentInv.GetCargo().GetItemCount() > 0)
4182 {
4183 if (GetHierarchyParent() && !GetHierarchyParent().IsInherited(PlayerBase))
4184 return false;
4185 }
4186
4188 attachment.GetInventory().GetCurrentInventoryLocation(loc);
4189 if (loc && loc.IsValid() && !GetInventory().AreChildrenAccessible())
4190 return false;
4191
4192 return super.CanReceiveAttachment(attachment, slotId);
4193 }
proto native int GetItemCount()
proto native CargoBase GetCargo()
cargo
script counterpart to engine's class Inventory
proto native bool IsValid()
verify current set inventory location
InventoryLocation.
Определения InventoryLocation.c:30
Определения PlayerBaseClient.c:2

Перекрестные ссылки GameInventory::GetCargo(), CargoBase::GetItemCount() и InventoryLocation::IsValid().