summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-14 12:57:54 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-14 12:57:54 +0000
commitfc767d9b3b123f6bdf37e30b78200c06f042b570 (patch)
tree19bf1e97e82356ceecd881f93f6002436a9683b6 /crawl-ref/source/itemprop.cc
parent8d572fb8435b02dc723c64318536ac38a5733eab (diff)
downloadcrawl-ref-fc767d9b3b123f6bdf37e30b78200c06f042b570.tar.gz
crawl-ref-fc767d9b3b123f6bdf37e30b78200c06f042b570.zip
Rewrite of the shopping code. Much cleaner now.
Hopefully I didn't break anything. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1861 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 1e8d20ae10..8162a4cd88 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -460,15 +460,16 @@ bool item_ident( const item_def &item, unsigned long flags )
void set_ident_flags( item_def &item, unsigned long flags )
{
- const bool known_before = fully_identified(item);
item.flags |= flags;
if (notes_are_active() && !(item.flags & ISFLAG_NOTED_ID) &&
- !known_before && fully_identified(item) && is_interesting_item(item))
+ fully_identified(item) && is_interesting_item(item))
{
- /* make a note of it */
+ // make a note of it
take_note(Note(NOTE_ID_ITEM, 0, 0, item.name(DESC_NOCAP_A).c_str(),
origin_desc(item).c_str()));
- item.flags |= ISFLAG_NOTED_ID;
+ // sometimes (e.g. shops) you can ID an item before you get it;
+ // don't note twice in those cases
+ item.flags |= (ISFLAG_NOTED_ID | ISFLAG_NOTED_GET);
}
}
@@ -517,8 +518,7 @@ unsigned long full_ident_mask( const item_def& item )
if (item_type_known(item))
flagset &= (~ISFLAG_KNOW_TYPE);
- if ( is_random_artefact(item) ||
- is_fixed_artefact(item) )
+ if ( is_artefact(item) )
{
flagset |= ISFLAG_KNOW_PROPERTIES;
}