Prev: 60850 Up: Map Next: 60880
60856: Handler: Drop Item
Input
A Item ID
Handler_DropItem 60856 CALL CheckObjectInInventory Call CheckObjectInInventory.
Print "You're not carrying ".
60859 LD HL,43675 HL=Messaging_YoureNotCarrying.
60862 JP NZ,PrintStringAndItThemHandler Jump to PrintStringAndItThemHandler if the player is not carrying the item in their inventory.
This entry point is used by the routines at Process_GiveSaltToWarrior and Process_DropAmulet.
The item is in the players inventory, so move its location to the current room.
DropItem 60865 LD B,E Copy the item ID into B.
60866 LD A,(42947) C=*CurrentRoom.
60869 LD C,A
60870 CALL Handler_UpdateItemLocation Call Handler_UpdateItemLocation.
Player has dropped an item so handle the inventory count.
60873 LD HL,42896 Decrease *Count_InventoryItems by one.
60876 DEC (HL)
Print "O.K.".
60877 JP Response_OK_Duplicate Jump to Response_OK_Duplicate.
Prev: 60850 Up: Map Next: 60880