[Quest API] Add RemoveAAPoints() and AA Loss Event to Perl/Lua (#4174)

* [Quest API] Add RemoveAAPoints() and AA Loss Event to Perl/Lua

# Perl
- Add `$client->RemoveAAPoints(points)`.
- Add `EVENT_AA_LOSS`, exports `$aa_lost`.

# Lua
- Add `client:RemoveAAPoints(points)`.
- Add `event_aa_loss`, exports `e.aa_lost`.

# Notes
- Allows operators to more easily remove AA Points.
- Has a bool return type that will return false if the player does not have enough AA Points to complete the removal.

* Update client.cpp
This commit is contained in:
Alex King
2024-03-08 21:20:33 -05:00
committed by GitHub
parent 96370e0298
commit 3bfb148bdc
11 changed files with 80 additions and 3 deletions
+6
View File
@@ -3103,6 +3103,11 @@ bool Perl_Client_IsInAGuild(Client* self)
return self->IsInAGuild();
}
bool Perl_Client_RemoveAAPoints(Client* self, uint32 points)
{
return self->RemoveAAPoints(points);
}
void perl_register_client()
{
perl::interpreter perl(PERL_GET_THX);
@@ -3470,6 +3475,7 @@ void perl_register_client()
package.add("ReadBookByName", &Perl_Client_ReadBookByName);
package.add("RefundAA", &Perl_Client_RefundAA);
package.add("ReloadDataBuckets", &Perl_Client_ReloadDataBuckets);
package.add("RemoveAAPoints", &Perl_Client_RemoveAAPoints);
package.add("RemoveAllExpeditionLockouts", (void(*)(Client*))&Perl_Client_RemoveAllExpeditionLockouts);
package.add("RemoveAllExpeditionLockouts", (void(*)(Client*, std::string))&Perl_Client_RemoveAllExpeditionLockouts);
package.add("RemoveEbonCrystals", &Perl_Client_RemoveEbonCrystals);