From e30e6b688d08e37735643f2f99f3b9ed16f025d2 Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Mon, 9 Jul 2012 21:23:34 +0200 Subject: Made kill count script bind capable of taking the monster name as argument Reviewed-by: bjorn. --- src/scripting/lua.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/scripting/lua.cpp') diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index ae9ba936..a07b287c 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -1791,9 +1791,9 @@ static int chr_get_hair_color(lua_State *s) static int chr_get_kill_count(lua_State *s) { Character *c = checkCharacter(s, 1); - const int id = luaL_checkint(s, 2); + MonsterClass *monster = checkMonsterClass(s, 2); - lua_pushinteger(s, c->getKillCount(id)); + lua_pushinteger(s, c->getKillCount(monster->getId())); return 1; } -- cgit v1.2.3-70-g09d2