From 42fe04c5774e1abb0c25de0aed269f0f5546e9d9 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 13 Sep 2007 12:24:05 +0000 Subject: 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 --- crawl-ref/source/invent.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/invent.cc') 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); -- cgit v1.2.3-54-g00ecf