diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-04-15 22:15:31 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-04-15 22:15:31 +0200 |
commit | c53bc90dbaa876a86f762a3d864b1f920e2b8071 (patch) | |
tree | 1a8174f4d1745a4799210db970aa2230df622d34 /src/scripting/luautil.h | |
parent | b89e404f85358f2e3ff87d7731376dbeacdf9778 (diff) | |
parent | 81be8dc99ba7558c8915310eed095df43e3bdbf7 (diff) | |
download | manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.gz manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.bz2 manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.xz manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.zip |
Merge branch 'master' into lpc2012
Conflicts:
src/account-server/accounthandler.cpp
src/game-server/character.cpp
Diffstat (limited to 'src/scripting/luautil.h')
-rw-r--r-- | src/scripting/luautil.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/scripting/luautil.h b/src/scripting/luautil.h index 8e380d4e..6d078e3e 100644 --- a/src/scripting/luautil.h +++ b/src/scripting/luautil.h @@ -37,15 +37,12 @@ extern "C" { #include "game-server/attack.h" #include "game-server/specialmanager.h" -class Being; -class Character; +class CharacterComponent; class Entity; class ItemClass; class MapComposite; class MapObject; -class Monster; class MonsterClass; -class NPC; class StatusEffect; void raiseWarning(lua_State *s, const char *format, ...); @@ -159,6 +156,7 @@ template <typename T> const char * LuaUserData<T>::mTypeName; typedef LuaUserData<AttackInfo> LuaAttackInfo; typedef LuaUserData<Damage> LuaDamage; +typedef LuaUserData<Entity> LuaEntity; typedef LuaUserData<ItemClass> LuaItemClass; typedef LuaUserData<MapObject> LuaMapObject; typedef LuaUserData<MonsterClass> LuaMonsterClass; @@ -167,19 +165,16 @@ typedef LuaUserData<SpecialManager::SpecialInfo> LuaSpecialInfo; Script * getScript(lua_State *s); -Being * getBeing(lua_State *s, int p); -Character * getCharacter(lua_State *s, int p); ItemClass * getItemClass(lua_State *s, int p); -Monster * getMonster(lua_State *s, int p); MonsterClass * getMonsterClass(lua_State *s, int p); -NPC * getNPC(lua_State *s, int p); -Being * checkBeing(lua_State *s, int p); -Character * checkCharacter(lua_State *s, int p); +Entity * checkActor(lua_State *s, int p); +Entity * checkBeing(lua_State *s, int p); +Entity * checkCharacter(lua_State *s, int p); ItemClass * checkItemClass(lua_State *s, int p); -Monster * checkMonster(lua_State *s, int p); +Entity * checkMonster(lua_State *s, int p); MonsterClass * checkMonsterClass(lua_State *s, int p); -NPC * checkNPC(lua_State *s, int p); +Entity * checkNpc(lua_State *s, int p); int checkSkill(lua_State *s, int p); int checkSpecial(lua_State *s, int p); @@ -202,7 +197,7 @@ inline void push(lua_State *s, const std::string &val) inline void push(lua_State *s, Entity *val) { - lua_pushlightuserdata(s, val); + LuaEntity::push(s, val); } inline void push(lua_State *s, double val) |