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:
+6
-5
@@ -10,13 +10,14 @@ class Lua_Mob : public Lua_Entity
|
||||
{
|
||||
typedef Mob NativeType;
|
||||
public:
|
||||
Lua_Mob() { d_ = nullptr; }
|
||||
Lua_Mob(NativeType *d) { d_ = d; }
|
||||
Lua_Mob() { }
|
||||
Lua_Mob(Mob *d) { SetLuaPtrData(d); }
|
||||
virtual ~Lua_Mob() { }
|
||||
|
||||
operator NativeType* () {
|
||||
if(d_) {
|
||||
return reinterpret_cast<NativeType*>(d_);
|
||||
operator Mob*() {
|
||||
void *d = GetLuaPtrData();
|
||||
if(d) {
|
||||
return reinterpret_cast<Mob*>(d);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user