question: boolean dropItems ( final Player player , int itemCount ) { boolean result = false ; final ItemCollection itemsTodo = new ItemCollection ( ) ; itemsTodo . addFromQuestStateString ( player . getQuest ( questSlot ) ) ; if ( player . drop ( itemName , itemCount ) ) { if ( itemsTodo . removeItem ( itemName , itemCount ) ) { result = true ; } } else { final List < Item > items = player . getAllEquipped ( itemName ) ; if ( items != null ) { for ( final Item item : items ) { final int quantity = item . getQuantity ( ) ; final int n = Math . min ( itemCount , quantity ) ; if ( player . drop ( itemName , n ) ) { itemCount -= n ; if ( itemsTodo . removeItem ( itemName , n ) ) { result = true ; } } if ( itemCount == 0 ) { result = true ; break ; } } } } if ( result ) { player . setQuest ( questSlot , itemsTodo . toStringForQuestState ( ) ) ; } return result ; }
target:  Drop specified amount of given item. If player doesn't have enough items, all carried ones will be dropped and number of missing items is updated.