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/shopping.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/shopping.cc')
-rw-r--r-- | crawl-ref/source/shopping.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 9f722b94bd..6836137cca 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -259,7 +259,20 @@ static void in_a_shop( char shoppy ) goto purchase; } - describe_item( mitm[shop_items[ft]] ); + // A hack to make the description more useful. + // In theory, the user could kill the process at this + // point and end up with valid ID for the item. + // That's not very useful, though, because it doesn't set + // type-ID and once you can access the item (by buying it) + // you have its full ID anyway. Worst case, it won't get + // noted when you buy it. + item_def& item = mitm[shop_items[ft]]; + const unsigned long old_flags = item.flags; + if ( id_stock ) + item.flags |= ISFLAG_IDENT_MASK; + describe_item(item); + if ( id_stock ) + item.flags = old_flags; goto print_stock; } |