summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-23 13:13:21 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-23 13:13:21 +0000
commit3c0f15a6ff536d6e97f856fcc85fbfd36bfb76b3 (patch)
tree4aee5aa907042cd51935caf9f3f405a995c63357
parent530dccaf735b1c9db4fe4c0b630e21f81ec70e6a (diff)
downloadcrawl-ref-3c0f15a6ff536d6e97f856fcc85fbfd36bfb76b3.tar.gz
crawl-ref-3c0f15a6ff536d6e97f856fcc85fbfd36bfb76b3.zip
Fixed up fully_identified().
Fixed bug when noting items purchased from shops. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@93 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/itemname.cc21
-rw-r--r--crawl-ref/source/shopping.cc4
2 files changed, 22 insertions, 3 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 4d22749cec..69f46865fb 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -1419,7 +1419,7 @@ static char item_name_2( const item_def &item, char buff[ITEMNAME_SIZE],
switch (item_typ)
{
case MISC_RUNE_OF_ZOT:
- strncat( buff, (it_plus == RUNE_DIS) ? "iron" :
+ strncat(buff, (it_plus == RUNE_DIS) ? "iron" :
(it_plus == RUNE_GEHENNA) ? "obsidian" :
(it_plus == RUNE_COCYTUS) ? "icy" :
(it_plus == RUNE_TARTARUS) ? "bone" :
@@ -2446,16 +2446,33 @@ bool is_interesting_item( const item_def& item ) {
}
bool fully_identified( const item_def& item ) {
- item_status_flag_type flagset = ISFLAG_IDENT_MASK;
+ long flagset = ISFLAG_IDENT_MASK;
switch ( item.base_type ) {
case OBJ_BOOKS:
case OBJ_MISCELLANY:
case OBJ_ORBS:
case OBJ_SCROLLS:
+ case OBJ_POTIONS:
flagset = ISFLAG_KNOW_TYPE;
break;
+ case OBJ_FOOD:
+ flagset = 0;
+ break;
+ case OBJ_WANDS:
+ flagset = (ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PLUSES);
+ break;
+ case OBJ_JEWELLERY:
+ flagset = (ISFLAG_KNOW_CURSE | ISFLAG_KNOW_TYPE);
+ if ( ring_has_pluses(item) )
+ flagset |= ISFLAG_KNOW_PLUSES;
+ break;
default:
break;
}
+ if ( is_random_artefact(item) ||
+ is_fixed_artefact(item) ||
+ is_unrandom_artefact(item) )
+ flagset |= ISFLAG_KNOW_PROPERTIES;
+
return item_ident( item, flagset );
}
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index 206cebe063..05f316dfd3 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -383,8 +383,10 @@ static void purchase( int shop, int item_got, int cost )
activate_notes(true);
char buf[ITEMNAME_SIZE];
+ char buf2[ITEMNAME_SIZE];
item_name( mitm[item_got], DESC_NOCAP_A, buf );
- take_note(Note(NOTE_ID_ITEM, 0, 0, buf));
+ strcpy(buf2, origin_desc(mitm[item_got]).c_str());
+ take_note(Note(NOTE_ID_ITEM, 0, 0, buf, buf2));
activate_notes(false);
}