mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 04:28:00 +00:00
[Commands] Add #unmemspell and #unmemspells Commands. (#1867)
- Add #unmemspell [Spell ID] command to unmemorize a spell by ID from you or your target. - Add #unmemspells command to unmemorize all spells from you or your target. - Cleanup #memspell command and change arguments from #memspell [Slot] [Spell ID] to #memspell [Spell ID] [Spell Gem] for easier use. - Add #memspell [Spell ID] functionality to memorize to first open spell gem if there are any using FindEmptyMemSlot helper method. - Rename client->FindMemmedSpellByID(spell_id) to FindMemmedSpellBySpellID(spell_id). - Add client->FindEmptyMemSlot() helper method. - Add $client->FindEmptyMemSlot() to Perl. - Add client:FindEmptyMemSlot() to Lua. - Add $client->FindMemmedSpellBySpellID(spell_id) to Perl. - Add client:FindMemmedSpellBySpellID(spell_id) to Lua.
This commit is contained in:
@@ -1897,6 +1897,23 @@ XS(XS_Client_UnmemSpellAll) {
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
XS(XS_Client_FindEmptyMemSlot); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Client_FindEmptyMemSlot) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Client::FindEmptyMemSlot(THIS)"); // @categories Account and Character, Spells and Disciplines
|
||||
{
|
||||
Client *THIS;
|
||||
int RETVAL;
|
||||
dXSTARG;
|
||||
VALIDATE_THIS_IS_CLIENT;
|
||||
RETVAL = THIS->FindEmptyMemSlot();
|
||||
XSprePUSH;
|
||||
PUSHi((IV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Client_FindMemmedSpellBySlot); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Client_FindMemmedSpellBySlot) {
|
||||
dXSARGS;
|
||||
@@ -1915,6 +1932,24 @@ XS(XS_Client_FindMemmedSpellBySlot) {
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Client_FindMemmedSpellBySpellID); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Client_FindMemmedSpellBySpellID) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Client::FindMemmedSpellBySpellID(THIS, uint16 spell_id)"); // @categories Account and Character, Spells and Disciplines
|
||||
{
|
||||
Client *THIS;
|
||||
int RETVAL;
|
||||
dXSTARG;
|
||||
uint16 spell_id = (uint16) SvUV(ST(1));
|
||||
VALIDATE_THIS_IS_CLIENT;
|
||||
RETVAL = THIS->FindMemmedSpellBySpellID(spell_id);
|
||||
XSprePUSH;
|
||||
PUSHi((IV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Client_MemmedCount); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Client_MemmedCount) {
|
||||
dXSARGS;
|
||||
@@ -5960,7 +5995,9 @@ XS(boot_Client) {
|
||||
newXSproto(strcpy(buf, "Escape"), XS_Client_Escape, file, "$");
|
||||
newXSproto(strcpy(buf, "ExpeditionMessage"), XS_Client_ExpeditionMessage, file, "$$$");
|
||||
newXSproto(strcpy(buf, "FailTask"), XS_Client_FailTask, file, "$$");
|
||||
newXSproto(strcpy(buf, "FindEmptyMemSlot"), XS_Client_FindEmptyMemSlot, file, "$");
|
||||
newXSproto(strcpy(buf, "FindMemmedSpellBySlot"), XS_Client_FindMemmedSpellBySlot, file, "$$");
|
||||
newXSproto(strcpy(buf, "FindMemmedSpellBySpellID"), XS_Client_FindMemmedSpellBySpellID, file, "$$");
|
||||
newXSproto(strcpy(buf, "Fling"), XS_Client_Fling, file, "$$$$$;$$");
|
||||
newXSproto(strcpy(buf, "ForageItem"), XS_Client_ForageItem, file, "$");
|
||||
newXSproto(strcpy(buf, "Freeze"), XS_Client_Freeze, file, "$");
|
||||
|
||||
Reference in New Issue
Block a user