summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-07 13:45:05 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-07 13:45:05 +0000
commit4253029283c971cf0ed1f84a20ea1ed20e855759 (patch)
treef1a3ab8fd5150b055e279173de7171c13710dff3 /crawl-ref/source/items.cc
parent3baafdfd73195fe83b6d9a1d6669ce61faefbe2f (diff)
downloadcrawl-ref-4253029283c971cf0ed1f84a20ea1ed20e855759.tar.gz
crawl-ref-4253029283c971cf0ed1f84a20ea1ed20e855759.zip
[1808624] Dropping part of a stack of wielded items should not unwield the whole stack.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2358 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 92bd3fa034..ab702c249e 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1807,7 +1807,8 @@ bool drop_item( int item_dropped, int quant_drop, bool try_offer )
//
// Unwield needs to be done before copy in order to clear things
// like temporary brands. -- bwr
- if (item_dropped == you.equip[EQ_WEAPON])
+ if (item_dropped == you.equip[EQ_WEAPON]
+ && quant_drop >= you.inv[item_dropped].quantity)
{
unwield_item();
canned_msg( MSG_EMPTY_HANDED );