diff options
Diffstat (limited to 'src/common/HPMi.h')
-rw-r--r-- | src/common/HPMi.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 485586f6f..a7435b437 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -136,10 +136,16 @@ enum HPluginConfType { /* HPMi->addScript */ #define addScriptCommand(cname,scinfo,funcname) \ if ( HPMi->addScript != NULL ) { \ - HPMi->addScript(cname,scinfo,buildin_ ## funcname); \ + HPMi->addScript(cname,scinfo,buildin_ ## funcname, false); \ } else { \ ShowWarning("HPM (%s):addScriptCommand(\"%s\",\"%s\",%s) failed, addScript sub is NULL!\n",pinfo.name,cname,scinfo,# funcname);\ } +#define addScriptCommandDeprecated(cname,scinfo,funcname) \ + if ( HPMi->addScript != NULL ) { \ + HPMi->addScript(cname,scinfo,buildin_ ## funcname, true); \ + } else { \ + ShowWarning("HPM (%s):addScriptCommandDeprecated(\"%s\",\"%s\",%s) failed, addScript sub is NULL!\n",pinfo.name,cname,scinfo,# funcname);\ + } /* HPMi->addCPCommand */ #define addCPCommand(cname,funcname) \ if ( HPMi->addCPCommand != NULL ) { \ @@ -162,7 +168,7 @@ HPExport struct HPMi_interface { /* */ void (*event[HPET_MAX]) (void); bool (*addCommand) (char *name, bool (*func)(const int fd, struct map_session_data* sd, const char* command, const char* message,struct AtCommandInfo *info)); - bool (*addScript) (char *name, char *args, bool (*func)(struct script_state *st)); + bool (*addScript) (char *name, char *args, bool (*func)(struct script_state *st), bool isDeprecated); void (*addCPCommand) (char *name, CParseFunc func); /* HPM Custom Data */ void (*addToHPData) (enum HPluginDataTypes type, unsigned int pluginID, void *ptr, void *data, unsigned int index, bool autofree); |