Added id to spells so i can export them to lua correctly. Also made the lua_classes less messy by having them all derive from Lua_Ptr instead of reimplementing functionality

This commit is contained in:
KimLS
2013-05-16 23:24:47 -07:00
parent b10de6f4e7
commit 3ddc61420b
14 changed files with 121 additions and 56 deletions
+38
View File
@@ -0,0 +1,38 @@
#ifndef EQEMU_LUA_PTR_H
#define EQEMU_LUA_PTR_H
#ifdef LUA_EQEMU
class Lua_Ptr
{
public:
Lua_Ptr() {
}
Lua_Ptr(void *d) : d_(d) {
}
~Lua_Ptr() {
}
void *GetLuaPtrData() {
return d_;
}
void SetLuaPtrData(void *d) {
d_ = d;
}
bool Null() {
return d_ == nullptr;
}
bool Valid() {
return d_ != nullptr;
}
protected:
void *d_;
};
#endif
#endif