Export clear_npctype_cache as both lua/perl general functions.

This commit is contained in:
KimLS
2014-02-01 14:55:51 -08:00
parent 6e0a214bcc
commit 8b1262b198
5 changed files with 31 additions and 2 deletions
+17
View File
@@ -3353,6 +3353,22 @@ XS(XS__disablerecipe)
XSRETURN_YES;
}
XS(XS__clear_npctype_cache);
XS(XS__clear_npctype_cache)
{
dXSARGS;
if (items != 1) {
Perl_croak(aTHX_ "Usage: clear_npctype_cache(npc_id)");
}
else {
int32 npctype_id = (int32)SvIV(ST(0));
quest_manager.ClearNPCTypeCache(npctype_id);
}
XSRETURN_EMPTY;
}
/*
This is the callback perl will look for to setup the
quest package's XSUBs
@@ -3573,6 +3589,7 @@ EXTERN_C XS(boot_quest)
newXS(strcpy(buf, "crosszonemessageplayerbyname"), XS__crosszonemessageplayerbyname, file);
newXS(strcpy(buf, "enablerecipe"), XS__enablerecipe, file);
newXS(strcpy(buf, "disablerecipe"), XS__disablerecipe, file);
newXS(strcpy(buf, "clear_npctype_cache"), XS__clear_npctype_cache, file);
XSRETURN_YES;
}