summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_item.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2011-01-26 17:02:08 +0100
committerRaphael Langella <raphael.langella@gmail.com>2011-01-26 23:04:05 +0100
commitfde910b2445b6a60968aa3bfabbb89c456d7fb15 (patch)
treeb120794ff08897f44ebf492928f5e1f2dcca8b8a /crawl-ref/source/l_item.cc
parent24b1396e00855a14d41d303df3894c81dc4ada87 (diff)
downloadcrawl-ref-fde910b2445b6a60968aa3bfabbb89c456d7fb15.tar.gz
crawl-ref-fde910b2445b6a60968aa3bfabbb89c456d7fb15.zip
Add a #define SLOT_BARE_HANDS for weapon unwield.
This replace the very hacky PROMPT_GOT_SPECIAL that was used for unwielding. This commit also fix what appears to be a bug in l_item_do_remove which called wield_weapon with -1 instead of -2 causing a weapon swap instead of unwielding. I can't test it, because I don't know what calls it.
Diffstat (limited to 'crawl-ref/source/l_item.cc')
-rw-r--r--crawl-ref/source/l_item.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/l_item.cc b/crawl-ref/source/l_item.cc
index ba2bedde53..b63dd9f4dc 100644
--- a/crawl-ref/source/l_item.cc
+++ b/crawl-ref/source/l_item.cc
@@ -172,7 +172,7 @@ static int l_item_do_remove(lua_State *ls)
bool result = false;
if (eq == EQ_WEAPON)
- result = wield_weapon(true, -1);
+ result = wield_weapon(true, SLOT_BARE_HANDS);
else if (eq == EQ_LEFT_RING || eq == EQ_RIGHT_RING || eq == EQ_AMULET)
result = remove_ring(item->link);
else