4914 {
4915 if (
GetGame().IsMultiplayer())
4916 {
4918 switch (t)
4919 {
4921 return false;
4927 return true;
4928
4929 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] " +
GetDebugName(
this) +
" STS=" + GetSimulationTimeStamp() +
" NeedInventoryJunctureFromServer item=" +
Object.GetDebugName(item) +
" currPar=" + currParent +
" newPar=" + newParent);
4930
4931 bool i_owned = GetHumanInventory().HasEntityInInventory(item);
4932
4933 bool cp_owned = false;
4934 if (currParent)
4935 cp_owned = GetHumanInventory().HasEntityInInventory(currParent);
4936
4937 bool np_owned = false;
4938 if (newParent)
4939 np_owned = GetHumanInventory().HasEntityInInventory(newParent);
4940
4941 bool all_owned = i_owned && cp_owned && (np_owned || (newParent == null));
4942 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] " +
GetDebugName(
this) +
" STS=" + GetSimulationTimeStamp() +
" NeedInventoryJunctureFromServer=" + !all_owned +
" i_pwn=" + i_owned +
" cp_pwn=" + cp_owned +
" np_pwn=" + np_owned);
4943
4944 return !all_owned;
4945 default:
4946 Error(
"[syncinv] unsupported instance type t=" + t);
4947 break;
4948 }
4949 }
4950 return false;
4951 }
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.