summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dactions.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-05-23 13:43:07 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-23 13:58:16 -0600
commitdf56bc9af60c6a091d13ee8c51212638c114d116 (patch)
tree9e188ec8bf894fefd0b2268d06dd940e95223d94 /crawl-ref/source/dactions.cc
parentcc16dbc6859834ec60dfe42dbe877fe2a6d8b920 (diff)
downloadcrawl-ref-df56bc9af60c6a091d13ee8c51212638c114d116.tar.gz
crawl-ref-df56bc9af60c6a091d13ee8c51212638c114d116.zip
Really fix Gozag gold detection (#8584).
It was moving the wrong item to the top of the cell - I wanted item_def::index(), not item_def::link. Also, if the gold was the second item on the cell, it would get missed, and if more than one identical item was being generated on the same tile before and after the gold, it could also get missed.
Diffstat (limited to 'crawl-ref/source/dactions.cc')
-rw-r--r--crawl-ref/source/dactions.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/dactions.cc b/crawl-ref/source/dactions.cc
index da2273049e..703aa9f4e1 100644
--- a/crawl-ref/source/dactions.cc
+++ b/crawl-ref/source/dactions.cc
@@ -326,7 +326,7 @@ static void _apply_daction(daction_type act)
if (j->base_type == OBJ_GOLD)
{
bool detected = false;
- int dummy = j->link;
+ int dummy = j->index();
j->special = 0;
unlink_item(dummy);
move_item_to_grid(&dummy, *ri, true);