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

◆ SwapEntities()

override bool SwapEntities ( InventoryMode mode,
notnull EntityAI item1,
notnull EntityAI item2 )
protected

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

1865 {
1866 #ifdef ENABLE_LOGGING
1868 {
1869 Debug.InventoryMoveLog("STS = " + GetDayZPlayerOwner().GetSimulationTimeStamp() + " item1 = " + item1 + " item2 = " + item2, "n/a" , "n/a", "SwapEntities", GetDayZPlayerOwner().ToString() );
1870 }
1871 #endif
1872
1873 InventoryLocation src1, src2, dst1, dst2;
1874 if( mode == InventoryMode.LOCAL )
1875 {
1876 if (GameInventory.MakeSrcAndDstForSwap(item1, item2, src1, src2, dst1, dst2))
1877 {
1878 LocationSwap(src1, src2, dst1, dst2);
1879 return true;
1880 }
1881 }
1882
1883 if(!super.SwapEntities(mode,item1,item2))
1884 {
1885 if (GameInventory.MakeSrcAndDstForSwap(item1, item2, src1, src2, dst1, dst2))
1886 {
1887 return PostDeferredForceSwapEntities(mode, item1, item2, dst1, dst2);
1888 }
1889 }
1890 return true;
1891 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
override bool PostDeferredForceSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
Определения DayZPlayerInventory.c:1893
DayZPlayer GetDayZPlayerOwner()
Определения DayZPlayerInventory.c:168
proto string ToString()
static void InventoryMoveLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Определения 3_Game/tools/Debug.c:137
Определения 3_Game/tools/Debug.c:2
static bool MakeSrcAndDstForSwap(notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, out InventoryLocation dst2)
helper function for swap
script counterpart to engine's class Inventory
InventoryLocation.
Определения InventoryLocation.c:29
static bool IsInventoryMoveLogEnable()
Определения 3_Game/tools/Debug.c:648
Определения 3_Game/tools/Debug.c:594

Перекрестные ссылки GetDayZPlayerOwner(), Debug::InventoryMoveLog(), LogManager::IsInventoryMoveLogEnable(), GameInventory::MakeSrcAndDstForSwap(), PostDeferredForceSwapEntities() и ToString().