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

◆ CanReceiveAttachment()

override bool InventoryItem::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

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

4151 {
4152 //removed 15.06. coz of loading from storage -> after load items in cargo was lost -> waiting for proper solution
4153 //if (GetHealthLevel() == GameConstants.STATE_RUINED)
4154 // return false;
4155
4156 GameInventory attachmentInv = attachment.GetInventory();
4157 if (attachmentInv && attachmentInv.GetCargo() && attachmentInv.GetCargo().GetItemCount() > 0)
4158 {
4159 if (GetHierarchyParent() && !GetHierarchyParent().IsInherited(PlayerBase))
4160 return false;
4161 }
4162
4163 InventoryLocation loc = new InventoryLocation();
4164 attachment.GetInventory().GetCurrentInventoryLocation(loc);
4165 if (loc && loc.IsValid() && !GetInventory().AreChildrenAccessible())
4166 return false;
4167
4168 return super.CanReceiveAttachment(attachment, slotId);
4169 }
proto native int GetItemCount()
proto native CargoBase GetCargo()
cargo
proto native bool IsValid()
verify current set inventory location

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