From e4a7536e7ca14dcc257d60f8562a9dab61c4fd34 Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Tue, 27 Dec 2011 05:59:55 +0800 Subject: Made all beings capable of having a gender Reviewed-by: o11c, bjorn, Bertram. --- src/scripting/lua.cpp | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'src/scripting/lua.cpp') diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 1bb75137..9f905bcd 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -27,6 +27,7 @@ extern "C" { #include } +#include "common/defines.h" #include "common/resourcemanager.h" #include "game-server/accountconnection.h" #include "game-server/buysell.h" @@ -191,13 +192,16 @@ static int npc_create(lua_State *s) { const char *name = luaL_checkstring(s, 1); const int id = luaL_checkint(s, 2); - const int x = luaL_checkint(s, 3); - const int y = luaL_checkint(s, 4); + const int gender = luaL_checkint(s, 3); + const int x = luaL_checkint(s, 4); + const int y = luaL_checkint(s, 5); lua_pushlightuserdata(s, (void *)®istryKey); lua_gettable(s, LUA_REGISTRYINDEX); Script *t = static_cast