diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-07-03 22:54:09 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-07-03 22:54:09 -0400 |
commit | c8772d145ea5db993a0d9ebc78f55b977dab1973 (patch) | |
tree | 0817c3a21692f7b7c06917e196b042639181bcbd /src/scripting/lua.cpp | |
parent | 16c8bad4bd1fd32cae60d15e55468d1a2be82d6e (diff) | |
download | manaserv-c8772d145ea5db993a0d9ebc78f55b977dab1973.tar.gz manaserv-c8772d145ea5db993a0d9ebc78f55b977dab1973.tar.bz2 manaserv-c8772d145ea5db993a0d9ebc78f55b977dab1973.tar.xz manaserv-c8772d145ea5db993a0d9ebc78f55b977dab1973.zip |
Makes Skills non hard coded
It should be noted that Jax still needs to update the client
Level calulation seems broken now too
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r-- | src/scripting/lua.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index f5ec0671..f607d976 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -940,13 +940,8 @@ static int chr_get_exp(lua_State *s) } int skill = lua_tointeger(s, 2); - if (skill < CHAR_SKILL_BEGIN || skill >= CHAR_SKILL_END) - { - raiseScriptError(s, "luaChr_GetExp called for nonexistent skill number %d.", skill); - return 0; - } - int exp = c->getExperience(skill - CHAR_SKILL_BEGIN); + int exp = c->getExperience(skill); lua_pushinteger(s, exp); return 1; @@ -969,11 +964,6 @@ static int chr_give_exp(lua_State *s) } int skill = lua_tointeger(s, 2); - if (skill < CHAR_SKILL_BEGIN || skill >= CHAR_SKILL_END) - { - raiseScriptError(s, "luaChr_GiveExp called for nonexistent skill number %d.", skill); - return 0; - } int exp = lua_tointeger(s, 3); |