From e0c16e3e44b4b97c89f590fa063c0d6bb341fe50 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Wed, 3 Dec 2008 06:31:03 +0000 Subject: Merge r7726 from trunk: set acquirement source on items early enough that it can be used by make_item_randart(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7727 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/makeitem.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/makeitem.cc') 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) -- cgit v1.2.3-54-g00ecf