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
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
Check if this this is being executed on the server and not by a juncture or AI so we can lock the item and ensure replication relationships are setup
TODO(kumarjac): We should continue with the execution and not have this special block but making a change here now will require testing
Is called twice unfortunately...
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 строка 772
773 {
775
778 bool success = true;
779
782
783 #ifdef ENABLE_LOGGING
785 {
787 }
788 #endif
789
791 {
793
794#ifdef ENABLE_LOGGING
796 {
798 }
799
801 {
803 }
804#endif
805
806 return true;
807 }
808
810
815 {
817
818#ifdef ENABLE_LOGGING
820 {
822 }
823
825 {
827 }
828#endif
829
831
833 {
834 success = false;
835 }
836 else
837 {
838 return true;
839 }
840 }
841
846 {
847#ifdef ENABLE_LOGGING
849 {
851 }
852
854 {
856 }
857#endif
858
860
862 {
863 success = false;
864 }
865 else
866 {
867 return true;
868 }
869 }
870
872
873#ifdef ENABLE_LOGGING
875 {
877 }
878#endif
879
882 {
885 {
886 #ifdef ENABLE_LOGGING
888 {
890 }
891 #endif
892 if (success)
893 {
895
896 LocationSyncMoveEntity(src, dst);
897
899 }
900 return true;
901 }
903 {
904 #ifdef ENABLE_LOGGING
906 {
908 }
909 #endif
910
912 {
913 #ifdef ENABLE_LOGGING
914
915 #ifdef DEVELOPER
916 DumpInventoryDebug();
917 #endif
918
920 {
922 }
923 #endif
925 return true;
926 }
927
930 return true;
931 }
932 else
933 {
934 #ifdef ENABLE_LOGGING
936 {
938 }
939 #endif
940
943 return true;
944 }
945 }
946
948 {
949 ClearInventoryReservationEx(dst.
GetItem(), dst);
950 }
951
954 {
956 }
957
962 {
963 #ifdef ENABLE_LOGGING
964
965 #ifdef DEVELOPER
966 DumpInventoryDebug();
967 #endif
968
970 {
972 }
973 #endif
974
976 return true;
977 }
978
979
981 {
982 #ifdef ENABLE_LOGGING
984 {
986 }
987 #endif
988 return false;
989 }
990
991 #ifdef ENABLE_LOGGING
993 {
995 }
996 #endif
997
998 LocationSyncMoveEntity(src, dst);
999
1001 return true;
1002 }
void syncDebugPrint(string s)
InventoryValidationResult
InventoryValidationReason
void EnableMovableOverride(EntityAI item)
bool MoveCheckExclusionMaskLocal(notnull InventoryLocation src, notnull InventoryLocation dst)
Local, checks only stuff that is in guaranteed sync.
void CheckForRope(InventoryLocation src, InventoryLocation dst)
bool PlayerCheckRequestSrc(notnull InventoryLocation src, float radius)
void RemoveMovableOverride(EntityAI item)
DayZPlayer GetDayZPlayerOwner()
bool PlayerCheckRequestDst(notnull InventoryLocation src, notnull InventoryLocation dst, float radius)
bool TryAcquireInventoryJunctureFromServer(notnull Man player, notnull InventoryLocation src, notnull InventoryLocation dst)
static void InventoryMoveLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static proto native bool LocationCanMoveEntity(notnull InventoryLocation src, notnull InventoryLocation dst)
queries if the entity contained in inv_loc.m_item can be moved to another location This is a shorthan...
static bool LocationCanMoveEntitySyncCheck(notnull InventoryLocation src, notnull InventoryLocation dst)
const float c_MaxItemDistanceRadius
anti-cheats
script counterpart to engine's class Inventory
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.
Перекрестные ссылки GameInventory::c_MaxItemDistanceRadius, CheckForRope(), InventoryLocation::DumpToStringNullSafe(), EnableMovableOverride(), Error(), GetDayZPlayerOwner(), GetGame(), GetInstanceType(), InventoryLocation::GetItem(), GetTime(), Debug::InventoryMoveLog(), LogManager::IsInventoryMoveLogEnable(), LogManager::IsSyncLogEnable(), GameInventory::LocationCanMoveEntity(), GameInventory::LocationCanMoveEntitySyncCheck(), InventoryValidation::m_IsJuncture, InventoryValidation::m_IsRemote, InventoryValidation::m_Reason, InventoryValidation::m_Result, MoveCheckExclusionMaskLocal(), PlayerCheckRequestDst(), PlayerCheckRequestSrc(), InventoryLocation::ReadFromContext(), RemoveMovableOverride(), syncDebugPrint(), ToString() и TryAcquireInventoryJunctureFromServer().
Используется в ProcessInputData().