diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-30 02:23:45 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-30 02:23:45 +0000 |
commit | b3a157e60e8c01aae3827e35e49306d775ea85d1 (patch) | |
tree | 670a371cb4de51ae9cb86ae987616977bb4c4baf /crawl-ref/source/items.cc | |
parent | 8e16f1a94ec8926ea4dc93f66e26c8512337e005 (diff) | |
download | crawl-ref-b3a157e60e8c01aae3827e35e49306d775ea85d1.tar.gz crawl-ref-b3a157e60e8c01aae3827e35e49306d775ea85d1.zip |
Mark quivered items as equipped (interface only, not gameplay.)
FR 2059687.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7071 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index c9756544f4..f20a518928 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2433,24 +2433,17 @@ item_def find_item_type(object_class_type base_type, std::string name) return (item); } -bool item_is_equipped(const item_def &item) +bool item_is_equipped(const item_def &item, bool quiver_too) { if (!in_inventory(item)) return (false); for (int i = 0; i < NUM_EQUIP; i++) - { - if (you.equip[i] == EQ_NONE) - continue; - - const item_def& eq(you.inv[you.equip[i]]); - - if (!is_valid_item(eq)) - continue; - - if (&eq == &item) + if (item.link == you.equip[i]) return (true); - } + + if (quiver_too && item.link == you.m_quiver->get_fire_item(NULL)) + return (true); return (false); } |