diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-13 12:24:05 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-13 12:24:05 +0000 |
commit | 42fe04c5774e1abb0c25de0aed269f0f5546e9d9 (patch) | |
tree | c42ba59affef4118c051c4a18c7977de6f970a97 /crawl-ref/source/invent.cc | |
parent | 1f89164a2b292e7da1020d8049499b1cdc6f8a87 (diff) | |
download | crawl-ref-42fe04c5774e1abb0c25de0aed269f0f5546e9d9.tar.gz crawl-ref-42fe04c5774e1abb0c25de0aed269f0f5546e9d9.zip |
Applying patches 1793701 (dolorous), 1793683 and 1793679
(both zelgadis), and 1793603 (ennewalker).
Also default yesno() when choosing a religion to 'no'.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2080 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r-- | crawl-ref/source/invent.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index c835984358..74a2a74bab 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -1024,11 +1024,15 @@ static bool check_old_item_warning( const item_def& item, } else if (oper == OPER_WEAR) // can we safely take off old item? { + if (item.base_type != OBJ_ARMOUR) + return (true); + equipment_type eq_slot = get_armour_slot(item); - if (item.base_type != OBJ_ARMOUR || you.equip[eq_slot] == -1) + if (you.equip[eq_slot] == -1) return (true); - + old_item = you.inv[you.equip[eq_slot]]; + if (!has_warning_inscription(old_item, OPER_TAKEOFF)) return (true); |