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

◆ ExecuteSyncMoveCommandRemote()

bool ExecuteSyncMoveCommandRemote ( ParamsReadContext ctx)
protected

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

1465 {
1468
1469 if (!src.ReadFromContext(ctx))
1470 return false;
1471 if (!dst.ReadFromContext(ctx))
1472 return false;
1473
1474#ifdef ENABLE_LOGGING
1476 {
1477 Debug.InventoryMoveLog("STS = " + GetDayZPlayerOwner().GetSimulationTimeStamp() + " src=" + InventoryLocation.DumpToStringNullSafe(src) + " dst=" + InventoryLocation.DumpToStringNullSafe(dst), "SYNC_MOVE" , "n/a", "ExecuteSyncMoveCommandRemote", GetDayZPlayerOwner().ToString() );
1478 }
1479#endif
1480
1481 EntityAI itemSrc = src.GetItem();
1482 EntityAI itemDst = dst.GetItem();
1483
1484 if (!itemSrc || !itemDst)
1485 {
1486#ifdef ENABLE_LOGGING
1488 {
1489 Debug.InventoryMoveLog("Failed - item not exist on remote client", "SYNC_MOVE" , "n/a", "ExecuteSyncMoveCommandRemote", GetDayZPlayerOwner().ToString() );
1490 }
1491
1493 {
1494 syncDebugPrint("[syncinv] ExecuteSyncMoveCommandRemote input (cmd=SYNC_MOVE) dropped, item not in bubble! src=" + InventoryLocation.DumpToStringNullSafe(src) + " dst=" + InventoryLocation.DumpToStringNullSafe(dst));
1495 }
1496#endif
1497 return false;
1498 }
1499
1500 RemoveMovableOverride(itemSrc);
1501
1502#ifdef ENABLE_LOGGING
1504 {
1505 syncDebugPrint("[syncinv] " + Object.GetDebugName(GetDayZPlayerOwner()) + " STS = " + GetDayZPlayerOwner().GetSimulationTimeStamp() + " ExecuteSyncMoveCommandRemote t=" + g_Game.GetTime() + "ms received cmd=" + typename.EnumToString(InventoryCommandType, InventoryCommandType.SYNC_MOVE) + " src=" + InventoryLocation.DumpToStringNullSafe(src) + " dst=" + InventoryLocation.DumpToStringNullSafe(dst));
1506 }
1507#endif
1508
1509#ifdef ENABLE_LOGGING
1511 {
1512 Debug.InventoryMoveLog("Success - LocationSyncMoveEntity", "SYNC_MOVE" , "n/a", "ExecuteSyncMoveCommandRemote", GetDayZPlayerOwner().ToString() );
1513 }
1514#endif
1515
1516 return LocationSyncMoveEntity(src, dst);
1517 }
void syncDebugPrint(string s)
InventoryCommandType
DayZGame g_Game
Определения DayZGame.c:4074
void RemoveMovableOverride(EntityAI item)
Определения DayZPlayerInventory.c:3683
DayZPlayer GetDayZPlayerOwner()
Определения DayZPlayerInventory.c:170
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:198
Определения 3_Game/DayZ/tools/Debug.c:2
static string DumpToStringNullSafe(InventoryLocation loc)
Определения InventoryLocation.c:233
bool ReadFromContext(ParamsReadContext ctx)
Определения InventoryLocation.c:310
proto native EntityAI GetItem()
returns item of current inventory location
InventoryLocation.
Определения InventoryLocation.c:30
static bool IsSyncLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:789
static bool IsInventoryMoveLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:759
Определения ObjectTyped.c:2

Перекрестные ссылки InventoryLocation::DumpToStringNullSafe(), g_Game, GetDayZPlayerOwner(), InventoryLocation::GetItem(), Debug::InventoryMoveLog(), LogManager::IsInventoryMoveLogEnable(), LogManager::IsSyncLogEnable(), InventoryLocation::ReadFromContext(), RemoveMovableOverride(), syncDebugPrint() и ToString().

Используется в ExecuteInventoryCommandRemote().