mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
35 lines
500 B
C++
35 lines
500 B
C++
#ifndef EQEMU_LUA_OBJECT_H
|
|
#define EQEMU_LUA_OBJECT_H
|
|
#ifdef LUA_EQEMU
|
|
|
|
#include "lua_entity.h"
|
|
|
|
class Object;
|
|
|
|
namespace luabind {
|
|
struct scope;
|
|
}
|
|
|
|
luabind::scope lua_register_object();
|
|
|
|
class Lua_Object : public Lua_Entity
|
|
{
|
|
typedef Object NativeType;
|
|
public:
|
|
Lua_Object() { }
|
|
Lua_Object(Object *d) { SetLuaPtrData(d); }
|
|
virtual ~Lua_Object() { }
|
|
|
|
operator Object*() {
|
|
void *d = GetLuaPtrData();
|
|
if(d) {
|
|
return reinterpret_cast<Object*>(d);
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
};
|
|
|
|
#endif
|
|
#endif
|