[Quest API] Add ResetCastbarCooldownBySlot / ResetCastbarCooldownBySpellID / ResetAllCastbarCooldowns (#1873)

* New function to reset spellbar in perl/lua ResetCastbarCooldownsBySlot -1 for all slots and anything else to do it by slot number

* Add ResetCastbarCooldownsBySlot / ResetCastbarCooldownsBySpellID / ResetAllCastbarCooldowns
This commit is contained in:
Natedog2012
2021-12-08 21:39:35 -06:00
committed by GitHub
parent 294e51fca7
commit 42f439c4b7
5 changed files with 133 additions and 0 deletions
+44
View File
@@ -5935,6 +5935,47 @@ XS(XS_Client_LearnDisciplines) {
XSRETURN(1);
}
XS(XS_Client_ResetCastbarCooldownBySlot);
XS(XS_Client_ResetCastbarCooldownBySlot) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Client::ResetCastbarCooldownBySlot(THIS, int slot)");
{
Client* THIS;
int slot = (int) SvIV(ST(1));
VALIDATE_THIS_IS_CLIENT;
THIS->ResetCastbarCooldownBySlot(slot);
}
XSRETURN_EMPTY;
}
XS(XS_Client_ResetAllCastbarCooldowns);
XS(XS_Client_ResetAllCastbarCooldowns) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Client::ResetAllCastbarCooldowns(THIS)");
{
Client* THIS;
VALIDATE_THIS_IS_CLIENT;
THIS->ResetAllCastbarCooldowns();
}
XSRETURN_EMPTY;
}
XS(XS_Client_ResetCastbarCooldownBySpellID);
XS(XS_Client_ResetCastbarCooldownBySpellID) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Client::ResetCastbarCooldownBySpellID(THIS, uint32 spell_id)");
{
Client* THIS;
uint32 spell_id = (uint32) SvUV(ST(1));
VALIDATE_THIS_IS_CLIENT;
THIS->ResetCastbarCooldownBySpellID(spell_id);
}
XSRETURN_EMPTY;
}
#ifdef __cplusplus
extern "C"
#endif
@@ -6169,6 +6210,9 @@ XS(boot_Client) {
newXSproto(strcpy(buf, "RemoveNoRent"), XS_Client_RemoveNoRent, file, "$");
newXSproto(strcpy(buf, "ResetAA"), XS_Client_ResetAA, file, "$");
newXSproto(strcpy(buf, "ResetAllDisciplineTimers"), XS_Client_ResetAllDisciplineTimers, file, "$");
newXSproto(strcpy(buf, "ResetAllCastbarCooldowns"), XS_Client_ResetAllCastbarCooldowns, file, "$");
newXSproto(strcpy(buf, "ResetCastbarCooldownBySlot"), XS_Client_ResetCastbarCooldownBySlot, file, "$$");
newXSproto(strcpy(buf, "ResetCastbarCooldownBySpellID"), XS_Client_ResetCastbarCooldownBySpellID, file, "$$");
newXSproto(strcpy(buf, "ResetDisciplineTimer"), XS_Client_ResetDisciplineTimer, file, "$$");
newXSproto(strcpy(buf, "ResetTrade"), XS_Client_ResetTrade, file, "$");
newXSproto(strcpy(buf, "Save"), XS_Client_Save, file, "$$");