Prev: EDB2 Up: Map Next: EDD0
EDB8: Handler: Drop Item
Input
A Item ID
Handler_DropItem EDB8 CALL CheckObjectInInventory Call CheckObjectInInventory.
Print "You're not carrying ".
EDBB LD HL,$AA9B HL=Messaging_YoureNotCarrying.
EDBE 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 EDC1 LD B,E Copy the item ID into B.
EDC2 LD A,($A7C3) C=*CurrentRoom.
EDC5 LD C,A
EDC6 CALL Handler_UpdateItemLocation Call Handler_UpdateItemLocation.
Player has dropped an item so handle the inventory count.
EDC9 LD HL,$A790 Decrease *Count_InventoryItems by one.
EDCC DEC (HL)
Print "O.K.".
EDCD JP Response_OK_Duplicate Jump to Response_OK_Duplicate.
Prev: EDB2 Up: Map Next: EDD0