[Quest API] Add GetRandomMob() and GetRandomNPC() to Perl/Lua. (#2006)

- Add $entity_list->GetRandomMob(x, y, z, distance, exclude_mob) to Perl.
- Add $entity_list->GetRandomNPC(x, y, z, distance, exclude_npc) to Perl.
- Add eq.get_entity_list():GetRandomMob(x, y, z, distance, exclude_mob) to Lua.
- Add eq.get_entity_list():GetRandomNPC(x, y, z, distance, exclude_npc) to Lua.
This commit is contained in:
Kinglykrab
2022-02-17 08:57:02 -05:00
committed by GitHub
parent 4de5a7b86d
commit 0d02fadb60
5 changed files with 159 additions and 24 deletions
+3 -1
View File
@@ -189,7 +189,9 @@ public:
Client *GetClientByWID(uint32 iWID);
Client *GetClientByLSID(uint32 iLSID);
Client *GetClient(uint32 ip, uint16 port);
Client *GetRandomClient(const glm::vec3& location, float Distance, Client *ExcludeClient = nullptr);
Client* GetRandomClient(const glm::vec3& location, float distance, Client* exclude_client = nullptr);
NPC* GetRandomNPC(const glm::vec3& location, float distance, NPC* exclude_npc = nullptr);
Mob* GetRandomMob(const glm::vec3& location, float distance, Mob* exclude_mob = nullptr);
Group *GetGroupByMob(Mob* mob);
Group *GetGroupByClient(Client* client);
Group *GetGroupByID(uint32 id);