#ifndef EQEMU_LUA_ENTITY_H #define EQEMU_LUA_ENTITY_H #ifdef LUA_EQEMU #include "lua_ptr.h" class Entity; class Lua_Client; class Lua_NPC; class Lua_Mob; struct Lua_HateList; class Lua_Item; class Lua_ItemInst; namespace luabind { struct scope; } luabind::scope lua_register_entity(); class Lua_Entity : public Lua_Ptr { typedef Entity NativeType; public: Lua_Entity() { } Lua_Entity(Entity *d) : Lua_Ptr(d) { } virtual ~Lua_Entity() { } operator Entity*() { void *d = GetLuaPtrData(); if(d) { return reinterpret_cast(d); } return nullptr; } bool IsClient(); bool IsNPC(); bool IsMob(); bool IsMerc(); bool IsCorpse(); bool IsPlayerCorpse(); bool IsNPCCorpse(); bool IsObject(); bool IsDoor(); bool IsTrap(); bool IsBeacon(); int GetID(); Lua_Client CastToClient(); Lua_NPC CastToNPC(); Lua_Mob CastToMob(); //Lua_Merc CastToMerc(); //Lua_Corpse CastToCorpse(); //Lua_Object CastToObject(); //Lua_Doors CastToDoors(); //Lua_Trap CastToTrap(); //Lua_Beacon CastToBeacon(); }; #endif #endif