diff options
author | Charles Otto <ottochar@gmail.com> | 2009-10-20 22:48:43 -0400 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2009-10-20 22:48:43 -0400 |
commit | 0b9380cc19f69c8249a4dd24beb7191d387919a3 (patch) | |
tree | c4dded6a5d5cde868e338dfd6c1aad341b8cccf2 /crawl-ref/source/religion.cc | |
parent | 00c00d528adfaddd2cd5708237b2cece4610358b (diff) | |
download | crawl-ref-0b9380cc19f69c8249a4dd24beb7191d387919a3.tar.gz crawl-ref-0b9380cc19f69c8249a4dd24beb7191d387919a3.zip |
Fix bug [2879187] Gods gifting duplicate books
Mark the type of a book as known when gifting it so that gods that
give books in a fixed order don't gift the same book twice if the
player never bothers to read the book the first time it is given.
I guess this is relevant because updated kiku doesn't use a gift
timeout.
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index eb435b17bd..2aba3fca11 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -2310,6 +2310,10 @@ static void _do_god_gift(bool prayed_for) if (thing_created == NON_ITEM) return; + // Mark the book type as known to avoid duplicate gifts + // if players don't read their gifts for some reason + mark_had_book(gift); + move_item_to_grid( &thing_created, you.pos() ); if (thing_created != NON_ITEM) |