eqemu-server/zone/lua_entity.h
Alex King 3335cacac1
[Bots] Cleanup and remove preprocessors. (#2757)
* [Bots] Cleanup and remove preprocessors.

- Removes every `#ifdef BOTS` we have and locks bots behind `Bots:AllowBots` rule.
- Bot updates are now done by default similar to regular database updates.
- Modify `CMakeLists.txt`, `.drone.yml`, and `BUILD.md` to match the removal of `EQEMU_ENABLE_BOTS`.

* Cleanup

- Add SQL for enabling bots for servers with bots.
- Add message that tells players/operators bots are disabled.

* Suggested changes.

* Bot injection stuff

* Change SQL to bot SQL.

* Tweaks

* Remove `is_bot`

* Update version.h

* Update main.cpp

* Update database.cpp

* Fix name availability crash

* Remove bots from update script

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-01-20 12:35:33 -06:00

63 lines
1.0 KiB
C++

#ifndef EQEMU_LUA_ENTITY_H
#define EQEMU_LUA_ENTITY_H
#ifdef LUA_EQEMU
#include "lua_ptr.h"
class Entity;
class Lua_Client;
class Lua_Bot;
class Lua_NPC;
class Lua_Mob;
struct Lua_HateList;
class Lua_Item;
class Lua_ItemInst;
class Lua_Corpse;
class Lua_Object;
class Lua_Door;
namespace luabind {
struct scope;
}
luabind::scope lua_register_entity();
class Lua_Entity : public Lua_Ptr<Entity>
{
typedef Entity NativeType;
public:
Lua_Entity() : Lua_Ptr(nullptr) { }
Lua_Entity(Entity *d) : Lua_Ptr(d) { }
virtual ~Lua_Entity() { }
operator Entity*() {
return reinterpret_cast<Entity*>(GetLuaPtrData());
}
bool IsClient();
bool IsNPC();
bool IsMob();
bool IsMerc();
bool IsCorpse();
bool IsPlayerCorpse();
bool IsNPCCorpse();
bool IsObject();
bool IsDoor();
bool IsTrap();
bool IsBeacon();
bool IsEncounter();
bool IsBot();
int GetID();
Lua_Client CastToClient();
Lua_NPC CastToNPC();
Lua_Mob CastToMob();
Lua_Corpse CastToCorpse();
Lua_Object CastToObject();
Lua_Door CastToDoor();
Lua_Bot CastToBot();
};
#endif
#endif