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

◆ ForceSwapEntities()

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

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

1976 {
1977 #ifdef ENABLE_LOGGING
1979 {
1980 Debug.InventoryMoveLog("STS = " + GetDayZPlayerOwner().GetSimulationTimeStamp() + " item1 = " + item1 + " item2 = " + item2 + " dst=" + InventoryLocation.DumpToStringNullSafe(item2_dst), "n/a" , "n/a", "ForceSwapEntities", GetDayZPlayerOwner().ToString() );
1981 }
1982 #endif
1983
1984 InventoryLocation src1, src2, dst1;
1985 if( mode == InventoryMode.LOCAL )
1986 {
1987 if (GameInventory.MakeSrcAndDstForForceSwap(item1, item2, src1, src2, dst1, item2_dst))
1988 {
1989 LocationSwap(src1, src2, dst1, item2_dst);
1990 return true;
1991 }
1992
1993 }
1994
1995 if(!super.ForceSwapEntities(mode,item1,item2,item2_dst))
1996 {
1997 if (GameInventory.MakeSrcAndDstForForceSwap(item1, item2, src1, src2, dst1, item2_dst))
1998 {
1999 return PostDeferredForceSwapEntities(mode, item1, item2, dst1, item2_dst);
2000 }
2001 }
2002
2003 return true;
2004 }
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 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:226
InventoryLocation.
Определения InventoryLocation.c:29
static bool IsInventoryMoveLogEnable()
Определения 3_Game/tools/Debug.c:648
Определения 3_Game/tools/Debug.c:594

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