From 5c4f3b7474b3dcadf255d43b87f2a7119d9127d4 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 12 May 2009 20:18:24 +0000 Subject: 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 --- crawl-ref/source/item_use.cc | 4 +++- crawl-ref/source/items.cc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source') 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; } diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 3f5dfcf2e7..e5c356ba86 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1983,7 +1983,7 @@ bool drop_item( int item_dropped, int quant_drop, bool try_offer ) if (item_dropped == you.equip[EQ_WEAPON] && quant_drop >= you.inv[item_dropped].quantity) { - if (!unwield_item()) + if (!wield_weapon(true, PROMPT_GOT_SPECIAL)) return (false); canned_msg( MSG_EMPTY_HANDED ); } -- cgit v1.2.3-54-g00ecf