[Quest API] Add UntrainDiscBySpellID(spell_id, update_client) to Perl/Lua. (#1565)

- Add $client->UntrainDiscBySpellID(spell_id, update_client) to Perl.
- Add client:UntrainDiscBySpellID(spell_id, update_client) to Lua.
This commit is contained in:
Kinglykrab
2021-10-01 23:14:56 -04:00
committed by GitHub
parent 92e03dccb9
commit 2f5d360e53
5 changed files with 56 additions and 11 deletions
+20
View File
@@ -5693,6 +5693,25 @@ XS(XS_Client_DiaWind) {
XSRETURN_EMPTY;
}
XS(XS_Client_UntrainDiscBySpellID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_UntrainDiscBySpellID) {
dXSARGS;
if (items < 2 || items > 3)
Perl_croak(aTHX_ "Usage: Client::UntrainDiscBySpellID(THIS, uint16 spell_id, [bool update_client = true])"); // @categories Spells and Disciplines
{
Client *THIS;
uint16 spell_id = (uint16) SvUV(ST(1));
bool update_client = true;
VALIDATE_THIS_IS_CLIENT;
if (items == 3) {
update_client = (bool) SvTRUE(ST(2));
}
THIS->UntrainDiscBySpellID(spell_id, update_client);
}
XSRETURN_EMPTY;
}
#ifdef __cplusplus
extern "C"
#endif
@@ -5998,6 +6017,7 @@ XS(boot_Client) {
newXSproto(strcpy(buf, "UnscribeSpellAll"), XS_Client_UnscribeSpellAll, file, "$;$");
newXSproto(strcpy(buf, "UntrainDisc"), XS_Client_UntrainDisc, file, "$$;$");
newXSproto(strcpy(buf, "UntrainDiscAll"), XS_Client_UntrainDiscAll, file, "$;$");
newXSproto(strcpy(buf, "UntrainDiscBySpellID"), XS_Client_UntrainDiscBySpellID, file, "$$;$");
newXSproto(strcpy(buf, "UpdateAdmin"), XS_Client_UpdateAdmin, file, "$;$");
newXSproto(strcpy(buf, "SetGMStatus"), XS_Client_SetGMStatus, file, "$$");
newXSproto(strcpy(buf, "UpdateGroupAAs"), XS_Client_UpdateGroupAAs, file, "$$$");