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 строка 3079
3080 {
3082
3084 {
3091
3092 return true;
3093 }
3094
3097
3098 #ifdef ENABLE_LOGGING
3100 {
3102 }
3103 #endif
3104
3106 {
3107 #ifdef ENABLE_LOGGING
3109 {
3111 }
3112 #endif
3113
3114 Error(
"[syncinv] HandleInputData remote input (cmd=DESTROY) dropped, item not in bubble");
3115 return true;
3116 }
3117
3122 {
3123 #ifdef ENABLE_LOGGING
3125 {
3127 }
3128 #endif
3129
3130 return true;
3131 }
3132
3137 {
3138 #ifdef ENABLE_LOGGING
3140 {
3142 }
3143 #endif
3144
3145 return true;
3146 }
3147
3148 if (GetInventoryOwner() != src.
GetParent())
3149 {
3150 #ifdef ENABLE_LOGGING
3152 {
3154 }
3155 #endif
3156
3157 return true;
3158 }
3159
3160 #ifdef ENABLE_LOGGING
3162 {
3164 }
3165 #endif
3166
3168
3170 return true;
3171 }
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().