- Joined
- Nov 25, 2008
- Messages
- 1,309
What JASS code is needed to prevent a specific item from being dropped?
The above function is [basically] what my event handling for dropping items is. This function is registered as a condition. There is a similar trigger for getting an item and another trigger for using an item. They are called Item_Get and Item_Use respectively. My problem is that I don't know what code to write to implement the function
JASS:
function Item_Lose takes nothing returns nothing
local unit Hero=GetTriggerUnit()
local item Item=GetManipulatedItem()
if(GetItemTypeId(I)=='item')then
call Prevent_Item_From_Being_Dropped(Hero,Item)
endif
set Hero=null
set Item=null
endfunction
Prevent_Item_From_Being_Dropped
. This function has to retain the original item's handle id and other data, as well as remaining in the same slot of Hero
. Any ideas?