summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-19 03:30:46 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-19 03:30:46 +0000
commita98b88c34760cb85963de4782bae483c5a175bc5 (patch)
treecc520b860cbd9f0354872d74fdc108efba2ddf67 /crawl-ref/source/items.cc
parent478bb9ee6ad07a89755cd4314a703bfce4f2c395 (diff)
downloadcrawl-ref-a98b88c34760cb85963de4782bae483c5a175bc5.tar.gz
crawl-ref-a98b88c34760cb85963de4782bae483c5a175bc5.zip
note_items now only notes when items are identified. NOTE_GET_ITEM is
now hardcoded for when runes, the Orb, or artefacts are first picked up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5968 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc21
1 files changed, 7 insertions, 14 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 5e5eba7580..613c2dee8e 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -967,7 +967,11 @@ static void _milestone_check(const item_def &item)
static void _check_note_item(item_def &item)
{
- if (!(item.flags & ISFLAG_NOTED_GET) && is_interesting_item(item))
+ if (item.flags & (ISFLAG_NOTED_GET | ISFLAG_NOTED_ID))
+ return;
+
+ if (is_rune(item) || item.base_type == OBJ_ORBS
+ || is_artefact(item))
{
take_note(Note(NOTE_GET_ITEM, 0, 0, item.name(DESC_NOCAP_A).c_str(),
origin_desc(item).c_str()));
@@ -1457,13 +1461,7 @@ static void _got_item(item_def& item, int quant)
}
item.flags |= ISFLAG_BEEN_IN_INV;
- if (!(item.flags & ISFLAG_NOTED_GET))
- {
- take_note(Note(NOTE_GET_ITEM, 0, 0,
- item.name(DESC_NOCAP_A).c_str()));
- // Don't take another note.
- item.flags |= (ISFLAG_NOTED_ID | ISFLAG_NOTED_GET);
- }
+ _check_note_item(item);
}
// Returns quantity of items moved into player's inventory and -1 if
@@ -1626,12 +1624,7 @@ int move_item_to_player( int obj, int quant_got, bool quiet )
&& you.char_direction == GDT_DESCENDING)
{
// Take a note!
- if (!(item.flags & ISFLAG_NOTED_GET))
- {
- take_note(Note(NOTE_GET_ITEM, 0, 0,
- item.name(DESC_NOCAP_A).c_str()));
- item.flags |= (ISFLAG_NOTED_ID | ISFLAG_NOTED_GET);
- }
+ _check_note_item(item);
if (!quiet)
mpr("Now all you have to do is get back out of the dungeon!");