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

◆ CreateCopyOfItemInInventory()

ItemBase ManBase::CreateCopyOfItemInInventory ( ItemBase src)
inlineprotected

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

6305 {
6306 InventoryLocation loc = new InventoryLocation;
6307 string t = src.GetType();
6308 if (GetInventory().FindFirstFreeLocationForNewEntity(t, FindInventoryLocationType.CARGO, loc))
6309 {
6310 bool locked = GetGame().HasInventoryJunctureDestination(this, loc);
6311 if (locked)
6312 {
6313 Print("Warning: Split: CreateCopyOfItemInInventory - Cannot create entity at locked inventory at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6314 return null;
6315 }
6316 ItemBase dst = ItemBase.Cast(GetInventory().LocationCreateLocalEntity(loc, t, ECE_IN_INVENTORY, RF_DEFAULT));
6317 if (dst)
6318 {
6319 MiscGameplayFunctions.TransferItemProperties(src, dst);
6320
6322
6323 Print("CreateCopyOfItemInInventory - created " + dst.GetName() + " at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6324 }
6325 return dst;
6326 }
6327 return NULL;
6328 }
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().