36{
37 #ifdef ENABLE_LOGGING
39 {
40 Debug.
InventoryReservationLog(
"STS = " + player.GetSimulationTimeStamp() +
" src1:" + src1.DumpToString() +
" dst1: " + dst1.DumpToString()+
" src2:" + src2.DumpToString() +
" dst2: " + dst2.DumpToString(),
"InventoryJuncture" ,
"n/a",
"TryAcquireTwoInventoryJuncturesFromServer",player.ToString() );
41 }
42 #endif
43
44
45
46 bool need_j1 = player.NeedInventoryJunctureFromServer(src1.GetItem(), src1.GetParent(), dst1.GetParent());
47 bool need_j2 = player.NeedInventoryJunctureFromServer(src2.GetItem(), src2.GetParent(), dst2.GetParent());
48 if (need_j1 || need_j2)
49 {
50 if (need_j1)
51 {
52 if ( ( src1.GetItem() && src1.GetItem().IsSetForDeletion() ) || ( src1.GetParent() && src1.GetParent().IsSetForDeletion() ) || ( dst1.GetParent() && dst1.GetParent().IsSetForDeletion() ) )
53 {
55 }
56
57
58 if (src1.GetItem() && !src1.GetItem().CanPutIntoHands(player))
59 {
61 }
62
64 {
65
66
67
68
69
70
72 }
73 }
74
75 if (need_j2)
76 {
77 if ( ( src2.GetItem() && src2.GetItem().IsSetForDeletion() ) || ( src2.GetParent() && src2.GetParent().IsSetForDeletion() ) || ( dst2.GetParent() && dst2.GetParent().IsSetForDeletion() ) )
78 {
79 if (need_j1)
80 {
82 }
84 }
85
86 if (src2.GetItem() && !src2.GetItem().CanPutIntoHands(player))
87 {
89 }
90
92 {
93
94 if (need_j1)
95 {
97
98 }
100 }
101 }
102
104 }
105 else
106 {
107 #ifdef ENABLE_LOGGING
109 {
111 }
112 #endif
115 }
116}
void syncDebugPrint(string s)
bool ClearJunctureEx(Man player, notnull EntityAI item)
static void InventoryReservationLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static void InventoryMoveLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
const int c_InventoryReservationTimeoutMS
reservations
script counterpart to engine's class Inventory
static string DumpToStringNullSafe(InventoryLocation loc)
static bool IsInventoryReservationLogEnable()
static bool IsSyncLogEnable()
proto native CGame GetGame()