summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stash.h
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-07-06 13:57:13 -0400
committerNeil Moore <neil@s-z.org>2012-07-06 13:57:13 -0400
commit1999034cde46cf2d91178cd9cd31ebe0bd955616 (patch)
treeafaea790a3129ddd1dddbaf7a5db4a44bc30487a /crawl-ref/source/stash.h
parentf5771d8f0ff0e3f460a7cca56af41dfac01e3397 (diff)
downloadcrawl-ref-1999034cde46cf2d91178cd9cd31ebe0bd955616.tar.gz
crawl-ref-1999034cde46cf2d91178cd9cd31ebe0bd955616.zip
Don't double tops of stacks.
We now track in the stash whether we saw a stack, even if we only saw the top item. On update, we add the top item if it differs from the remembered old items, or if we noticed a change from not-a-stack to a stack. Previously, the second condition also triggered if we remembered only a single item of the stack, which would lead to that item being added to the stash again. Fixes #5850. Stacks in old saves will continue to exhibit duplication until they are verified by visiting the square.
Diffstat (limited to 'crawl-ref/source/stash.h')
-rw-r--r--crawl-ref/source/stash.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/stash.h b/crawl-ref/source/stash.h
index 58bc6097b6..f5ca23fd28 100644
--- a/crawl-ref/source/stash.h
+++ b/crawl-ref/source/stash.h
@@ -97,6 +97,7 @@ private:
trap_type trap;
std::vector<item_def> items;
+ bool is_stack;
static bool are_items_same(const item_def &, const item_def &);