diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-23 13:43:07 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-23 13:58:16 -0600 |
commit | df56bc9af60c6a091d13ee8c51212638c114d116 (patch) | |
tree | 9e188ec8bf894fefd0b2268d06dd940e95223d94 /crawl-ref/source/dactions.cc | |
parent | cc16dbc6859834ec60dfe42dbe877fe2a6d8b920 (diff) | |
download | crawl-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.cc | 2 |
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); |