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

◆ ForceSwapEntities()

override bool ForceSwapEntities ( InventoryMode mode,
notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation item2_dst )
protected

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

2257 {
2258 #ifdef ENABLE_LOGGING
2260 {
2261 Debug.InventoryMoveLog("STS = " + GetDayZPlayerOwner().GetSimulationTimeStamp() + " item1 = " + item1 + " item2 = " + item2 + " dst=" + InventoryLocation.DumpToStringNullSafe(item2_dst), "n/a" , "n/a", "ForceSwapEntities", GetDayZPlayerOwner().ToString() );
2262 }
2263 #endif
2264
2265 InventoryLocation src1, src2, dst1;
2266 if( mode == InventoryMode.LOCAL )
2267 {
2268 if (GameInventory.MakeSrcAndDstForForceSwap(item1, item2, src1, src2, dst1, item2_dst))
2269 {
2270 LocationSwap(src1, src2, dst1, item2_dst);
2271 return true;
2272 }
2273
2274 }
2275
2276 if(!super.ForceSwapEntities(mode,item1,item2,item2_dst))
2277 {
2278 if (GameInventory.MakeSrcAndDstForForceSwap(item1, item2, src1, src2, dst1, item2_dst))
2279 {
2280 return PostDeferredForceSwapEntities(mode, item1, item2, dst1, item2_dst);
2281 }
2282 }
2283
2284 return true;
2285 }
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 MakeSrcAndDstForForceSwap(notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, notnull InventoryLocation dst2)
helper function for ForceSwap
script counterpart to engine's class Inventory
static string DumpToStringNullSafe(InventoryLocation loc)
Определения InventoryLocation.c:233
InventoryLocation.
Определения InventoryLocation.c:30
static bool IsInventoryMoveLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:746

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