mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Cleanup of some lua code, initial work on encounter_quests
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include "lua_client.h"
|
||||
#include "lua_npc.h"
|
||||
|
||||
#include "lua.hpp"
|
||||
#include <luabind/luabind.hpp>
|
||||
|
||||
bool Lua_Entity::IsClient() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsClient();
|
||||
@@ -84,4 +87,26 @@ Lua_Mob Lua_Entity::CastToMob() {
|
||||
return Lua_Mob(m);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_entity() {
|
||||
return luabind::class_<Lua_Entity>("Entity")
|
||||
.def(luabind::constructor<>())
|
||||
.property("null", &Lua_Entity::Null)
|
||||
.property("valid", &Lua_Entity::Valid)
|
||||
.def("IsClient", &Lua_Entity::IsClient)
|
||||
.def("IsNPC", &Lua_Entity::IsNPC)
|
||||
.def("IsMob", &Lua_Entity::IsMob)
|
||||
.def("IsMerc", &Lua_Entity::IsMerc)
|
||||
.def("IsCorpse", &Lua_Entity::IsCorpse)
|
||||
.def("IsPlayerCorpse", &Lua_Entity::IsPlayerCorpse)
|
||||
.def("IsNPCCorpse", &Lua_Entity::IsNPCCorpse)
|
||||
.def("IsObject", &Lua_Entity::IsObject)
|
||||
.def("IsDoor", &Lua_Entity::IsDoor)
|
||||
.def("IsTrap", &Lua_Entity::IsTrap)
|
||||
.def("IsBeacon", &Lua_Entity::IsBeacon)
|
||||
.def("GetID", &Lua_Entity::GetID)
|
||||
.def("CastToClient", &Lua_Entity::CastToClient)
|
||||
.def("CastToNPC", &Lua_Entity::CastToNPC)
|
||||
.def("CastToMob", &Lua_Entity::CastToMob);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user