diff options
author | Florian Diebold <flodiebold@gmail.com> | 2012-02-18 23:57:31 +0100 |
---|---|---|
committer | Florian Diebold <flodiebold@gmail.com> | 2012-02-18 23:57:31 +0100 |
commit | 63de88c69fa7d45e6cc2d088ebe01ae6101e9a2e (patch) | |
tree | 891e312a2753b689714344d241efcf2ffd18a196 /crawl-ref/source/tilereg-inv.cc | |
parent | 6adc23ed20680dffaf51e6f4c180ab642ed361ed (diff) | |
download | crawl-ref-63de88c69fa7d45e6cc2d088ebe01ae6101e9a2e.tar.gz crawl-ref-63de88c69fa7d45e6cc2d088ebe01ae6101e9a2e.zip |
Fix the "tried" question mark still not appearing in some cases (#5333).
The underlying problem is that item_type_known returns true for some
item_info objects (i.e. item_defs returned by get_item_info) even
though their item type isn't really known, because the item type data
is erased by setting it to 0. So if the sub type 0 of the respective
base type is known, item_type_known may return true (which causes
item_type_tried to return false).
I didn't fix that (I'm not sure if it should be considered a bug, or
item_type_{known,tried} just shouldn't be used on item_infos), but
just changed the call to item_type_tried to a direct check for the flag.
Diffstat (limited to 'crawl-ref/source/tilereg-inv.cc')
-rw-r--r-- | crawl-ref/source/tilereg-inv.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg-inv.cc b/crawl-ref/source/tilereg-inv.cc index 8595564911..9143e7e4ae 100644 --- a/crawl-ref/source/tilereg-inv.cc +++ b/crawl-ref/source/tilereg-inv.cc @@ -624,7 +624,7 @@ static void _fill_item_info(InventoryTile &desc, const item_info &item) desc.flag = 0; if (item.cursed()) desc.flag |= TILEI_FLAG_CURSE; - if (item_type_tried(item)) + if (item.flags & ISFLAG_TRIED) desc.flag |= TILEI_FLAG_TRIED; if (item.pos.x != -1) desc.flag |= TILEI_FLAG_FLOOR; |