diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-07-09 21:23:34 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-07-10 00:02:24 +0200 |
commit | 52bc6c29358ccfd241b99c8ff7a423f962c5493b (patch) | |
tree | cf5957a26bf87fbe6df338fdfe841dcf91397443 /src | |
parent | 4d88724f011090de417284668d2264931f1bfcc3 (diff) | |
download | manaserv-52bc6c29358ccfd241b99c8ff7a423f962c5493b.tar.gz manaserv-52bc6c29358ccfd241b99c8ff7a423f962c5493b.tar.bz2 manaserv-52bc6c29358ccfd241b99c8ff7a423f962c5493b.tar.xz manaserv-52bc6c29358ccfd241b99c8ff7a423f962c5493b.zip |
Made kill count script bind capable of taking the monster name as argument
Reviewed-by: bjorn.
Diffstat (limited to 'src')
-rw-r--r-- | src/scripting/lua.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 51ebaa5e..b29ae74d 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -1793,9 +1793,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; } |