summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-30 14:40:48 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-30 14:40:48 +0000
commit2e5c80c5f2690bb4ef929c6c1a6d0c309afe55e5 (patch)
tree4aa478ab9403ef8fd670ee1ed04d8cf00f88be0b /crawl-ref/source/invent.cc
parent26daf2e137f335a48ae532b3a379cef0550d4e39 (diff)
downloadcrawl-ref-2e5c80c5f2690bb4ef929c6c1a6d0c309afe55e5.tar.gz
crawl-ref-2e5c80c5f2690bb4ef929c6c1a6d0c309afe55e5.zip
Several bugfixes.
In no particular order: + Beogh shouldn't care about you attacking non-orc friends. + Mummies don't get "Food" listed as ability costs. + corrected order of invis flickering + modified (and tidied) you_can_wear checks and output + added ']' command to list currently worn equipment (inv) + wielded cursed items can no longer be fired + Wanderers no longer get inappropriate armour + Fixed "bad item" message for confirm-inscribed items + copied "Discharge" to "Static Discharge" in spells.txt (Maybe we should remove the first, but I was unsure about that, so I left it for now.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2035 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 461d83bda3..057f4c8e7b 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -633,6 +633,13 @@ static bool item_class_selected(const item_def &i, int selector)
|| itype == OBJ_MISCELLANY);
case OBJ_SCROLLS:
return (itype == OBJ_SCROLLS || itype == OBJ_BOOKS);
+ case OSEL_EQUIP:
+ for (int eq = 0; eq < NUM_EQUIP; eq++)
+ {
+ if (you.equip[eq] == i.link)
+ return (true);
+ }
+ // fall through
default:
return (false);
}
@@ -913,7 +920,7 @@ bool has_warning_inscription(const item_def& item,
bool check_warning_inscriptions( const item_def& item,
operation_types oper )
{
- if ( has_warning_inscription(item, oper) )
+ if (is_valid_item( item ) && has_warning_inscription(item, oper) )
{
std::string prompt = "Really choose ";
prompt += item.name(DESC_INVENTORY);