[Quest API] Add several methods to Perl/Lua API for LDoN stuff. (#1356)

- Swapped parameters in mostly unused functions to be theme_id first and points second. (No examples in PEQ quests.)
- Add $client->AddLDoNLoss(theme_id) to Perl.
- Add $client->AddLDoNWin(theme_id) to Perl.
- Add quest::crosszoneaddldonlossbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneaddldonpointsbycharid(character_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbygroupid(group_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyraidid(raid_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyguildid(guild_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyexpeditionid(expedition_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonwinbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyexpeditionid(expedition_id, theme_id) to Perl.
- Fix quest::addldonloss(theme_id) in Perl.
- Fix quest::addldonwin(theme_id) in Perl.
- Add client:AddLDoNLoss(theme_id) to Lua.
- Add client:AddLDoNWin(theme_id) to Lua.
- Add eq.add_ldon_loss(theme_id) to Lua.
- Add eq.add_ldon_points(theme_id, points) to Lua.
- Add eq.add_ldon_win(theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_points_by_char_id(character_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_group_id(group_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_raid_id(raid_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_guild_id(guild_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_expedition_id(expedition_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_win_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_expedition_id(expedition_id, theme_id) to Lua.
This commit is contained in:
Alex
2021-05-24 22:15:41 -04:00
committed by GitHub
parent 15328196e2
commit e14acd6802
14 changed files with 692 additions and 171 deletions
+38 -8
View File
@@ -672,15 +672,15 @@ XS(XS_Client_UpdateLDoNPoints); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_UpdateLDoNPoints) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: Client::UpdateLDoNPoints(THIS, int32 points, uint32 theme)"); // @categories Currency and Points
Perl_croak(aTHX_ "Usage: Client::UpdateLDoNPoints(THIS, uint32 theme_id, int points)"); // @categories Currency and Points
{
Client *THIS;
bool RETVAL;
int32 points = (int32) SvIV(ST(1));
uint32 theme = (uint32) SvUV(ST(2));
bool RETVAL;
uint32 theme_id = (uint32) SvUV(ST(1));
int points = (int) SvIV(ST(2));
VALIDATE_THIS_IS_CLIENT;
RETVAL = THIS->UpdateLDoNPoints(points, theme);
ST(0) = boolSV(RETVAL);
RETVAL = THIS->UpdateLDoNPoints(theme_id, points);
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
@@ -5272,7 +5272,7 @@ XS(XS_Client_SetAAEXPModifier) {
VALIDATE_THIS_IS_CLIENT;
THIS->SetAAEXPModifier(zone_id, aa_modifier);
}
XSRETURN_EMPTY;
XSRETURN_EMPTY;
}
XS(XS_Client_SetEXPModifier);
@@ -5287,7 +5287,35 @@ XS(XS_Client_SetEXPModifier) {
VALIDATE_THIS_IS_CLIENT;
THIS->SetEXPModifier(zone_id, exp_modifier);
}
XSRETURN_EMPTY;
XSRETURN_EMPTY;
}
XS(XS_Client_AddLDoNLoss);
XS(XS_Client_AddLDoNLoss) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Client::AddLDoNLoss(THIS, uint32 theme_id)");
{
Client* THIS;
uint32 theme_id = (uint32) SvUV(ST(1));
VALIDATE_THIS_IS_CLIENT;
THIS->AddLDoNLoss(theme_id);
}
XSRETURN_EMPTY;
}
XS(XS_Client_AddLDoNWin);
XS(XS_Client_AddLDoNWin) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Client::AddLDoNWin(THIS, uint32 theme_id)");
{
Client* THIS;
uint32 theme_id = (uint32) SvUV(ST(1));
VALIDATE_THIS_IS_CLIENT;
THIS->AddLDoNWin(theme_id);
}
XSRETURN_EMPTY;
}
#ifdef __cplusplus
@@ -5318,6 +5346,8 @@ XS(boot_Client) {
newXSproto(strcpy(buf, "AddEXP"), XS_Client_AddEXP, file, "$$;$$");
newXSproto(strcpy(buf, "AddExpeditionLockout"), XS_Client_AddExpeditionLockout, file, "$$$$;$");
newXSproto(strcpy(buf, "AddExpeditionLockoutDuration"), XS_Client_AddExpeditionLockoutDuration, file, "$$$$;$");
newXSproto(strcpy(buf, "AddLDoNLoss"), XS_Client_AddLDoNLoss, file, "$$");
newXSproto(strcpy(buf, "AddLDoNWin"), XS_Client_AddLDoNWin, file, "$$");
newXSproto(strcpy(buf, "AddLevelBasedExp"), XS_Client_AddLevelBasedExp, file, "$$;$$");
newXSproto(strcpy(buf, "AddMoneyToPP"), XS_Client_AddMoneyToPP, file, "$$$$$$");
newXSproto(strcpy(buf, "AddPVPPoints"), XS_Client_AddPVPPoints, file, "$$");