mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] Add Zone Flag Methods to Perl/Lua. (#2574)
* [Quest API] Add Zone Flag Methods to Perl/Lua. # Perl - Add `$client->GetPEQZoneFlags()`. - Add `$client->GetZoneFlags()`. # Lua - Add `client:GetPEQZoneFlags()`. - Add `client:GetZoneFlags()`. # Notes - Allows operators to get a list of all PEQ/zone flags to be looped through or listed out easily without having to have a list of individual zone IDs to check or otherwise. * Update zoning.cpp * Repositories and cleanup.
This commit is contained in:
@@ -2708,6 +2708,30 @@ void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration,
|
||||
}
|
||||
#endif
|
||||
|
||||
perl::array Perl_Client_GetPEQZoneFlags(Client* self)
|
||||
{
|
||||
perl::array a;
|
||||
|
||||
auto l = self->GetPEQZoneFlags();
|
||||
for (const auto& f : l) {
|
||||
a.push_back(f);
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
perl::array Perl_Client_GetZoneFlags(Client* self)
|
||||
{
|
||||
perl::array a;
|
||||
|
||||
auto l = self->GetZoneFlags();
|
||||
for (const auto& f : l) {
|
||||
a.push_back(f);
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
|
||||
int Perl_Client_GetBotRequiredLevel(Client* self)
|
||||
@@ -3011,6 +3035,8 @@ void perl_register_client()
|
||||
package.add("GetThirst", &Perl_Client_GetThirst);
|
||||
package.add("GetTotalSecondsPlayed", &Perl_Client_GetTotalSecondsPlayed);
|
||||
package.add("GetWeight", &Perl_Client_GetWeight);
|
||||
package.add("GetPEQZoneFlags", &Perl_Client_GetPEQZoneFlags);
|
||||
package.add("GetZoneFlags", &Perl_Client_GetZoneFlags);
|
||||
package.add("GoFish", &Perl_Client_GoFish);
|
||||
package.add("GrantAlternateAdvancementAbility", (bool(*)(Client*, int, int))&Perl_Client_GrantAlternateAdvancementAbility);
|
||||
package.add("GrantAlternateAdvancementAbility", (bool(*)(Client*, int, int, bool))&Perl_Client_GrantAlternateAdvancementAbility);
|
||||
|
||||
Reference in New Issue
Block a user