827 {
829 {
831 {
833 }
835 {
836 #ifdef DIAG_DEVELOPER
839 else
840 #endif
841 {
843
846 }
847 }
848
849 }
851 {
852 switch (button)
853 {
856 break;
857
860 if (
g_Game.IsLeftCtrlDown())
861 {
862 if (controlledPlayer.CanDropEntity(
m_Item))
863 {
864 if (
m_Item.GetTargetQuantityMax() <
m_Item.GetQuantity())
865 m_Item.SplitIntoStackMaxClient(null, -1);
866 else
867 controlledPlayer.PhysicalPredictiveDropItem(
m_Item);
868
869 ItemManager.GetInstance().SetWidgetDraggable(w, false);
870 }
871 }
872 else
873 {
874 InventoryLocation il = new InventoryLocation();
875 m_Obj.GetInventory().GetCurrentInventoryLocation(il);
876
877 bool draggable = !controlledPlayer.GetInventory().HasInventoryReservation(
m_Obj, null) && !controlledPlayer.GetInventory().IsInventoryLocked() && !controlledPlayer.IsItemsToDelete();
878 draggable = draggable && (
m_Obj.GetHierarchyRoot() &&
m_Obj.GetInventory().CanRemoveEntity() || !
m_Obj.GetHierarchyRoot() && AttachmentsOutOfReach.IsAttachmentReachable(
m_Obj,
"", il.
GetSlot()));
879
880 ItemManager.GetInstance().SetWidgetDraggable(w, draggable);
881 }
882 break;
883 }
884 }
885 }
proto native DayZPlayer GetPlayer()
proto native int GetSlot()
returns slot id if current type is Attachment
proto native CGame GetGame()