eqemu-server/zone/gm_commands/max_all_skills.cpp
Alex King f7fb1c9fe1
[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.
2022-12-06 08:46:21 -05:00

21 lines
332 B
C++
Executable File

#include "../client.h"
void command_max_all_skills(Client *c, const Seperator *sep)
{
auto t = c;
if (c->GetTarget() && c->GetTarget()->IsClient()) {
t = c->GetTarget()->CastToClient();
}
t->MaxSkills();
c->Message(
Chat::White,
fmt::format(
"Maxed skills for {}.",
c->GetTargetDescription(t)
).c_str()
);
}