Merge pull request #1012 from EQEmu/getspellname

Add getspellname(spell_id) to Perl/Lua.
This commit is contained in:
Chris Miles
2020-03-31 18:53:20 -05:00
committed by GitHub
4 changed files with 32 additions and 0 deletions
+17
View File
@@ -822,6 +822,22 @@ XS(XS__isdisctome) {
XSRETURN(1);
}
XS(XS__getspellname);
XS(XS__getspellname) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: quest::getspellname(uint32 spell_id)");
dXSTARG;
uint32 spell_id = (int) SvIV(ST(0));
std::string spell_name = quest_manager.getspellname(spell_id);
sv_setpv(TARG, spell_name.c_str());
XSprePUSH;
PUSHTARG;
XSRETURN(1);
}
XS(XS__safemove);
XS(XS__safemove) {
dXSARGS;
@@ -4028,6 +4044,7 @@ EXTERN_C XS(boot_quest) {
newXS(strcpy(buf, "getguildidbycharid"), XS__getguildidbycharid, file);
newXS(strcpy(buf, "getgroupidbycharid"), XS__getgroupidbycharid, file);
newXS(strcpy(buf, "getraididbycharid"), XS__getraididbycharid, file);
newXS(strcpy(buf, "getspellname"), XS__getspellname, file);
newXS(strcpy(buf, "getlevel"), XS__getlevel, file);
newXS(strcpy(buf, "getplayerburiedcorpsecount"), XS__getplayerburiedcorpsecount, file);
newXS(strcpy(buf, "getplayercorpsecount"), XS__getplayercorpsecount, file);