[Quest API] Add MaxSkills() to Perl/Lua. (#2621)

* [Quest API] Add MaxSkills() to Perl/Lua.

# Perl
- Add `$client->MaxSkills()`.

# Lua
- Add `client:MaxSkills()`.

# Notes
- Allows operators an easy short hand for maxing a player's skills for their level without needing to do all the looping and stuff on their own.

* Cleanup.

* Only set if it's higher than skill level player has.

* Add constant.
This commit is contained in:
Alex King
2022-12-06 08:46:21 -05:00
committed by GitHub
parent 91ea6462f2
commit f7fb1c9fe1
7 changed files with 45 additions and 14 deletions
+6
View File
@@ -2767,6 +2767,11 @@ std::string Perl_Client_GetGuildPublicNote(Client* self)
return self->GetGuildPublicNote();
}
void Perl_Client_MaxSkills(Client* self)
{
self->MaxSkills();
}
#ifdef BOTS
int Perl_Client_GetBotRequiredLevel(Client* self)
@@ -3126,6 +3131,7 @@ void perl_register_client()
package.add("MaxSkill", (int(*)(Client*, uint16))&Perl_Client_MaxSkill);
package.add("MaxSkill", (int(*)(Client*, uint16, uint16))&Perl_Client_MaxSkill);
package.add("MaxSkill", (int(*)(Client*, uint16, uint16, uint16))&Perl_Client_MaxSkill);
package.add("MaxSkills", &Perl_Client_MaxSkills);
package.add("MemSpell", (void(*)(Client*, uint16, int))&Perl_Client_MemSpell);
package.add("MemSpell", (void(*)(Client*, uint16, int, bool))&Perl_Client_MemSpell);
package.add("MemmedCount", &Perl_Client_MemmedCount);