mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 15:00:25 +00:00
[Quest API] Add client->ReadBookByName(book_name, book_type) to Perl/Lua.
- Add $client->ReadBookByName(booK_name, book_type) to Perl. - Add client:ReadBookByName(booK_name, book_type) to Lua. - Allows server operators to put books in to their database and read from their database instead of storing the values in a script, also allows them to read pre-existing books using a script.
This commit is contained in:
@@ -5693,6 +5693,21 @@ XS(XS_Client_DiaWind) {
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
XS(XS_Client_ReadBookByName);
|
||||
XS(XS_Client_ReadBookByName) {
|
||||
dXSARGS;
|
||||
if (items != 3)
|
||||
Perl_croak(aTHX_ "Usage: Client::ReadBookByName(THIS, string book_name, uint8 book_type)"); // @categories Script Utility
|
||||
{
|
||||
Client *THIS;
|
||||
std::string book_name(SvPV_nolen(ST(1)));
|
||||
uint8 book_type = (uint8) SvUV(ST(2));
|
||||
VALIDATE_THIS_IS_CLIENT;
|
||||
THIS->ReadBookByName(book_name, book_type);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
XS(XS_Client_UntrainDiscBySpellID); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Client_UntrainDiscBySpellID) {
|
||||
dXSARGS;
|
||||
@@ -6078,6 +6093,7 @@ XS(boot_Client) {
|
||||
newXSproto(strcpy(buf, "UpdateWho"), XS_Client_UpdateWho, file, "$;$");
|
||||
newXSproto(strcpy(buf, "UseDiscipline"), XS_Client_UseDiscipline, file, "$$$");
|
||||
newXSproto(strcpy(buf, "WorldKick"), XS_Client_WorldKick, file, "$");
|
||||
newXSproto(strcpy(buf, "ReadBookByName"), XS_Client_ReadBookByName, file, "$$$");
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user