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

◆ SwapEntities()

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

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

2120 {
2121 #ifdef ENABLE_LOGGING
2123 {
2124 Debug.InventoryMoveLog("STS = " + GetDayZPlayerOwner().GetSimulationTimeStamp() + " item1 = " + item1 + " item2 = " + item2, "n/a" , "n/a", "SwapEntities", GetDayZPlayerOwner().ToString() );
2125 }
2126 #endif
2127
2128 InventoryLocation src1, src2, dst1, dst2;
2129 if( mode == InventoryMode.LOCAL )
2130 {
2131 if (GameInventory.MakeSrcAndDstForSwap(item1, item2, src1, src2, dst1, dst2))
2132 {
2133 LocationSwap(src1, src2, dst1, dst2);
2134 return true;
2135 }
2136 }
2137
2138 if(!super.SwapEntities(mode,item1,item2))
2139 {
2140 if (GameInventory.MakeSrcAndDstForSwap(item1, item2, src1, src2, dst1, dst2))
2141 {
2142 return PostDeferredForceSwapEntities(mode, item1, item2, dst1, dst2);
2143 }
2144 }
2145 return true;
2146 }
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:2148
DayZPlayer GetDayZPlayerOwner()
Определения DayZPlayerInventory.c:167
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/DayZ/tools/Debug.c:197
Определения 3_Game/DayZ/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:30
static bool IsInventoryMoveLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:746

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