summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_dgnmon.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-03-26 23:51:31 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-03-26 23:56:36 +0200
commit2c8c99fec4aab48970d75030ece87dda40260e78 (patch)
treeed687319685e936cb25b8fa046c01209c36c7525 /crawl-ref/source/l_dgnmon.cc
parent01c2aa8463804cdd4ff8818b78c1deb890a78efb (diff)
parent537a8dfbb6582c8269e3239b63a5d2ea03eb77a3 (diff)
downloadcrawl-ref-2c8c99fec4aab48970d75030ece87dda40260e78.tar.gz
crawl-ref-2c8c99fec4aab48970d75030ece87dda40260e78.zip
Merge branch 'master' into portal_branches
This includes fixes for 64834896234968 places in master that add new uses of LEVEL_FOO and so on.
Diffstat (limited to 'crawl-ref/source/l_dgnmon.cc')
-rw-r--r--crawl-ref/source/l_dgnmon.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/l_dgnmon.cc b/crawl-ref/source/l_dgnmon.cc
index 1cb8941a06..ed4f652f87 100644
--- a/crawl-ref/source/l_dgnmon.cc
+++ b/crawl-ref/source/l_dgnmon.cc
@@ -132,7 +132,7 @@ static int dgn_set_random_mon_list(lua_State *ls)
}
if (mon.type == -1)
mon.type = MONS_PROGRAM_BUG;
- name = mons_type_name(mon.type, DESC_PLAIN);
+ name = mons_type_name(static_cast<monster_type>(mon.type), DESC_PLAIN);
}
mons.push_back(mon);
@@ -173,11 +173,11 @@ static int dgn_set_random_mon_list(lua_State *ls)
return (0);
}
-static int dgn_mons_from_index(lua_State *ls)
+static int dgn_mons_from_mid(lua_State *ls)
{
- const int index = luaL_checkint(ls, 1);
+ const int mid = luaL_checkint(ls, 1);
- monster* mons = &menv[index];
+ monster* mons = monster_by_mid(mid);
if (mons->type != -1)
push_monster(ls, mons);
@@ -237,7 +237,7 @@ LUAFN(dgn_dismiss_monsters)
const struct luaL_reg dgn_mons_dlib[] =
{
{ "set_random_mon_list", dgn_set_random_mon_list },
-{ "mons_from_index", dgn_mons_from_index },
+{ "mons_from_mid", dgn_mons_from_mid },
{ "mons_at", dgn_mons_at },
{ "create_monster", dgn_create_monster },
{ "monster_spec", _dgn_monster_spec },