mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 16:46:37 +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,28 @@
|
||||
#ifndef EQEMU_LUA_ITEM_H
|
||||
#define EQEMU_LUA_ITEM_H
|
||||
#ifdef LUA_EQEMU
|
||||
|
||||
#include "lua_ptr.h"
|
||||
|
||||
struct SPDat_Spell_Struct;
|
||||
|
||||
class Lua_Spell : public Lua_Ptr
|
||||
{
|
||||
typedef SPDat_Spell_Struct NativeType;
|
||||
public:
|
||||
Lua_Spell() { }
|
||||
Lua_Spell(SPDat_Spell_Struct *d) : Lua_Ptr(d) { }
|
||||
virtual ~Lua_Spell() { }
|
||||
|
||||
operator SPDat_Spell_Struct*() {
|
||||
void *d = GetLuaPtrData();
|
||||
if(d) {
|
||||
return reinterpret_cast<SPDat_Spell_Struct*>(d);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user