/* EQEmu: EQEmulator
Copyright (C) 2001-2026 EQEmu Development Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#ifdef LUA_EQEMU
#include "lua_entity.h"
#include "zone/entity.h"
#include "zone/lua_bot.h"
#include "zone/lua_client.h"
#include "zone/lua_corpse.h"
#include "zone/lua_door.h"
#include "zone/lua_merc.h"
#include "zone/lua_mob.h"
#include "zone/lua_npc.h"
#include "zone/lua_object.h"
#include "luabind/luabind.hpp"
bool Lua_Entity::IsClient() {
Lua_Safe_Call_Bool();
return self->IsClient();
}
bool Lua_Entity::IsNPC() {
Lua_Safe_Call_Bool();
return self->IsNPC();
}
bool Lua_Entity::IsMob() {
Lua_Safe_Call_Bool();
return self->IsMob();
}
bool Lua_Entity::IsMerc() {
Lua_Safe_Call_Bool();
return self->IsMerc();
}
bool Lua_Entity::IsCorpse() {
Lua_Safe_Call_Bool();
return self->IsCorpse();
}
bool Lua_Entity::IsPlayerCorpse() {
Lua_Safe_Call_Bool();
return self->IsPlayerCorpse();
}
bool Lua_Entity::IsNPCCorpse() {
Lua_Safe_Call_Bool();
return self->IsNPCCorpse();
}
bool Lua_Entity::IsObject() {
Lua_Safe_Call_Bool();
return self->IsObject();
}
bool Lua_Entity::IsDoor() {
Lua_Safe_Call_Bool();
return self->IsDoor();
}
bool Lua_Entity::IsTrap() {
Lua_Safe_Call_Bool();
return self->IsTrap();
}
bool Lua_Entity::IsBeacon() {
Lua_Safe_Call_Bool();
return self->IsBeacon();
}
bool Lua_Entity::IsEncounter() {
Lua_Safe_Call_Bool();
return self->IsEncounter();
}
bool Lua_Entity::IsBot() {
Lua_Safe_Call_Bool();
return self->IsBot();
}
bool Lua_Entity::IsAura() {
Lua_Safe_Call_Bool();
return self->IsAura();
}
bool Lua_Entity::IsOfClientBot() {
Lua_Safe_Call_Bool();
return self->IsOfClientBot();
}
bool Lua_Entity::IsOfClientBotMerc() {
Lua_Safe_Call_Bool();
return self->IsOfClientBotMerc();
}
int Lua_Entity::GetID() {
Lua_Safe_Call_Bool();
return self->GetID();
}
Lua_Client Lua_Entity::CastToClient() {
void *d = GetLuaPtrData();
Client *m = reinterpret_cast(d);
return Lua_Client(m);
}
Lua_NPC Lua_Entity::CastToNPC() {
void *d = GetLuaPtrData();
NPC *m = reinterpret_cast(d);
return Lua_NPC(m);
}
Lua_Mob Lua_Entity::CastToMob() {
void *d = GetLuaPtrData();
Mob *m = reinterpret_cast(d);
return Lua_Mob(m);
}
Lua_Corpse Lua_Entity::CastToCorpse() {
void *d = GetLuaPtrData();
Corpse *m = reinterpret_cast(d);
return Lua_Corpse(m);
}
Lua_Object Lua_Entity::CastToObject() {
void *d = GetLuaPtrData();
Object *m = reinterpret_cast