summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-12 20:18:24 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-12 20:18:24 +0000
commit5c4f3b7474b3dcadf255d43b87f2a7119d9127d4 (patch)
treeecdada128b93464498eb4d9e0f7f89319343996b /crawl-ref/source/item_use.cc
parent5f92d00d2f5b4973ab846e1f068ec1460e2eb9d5 (diff)
downloadcrawl-ref-5c4f3b7474b3dcadf255d43b87f2a7119d9127d4.tar.gz
crawl-ref-5c4f3b7474b3dcadf255d43b87f2a7119d9127d4.zip
Use wield_weapon(-) instead of unwield_item() when dropping/throwing a
wielded weapon, so inscriptions are respected. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9760 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 48b2a81b15..1e03712a56 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2407,7 +2407,9 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
bool unwielded = false;
if (throw_2 == you.equip[EQ_WEAPON] && thrown.quantity == 1)
{
- unwield_item();
+ if (!wield_weapon(true, PROMPT_GOT_SPECIAL))
+ return (false);
+
unwielded = true;
}