dont ask me to add any comments to this since its almost the same thing as the script above.
MakeItemUndroppable
not ratedwill prevent the unit from dropping the item while still allowing drag and dropping.
useful for a UI buttons on the hero inventory.
requires
-Handle Variables
-GetItemSlot function (below this JASS Script)
-GetHandleTriggerAction (Included)
usage:
MakeItemUndroppable2 takes unit whichUnit, item whichItem, boolean sameslot
whichUnit is the unit that will not be able to drop the item
whichItem is the item that cannot be dropped
sameslot true to prevent the item from switching slots when dropped, shud be true in most cases.
MakeItemDroppable2 takes unit whichUnit, item whichItem
this function will allow the unit to drop the item again
useful for a UI buttons on the hero inventory.
requires
-Handle Variables
-GetItemSlot function (below this JASS Script)
-GetHandleTriggerAction (Included)
usage:
MakeItemUndroppable2 takes unit whichUnit, item whichItem, boolean sameslot
whichUnit is the unit that will not be able to drop the item
whichItem is the item that cannot be dropped
sameslot true to prevent the item from switching slots when dropped, shud be true in most cases.
MakeItemDroppable2 takes unit whichUnit, item whichItem
this function will allow the unit to drop the item again