[Quest API] Add getgendername(gender_id) to Perl/Lua. (#1405)

- Add quest::getgendername(gender_id) to Perl.
- Add eq.get_gender_name(gender_id) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
Alex
2021-06-16 11:49:02 -04:00
committed by GitHub
parent f8a72296e6
commit 68fe95786e
4 changed files with 30 additions and 0 deletions
+12
View File
@@ -6774,6 +6774,17 @@ XS(XS__getcleannpcnamebyid) {
XSRETURN(1);
}
XS(XS__getgendername);
XS(XS__getgendername) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: quest::getgendername(uint32 gender_id)");
dXSTARG;
uint32 gender_id = (uint32) SvUV(ST(0));
auto gender_name = quest_manager.getgendername(gender_id);
sv_setpv(TARG, gender_name.c_str());
}
XS(XS__getdeityname);
XS(XS__getdeityname) {
@@ -7054,6 +7065,7 @@ EXTERN_C XS(boot_quest) {
newXS(strcpy(buf, "get_spawn_condition"), XS__get_spawn_condition, file);
newXS(strcpy(buf, "getcharnamebyid"), XS__getcharnamebyid, file);
newXS(strcpy(buf, "getcurrencyitemid"), XS__getcurrencyitemid, file);
newXS(strcpy(buf, "getgendername"), XS__getgendername, file);
newXS(strcpy(buf, "getdeityname"), XS__getdeityname, file);
newXS(strcpy(buf, "getguildnamebyid"), XS__getguildnamebyid, file);
newXS(strcpy(buf, "getguildidbycharid"), XS__getguildidbycharid, file);