4924 {
4925 if (
GetGame().IsMultiplayer())
4926 {
4928 switch (t)
4929 {
4931 return false;
4937 return true;
4938
4939 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] " +
GetDebugName(
this) +
" STS=" + GetSimulationTimeStamp() +
" NeedInventoryJunctureFromServer item=" +
Object.GetDebugName(item) +
" currPar=" + currParent +
" newPar=" + newParent);
4940
4941 bool i_owned = GetHumanInventory().HasEntityInInventory(item);
4942
4943 bool cp_owned = false;
4944 if (currParent)
4945 cp_owned = GetHumanInventory().HasEntityInInventory(currParent);
4946
4947 bool np_owned = false;
4948 if (newParent)
4949 np_owned = GetHumanInventory().HasEntityInInventory(newParent);
4950
4951 bool all_owned = i_owned && cp_owned && (np_owned || (newParent == null));
4952 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] " +
GetDebugName(
this) +
" STS=" + GetSimulationTimeStamp() +
" NeedInventoryJunctureFromServer=" + !all_owned +
" i_pwn=" + i_owned +
" cp_pwn=" + cp_owned +
" np_pwn=" + np_owned);
4953
4954 return !all_owned;
4955 default:
4956 Error(
"[syncinv] unsupported instance type t=" + t);
4957 break;
4958 }
4959 }
4960 return false;
4961 }
void syncDebugPrint(string s)
override string GetDebugName()
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerInstanceType GetInstanceType()
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.