3995 {
3997 if( deferred_swap_entities )
3998 {
4002 {
4004 {
4006 }
4007
4008 switch (deferred_swap_entities.
m_mode)
4009 {
4012 {
4013 #ifdef DIAG_DEVELOPER
4014 if (PluginInventoryDebug.Cast(
GetPlugin(PluginInventoryDebug)).IsLocalOnlyMoveEnable())
4015 {
4016 LocationSwap(src1, src2, deferred_swap_entities.
m_dst1, deferred_swap_entities.
m_dst2);
4017 }
4018 else
4019 {
4020 #endif
4021
4023 LocationSwap(src1, src2, deferred_swap_entities.
m_dst1, deferred_swap_entities.
m_dst2);
4024
4025 #ifdef DIAG_DEVELOPER
4026 }
4027 #endif
4028 }
4029 else
4030 {
4031 #ifdef ENABLE_LOGGING
4033 {
4035 }
4036 #endif
4037 }
4038 break;
4039
4042 {
4043 #ifdef DIAG_DEVELOPER
4044 if (PluginInventoryDebug.Cast(
GetPlugin(PluginInventoryDebug)).IsLocalOnlyMoveEnable())
4045 {
4046 LocationSwap(src1, src2, deferred_swap_entities.
m_dst1, deferred_swap_entities.
m_dst2);
4047 }
4048 else
4049 {
4050 #endif
4051
4058
4059 #ifdef DIAG_DEVELOPER
4060 }
4061 #endif
4062 }
4063 else
4064 {
4065 #ifdef ENABLE_LOGGING
4067 {
4069 }
4070 #endif
4071 }
4072 break;
4073
4075 break;
4076
4077 default:
4078 Error(
"SwapEntities - HandEvent - Invalid mode");
4079 }
4080 }
4081 else
4082 Error(
"SwapEntities - MakeSrcAndDstForSwap - no inv loc");
4083 }
4084 }
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.