summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-30 15:49:18 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-30 15:49:18 +0000
commitfd34c17a54e69fa53b0b6ae7123fdbd60e6303f7 (patch)
tree01846cf5096208daf13e1005b38647afe6676409 /crawl-ref/source/items.cc
parent34cc3ee5d9832be20c635849dc592611c4697f2c (diff)
downloadcrawl-ref-fd34c17a54e69fa53b0b6ae7123fdbd60e6303f7.tar.gz
crawl-ref-fd34c17a54e69fa53b0b6ae7123fdbd60e6303f7.zip
[1742338] Fixed Hell portals not being revealed correctly when the horn is
sounded. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1701 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index ac28060190..79048b4938 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -52,6 +52,7 @@
#include "mstuff2.h"
#include "mon-util.h"
#include "mutation.h"
+#include "notes.h"
#include "overmap.h"
#include "player.h"
#include "randart.h"
@@ -844,6 +845,13 @@ static void milestone_check(const item_def &item)
}
#endif // DGL_MILESTONES
+static void check_note_item(const item_def &item)
+{
+ if (is_interesting_item(item))
+ take_note(Note(NOTE_GET_ITEM, 0, 0, item.name(DESC_NOCAP_A).c_str(),
+ origin_desc(item).c_str()));
+}
+
void origin_set(int x, int y)
{
int monnum = first_corpse_monnum(x, y);
@@ -857,7 +865,7 @@ void origin_set(int x, int y)
if (!item.orig_monnum)
item.orig_monnum = static_cast<short>( monnum );
item.orig_place = pplace;
-
+ check_note_item(item);
#ifdef DGL_MILESTONES
milestone_check(item);
#endif
@@ -876,6 +884,7 @@ void origin_freeze(item_def &item, int x, int y)
if (!item.orig_monnum && x != -1 && y != -1)
origin_set_monstercorpse(item, x, y);
item.orig_place = get_packed_place();
+ check_note_item(item);
#ifdef DGL_MILESTONES
milestone_check(item);
#endif