Add getcharidbyname(name) to Perl/Lua.

This commit is contained in:
Alex
2020-04-05 20:41:49 -04:00
parent 3c71e2c91d
commit 41d0b1a947
4 changed files with 28 additions and 0 deletions
+18
View File
@@ -3231,6 +3231,23 @@ XS(XS__saylink) {
XSRETURN(1);
}
XS(XS__getcharidbyname);
XS(XS__getcharidbyname) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: quest::getcharidbyname(string name)");
dXSTARG;
uint32 RETVAL;
const char *name = (const char *) SvPV_nolen(ST(0));
RETVAL = quest_manager.getcharidbyname(name);
XSprePUSH;
PUSHu((UV)RETVAL);
XSRETURN(1);
}
XS(XS__getguildnamebyid);
XS(XS__getguildnamebyid) {
dXSARGS;
@@ -4072,6 +4089,7 @@ EXTERN_C XS(boot_quest) {
newXS(strcpy(buf, "follow"), XS__follow, file);
newXS(strcpy(buf, "forcedoorclose"), XS__forcedoorclose, file);
newXS(strcpy(buf, "forcedooropen"), XS__forcedooropen, file);
newXS(strcpy(buf, "getcharidbyname"), XS__getcharidbyname, file);
newXS(strcpy(buf, "getinventoryslotid"), XS__getinventoryslotid, file);
newXS(strcpy(buf, "getitemname"), XS__getitemname, file);
newXS(strcpy(buf, "getItemName"), XS_qc_getItemName, file);