mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 22:06:46 +00:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user