summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-03 06:31:03 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-03 06:31:03 +0000
commite0c16e3e44b4b97c89f590fa063c0d6bb341fe50 (patch)
treee91429b6374df49fc8fb8fe691fdc2c52c7ba6c0 /crawl-ref/source/makeitem.cc
parent07eadf8e4cf3dd61fa66d194720143685ab84174 (diff)
downloadcrawl-ref-e0c16e3e44b4b97c89f590fa063c0d6bb341fe50.tar.gz
crawl-ref-e0c16e3e44b4b97c89f590fa063c0d6bb341fe50.zip
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
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)