diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-07 10:17:07 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-07 10:17:07 +0000 |
commit | c59c58e7a4e34a1f46ece4a45096b955d6caba65 (patch) | |
tree | 0354c7fe6c3a8d23122e4ddbf6e67a46d3cb5fe1 /crawl-ref/source/spells1.cc | |
parent | 085d445195e9621ca31d54076e1dabf11a09f9b6 (diff) | |
download | crawl-ref-c59c58e7a4e34a1f46ece4a45096b955d6caba65.tar.gz crawl-ref-c59c58e7a4e34a1f46ece4a45096b955d6caba65.zip |
Describing items now works better in shops (fixes 1749246.)
More consistency in type-ID vs. artefacts: knowing the type-ID of a specific
ring won't property-ID or type-ID an artefact ring of the same type, and
vice versa.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1781 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 724d2bc037..e78ef07a83 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -39,6 +39,7 @@ #include "monstuff.h" #include "mon-util.h" #include "player.h" +#include "randart.h" #include "skills2.h" #include "spells3.h" #include "spells4.h" @@ -374,7 +375,10 @@ void identify(int power) canned_msg( MSG_OK ); return; } - if ( fully_identified(you.inv[item_slot]) ) + + item_def& item(you.inv[item_slot]); + + if ( fully_identified(item) ) { mpr("Choose an unidentified item, or Esc to abort."); if ( Options.auto_list ) @@ -382,13 +386,13 @@ void identify(int power) continue; } - set_ident_type( you.inv[item_slot].base_type, - you.inv[item_slot].sub_type, ID_KNOWN_TYPE ); + if ( !is_artefact(item) ) + set_ident_type( item.base_type, item.sub_type, ID_KNOWN_TYPE ); - set_ident_flags( you.inv[item_slot], ISFLAG_IDENT_MASK ); + set_ident_flags( item, ISFLAG_IDENT_MASK ); // output identified item - mpr(you.inv[item_slot].name(DESC_INVENTORY_EQUIP).c_str()); + mpr(item.name(DESC_INVENTORY_EQUIP).c_str()); if (item_slot == you.equip[EQ_WEAPON]) you.wield_change = true; |