5068 {
5069 if (
g_Game.IsMultiplayer())
5070 {
5072 switch (t)
5073 {
5075 return false;
5081 return true;
5082
5083 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] " +
GetDebugName(
this) +
" STS=" + GetSimulationTimeStamp() +
" NeedInventoryJunctureFromServer item=" +
Object.GetDebugName(item) +
" currPar=" + currParent +
" newPar=" + newParent);
5084
5085 bool i_owned = GetHumanInventory().HasEntityInInventory(item);
5086
5087 bool cp_owned = false;
5088 if (currParent)
5089 cp_owned = GetHumanInventory().HasEntityInInventory(currParent);
5090
5091 bool np_owned = false;
5092 if (newParent)
5093 np_owned = GetHumanInventory().HasEntityInInventory(newParent);
5094
5095 bool all_owned = i_owned && cp_owned && (np_owned || (newParent == null));
5096 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] " +
GetDebugName(
this) +
" STS=" + GetSimulationTimeStamp() +
" NeedInventoryJunctureFromServer=" + !all_owned +
" i_pwn=" + i_owned +
" cp_pwn=" + cp_owned +
" np_pwn=" + np_owned);
5097
5098 return !all_owned;
5099 default:
5100 Error(
"[syncinv] unsupported instance type t=" + t);
5101 break;
5102 }
5103 }
5104 return false;
5105 }
void syncDebugPrint(string s)
override string GetDebugName()
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerInstanceType GetInstanceType()
void Error(string err)
Messagebox with error message.