summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-26 15:31:53 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-26 15:31:53 +0000
commitdd695c352f27764a0c4f1efee5ee1676678162c2 (patch)
treedca72ed2e12f7ddd638bd68598261545a92d9a58 /crawl-ref/source/mapdef.cc
parent269a1da76046334717fed84754ca3bde5f5bffc5 (diff)
downloadcrawl-ref-dd695c352f27764a0c4f1efee5ee1676678162c2.tar.gz
crawl-ref-dd695c352f27764a0c4f1efee5ee1676678162c2.zip
Made item_def::base_type into object_class_type, instead of unsigned char.
Flushed out a few bugs as a result, specifically: 1. Some monsters (e.g., orcs) can now get blowguns as they were intended to (look at the makeitem.cc change); 2. Acquirement will no longer attempt to give you the books of minor magic if you've found them (look at the effects.cc change.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1374 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 42849a8a17..1535b2ffa0 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -1174,7 +1174,7 @@ void item_list::parse_random_by_class(std::string c, item_spec &spec)
{
if (c == item_class_name(type, true))
{
- spec.base_type = type;
+ spec.base_type = static_cast<object_class_type>(type);
return;
}
}
@@ -1191,7 +1191,7 @@ void item_list::parse_raw_name(std::string name, item_spec &spec)
return ;
}
- item_def parsed = find_item_type(-1, name);
+ item_def parsed = find_item_type(OBJ_UNASSIGNED, name);
if (parsed.sub_type != OBJ_RANDOM)
{
spec.base_type = parsed.base_type;