diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-03 06:08:48 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-03 06:08:48 +0000 |
commit | 8bf4f93aa163d478558f5ea3897c6158bd9781ea (patch) | |
tree | 9cefd9fff350b86c4d83a7be00b16199e8fe46b9 /crawl-ref/source/makeitem.h | |
parent | 921d8f93a339385678d72c8347725a5bc3de1145 (diff) | |
download | crawl-ref-8bf4f93aa163d478558f5ea3897c6158bd9781ea.tar.gz crawl-ref-8bf4f93aa163d478558f5ea3897c6158bd9781ea.zip |
Add another optional parameter to items() of makeitem.{cc,h}, the agent
parameter. If not -1 then it will be used to set the acquirement agent of the
item. This is done in items() so that make_item_randart() can use it if it's
called from items(). Before this _god_fits_artefact() in randart.cc was only
being called for choosing an appropriate god for random artifact names, and not
to check the appropriateness of the randart proeprties chosen for randart god
gifts.
Changed _god_fits_artefact() so that if a bug leads a god to gifting an item
with an inapropriate base_type or sub_type that it will give an assertion or
error message instead of causing make_item_randart() to go into an infinite
loop.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7726 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/makeitem.h')
-rw-r--r-- | crawl-ref/source/makeitem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/makeitem.h b/crawl-ref/source/makeitem.h index 26797f7bb3..7335055592 100644 --- a/crawl-ref/source/makeitem.h +++ b/crawl-ref/source/makeitem.h @@ -23,7 +23,7 @@ enum item_make_species_type int items( int allow_uniques, object_class_type force_class, int force_type, bool dont_place, int item_level, int item_race, - unsigned mapmask = 0, int force_ego = 0 ); + unsigned mapmask = 0, int force_ego = 0, int agent = -1 ); void item_colour( item_def &item ); void init_rod_mp(item_def &item); |