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

◆ CreateCopyOfItemInInventory()

ItemBase ManBase::CreateCopyOfItemInInventory ( ItemBase src)
inlineprotected

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

6536 {
6537 InventoryLocation loc = new InventoryLocation;
6538 string t = src.GetType();
6539 GameInventory inventory = GetInventory();
6541 {
6542 bool locked = g_Game.HasInventoryJunctureDestination(this, loc);
6543 if (locked)
6544 {
6545 Print("Warning: Split: CreateCopyOfItemInInventory - Cannot create entity at locked inventory at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6546 return null;
6547 }
6549 if (dst)
6550 {
6551 MiscGameplayFunctions.TransferItemProperties(src, dst);
6552
6553 g_Game.RemoteObjectTreeCreate(dst);
6554
6555 Print("CreateCopyOfItemInInventory - created " + dst.GetName() + " at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6556 }
6557 return dst;
6558 }
6559 return NULL;
6560 }
const int ECE_IN_INVENTORY
Определения CentralEconomy.c:36
const int RF_DEFAULT
Определения CentralEconomy.c:65
DayZGame g_Game
Определения DayZGame.c:3942
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:18
proto native bool FindFirstFreeLocationForNewEntity(string item_type, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFirstFreeLocationForNewEntity.
static proto native EntityAI LocationCreateLocalEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new local item directly at location @NOTE: the item is created localy, i.e....
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки InventoryLocation::DumpToStringNullSafe(), ECE_IN_INVENTORY, GameInventory::FindFirstFreeLocationForNewEntity(), g_Game, GameInventory::LocationCreateLocalEntity(), Print() и RF_DEFAULT.

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