TODO(kumarjac): Probably should be called through inventory juncture, we shouldn't allow the client to delete until the server says it is okay as there can be more reasons than "cheater" for it to be rejected such as 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
См. определение в файле DayZPlayerInventory.c строка 4909
4910 {
4912
4914 {
4921
4922 return true;
4923 }
4924
4927
4928 #ifdef ENABLE_LOGGING
4930 {
4932 }
4933 #endif
4934
4936 {
4937 #ifdef ENABLE_LOGGING
4939 {
4941 }
4942 #endif
4943
4944 Error(
"[syncinv] HandleInputData remote input (cmd=DESTROY) dropped, item not in bubble");
4945 return true;
4946 }
4947
4952 {
4953 #ifdef ENABLE_LOGGING
4955 {
4957 }
4958 #endif
4959
4960 return true;
4961 }
4962
4967 {
4968 #ifdef ENABLE_LOGGING
4970 {
4972 }
4973 #endif
4974
4975 return true;
4976 }
4977
4978 if (GetInventoryOwner() != src.
GetParent())
4979 {
4980 #ifdef ENABLE_LOGGING
4982 {
4984 }
4985 #endif
4986
4987 return true;
4988 }
4989
4990 #ifdef ENABLE_LOGGING
4992 {
4994 }
4995 #endif
4996
4998
5000 return true;
5001 }
InventoryValidationResult
bool PlayerCheckDropRequest(notnull InventoryLocation src, float radius)
bool PlayerCheckRequestSrc(notnull InventoryLocation src, float radius)
DayZPlayer GetDayZPlayerOwner()
static void InventoryMoveLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
const float c_MaxItemDistanceRadius
anti-cheats
script counterpart to engine's class Inventory
proto native EntityAI GetParent()
returns parent of current inventory location
static string DumpToStringNullSafe(InventoryLocation loc)
bool ReadFromContext(ParamsReadContext ctx)
proto native EntityAI GetItem()
returns item of current inventory location
InventoryValidationResult m_Result
static bool IsInventoryMoveLogEnable()
void Error(string err)
Messagebox with error message.
Перекрестные ссылки GameInventory::c_MaxItemDistanceRadius, InventoryLocation::DumpToStringNullSafe(), Error(), g_Game, GetDayZPlayerOwner(), InventoryLocation::GetItem(), InventoryLocation::GetParent(), Debug::InventoryMoveLog(), LogManager::IsInventoryMoveLogEnable(), InventoryValidation::m_IsJuncture, InventoryValidation::m_IsRemote, InventoryValidation::m_Result, PlayerCheckDropRequest(), PlayerCheckRequestSrc(), InventoryLocation::ReadFromContext() и ToString().