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

◆ CreateCopyOfItemInInventory()

ItemBase ManBase::CreateCopyOfItemInInventory ( ItemBase src)
inlineprotected

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

6313 {
6314 InventoryLocation loc = new InventoryLocation;
6315 string t = src.GetType();
6316 if (GetInventory().FindFirstFreeLocationForNewEntity(t, FindInventoryLocationType.CARGO, loc))
6317 {
6318 bool locked = GetGame().HasInventoryJunctureDestination(this, loc);
6319 if (locked)
6320 {
6321 Print("Warning: Split: CreateCopyOfItemInInventory - Cannot create entity at locked inventory at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6322 return null;
6323 }
6324 ItemBase dst = ItemBase.Cast(GetInventory().LocationCreateLocalEntity(loc, t, ECE_IN_INVENTORY, RF_DEFAULT));
6325 if (dst)
6326 {
6327 MiscGameplayFunctions.TransferItemProperties(src, dst);
6328
6330
6331 Print("CreateCopyOfItemInInventory - created " + dst.GetName() + " at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6332 }
6333 return dst;
6334 }
6335 return NULL;
6336 }
const int ECE_IN_INVENTORY
Определения CentralEconomy.c:36
const int RF_DEFAULT
Определения CentralEconomy.c:65
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
proto native bool HasInventoryJunctureDestination(Man player, notnull InventoryLocation dst)
proto native void RemoteObjectTreeCreate(Object obj)
RemoteObjectCreate - postponed registration of network object (and creation of remote object)....
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки InventoryLocation::DumpToStringNullSafe(), ECE_IN_INVENTORY, GetGame(), CGame::HasInventoryJunctureDestination(), Print(), CGame::RemoteObjectTreeCreate() и RF_DEFAULT.

Используется в CreateCopyOfItemInInventoryOrGroundEx().