Below is a quest function for getting the instance flag of a character.
Zone\perlparser.cpp
Above XSRETURN_YES;
Insert
Code:
newXS(strcpy(buf, "getinstflag"), XS__getinstflag, file);
zone\perlparser.cpp
Above /*This is the callback perl will look for to setup the
Insert
Code:
XS(XS__getinstflag);
XS(XS__getinstflag)
{
dXSARGS;
if (items != 0)
Perl_croak(aTHX_ "Usage: getinstflag()");
int RETVAL;
dXSTARG;
RETVAL = quest_manager.getinstflag();
XSprePUSH; PUSHu((IV)RETVAL);
XSRETURN(1);
}
Zone\questmgr.h
Near line 179 Insert
zone\questmgr.cpp
At end Insert
Code:
int QuestManager::getinstflag()
{
return (database.GetCharInstFlagNum(initiator->CharacterID()));
}