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

◆ CreateCopyOfItemInInventory()

ItemBase ManBase::CreateCopyOfItemInInventory ( ItemBase src)
inlineprotected

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

6857 {
6858 InventoryLocation loc = new InventoryLocation;
6859 string t = src.GetType();
6860 GameInventory inventory = GetInventory();
6862 {
6863 bool locked = g_Game.HasInventoryJunctureDestination(this, loc);
6864 if (locked)
6865 {
6866 Print("Warning: Split: CreateCopyOfItemInInventory - Cannot create entity at locked inventory at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6867 return null;
6868 }
6870 if (dst)
6871 {
6872 MiscGameplayFunctions.TransferItemProperties(src, dst);
6873
6874 g_Game.RemoteObjectTreeCreate(dst);
6875
6876 Print("CreateCopyOfItemInInventory - created " + dst.GetName() + " at loc=" + InventoryLocation.DumpToStringNullSafe(loc));
6877 }
6878 return dst;
6879 }
6880 return NULL;
6881 }
const int ECE_IN_INVENTORY
Определения CentralEconomy.c:37
const int RF_DEFAULT
Определения CentralEconomy.c:66
DayZGame g_Game
Определения DayZGame.c:4074
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().