mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 05:18:40 +00:00
[Quest API] Add GrantAllAAPoints() Overload To Perl/Lua (#4474)
This commit is contained in:
@@ -7,15 +7,16 @@ void command_grantaa(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
const uint8 unlock_level = sep->IsNumber(1) ? static_cast<uint8>(Strings::ToUnsignedInt(sep->arg[1])) : 0;
|
||||
const uint8 unlock_level = sep->IsNumber(1) ? static_cast<uint8>(Strings::ToUnsignedInt(sep->arg[1])) : 0;
|
||||
const bool skip_grant_only = sep->IsNumber(2) ? Strings::ToBool(sep->arg[2]) : false;
|
||||
|
||||
auto t = c->GetTarget()->CastToClient();
|
||||
t->GrantAllAAPoints(unlock_level);
|
||||
t->GrantAllAAPoints(unlock_level, skip_grant_only);
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Successfully granted all Alternate Advancements for {}{}.",
|
||||
"Successfully granted all Alternate Advancements for {}{}{}.",
|
||||
c->GetTargetDescription(t),
|
||||
(
|
||||
unlock_level ?
|
||||
@@ -24,7 +25,8 @@ void command_grantaa(Client *c, const Seperator *sep)
|
||||
unlock_level
|
||||
) :
|
||||
""
|
||||
)
|
||||
),
|
||||
skip_grant_only ? "except for grant only AAs" : ""
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user