Expose client method NotifyNewTitlesAvailable for perl and lua

This commit is contained in:
Noudess
2020-05-08 09:58:53 -04:00
parent ca50013334
commit 0a42ded33f
3 changed files with 29 additions and 0 deletions
+22
View File
@@ -5522,6 +5522,27 @@ XS(XS_Client_OpenLFGuildWindow) {
XSRETURN_EMPTY;
}
XS(XS_NotifyNewTitlesAvailable); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_NotifyNewTitlesAvailable) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Client::NotifyNewTitlesAvailable(THIS)");
{
Client *THIS;
if (sv_derived_from(ST(0), "Client")) {
IV tmp = SvIV((SV *) SvRV(ST(0)));
THIS = INT2PTR(Client *, tmp);
} else
Perl_croak(aTHX_ "THIS is not of type Client");
if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->NotifyNewTitlesAvailable();
}
XSRETURN_EMPTY;
}
XS(XS_Client_SignalClient); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_SignalClient) {
dXSARGS;
@@ -6568,6 +6589,7 @@ XS(boot_Client) {
newXSproto(strcpy(buf, "NPCSpawn"), XS_Client_NPCSpawn, file, "$$$;$");
newXSproto(strcpy(buf, "NukeItem"), XS_Client_NukeItem, file, "$$;$");
newXSproto(strcpy(buf, "OpenLFGuildWindow"), XS_Client_OpenLFGuildWindow, file, "$");
newXSproto(strcpy(buf, "NotifyNewTitlesAvailable"), XS_Client_NotifyNewTitlesAvailable, file, "$");
newXSproto(strcpy(buf, "PlayMP3"), XS_Client_PlayMP3, file, "$;$");
newXSproto(strcpy(buf, "Popup2"), XS_Client_Popup2, file, "$$$;$$$$$$$");
newXSproto(strcpy(buf, "QuestReward"), XS_Client_QuestReward, file, "$$;$$$$$$$");