mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 22:56:37 +00:00
[Quest API] Add GetRandomBot() to Perl/Lua (#2543)
* [Quest API] Add GetRandomBot() to Perl/lua. # Perl - Add `$entity_list->GetRandomBot()` to Perl. - Add `$entity_list->GetRandomBot(x, y, z, distance)` to Perl. - Add `$entity_list->GetRandomBot(x, y, z, distance, exclude_bot)` to Perl. # Lua - Add `eq.get_entity_list():GetRandomBot()` to Lua. - Add `eq.get_entity_list():GetRandomBot(x, y, z, distance)` to Lua. - Add `eq.get_entity_list():GetRandomBot(x, y, z, distance, exclude_bot)` to Lua. # Notes - Allows operators to grab a random Bot from entity list similar to Client, Mob, and NPC. * Cleanup and fix Perl distance. - Perl distance was sending as already squared, Lua was not. - Send as non-squared and square in the method so that both work the same. * Update entity.cpp * Update entity.cpp
This commit is contained in:
@@ -189,6 +189,11 @@ public:
|
||||
Client *GetClientByWID(uint32 iWID);
|
||||
Client *GetClientByLSID(uint32 iLSID);
|
||||
Client *GetClient(uint32 ip, uint16 port);
|
||||
|
||||
#ifdef BOTS
|
||||
Bot* GetRandomBot(const glm::vec3& location = glm::vec3(0.f), float distance = 0, Bot* exclude_bot = nullptr);
|
||||
#endif
|
||||
|
||||
Client* GetRandomClient(const glm::vec3& location = glm::vec3(0.f), float distance = 0, Client* exclude_client = nullptr);
|
||||
NPC* GetRandomNPC(const glm::vec3& location = glm::vec3(0.f), float distance = 0, NPC* exclude_npc = nullptr);
|
||||
Mob* GetRandomMob(const glm::vec3& location = glm::vec3(0.f), float distance = 0, Mob* exclude_mob = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user