[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
+7
View File
@@ -2886,6 +2886,12 @@ std::string Lua_Client::GetGuildPublicNote()
return self->GetGuildPublicNote();
}
void Lua_Client::MaxSkills()
{
Lua_Safe_Call_Void();
self->MaxSkills();
}
#ifdef BOTS
int Lua_Client::GetBotRequiredLevel()
@@ -3251,6 +3257,7 @@ luabind::scope lua_register_client() {
.def("Marquee", (void(Lua_Client::*)(uint32, std::string, uint32))&Lua_Client::SendMarqueeMessage)
.def("Marquee", (void(Lua_Client::*)(uint32, uint32, uint32, uint32, uint32, std::string))&Lua_Client::SendMarqueeMessage)
.def("MaxSkill", (int(Lua_Client::*)(int))&Lua_Client::MaxSkill)
.def("MaxSkills", (void(Lua_Client::*)(void))&Lua_Client::MaxSkills)
.def("MemSpell", (void(Lua_Client::*)(int,int))&Lua_Client::MemSpell)
.def("MemSpell", (void(Lua_Client::*)(int,int,bool))&Lua_Client::MemSpell)
.def("MemmedCount", (int(Lua_Client::*)(void))&Lua_Client::MemmedCount)