2165 {
2167 if( deferred_swap_entities )
2168 {
2172 {
2174 {
2176 }
2177
2178 switch (deferred_swap_entities.
m_mode)
2179 {
2182 {
2183 #ifdef DIAG_DEVELOPER
2184 if (PluginInventoryDebug.Cast(
GetPlugin(PluginInventoryDebug)).IsLocalOnlyMoveEnable())
2185 {
2186 LocationSwap(src1, src2, deferred_swap_entities.
m_dst1, deferred_swap_entities.
m_dst2);
2187 }
2188 else
2189 {
2190 #endif
2191
2193 LocationSwap(src1, src2, deferred_swap_entities.
m_dst1, deferred_swap_entities.
m_dst2);
2194
2195 #ifdef DIAG_DEVELOPER
2196 }
2197 #endif
2198 }
2199 else
2200 {
2201 #ifdef ENABLE_LOGGING
2203 {
2205 }
2206 #endif
2207 }
2208 break;
2209
2212 {
2213 #ifdef DIAG_DEVELOPER
2214 if (PluginInventoryDebug.Cast(
GetPlugin(PluginInventoryDebug)).IsLocalOnlyMoveEnable())
2215 {
2216 LocationSwap(src1, src2, deferred_swap_entities.
m_dst1, deferred_swap_entities.
m_dst2);
2217 }
2218 else
2219 {
2220 #endif
2221
2228
2229 #ifdef DIAG_DEVELOPER
2230 }
2231 #endif
2232 }
2233 else
2234 {
2235 #ifdef ENABLE_LOGGING
2237 {
2239 }
2240 #endif
2241 }
2242 break;
2243
2245 break;
2246
2247 default:
2248 Error(
"SwapEntities - HandEvent - Invalid mode");
2249 }
2250 }
2251 else
2252 Error(
"SwapEntities - MakeSrcAndDstForSwap - no inv loc");
2253 }
2254 }
void inventoryDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void EnableMovableOverride(EntityAI item)
DayZPlayer GetDayZPlayerOwner()
PluginBase GetPlugin(typename plugin_type)
static void InventoryMoveLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
ref InventoryLocation m_dst1
override void ClearInventoryReservation(HumanInventory inventory)
ref InventoryLocation m_dst2
const int c_InventoryReservationTimeoutShortMS
static bool MakeSrcAndDstForSwap(notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, out InventoryLocation dst2)
helper function for swap
script counterpart to engine's class Inventory
static string DumpToStringNullSafe(InventoryLocation loc)
proto native EntityAI GetItem()
returns item of current inventory location
static bool IsInventoryMoveLogEnable()
void Error(string err)
Messagebox with error message.