kumarjac: This indicates a failure in replication relationships as player full inventory should be synchronized always if player exists on the remote
Do not check for action validity on remotes or when performing through juncture. Juncture locks guarentee the item is safe to interact with and the server has validated the command at this point. Checking at this point is both wasteful and can result in a failure which leads to desync
Do not check for action validity on remotes or when performing through juncture. Juncture locks guarentee the item is safe to interact with and the server has validated the command at this point. Checking at this point is both wasteful and can result in a failure which leads to desync
Do not check for action validity on remotes or when performing through juncture. Juncture locks guarentee the item is safe to interact with and the server has validated the command at this point. Checking at this point is both wasteful and can result in a failure which leads to desync
Do not check for action validity on remotes or when performing through juncture. Juncture locks guarentee the item is safe to interact with and the server has validated the command at this point. Checking at this point is both wasteful and can result in a failure which leads to desync
1240 {
1242
1245
1248
1249 bool skippedSwap = false;
1250 bool success = true;
1251
1256 ctx.Read(skippedSwap);
1257
1258 #ifdef ENABLE_LOGGING
1260 {
1262 }
1263 #endif
1264
1266 {
1267 if (skippedSwap)
1268 {
1269 #ifdef ENABLE_LOGGING
1271 {
1273 }
1274 #endif
1275
1276
1277
1278
1279
1280
1281 }
1282 else
1283 {
1285
1286 #ifdef ENABLE_LOGGING
1288 {
1290 }
1291 #endif
1292
1293 Error(
"[syncinv] HandleInputData remote input (cmd=SWAP) dropped, item not in bubble");
1294 }
1295
1296 return true;
1297 }
1298
1301
1306 {
1307#ifdef ENABLE_LOGGING
1309 {
1311 }
1312
1314 {
1316 }
1317#endif
1318
1321
1323 {
1324 success = false;
1325 }
1326 else
1327 {
1328 return true;
1329 }
1330 }
1331
1336 {
1337#ifdef ENABLE_LOGGING
1339 {
1341 }
1342
1344 {
1346 }
1347#endif
1348
1351
1353 {
1354 success = false;
1355 }
1356 else
1357 {
1358 return true;
1359 }
1360 }
1361
1366 {
1367#ifdef ENABLE_LOGGING
1369 {
1371 }
1372
1374 {
1376 }
1377#endif
1378
1381
1383 {
1384 success = false;
1385 }
1386 else
1387 {
1388 return true;
1389 }
1390 }
1391
1394
1396 {
1397 ClearInventoryReservationEx(dst1.
GetItem(), dst1);
1398 ClearInventoryReservationEx(dst2.
GetItem(), dst2);
1399 }
1400
1405 {
1406 #ifdef ENABLE_LOGGING
1407
1408 #ifdef DEVELOPER
1409 DumpInventoryDebug();
1410 #endif
1411
1413 {
1415 }
1416 #endif
1417
1419 {
1420 success = false;
1421 }
1422 else
1423 {
1425 return true;
1426 }
1427 }
1428
1430 {
1433 }
1434
1436 {
1438 return true;
1439 }
1440
1443 {
1446 {
1447 #ifdef ENABLE_LOGGING
1449 {
1451 }
1452 #endif
1453
1455 }
1457 {
1458 #ifdef ENABLE_LOGGING
1460 {
1462 }
1463 #endif
1464
1468 return true;
1469 }
1470 else
1471 {
1472 #ifdef ENABLE_LOGGING
1474 {
1476 }
1477 #endif
1478
1481 return true;
1482 }
1483 }
1484
1486 {
1487 ClearInventoryReservationEx(dst1.
GetItem(), dst1);
1488 ClearInventoryReservationEx(dst2.
GetItem(), dst2);
1489 }
1490 else
1491 {
1494 }
1495
1496
1498 {
1499 #ifdef ENABLE_LOGGING
1501 {
1503 }
1504 #endif
1505 return false;
1506 }
1507
1508 #ifdef ENABLE_LOGGING
1510 {
1512 }
1513 #endif
1514 if (success)
1515 {
1516 bool isNotSkipped = LocationSwap(src1, src2, dst1, dst2);
1517
1520
1522 }
1523 return true;
1524 }
void syncDebugPrint(string s)
InventoryValidationResult
InventoryValidationReason
void EnableMovableOverride(EntityAI item)
bool SwapCheckExclusionMaskLocal(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
Local, checks only stuff that is in guaranteed sync.
bool PlayerCheckRequestSrc(notnull InventoryLocation src, float radius)
void RemoveMovableOverride(EntityAI item)
DayZPlayer GetDayZPlayerOwner()
bool PlayerCheckSwapItemsRequest(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2, float radius)
bool TryAcquireTwoInventoryJuncturesFromServer(notnull Man player, notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
bool ClearJunctureEx(Man player, notnull EntityAI item)
static void InventoryMoveLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
const int c_InventoryReservationTimeoutShortMS
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
const float c_MaxItemDistanceRadius
anti-cheats
script counterpart to engine's class Inventory
proto native bool IsValid()
verify current set inventory location
static string DumpToStringNullSafe(InventoryLocation loc)
bool ReadFromContext(ParamsReadContext ctx)
proto native EntityAI GetItem()
returns item of current inventory location
InventoryValidationResult m_Result
InventoryValidationReason m_Reason
static bool IsSyncLogEnable()
static bool IsInventoryMoveLogEnable()
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerInstanceType GetInstanceType()
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.