diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-15 12:27:57 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-15 12:27:57 +0000 |
commit | afaae93d272eb3a6b09fde538c8d85005cad91e3 (patch) | |
tree | 7fd2d99a850657c9bda925d27f9b2c6deedaaef5 /crawl-ref/source/items.cc | |
parent | fb0ab9913b253f6648b2848e7432f29f4b1f2d9f (diff) | |
download | crawl-ref-afaae93d272eb3a6b09fde538c8d85005cad91e3.tar.gz crawl-ref-afaae93d272eb3a6b09fde538c8d85005cad91e3.zip |
[1813214] Trog should not gift the Wrath of Trog.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2472 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 7fe521fb3f..443ed566eb 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -210,7 +210,7 @@ int cull_items(void) // 9. unmark unrandart int z = find_unrandart_index(item); if (z >= 0) - set_unrandart_exist(z, 0); + set_unrandart_exist(z, false); } // POOF! @@ -506,7 +506,7 @@ void unlink_item( int dest ) #endif } // end unlink_item() -void destroy_item( int dest ) +void destroy_item( int dest, bool never_created ) { // Don't destroy non-items, but this function may be called upon // to remove items reduced to zero quantity, so we allow "invalid" @@ -516,6 +516,19 @@ void destroy_item( int dest ) unlink_item( dest ); + if (never_created) + { + if (is_fixed_artefact(mitm[dest])) + set_unique_item_status( mitm[dest].base_type, mitm[dest].special, + UNIQ_NOT_EXISTS ); + else if (is_unrandom_artefact(mitm[dest])) + { + const int unrand = find_unrandart_index(dest); + if (unrand != -1) + set_unrandart_exist( unrand, false ); + } + } + // paranoia, shouldn't be needed mitm[dest].clear(); } |