summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index cdb337188e..3239939309 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2700,7 +2700,8 @@ int items( int allow_uniques, // not just true-false,
int item_race, // weapon / armour racial categories
// item_race also gives type of rune!
unsigned mapmask,
- int force_ego) // desired ego/brand
+ int force_ego, // desired ego/brand
+ int agent) // acquirement agent, if not -1
{
// TODO: Allow a combination of force_ego > 0 and
// force_type == OBJ_RANDOM, so that (for example) you could have
@@ -2719,6 +2720,11 @@ int items( int allow_uniques, // not just true-false,
item_def& item(mitm[p]);
+ // make_item_randart() might do things differently based upon the
+ // acquirement agent, especially for god gifts.
+ if (agent != -1)
+ origin_acquired(item, agent);
+
const bool force_good = (item_level == MAKE_GOOD_ITEM);
if (force_ego > 0)