diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-06-10 15:11:11 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-07-07 21:56:14 +0200 |
commit | 68158fffc6d2b28856e7b8f9f11e26131c1f3761 (patch) | |
tree | af177a1bc0b3b0c1df911f3c80d5c67c2ff51cd6 /src/scripting/luautil.h | |
parent | 4cf22065e9f2b24eb481959aa65667ef1bd0724d (diff) | |
download | manaserv-68158fffc6d2b28856e7b8f9f11e26131c1f3761.tar.gz manaserv-68158fffc6d2b28856e7b8f9f11e26131c1f3761.tar.bz2 manaserv-68158fffc6d2b28856e7b8f9f11e26131c1f3761.tar.xz manaserv-68158fffc6d2b28856e7b8f9f11e26131c1f3761.zip |
Added script binds for getting attack information
New binds:
- Damage:
- id
- skill
- base
- delta
- cth
- element
- type
- truestrike
- range
- Attack:
- priority
- cooldown
- warmup
- global_cooldown
- damage
- on_attack
- MonsterClass:
- attacks
- ItemClass:
- attacks
Diffstat (limited to 'src/scripting/luautil.h')
-rw-r--r-- | src/scripting/luautil.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/scripting/luautil.h b/src/scripting/luautil.h index 2395f211..e2ee5737 100644 --- a/src/scripting/luautil.h +++ b/src/scripting/luautil.h @@ -34,10 +34,12 @@ extern "C" { #include <set> #include <vector> +#include "game-server/attack.h" #include "game-server/specialmanager.h" class Being; class Character; +class Entity; class ItemClass; class MapComposite; class MapObject; @@ -45,7 +47,6 @@ class Monster; class MonsterClass; class NPC; class StatusEffect; -class Entity; // Report script errors and interrupt the script. void raiseScriptError(lua_State *s, const char *format, ...); @@ -150,6 +151,8 @@ private: template <typename T> const char * LuaUserData<T>::mTypeName; +typedef LuaUserData<AttackInfo> LuaAttackInfo; +typedef LuaUserData<Damage> LuaDamage; typedef LuaUserData<ItemClass> LuaItemClass; typedef LuaUserData<MapObject> LuaMapObject; typedef LuaUserData<MonsterClass> LuaMonsterClass; @@ -185,6 +188,11 @@ void push(lua_State *s, const std::string &val); void push(lua_State *s, Entity *val); void push(lua_State *s, double val); +inline void push(lua_State *s, AttackInfo *val) +{ + LuaAttackInfo::push(s, val); +} + inline void push(lua_State *s, MapObject *val) { LuaMapObject::push(s, val); |