From bb9f27f3fa24c9fab756d60ad961b866ad1c7d35 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 8 Jul 2013 18:08:39 -0300 Subject: Fixed compiling errors when CONSOLE_PARSE was disabled Special Thanks to quesoph for bringing this to our attention. Signed-off-by: shennetsind --- src/common/HPM.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 9283360dc..53059d224 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -255,7 +255,9 @@ void hplugins_config_read(void) { } void hplugins_share_defaults(void) { /* console */ +#ifdef CONSOLE_INPUT HPM->share(console->addCommand,"addCPCommand"); +#endif /* core */ HPM->share(&runflag,"runflag"); HPM->share(arg_v,"arg_v"); @@ -311,8 +313,9 @@ void hpm_init(void) { } HPM->symbol_defaults(); +#ifdef CONSOLE_INPUT console->addCommand("plugins",CPCMD_A(plugins)); - +#endif return; } -- cgit v1.2.3-70-g09d2 From 6b9f58446c46877ecfc5fe40847636145acf5af8 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 4 Aug 2013 12:19:25 -0300 Subject: HPM Update - Custom Packet Support - Custom Data Struct Support (currently append-able to map_session_data and socket_data) - Char Server Support - Login Server Support http://hercules.ws/board/topic/1934-hercules-plugin-manager-update/ Documentation will soon be updated in http://hercules.ws/wiki/HPM Signed-off-by: shennetsind --- src/char/char.c | 34 ++++++ src/common/HPM.c | 267 +++++++++++++++++++++++++++++++++++++++++++----- src/common/HPM.h | 32 +++++- src/common/HPMi.h | 29 +++++- src/common/malloc.c | 7 +- src/common/malloc.h | 11 +- src/common/socket.c | 26 ++++- src/common/socket.h | 7 +- src/login/account.h | 2 +- src/login/account_sql.c | 3 +- src/login/login.c | 49 ++++++--- src/map/HPMmap.c | 89 ++++++++++++++++ src/map/HPMmap.h | 18 ++++ src/map/Makefile.in | 4 +- src/map/chrif.c | 14 ++- src/map/clif.c | 9 ++ src/map/map.c | 5 + src/map/pc.h | 3 + src/map/pc_groups.c | 1 + src/map/unit.c | 11 ++ src/plugins/sample.c | 82 ++++++++++++++- 21 files changed, 639 insertions(+), 64 deletions(-) create mode 100644 src/map/HPMmap.c create mode 100644 src/map/HPMmap.h (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index b6ea8e2f6..e6e8732db 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -14,6 +14,7 @@ #include "../common/timer.h" #include "../common/utils.h" #include "../common/console.h" +#include "../common/HPM.h" #include "int_guild.h" #include "int_homun.h" #include "int_mercenary.h" @@ -2150,6 +2151,14 @@ int parse_fromlogin(int fd) { while(RFIFOREST(fd) >= 2) { uint16 command = RFIFOW(fd,0); + + if( HPM->packetsc[hpParse_FromLogin] ) { + if( (i = HPM->parse_packets(fd,hpParse_FromLogin)) ) { + if( i == 1 ) continue; + if( i == 2 ) return 0; + } + } + switch( command ) { // acknowledgement of connect-to-loginserver request @@ -2704,6 +2713,14 @@ int parse_frommap(int fd) } while(RFIFOREST(fd) >= 2) { + + if( HPM->packetsc[hpParse_FromMap] ) { + if( (i = HPM->parse_packets(fd,hpParse_FromMap)) ) { + if( i == 1 ) continue; + if( i == 2 ) return 0; + } + } + switch(RFIFOW(fd,0)) { case 0x2b0a: @@ -3752,6 +3769,13 @@ int parse_char(int fd) //For use in packets that depend on an sd being present [Skotlex] #define FIFOSD_CHECK(rest) { if(RFIFOREST(fd) < rest) return 0; if (sd==NULL || !sd->auth) { RFIFOSKIP(fd,rest); return 0; } } + if( HPM->packetsc[hpParse_Char] ) { + if( (i = HPM->parse_packets(fd,hpParse_Char)) ) { + if( i == 1 ) continue; + if( i == 2 ) return 0; + } + } + cmd = RFIFOW(fd,0); switch( cmd ) { @@ -4874,8 +4898,11 @@ int char_config_read(const char* cfgName) void do_final(void) { int i; + ShowStatus("Terminating...\n"); + HPM->event(HPET_FINAL); + set_all_offline(-1); set_all_offline_sql(); @@ -4967,6 +4994,11 @@ int do_init(int argc, char **argv) { auth_db = idb_alloc(DB_OPT_RELEASE_DATA); online_char_db = idb_alloc(DB_OPT_RELEASE_DATA); + + HPM->share(sql_handle,"sql_handle"); + HPM->config_read(); + HPM->event(HPET_INIT); + mmo_char_sql_init(); char_read_fame_list(); //Read fame lists. @@ -5034,5 +5066,7 @@ int do_init(int argc, char **argv) { runflag = CHARSERVER_ST_RUNNING; } + HPM->event(HPET_READY); + return 0; } diff --git a/src/common/HPM.c b/src/common/HPM.c index 53059d224..3b79febd7 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -22,6 +22,9 @@ #include #endif +struct malloc_interface iMalloc_HPM; +struct malloc_interface *HPMiMalloc; + void hplugin_trigger_event(enum hp_event_types type) { unsigned int i; for( i = 0; i < HPM->plugin_count; i++ ) { @@ -189,12 +192,17 @@ void hplugin_load(const char* filename) { if( !HPM->populate(plugin,filename) ) return; - - if( SERVER_TYPE == SERVER_TYPE_MAP ) { - plugin->hpi->addCommand = HPM->import_symbol("addCommand"); - plugin->hpi->addScript = HPM->import_symbol("addScript"); - plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand"); - } + /* id */ + plugin->hpi->pid = plugin->idx; + /* core */ + plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand"); + plugin->hpi->addPacket = HPM->import_symbol("addPacket"); + plugin->hpi->addToSession = HPM->import_symbol("addToSession"); + plugin->hpi->getFromSession = HPM->import_symbol("getFromSession"); + plugin->hpi->removeFromSession = HPM->import_symbol("removeFromSession"); + /* server specific */ + if( HPM->load_sub ) + HPM->load_sub(plugin); plugin->info = info; plugin->filename = aStrdup(filename); @@ -209,7 +217,8 @@ void hplugin_unload(struct hplugin* plugin) { aFree(plugin->filename); if( plugin->dll ) plugin_close(plugin->dll); - + /* TODO: for manual packet unload */ + /* - Go thru known packets and unlink any belonging to the plugin being removed */ aFree(plugin); if( !HPM->off ) { HPM->plugins[i] = NULL; @@ -253,11 +262,191 @@ void hplugins_config_read(void) { if( HPM->plugin_count ) ShowStatus("HPM: There are '"CL_WHITE"%d"CL_RESET"' plugins loaded, type '"CL_WHITE"plugins"CL_RESET"' to list them\n", HPM->plugin_count); } +CPCMD(plugins) { + if( HPM->plugin_count == 0 ) { + ShowInfo("HPC: there are no plugins loaded\n"); + } else { + unsigned int i; + + ShowInfo("HPC: There are '"CL_WHITE"%d"CL_RESET"' plugins loaded\n",HPM->plugin_count); + + for(i = 0; i < HPM->plugin_count; i++) { + ShowInfo("HPC: - '"CL_WHITE"%s"CL_RESET"' (%s)\n",HPM->plugins[i]->info->name,HPM->plugins[i]->filename); + } + } +} + +void hplugins_addToSession(struct socket_data *sess, void *data, unsigned int id, unsigned int type, bool autofree) { + struct HPluginData *HPData; + unsigned int i; + + for(i = 0; i < sess->hdatac; i++) { + if( sess->hdata[i]->pluginID == id && sess->hdata[i]->type == type ) { + ShowError("HPM->addToSession:%s: error! attempting to insert duplicate struct of id %u and type %u\n",HPM->pid2name(id),id,type); + return; + } + } + + //HPluginData is always same size, probably better to use the ERS + CREATE(HPData, struct HPluginData, 1); + + HPData->pluginID = id; + HPData->type = type; + HPData->flag.free = autofree ? 1 : 0; + HPData->data = data; + + RECREATE(sess->hdata,struct HPluginData *,++sess->hdatac); + sess->hdata[sess->hdatac - 1] = HPData; +} +void *hplugins_getFromSession(struct socket_data *sess, unsigned int id, unsigned int type) { + unsigned int i; + + for(i = 0; i < sess->hdatac; i++) { + if( sess->hdata[i]->pluginID == id && sess->hdata[i]->type == type ) { + break; + } + } + + if( i != sess->hdatac ) + return sess->hdata[i]->data; + + return NULL; +} +void hplugins_removeFromSession(struct socket_data *sess, unsigned int id, unsigned int type) { + unsigned int i; + + for(i = 0; i < sess->hdatac; i++) { + if( sess->hdata[i]->pluginID == id && sess->hdata[i]->type == type ) { + break; + } + } + + if( i != sess->hdatac ) { + unsigned int cursor; + + aFree(sess->hdata[i]->data); + aFree(sess->hdata[i]); + sess->hdata[i] = NULL; + + for(i = 0, cursor = 0; i < sess->hdatac; i++) { + if( sess->hdata[i] == NULL ) + continue; + if( i != cursor ) + sess->hdata[cursor] = sess->hdata[i]; + cursor++; + } + sess->hdatac = cursor; + } + +} + +bool hplugins_addpacket(unsigned short cmd, short length,void (*receive) (int fd),unsigned int point,unsigned int pluginID) { + struct HPluginPacket *packet; + unsigned int i; + + if( point >= hpPHP_MAX ) { + ShowError("HPM->addPacket:%s: unknown point '%u' specified for packet 0x%04x (len %d)\n",HPM->pid2name(pluginID),point,cmd,length); + return false; + } + + for(i = 0; i < HPM->packetsc[point]; i++) { + if( HPM->packets[point][i].cmd == cmd ) { + ShowError("HPM->addPacket:%s: can't add packet 0x%04x, already in use by '%s'!",HPM->pid2name(pluginID),cmd,HPM->pid2name(HPM->packets[point][i].pluginID)); + return false; + } + } + + RECREATE(HPM->packets[point], struct HPluginPacket, ++HPM->packetsc[point]); + packet = &HPM->packets[point][HPM->packetsc[point] - 1]; + + packet->pluginID = pluginID; + packet->cmd = cmd; + packet->len = length; + packet->receive = receive; + + return true; +} +/* + 0 = unknown + 1 = OK + 2 = incomplete + */ +unsigned char hplugins_parse_packets(int fd, enum HPluginPacketHookingPoints point) { + unsigned int i; + + for(i = 0; i < HPM->packetsc[point]; i++) { + if( HPM->packets[point][i].cmd == RFIFOW(fd,0) ) + break; + } + + if( i != HPM->packetsc[point] ) { + struct HPluginPacket *packet = &HPM->packets[point][i]; + short length; + + if( (length = packet->len) == -1 ) { + if( (length = RFIFOW(fd, 2)) < (int)RFIFOREST(fd) ) + return 2; + } + + packet->receive(fd); + RFIFOSKIP(fd, length); + return 1; + } + + return 0; +} + +char *hplugins_id2name (unsigned int pid) { + unsigned int i; + + for( i = 0; i < HPM->plugin_count; i++ ) { + if( HPM->plugins[i]->idx == pid ) + return HPM->plugins[i]->info->name; + } + + return "UnknownPlugin"; +} +char* HPM_file2ptr(const char *file) { + unsigned int i; + + for(i = 0; i < HPM->fnamec; i++) { + if( HPM->fnames[i].addr == file ) + return HPM->fnames[i].name; + } + + i = HPM->fnamec; + + /* we handle this memory outside of the server's memory manager because we need it to exist after the memory manager goes down */ + HPM->fnames = realloc(HPM->fnames,(++HPM->fnamec)*sizeof(struct HPMFileNameCache)); + + HPM->fnames[i].addr = file; + HPM->fnames[i].name = strdup(file); + + return HPM->fnames[i].name; +} +void* HPM_mmalloc(size_t size, const char *file, int line, const char *func) { + return iMalloc->malloc(size,HPM_file2ptr(file),line,func); +} +void* HPM_calloc(size_t num, size_t size, const char *file, int line, const char *func) { + return iMalloc->calloc(num,size,HPM_file2ptr(file),line,func); +} +void* HPM_realloc(void *p, size_t size, const char *file, int line, const char *func) { + return iMalloc->realloc(p,size,HPM_file2ptr(file),line,func); +} +char* HPM_astrdup(const char *p, const char *file, int line, const char *func) { + return iMalloc->astrdup(p,HPM_file2ptr(file),line,func); +} + void hplugins_share_defaults(void) { /* console */ #ifdef CONSOLE_INPUT HPM->share(console->addCommand,"addCPCommand"); #endif + /* our own */ + HPM->share(hplugins_addpacket,"addPacket"); + HPM->share(hplugins_addToSession,"addToSession"); + HPM->share(hplugins_getFromSession,"getFromSession"); + HPM->share(hplugins_removeFromSession,"removeFromSession"); /* core */ HPM->share(&runflag,"runflag"); HPM->share(arg_v,"arg_v"); @@ -267,15 +456,13 @@ void hplugins_share_defaults(void) { HPM->share((void*)get_svn_revision,"get_svn_revision"); HPM->share((void*)get_git_hash,"get_git_hash"); HPM->share(DB, "DB"); - HPM->share(iMalloc, "iMalloc"); + HPM->share(HPMiMalloc, "iMalloc"); /* socket */ HPM->share(RFIFOSKIP,"RFIFOSKIP"); HPM->share(WFIFOSET,"WFIFOSET"); HPM->share(do_close,"do_close"); HPM->share(make_connection,"make_connection"); - HPM->share(session,"session"); - HPM->share(&fd_max,"fd_max"); - HPM->share(addr_,"addr"); + //session,fd_max and addr_ are shared from within socket.c /* strlib */ HPM->share(strlib,"strlib"); HPM->share(sv,"sv"); @@ -286,31 +473,34 @@ void hplugins_share_defaults(void) { HPM->share(iTimer,"iTimer"); } -CPCMD(plugins) { - if( HPM->plugin_count == 0 ) { - ShowInfo("HPC: there are no plugins loaded\n"); - } else { - unsigned int i; - - ShowInfo("HPC: There are '"CL_WHITE"%d"CL_RESET"' plugins loaded\n",HPM->plugin_count); - - for(i = 0; i < HPM->plugin_count; i++) { - ShowInfo("HPC: - '"CL_WHITE"%s"CL_RESET"' (%s)\n",HPM->plugins[i]->info->name,HPM->plugins[i]->filename); - } - } -} + void hpm_init(void) { + unsigned int i; + HPM->symbols = NULL; HPM->plugins = NULL; HPM->plugin_count = HPM->symbol_count = 0; HPM->off = false; + memcpy(&iMalloc_HPM, iMalloc, sizeof(struct malloc_interface)); + HPMiMalloc = &iMalloc_HPM; + HPMiMalloc->malloc = HPM_mmalloc; + HPMiMalloc->calloc = HPM_calloc; + HPMiMalloc->realloc = HPM_realloc; + HPMiMalloc->astrdup = HPM_astrdup; + sscanf(HPM_VERSION, "%d.%d", &HPM->version[0], &HPM->version[1]); if( HPM->version[0] == 0 && HPM->version[1] == 0 ) { ShowError("HPM:init:failed to retrieve HPM version!!\n"); return; } + + for(i = 0; i < hpPHP_MAX; i++) { + HPM->packets[i] = NULL; + HPM->packetsc[i] = 0; + } + HPM->symbol_defaults(); #ifdef CONSOLE_INPUT @@ -318,7 +508,18 @@ void hpm_init(void) { #endif return; } - +void hpm_memdown(void) { + unsigned int i; + + /* this memory is handled outside of the server's memory manager and thus cleared after memory manager goes down */ + + for( i = 0; i < HPM->fnamec; i++ ) { + free(HPM->fnames[i].name); + } + + if( HPM->fnames ) + free(HPM->fnames); +} void hpm_final(void) { unsigned int i; @@ -337,12 +538,23 @@ void hpm_final(void) { if( HPM->symbols ) aFree(HPM->symbols); - + + for( i = 0; i < hpPHP_MAX; i++ ) { + if( HPM->packets[i] ) + aFree(HPM->packets[i]); + } + + /* HPM->fnames is cleared after the memory manager goes down */ + iMalloc->post_shutdown = hpm_memdown; + return; } void hpm_defaults(void) { HPM = &HPM_s; + HPM->fnames = NULL; + HPM->fnamec = 0; + HPM->init = hpm_init; HPM->final = hpm_final; @@ -358,4 +570,7 @@ void hpm_defaults(void) { HPM->config_read = hplugins_config_read; HPM->populate = hplugin_populate; HPM->symbol_defaults_sub = NULL; + HPM->pid2name = hplugins_id2name; + HPM->parse_packets = hplugins_parse_packets; + HPM->load_sub = NULL; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 10b1f0e79..d2a1308f2 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -49,6 +49,27 @@ struct hpm_symbol { void *ptr; }; +struct HPluginData { + unsigned int pluginID; + unsigned int type; + struct { + unsigned int free : 1; + } flag; + void *data; +}; + +struct HPluginPacket { + unsigned int pluginID; + unsigned short cmd; + short len; + void (*receive) (int fd); +}; + +struct HPMFileNameCache { + const char *addr; + char *name; +}; + /* Hercules Plugin Manager Interface */ struct HPM_interface { /* vars */ @@ -59,6 +80,12 @@ struct HPM_interface { unsigned int plugin_count; struct hpm_symbol **symbols; unsigned int symbol_count; + /* packet hooking points */ + struct HPluginPacket *packets[hpPHP_MAX]; + unsigned int packetsc[hpPHP_MAX]; + /* plugin file ptr caching */ + struct HPMFileNameCache *fnames; + unsigned int fnamec; /* funcs */ void (*init) (void); void (*final) (void); @@ -73,7 +100,10 @@ struct HPM_interface { void (*symbol_defaults) (void); void (*config_read) (void); bool (*populate) (struct hplugin *plugin,const char *filename); - void (*symbol_defaults_sub) (void); + void (*symbol_defaults_sub) (void);//TODO drop + char *(*pid2name) (unsigned int pid); + unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point); + void (*load_sub) (struct hplugin *plugin); } HPM_s; struct HPM_interface *HPM; diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 3cdb804e0..5e44b80c7 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -11,6 +11,8 @@ struct script_state; struct AtCommandInfo; +struct socket_data; +struct map_session_data; #ifdef WIN32 #define HPExport __declspec(dllexport) @@ -33,7 +35,7 @@ struct AtCommandInfo; /* after */ #include "../common/showmsg.h" -#define HPM_VERSION "0.1" +#define HPM_VERSION "0.2" struct hplugin_info { char* name; @@ -56,12 +58,37 @@ enum hp_event_types { HPET_MAX, }; +enum HPluginPacketHookingPoints { + hpClif_Parse, /* map-server (client-map) */ + hpChrif_Parse, /* map-server (char-map) */ + hpParse_FromMap, /* char-server (map-char) */ + hpParse_FromLogin, /* char-server (login-char) */ + hpParse_Char, /* char-server (client-char) */ + hpParse_FromChar, /* login-server (char-login) */ + hpParse_Login, /* login-server (client-login) */ + /* */ + hpPHP_MAX, +}; + /* Hercules Plugin Mananger Include Interface */ HPExport struct HPMi_interface { + /* */ + unsigned int pid; + /* */ 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)); void (*addCPCommand) (char *name, CParseFunc func); + /* map_session_data */ + void (*addToMSD) (struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree); + void *(*getFromMSD) (struct map_session_data *sd, unsigned int id, unsigned int type); + void (*removeFromMSD) (struct map_session_data *sd, unsigned int id, unsigned int type); + /* session[] */ + void (*addToSession) (struct socket_data *sess, void *data, unsigned int id, unsigned int type, bool autofree); + void *(*getFromSession) (struct socket_data *sess, unsigned int id, unsigned int type); + void (*removeFromSession) (struct socket_data *sess, unsigned int id, unsigned int type); + /* packet */ + bool (*addPacket) (unsigned short cmd, unsigned short length, void (*receive)(int fd), unsigned int point, unsigned int pluginID); } HPMi_s; #ifndef _HPM_H_ HPExport struct HPMi_interface *HPMi; diff --git a/src/common/malloc.c b/src/common/malloc.c index d629aa63f..4d2c93b77 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -11,6 +11,8 @@ #include #include +struct malloc_interface iMalloc_s; + ////////////// Memory Libraries ////////////////// #if defined(MEMWATCH) @@ -672,7 +674,7 @@ void memmgr_report (int extra) { if( extra != 0 ) msize = extra; - + while (block) { if (block->unit_used) { int i; @@ -784,6 +786,8 @@ void malloc_final (void) { memmgr_final (); #endif MEMORY_CHECK(); + if( iMalloc->post_shutdown ) + iMalloc->post_shutdown(); } void malloc_init (void) { @@ -825,4 +829,5 @@ void malloc_defaults(void) { iMalloc->astrdup = aStrdup_; iMalloc->free = aFree_; #endif + iMalloc->post_shutdown = NULL; } diff --git a/src/common/malloc.h b/src/common/malloc.h index 834781905..bc8aa9a20 100644 --- a/src/common/malloc.h +++ b/src/common/malloc.h @@ -67,18 +67,21 @@ void malloc_defaults(void); struct malloc_interface { + void (*init) (void); + void (*final) (void); + /* */ void* (*malloc )(size_t size, const char *file, int line, const char *func); void* (*calloc )(size_t num, size_t size, const char *file, int line, const char *func); void* (*realloc )(void *p, size_t size, const char *file, int line, const char *func); char* (*astrdup )(const char *p, const char *file, int line, const char *func); void (*free )(void *p, const char *file, int line, const char *func); - + /* */ void (*memory_check)(void); bool (*verify_ptr)(void* ptr); size_t (*usage) (void); - void (*init) (void); - void (*final) (void); -} iMalloc_s; + /* */ + void (*post_shutdown) (void); +}; void memmgr_report (int extra); diff --git a/src/common/socket.c b/src/common/socket.c index f6d5849be..4f2e386ec 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -9,6 +9,7 @@ #include "../common/showmsg.h" #include "../common/strlib.h" #include "../config/core.h" +#include "../common/HPM.h" #include "socket.h" #include @@ -239,8 +240,6 @@ static time_t socket_data_last_tick = 0; // The connection is closed if it goes over the limit. #define WFIFO_MAX (1*1024*1024) -struct socket_data* session[FD_SETSIZE]; - #ifdef SEND_SHORTLIST int send_shortlist_array[FD_SETSIZE];// we only support FD_SETSIZE sockets, limit the array to that int send_shortlist_count = 0;// how many fd's are in the shortlist @@ -594,13 +593,15 @@ static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseF session[fd]->func_parse = func_parse; session[fd]->rdata_tick = last_tick; session[fd]->session_data = NULL; + session[fd]->hdata = NULL; + session[fd]->hdatac = 0; return 0; } static void delete_session(int fd) { - if( session_isValid(fd) ) - { + if( session_isValid(fd) ) { + unsigned int i; #ifdef SHOW_SERVER_STATS socket_data_qi -= session[fd]->rdata_size - session[fd]->rdata_pos; socket_data_qo -= session[fd]->wdata_size; @@ -609,6 +610,14 @@ static void delete_session(int fd) aFree(session[fd]->wdata); if( session[fd]->session_data ) aFree(session[fd]->session_data); + for(i = 0; i < session[fd]->hdatac; i++) { + if( session[fd]->hdata[i]->flag.free ) { + aFree(session[fd]->hdata[i]->data); + aFree(session[fd]->hdata[i]); + } + } + if( session[fd]->hdata ) + aFree(session[fd]->hdata); aFree(session[fd]); session[fd] = NULL; } @@ -1214,6 +1223,8 @@ void socket_final(void) aFree(session[0]->rdata); aFree(session[0]->wdata); aFree(session[0]); + + aFree(session); } /// Closes a socket. @@ -1375,6 +1386,8 @@ void socket_init(void) memset(send_shortlist_set, 0, sizeof(send_shortlist_set)); #endif + CREATE(session, struct socket_data *, FD_SETSIZE); + socket_config_read(SOCKET_CONF_FILENAME); // initialise last send-receive tick @@ -1392,6 +1405,11 @@ void socket_init(void) #endif ShowInfo("Server supports up to '"CL_WHITE"%u"CL_RESET"' concurrent connections.\n", rlim_cur); + + /* Hercules Plugin Manager */ + HPM->share(session,"session"); + HPM->share(&fd_max,"fd_max"); + HPM->share(addr_,"addr"); } bool session_isValid(int fd) diff --git a/src/common/socket.h b/src/common/socket.h index 82f8b84c3..0e34da660 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -18,6 +18,8 @@ #include +struct HPluginData; + #define FIFOSIZE_SERVERLINK 256*1024 // socket I/O macros @@ -96,6 +98,9 @@ struct socket_data ParseFunc func_parse; void* session_data; // stores application-specific data related to the session + + struct HPluginData **hdata; + unsigned int hdatac; }; struct hSockOpt { @@ -105,7 +110,7 @@ struct hSockOpt { // Data prototype declaration -extern struct socket_data* session[FD_SETSIZE]; +struct socket_data **session; extern int fd_max; diff --git a/src/login/account.h b/src/login/account.h index 999c93075..f55e38b0c 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -135,6 +135,6 @@ struct AccountDB AccountDBIterator* (*iterator)(AccountDB* self); }; -void account_db_sql_up(AccountDB* self); +Sql *account_db_sql_up(AccountDB* self); #endif // __ACCOUNT_H_INCLUDED__ diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 218248c82..533b3d860 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -687,10 +687,11 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo return result; } -void account_db_sql_up(AccountDB* self) { +Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; Sql_HerculesUpdateCheck(db->accounts); #ifdef CONSOLE_INPUT console->setSQL(db->accounts); #endif + return db->accounts; } diff --git a/src/login/login.c b/src/login/login.c index a17faa058..f92f0094d 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -11,6 +11,7 @@ #include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "../common/HPM.h" #include "account.h" #include "ipban.h" #include "login.h" @@ -372,12 +373,17 @@ int parse_fromchar(int fd) ipl = server[id].ip; ip2str(ipl, ip); - while( RFIFOREST(fd) >= 2 ) - { + while( RFIFOREST(fd) >= 2 ) { uint16 command = RFIFOW(fd,0); - switch( command ) - { + if( HPM->packetsc[hpParse_FromChar] ) { + if( (j = HPM->parse_packets(fd,hpParse_FromChar)) ) { + if( j == 1 ) continue; + if( j == 2 ) return 0; + } + } + + switch( command ) { case 0x2712: // request from char-server to authenticate an account if( RFIFOREST(fd) < 23 ) @@ -1324,12 +1330,17 @@ int parse_login(int fd) sd->fd = fd; } - while( RFIFOREST(fd) >= 2 ) - { + while( RFIFOREST(fd) >= 2 ) { uint16 command = RFIFOW(fd,0); - switch( command ) - { + if( HPM->packetsc[hpParse_Login] ) { + if( (result = HPM->parse_packets(fd,hpParse_Login)) ) { + if( result == 1 ) continue; + if( result == 2 ) return 0; + } + } + + switch( command ) { case 0x0200: // New alive packet: structure: 0x200 .24B. used to verify if client is always alive. if (RFIFOREST(fd) < 26) @@ -1688,15 +1699,17 @@ void do_final(void) int i; struct client_hash_node *hn = login_config.client_hash_nodes; - while (hn) - { + ShowStatus("Terminating...\n"); + + HPM->event(HPET_FINAL); + + while (hn) { struct client_hash_node *tmp = hn; hn = hn->next; aFree(tmp); } login_log(0, "login server", 100, "login server shutdown"); - ShowStatus("Terminating...\n"); if( login_config.log_login ) loginlog_final(); @@ -1770,7 +1783,7 @@ int do_init(int argc, char** argv) login_lan_config_read((argc > 2) ? argv[2] : LAN_CONF_NAME); rnd_init(); - + for( i = 0; i < ARRAYLENGTH(server); ++i ) chrif_server_init(i); @@ -1780,7 +1793,7 @@ int do_init(int argc, char** argv) // initialize static and dynamic ipban system ipban_init(); - + // Online user database init online_db = idb_alloc(DB_OPT_RELEASE_DATA); iTimer->add_timer_func_list(waiting_disconnect_timer, "waiting_disconnect_timer"); @@ -1814,6 +1827,10 @@ int do_init(int argc, char** argv) } } + HPM->share(account_db_sql_up(accounts),"sql_handle"); + HPM->config_read(); + HPM->event(HPET_INIT); + // server port open & binding if( (login_fd = make_listen_bind(login_config.login_ip,login_config.login_port)) == -1 ) { ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",login_config.login_port); @@ -1824,11 +1841,11 @@ int do_init(int argc, char** argv) shutdown_callback = do_shutdown; runflag = LOGINSERVER_ST_RUNNING; } - - account_db_sql_up(accounts); ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %u).\n\n", login_config.login_port); login_log(0, "login server", 100, "login server started"); - + + HPM->event(HPET_READY); + return 0; } diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c new file mode 100644 index 000000000..17d72bc98 --- /dev/null +++ b/src/map/HPMmap.c @@ -0,0 +1,89 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file + +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/HPM.h" + +#include "HPMmap.h" +#include "pc.h" +#include "map.h" + +#include +#include +#include +#include + + +void HPM_map_addToMSD(struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree) { + struct HPluginData *HPData; + unsigned int i; + + for(i = 0; i < sd->hdatac; i++) { + if( sd->hdata[i]->pluginID == id && sd->hdata[i]->type == type ) { + ShowError("HPMi->addToMSD:%s: error! attempting to insert duplicate struct of type %u on '%s'\n",HPM->pid2name(id),type,sd->status.name); + return; + } + } + + CREATE(HPData, struct HPluginData, 1); + + HPData->pluginID = id; + HPData->type = type; + HPData->flag.free = autofree ? 1 : 0; + HPData->data = data; + + RECREATE(sd->hdata,struct HPluginData *,++sd->hdatac); + sd->hdata[sd->hdatac - 1] = HPData; +} +void *HPM_map_getFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type) { + unsigned int i; + + for(i = 0; i < sd->hdatac; i++) { + if( sd->hdata[i]->pluginID == id && sd->hdata[i]->type == type ) { + break; + } + } + + if( i != sd->hdatac ) + return sd->hdata[i]->data; + + return NULL; +} +void HPM_map_removeFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type) { + unsigned int i; + + for(i = 0; i < sd->hdatac; i++) { + if( sd->hdata[i]->pluginID == id && sd->hdata[i]->type == type ) { + break; + } + } + + if( i != sd->hdatac ) { + unsigned int cursor; + + aFree(sd->hdata[i]->data); + aFree(sd->hdata[i]); + sd->hdata[i] = NULL; + + for(i = 0, cursor = 0; i < sd->hdatac; i++) { + if( sd->hdata[i] == NULL ) + continue; + if( i != cursor ) + sd->hdata[cursor] = sd->hdata[i]; + cursor++; + } + + sd->hdatac = cursor; + } + +} +void HPM_map_plugin_load_sub(struct hplugin *plugin) { + plugin->hpi->addCommand = HPM->import_symbol("addCommand"); + plugin->hpi->addScript = HPM->import_symbol("addScript"); + /* */ + plugin->hpi->addToMSD = HPM->import_symbol("addToMSD"); + plugin->hpi->getFromMSD = HPM->import_symbol("getFromMSD"); + plugin->hpi->removeFromMSD = HPM->import_symbol("removeFromMSD"); +} diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h new file mode 100644 index 000000000..a6cac4ace --- /dev/null +++ b/src/map/HPMmap.h @@ -0,0 +1,18 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file + +#ifndef _HPM_MAP_ +#define _HPM_MAP_ + +#include "../common/cbasetypes.h" + +struct hplugin; +struct map_session_data; + +void HPM_map_addToMSD(struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree); +void *HPM_map_getFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type); +void HPM_map_removeFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type); + +void HPM_map_plugin_load_sub(struct hplugin *plugin); + +#endif /* _HPM_MAP_ */ diff --git a/src/map/Makefile.in b/src/map/Makefile.in index 70c0cd900..588d19eae 100644 --- a/src/map/Makefile.in +++ b/src/map/Makefile.in @@ -17,7 +17,7 @@ MAP_OBJ = map.o chrif.o clif.o pc.o status.o npc.o \ storage.o skill.o atcommand.o battle.o battleground.o \ intif.o trade.o party.o vending.o guild.o pet.o \ log.o mail.o date.o unit.o homunculus.o mercenary.o quest.o instance.o \ - buyingstore.o searchstore.o duel.o pc_groups.o elemental.o irc-bot.o + buyingstore.o searchstore.o duel.o pc_groups.o elemental.o irc-bot.o HPMmap.o MAP_SQL_OBJ = $(MAP_OBJ:%=obj_sql/%) \ obj_sql/mapreg_sql.o MAP_H = map.h chrif.h clif.h pc.h status.h npc.h \ @@ -27,7 +27,7 @@ MAP_H = map.h chrif.h clif.h pc.h status.h npc.h \ log.h mail.h date.h unit.h homunculus.h mercenary.h quest.h instance.h mapreg.h \ buyingstore.h searchstore.h duel.h pc_groups.h \ ../config/core.h ../config/renewal.h ../config/secure.h ../config/const.h \ - ../config/classes/general.h elemental.h packets.h packets_struct.h irc-bot.h + ../config/classes/general.h elemental.h packets.h packets_struct.h irc-bot.h HPMmap.h HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) diff --git a/src/map/chrif.c b/src/map/chrif.c index d44ccf721..6b0397b56 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -10,6 +10,7 @@ #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/ers.h" +#include "../common/HPM.h" #include "map.h" #include "battle.h" @@ -1396,7 +1397,7 @@ void chrif_skillid2idx(int fd) { * *------------------------------------------*/ int chrif_parse(int fd) { - int packet_len, cmd; + int packet_len, cmd, r; // only process data from the char-server if ( fd != char_fd ) { @@ -1421,9 +1422,18 @@ int chrif_parse(int fd) { } while ( RFIFOREST(fd) >= 2 ) { + + if( HPM->packetsc[hpChrif_Parse] ) { + if( (r = HPM->parse_packets(fd,hpChrif_Parse)) ) { + if( r == 1 ) continue; + if( r == 2 ) return 0; + } + } + cmd = RFIFOW(fd,0); + if (cmd < 0x2af8 || cmd >= 0x2af8 + ARRAYLENGTH(packet_len_table) || packet_len_table[cmd-0x2af8] == 0) { - int r = intif->parse(fd); // Passed on to the intif + r = intif->parse(fd); // Passed on to the intif if (r == 1) continue; // Treated in intif if (r == 2) return 0; // Didn't have enough data (len==-1) diff --git a/src/map/clif.c b/src/map/clif.c index 44df5b607..7171a48be 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -14,6 +14,7 @@ #include "../common/utils.h" #include "../common/ers.h" #include "../common/conf.h" +#include "../common/HPM.h" #include "map.h" #include "chrif.h" @@ -17621,6 +17622,14 @@ int clif_parse(int fd) { if (RFIFOREST(fd) < 2) return 0; + + if( HPM->packetsc[hpClif_Parse] ) { + int r; + if( (r = HPM->parse_packets(fd,hpClif_Parse)) ) { + if( r == 1 ) continue; + if( r == 2 ) return 0; + } + } if( sd ) parse_cmd_func = sd->parse_cmd_func; diff --git a/src/map/map.c b/src/map/map.c index 713577495..5753fbc1d 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -51,6 +51,7 @@ #include "log.h" #include "mail.h" #include "irc-bot.h" +#include "HPMmap.h" #include #include @@ -5172,6 +5173,9 @@ void map_hp_symbols(void) { /* specific */ HPM->share(atcommand->create,"addCommand"); HPM->share(script->addScript,"addScript"); + HPM->share(HPM_map_addToMSD,"addToMSD"); + HPM->share(HPM_map_getFromMSD,"getFromMSD"); + HPM->share(HPM_map_removeFromMSD,"removeFromMSD"); /* vars */ HPM->share(map,"map"); } @@ -5379,6 +5383,7 @@ int do_init(int argc, char *argv[]) iTimer->add_timer_func_list(map_removemobs_timer, "map_removemobs_timer"); iTimer->add_timer_interval(iTimer->gettick()+1000, map_freeblock_timer, 0, 0, 60*1000); + HPM->load_sub = HPM_map_plugin_load_sub; HPM->symbol_defaults_sub = map_hp_symbols; HPM->config_read(); HPM->event(HPET_INIT); diff --git a/src/map/pc.h b/src/map/pc.h index 1f1538e1f..c2e834d1c 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -507,6 +507,9 @@ struct map_session_data { unsigned char delayed_damage;//ref. counter bugreport:7307 [Ind/Hercules] + struct HPluginData **hdata; + unsigned int hdatac; + // temporary debugging of bug #3504 const char* delunit_prevfile; int delunit_prevline; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index 9ca0fd17a..be02b5f15 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,6 +2,7 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/db.h" #include "../common/malloc.h" diff --git a/src/map/unit.c b/src/map/unit.c index 9becb128e..41d661169 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -8,6 +8,7 @@ #include "../common/db.h" #include "../common/malloc.h" #include "../common/random.h" +#include "../common/HPM.h" #include "map.h" #include "path.h" @@ -2330,6 +2331,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) { struct map_session_data *sd = (struct map_session_data*)bl; int i; + unsigned int k; if( iStatus->isdead(bl) ) pc->setrestartvalue(sd,2); @@ -2397,6 +2399,15 @@ int unit_free(struct block_list *bl, clr_type clrtype) aFree(sd->queues); sd->queues = NULL; } + + for( k = 0; k < sd->hdatac; k++ ) { + if( sd->hdata[k]->flag.free ) { + aFree(sd->hdata[k]->data); + aFree(sd->hdata[k]); + } + } + if( sd->hdata ) + aFree(sd->hdata); break; } case BL_PET: diff --git a/src/plugins/sample.c b/src/plugins/sample.c index 7f7528cb7..4a8402560 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -4,9 +4,15 @@ #include #include +#include + #include "../common/HPMi.h" +#include "../common/mmo.h" +#include "../common/socket.h" +#include "../common/malloc.h" #include "../map/script.h" #include "../map/pc.h" +#include "../map/clif.h" HPExport struct hplugin_info pinfo = { "Sample", // Plugin name @@ -26,18 +32,81 @@ BUILDIN(sample) {//script command 'sample(num);' - 1 param: struct script_state* CPCMD(sample) {//console command 'sample' - 1 param: char *line ShowInfo("I'm being run! arg -> '%s'\n",line?line:"NONE"); } -struct script_interface *script;/* used by script commands */ +struct sample_data_struct { + struct point lastMSGPosition; + unsigned int someNumber; +}; +/* sample packet implementation */ +/* cmd 0xf3 - it is a client-server existent id, for clif_parse_GlobalMessage */ +/* in this sample we do nothing and simply redirect */ +void sample_packet0f3(int fd) { + struct map_session_data *sd = session[fd]->session_data; + struct sample_data_struct *data; + + if( !sd ) return;/* socket didn't fully log-in? this packet shouldn't do anything then! */ + + ShowInfo("sample_packet0f3: Hello World! received 0xf3 for '%s', redirecting!\n",sd->status.name); + + /* sample usage of appending data to a socket_data (session[]) entry */ + if( !(data = HPMi->getFromSession(session[fd],HPMi->pid,0)) ) { + CREATE(data,struct sample_data_struct,1); + + data->lastMSGPosition.map = sd->status.last_point.map; + data->lastMSGPosition.x = sd->status.last_point.x; + data->lastMSGPosition.y = sd->status.last_point.y; + data->someNumber = rand()%777; + + ShowInfo("Created Appended session[] data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); + HPMi->addToSession(session[fd],data,HPMi->pid,0,true); + } else { + ShowInfo("Existent Appended session[] data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); + if( rand()%4 == 2 ) { + ShowInfo("Removing Appended session[] data\n"); + HPMi->removeFromSession(session[fd],HPMi->pid,0); + } + } + + /* sample usage of appending data to a map_session_data (sd) entry */ + if( !(data = HPMi->getFromMSD(sd,HPMi->pid,0)) ) { + CREATE(data,struct sample_data_struct,1); + + data->lastMSGPosition.map = sd->status.last_point.map; + data->lastMSGPosition.x = sd->status.last_point.x; + data->lastMSGPosition.y = sd->status.last_point.y; + data->someNumber = rand()%777; + + ShowInfo("Created Appended map_session_data data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); + HPMi->addToMSD(sd,data,HPMi->pid,0,true); + } else { + ShowInfo("Existent Appended map_session_data data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); + if( rand()%4 == 2 ) { + ShowInfo("Removing Appended map_session_data data\n"); + HPMi->removeFromMSD(sd,HPMi->pid,0); + } + } + + + clif->pGlobalMessage(fd,sd); +} /* run when server starts */ HPExport void plugin_init (void) { char *server_type; char *server_name; - - //get the symbols from the server + + /* core vars */ server_type = GET_SYMBOL("SERVER_TYPE"); server_name = GET_SYMBOL("SERVER_NAME"); + /* core interfaces */ + iMalloc = GET_SYMBOL("iMalloc"); + + /* map-server interfaces */ script = GET_SYMBOL("script"); - + clif = GET_SYMBOL("clif"); + + /* session[] */ + session = GET_SYMBOL("session"); + ShowInfo ("Server type is "); switch (*server_type) { @@ -59,6 +128,11 @@ HPExport void plugin_init (void) { if( HPMi->addCPCommand != NULL ) {//link our 'sample' console command HPMi->addCPCommand("this:is:a:sample",CPCMD_A(sample)); } + + if( HPMi->addPacket != NULL ) {//link our 'sample' packet to map-server + HPMi->addPacket(0xf3,-1,sample_packet0f3,hpClif_Parse,HPMi->pid); + } + } /* run when server is ready (online) */ HPExport void server_online (void) { -- cgit v1.2.3-70-g09d2 From 1114eb3da58b078258a824424fef687a1ccee90c Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 25 Sep 2013 08:50:52 -0300 Subject: Renamed iTimer interface to timer. Also removed duplicate mentions of timer within calls to shorten. --- src/char/char.c | 32 ++++++------- src/char/int_auction.c | 8 ++-- src/char/int_guild.c | 6 +-- src/char/inter.c | 4 +- src/common/HPM.c | 2 +- src/common/console.c | 6 +-- src/common/core.c | 6 +-- src/common/mutex.c | 2 +- src/common/random.c | 2 +- src/common/socket.c | 12 ++--- src/common/sql.c | 4 +- src/common/timer.c | 34 ++++++------- src/common/timer.h | 18 +++---- src/login/ipban_sql.c | 6 +-- src/login/login.c | 26 +++++----- src/map/atcommand.c | 52 ++++++++++---------- src/map/battle.c | 58 +++++++++++------------ src/map/battleground.c | 12 ++--- src/map/chrif.c | 28 +++++------ src/map/clif.c | 86 ++++++++++++++++----------------- src/map/elemental.c | 22 ++++----- src/map/guild.c | 8 ++-- src/map/homunculus.c | 12 ++--- src/map/instance.c | 18 +++---- src/map/irc-bot.c | 18 +++---- src/map/map.c | 22 ++++----- src/map/mapreg_sql.c | 4 +- src/map/mercenary.c | 8 ++-- src/map/mob.c | 60 +++++++++++------------ src/map/npc.c | 50 ++++++++++---------- src/map/party.c | 4 +- src/map/pc.c | 126 ++++++++++++++++++++++++------------------------- src/map/pet.c | 64 ++++++++++++------------- src/map/script.c | 62 ++++++++++++------------ src/map/skill.c | 126 ++++++++++++++++++++++++------------------------- src/map/status.c | 66 +++++++++++++------------- src/map/unit.c | 116 ++++++++++++++++++++++----------------------- 37 files changed, 596 insertions(+), 594 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index 943d1f52e..f618320e1 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -212,7 +212,7 @@ void set_char_charselect(int account_id) character->pincode_enable = *pincode->charselect + *pincode->enabled; if(character->waiting_disconnect != INVALID_TIMER) { - iTimer->delete_timer(character->waiting_disconnect, chardb_waiting_disconnect); + timer->delete(character->waiting_disconnect, chardb_waiting_disconnect); character->waiting_disconnect = INVALID_TIMER; } @@ -253,7 +253,7 @@ void set_char_online(int map_id, int char_id, int account_id) //Get rid of disconnect timer if(character->waiting_disconnect != INVALID_TIMER) { - iTimer->delete_timer(character->waiting_disconnect, chardb_waiting_disconnect); + timer->delete(character->waiting_disconnect, chardb_waiting_disconnect); character->waiting_disconnect = INVALID_TIMER; } @@ -298,7 +298,7 @@ void set_char_offline(int char_id, int account_id) server[character->server].users--; if(character->waiting_disconnect != INVALID_TIMER){ - iTimer->delete_timer(character->waiting_disconnect, chardb_waiting_disconnect); + timer->delete(character->waiting_disconnect, chardb_waiting_disconnect); character->waiting_disconnect = INVALID_TIMER; } @@ -333,7 +333,7 @@ static int char_db_setoffline(DBKey key, DBData *data, va_list ap) character->char_id = -1; character->server = -1; if(character->waiting_disconnect != INVALID_TIMER){ - iTimer->delete_timer(character->waiting_disconnect, chardb_waiting_disconnect); + timer->delete(character->waiting_disconnect, chardb_waiting_disconnect); character->waiting_disconnect = INVALID_TIMER; } } else if (character->server == server) @@ -2036,7 +2036,7 @@ static void char_auth_ok(int fd, struct char_session_data *sd) { //Character already online. KICK KICK KICK mapif_disconnectplayer(server[character->server].fd, character->account_id, character->char_id, 2); if (character->waiting_disconnect == INVALID_TIMER) - character->waiting_disconnect = iTimer->add_timer(iTimer->gettick()+20000, chardb_waiting_disconnect, character->account_id, 0); + character->waiting_disconnect = timer->add(timer->gettick()+20000, chardb_waiting_disconnect, character->account_id, 0); if (character) character->pincode_enable = -1; WFIFOHEAD(fd,3); @@ -2115,7 +2115,7 @@ void loginif_on_ready(void) loginif_check_shutdown(); //Send online accounts to login server. - send_accounts_tologin(INVALID_TIMER, iTimer->gettick(), 0, 0); + send_accounts_tologin(INVALID_TIMER, timer->gettick(), 0, 0); // if no map-server already connected, display a message... ARR_FIND( 0, ARRAYLENGTH(server), i, server[i].fd > 0 && server[i].map[0] ); @@ -2404,7 +2404,7 @@ int parse_fromlogin(int fd) { { //Kick it from the map server it is on. mapif_disconnectplayer(server[character->server].fd, character->account_id, character->char_id, 2); if (character->waiting_disconnect == INVALID_TIMER) - character->waiting_disconnect = iTimer->add_timer(iTimer->gettick()+AUTH_TIMEOUT, chardb_waiting_disconnect, character->account_id, 0); + character->waiting_disconnect = timer->add(timer->gettick()+AUTH_TIMEOUT, chardb_waiting_disconnect, character->account_id, 0); } else {// Manual kick from char server. @@ -2473,12 +2473,12 @@ int send_accounts_tologin(int tid, unsigned int tick, int id, intptr_t data); void do_init_loginif(void) { // establish char-login connection if not present - iTimer->add_timer_func_list(check_connect_login_server, "check_connect_login_server"); - iTimer->add_timer_interval(iTimer->gettick() + 1000, check_connect_login_server, 0, 0, 10 * 1000); + timer->add_func_list(check_connect_login_server, "check_connect_login_server"); + timer->add_interval(timer->gettick() + 1000, check_connect_login_server, 0, 0, 10 * 1000); // send a list of all online account IDs to login server - iTimer->add_timer_func_list(send_accounts_tologin, "send_accounts_tologin"); - iTimer->add_timer_interval(iTimer->gettick() + 1000, send_accounts_tologin, 0, 0, 3600 * 1000); //Sync online accounts every hour + timer->add_func_list(send_accounts_tologin, "send_accounts_tologin"); + timer->add_interval(timer->gettick() + 1000, send_accounts_tologin, 0, 0, 3600 * 1000); //Sync online accounts every hour } void do_final_loginif(void) @@ -5030,15 +5030,15 @@ int do_init(int argc, char **argv) { do_init_mapif(); // periodically update the overall user count on all mapservers + login server - iTimer->add_timer_func_list(broadcast_user_count, "broadcast_user_count"); - iTimer->add_timer_interval(iTimer->gettick() + 1000, broadcast_user_count, 0, 0, 5 * 1000); + timer->add_func_list(broadcast_user_count, "broadcast_user_count"); + timer->add_interval(timer->gettick() + 1000, broadcast_user_count, 0, 0, 5 * 1000); // Timer to clear (online_char_db) - iTimer->add_timer_func_list(chardb_waiting_disconnect, "chardb_waiting_disconnect"); + timer->add_func_list(chardb_waiting_disconnect, "chardb_waiting_disconnect"); // Online Data timers (checking if char still connected) - iTimer->add_timer_func_list(online_data_cleanup, "online_data_cleanup"); - iTimer->add_timer_interval(iTimer->gettick() + 1000, online_data_cleanup, 0, 0, 600 * 1000); + timer->add_func_list(online_data_cleanup, "online_data_cleanup"); + timer->add_interval(timer->gettick() + 1000, online_data_cleanup, 0, 0, 600 * 1000); //Cleaning the tables for NULL entrys @ startup [Sirius] //Chardb clean diff --git a/src/char/int_auction.c b/src/char/int_auction.c index bf5ea1700..0dad9d2de 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -115,7 +115,7 @@ unsigned int auction_create(struct auction_data *auction) auction->item.expire_time = 0; auction->auction_id = (unsigned int)SQL->StmtLastInsertId(stmt); - auction->auction_end_timer = iTimer->add_timer( iTimer->gettick() + tick , auction_end_timer, auction->auction_id, 0); + auction->auction_end_timer = timer->add( timer->gettick() + tick , auction_end_timer, auction->auction_id, 0); ShowInfo("New Auction %u | time left %u ms | By %s.\n", auction->auction_id, tick, auction->seller_name); CREATE(auction_, struct auction_data, 1); @@ -170,7 +170,7 @@ void auction_delete(struct auction_data *auction) Sql_ShowDebug(sql_handle); if( auction->auction_end_timer != INVALID_TIMER ) - iTimer->delete_timer(auction->auction_end_timer, auction_end_timer); + timer->delete(auction->auction_end_timer, auction_end_timer); idb_remove(auction_db_, auction_id); } @@ -182,7 +182,7 @@ void inter_auctions_fromsql(void) struct item *item; char *data; StringBuf buf; - unsigned int tick = iTimer->gettick(), endtick; + unsigned int tick = timer->gettick(), endtick; time_t now = time(NULL); StrBuf->Init(&buf); @@ -234,7 +234,7 @@ void inter_auctions_fromsql(void) else endtick = tick + 10000; // 10 Second's to process ended auctions - auction->auction_end_timer = iTimer->add_timer(endtick, auction_end_timer, auction->auction_id, 0); + auction->auction_end_timer = timer->add(endtick, auction_end_timer, auction->auction_id, 0); idb_put(auction_db_, auction->auction_id, auction); } diff --git a/src/char/int_guild.c b/src/char/int_guild.c index a9bce9cbe..fab63894e 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -86,7 +86,7 @@ static int guild_save_timer(int tid, unsigned int tick, int id, intptr_t data) state = guild_db_->size(guild_db_); if( state < 1 ) state = 1; //Calculate the time slot for the next save. - iTimer->add_timer(tick + autosave_interval/state, guild_save_timer, 0, 0); + timer->add(tick + autosave_interval/state, guild_save_timer, 0, 0); return 0; } @@ -729,8 +729,8 @@ int inter_guild_sql_init(void) //Read exp file sv->readdb("db", DBPATH"exp_guild.txt", ',', 1, 1, 100, exp_guild_parse_row); - iTimer->add_timer_func_list(guild_save_timer, "guild_save_timer"); - iTimer->add_timer(iTimer->gettick() + 10000, guild_save_timer, 0, 0); + timer->add_func_list(guild_save_timer, "guild_save_timer"); + timer->add(timer->gettick() + 10000, guild_save_timer, 0, 0); return 0; } diff --git a/src/char/inter.c b/src/char/inter.c index 1ff2bca61..23f400ee9 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -946,7 +946,7 @@ int check_ttl_wisdata_sub(DBKey key, DBData *data, va_list ap) int check_ttl_wisdata(void) { - unsigned long tick = iTimer->gettick(); + unsigned long tick = timer->gettick(); int i; do { @@ -1039,7 +1039,7 @@ int mapif_parse_WisRequest(int fd) memcpy(wd->src, RFIFOP(fd, 4), NAME_LENGTH); memcpy(wd->dst, RFIFOP(fd,28), NAME_LENGTH); memcpy(wd->msg, RFIFOP(fd,52), wd->len); - wd->tick = iTimer->gettick(); + wd->tick = timer->gettick(); idb_put(wis_db, wd->id, wd); mapif_wis_message(wd); } diff --git a/src/common/HPM.c b/src/common/HPM.c index 3b79febd7..9895ae95d 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -470,7 +470,7 @@ void hplugins_share_defaults(void) { /* sql */ HPM->share(SQL,"SQL"); /* timer */ - HPM->share(iTimer,"iTimer"); + HPM->share(timer,"timer"); } diff --git a/src/common/console.c b/src/common/console.c index c9772ecfd..75b6eaea4 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -362,7 +362,7 @@ void console_parse_final(void) { /* wait for thread to close */ rathread_wait(console->pthread, NULL); - + racond_destroy(console->ptcond); ramutex_destroy(console->ptmutex); } @@ -382,8 +382,8 @@ void console_parse_init(void) { exit(EXIT_FAILURE); } - iTimer->add_timer_func_list(console->parse_timer, "console_parse_timer"); - iTimer->add_timer_interval(iTimer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ + timer->add_func_list(console->parse_timer, "console_parse_timer"); + timer->add_interval(timer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } void console_setSQL(Sql *SQL) { diff --git a/src/common/core.c b/src/common/core.c index 1e5179448..6a73d2d39 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -325,7 +325,7 @@ int main (int argc, char **argv) { cevents_init(); #endif - iTimer->init(); + timer->init(); console->init(); @@ -341,7 +341,7 @@ int main (int argc, char **argv) { {// Main runtime cycle int next; while (runflag != CORE_ST_STOP) { - next = iTimer->do_timer(iTimer->gettick_nocache()); + next = timer->do_timer(timer->gettick_nocache()); do_sockets(next); } } @@ -352,7 +352,7 @@ int main (int argc, char **argv) { #ifndef MINICORE HPM->final(); #endif - iTimer->final(); + timer->final(); socket_final(); DB->final(); mempool_final(); diff --git a/src/common/mutex.c b/src/common/mutex.c index 6bb1efdab..0668dbc41 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -201,7 +201,7 @@ void racond_wait( racond c, ramutex m, sysint timeout_ticks){ pthread_cond_wait( &c->hCond, &m->hMutex ); }else{ struct timespec wtime; - int64 exact_timeout = iTimer->gettick() + timeout_ticks; + int64 exact_timeout = timer->gettick() + timeout_ticks; wtime.tv_sec = exact_timeout/1000; wtime.tv_nsec = (exact_timeout%1000)*1000000; diff --git a/src/common/random.c b/src/common/random.c index a7d432e34..2f1b62934 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -17,7 +17,7 @@ /// Initializes the random number generator with an appropriate seed. void rnd_init(void) { - uint32 seed = iTimer->gettick(); + uint32 seed = timer->gettick(); seed += (uint32)time(NULL); #if defined(WIN32) seed += GetCurrentProcessId(); diff --git a/src/common/socket.c b/src/common/socket.c index 4f2e386ec..7c8b3738b 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -1012,9 +1012,9 @@ static int connect_check_(uint32 ip) if( hist->ddos ) {// flagged as DDoS return (connect_ok == 2 ? 1 : 0); - } else if( DIFF_TICK(iTimer->gettick(),hist->tick) < ddos_interval ) + } else if( DIFF_TICK(timer->gettick(),hist->tick) < ddos_interval ) {// connection within ddos_interval - hist->tick = iTimer->gettick(); + hist->tick = timer->gettick(); if( hist->count++ >= ddos_count ) {// DDoS attack detected hist->ddos = 1; @@ -1024,7 +1024,7 @@ static int connect_check_(uint32 ip) return connect_ok; } else {// not within ddos_interval, clear data - hist->tick = iTimer->gettick(); + hist->tick = timer->gettick(); hist->count = 0; return connect_ok; } @@ -1035,7 +1035,7 @@ static int connect_check_(uint32 ip) CREATE(hist, ConnectHistory, 1); memset(hist, 0, sizeof(ConnectHistory)); hist->ip = ip; - hist->tick = iTimer->gettick(); + hist->tick = timer->gettick(); hist->next = connect_history[ip&0xFFFF]; connect_history[ip&0xFFFF] = hist; return connect_ok; @@ -1400,8 +1400,8 @@ void socket_init(void) #ifndef MINICORE // Delete old connection history every 5 minutes memset(connect_history, 0, sizeof(connect_history)); - iTimer->add_timer_func_list(connect_check_clear, "connect_check_clear"); - iTimer->add_timer_interval(iTimer->gettick()+1000, connect_check_clear, 0, 0, 5*60*1000); + timer->add_func_list(connect_check_clear, "connect_check_clear"); + timer->add_interval(timer->gettick()+1000, connect_check_clear, 0, 0, 5*60*1000); #endif ShowInfo("Server supports up to '"CL_WHITE"%u"CL_RESET"' concurrent connections.\n", rlim_cur); diff --git a/src/common/sql.c b/src/common/sql.c index 579346001..9b7fe4108 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -210,7 +210,7 @@ static int Sql_P_Keepalive(Sql* self) // establish keepalive ping_interval = timeout - 30; // 30-second reserve //add_timer_func_list(Sql_P_KeepaliveTimer, "Sql_P_KeepaliveTimer"); - return iTimer->add_timer_interval(iTimer->gettick() + ping_interval*1000, Sql_P_KeepaliveTimer, 0, (intptr_t)self, ping_interval*1000); + return timer->add_interval(timer->gettick() + ping_interval*1000, Sql_P_KeepaliveTimer, 0, (intptr_t)self, ping_interval*1000); } @@ -404,7 +404,7 @@ void Sql_Free(Sql* self) { SQL->FreeResult(self); StrBuf->Destroy(&self->buf); - if( self->keepalive != INVALID_TIMER ) iTimer->delete_timer(self->keepalive, Sql_P_KeepaliveTimer); + if( self->keepalive != INVALID_TIMER ) timer->delete(self->keepalive, Sql_P_KeepaliveTimer); aFree(self); } } diff --git a/src/common/timer.c b/src/common/timer.c index f019c6927..a2378a5aa 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -21,6 +21,8 @@ #include // struct timeval, gettimeofday() #endif +struct timer_interface timer_s; + // If the server can't handle processing thousands of monsters // or many connected clients, please increase TIMER_MIN_INTERVAL. #define TIMER_MIN_INTERVAL 50 @@ -257,7 +259,7 @@ int timer_add_interval(unsigned int tick, TimerFunc func, int id, intptr_t data, int tid; if( interval < 1 ) { - ShowError("timer_add_interval: invalid interval (tick=%u %p[%s] id=%d data=%d diff_tick=%d)\n", tick, func, search_timer_func_list(func), id, data, DIFF_TICK(tick, iTimer->gettick())); + ShowError("timer_add_interval: invalid interval (tick=%u %p[%s] id=%d data=%d diff_tick=%d)\n", tick, func, search_timer_func_list(func), id, data, DIFF_TICK(tick, timer->gettick())); return INVALID_TIMER; } @@ -300,7 +302,7 @@ int timer_do_delete(int tid, TimerFunc func) { /// Adjusts a timer's expiration time. /// Returns the new tick value, or -1 if it fails. int timer_addtick(int tid, unsigned int tick) { - return iTimer->settick_timer(tid, timer_data[tid].tick+tick); + return timer->settick(tid, timer_data[tid].tick+tick); } /// Modifies a timer's expiration time (an alternative to deleting a timer and starting a new one). @@ -415,20 +417,20 @@ void timer_final(void) { * created by Susu *-------------------------------------*/ void timer_defaults(void) { - iTimer = &iTimer_s; + timer = &timer_s; /* funcs */ - iTimer->gettick = timer_gettick; - iTimer->gettick_nocache = timer_gettick_nocache; - iTimer->add_timer = timer_add; - iTimer->add_timer_interval = timer_add_interval; - iTimer->add_timer_func_list = timer_add_func_list; - iTimer->get_timer = timer_get; - iTimer->delete_timer = timer_do_delete; - iTimer->addtick_timer = timer_addtick; - iTimer->settick_timer = timer_settick; - iTimer->get_uptime = timer_get_uptime; - iTimer->do_timer = do_timer; - iTimer->init = timer_init; - iTimer->final = timer_final; + timer->gettick = timer_gettick; + timer->gettick_nocache = timer_gettick_nocache; + timer->add = timer_add; + timer->add_interval = timer_add_interval; + timer->add_func_list = timer_add_func_list; + timer->get = timer_get; + timer->delete = timer_do_delete; + timer->addtick = timer_addtick; + timer->settick = timer_settick; + timer->get_uptime = timer_get_uptime; + timer->do_timer = do_timer; + timer->init = timer_init; + timer->final = timer_final; } diff --git a/src/common/timer.h b/src/common/timer.h index 50f1c354b..3146a2e66 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -44,24 +44,24 @@ struct timer_interface { unsigned int (*gettick) (void); unsigned int (*gettick_nocache) (void); - int (*add_timer) (unsigned int tick, TimerFunc func, int id, intptr_t data); - int (*add_timer_interval) (unsigned int tick, TimerFunc func, int id, intptr_t data, int interval); - const struct TimerData *(*get_timer) (int tid); - int (*delete_timer) (int tid, TimerFunc func); + int (*add) (unsigned int tick, TimerFunc func, int id, intptr_t data); + int (*add_interval) (unsigned int tick, TimerFunc func, int id, intptr_t data, int interval); + const struct TimerData *(*get) (int tid); + int (*delete) (int tid, TimerFunc func); - int (*addtick_timer) (int tid, unsigned int tick); - int (*settick_timer) (int tid, unsigned int tick); + int (*addtick) (int tid, unsigned int tick); + int (*settick) (int tid, unsigned int tick); - int (*add_timer_func_list) (TimerFunc func, char* name); + int (*add_func_list) (TimerFunc func, char* name); unsigned long (*get_uptime) (void); int (*do_timer) (unsigned int tick); void (*init) (void); void (*final) (void); -} iTimer_s; +}; -struct timer_interface *iTimer; +struct timer_interface *timer; void timer_defaults(void); diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c index fd9f1a4a1..df516a3f6 100644 --- a/src/login/ipban_sql.c +++ b/src/login/ipban_sql.c @@ -86,8 +86,8 @@ void ipban_init(void) if( login_config.ipban_cleanup_interval > 0 ) { // set up periodic cleanup of connection history and active bans - iTimer->add_timer_func_list(ipban_cleanup, "ipban_cleanup"); - cleanup_timer_id = iTimer->add_timer_interval(iTimer->gettick()+10, ipban_cleanup, 0, 0, login_config.ipban_cleanup_interval*1000); + timer->add_func_list(ipban_cleanup, "ipban_cleanup"); + cleanup_timer_id = timer->add_interval(timer->gettick()+10, ipban_cleanup, 0, 0, login_config.ipban_cleanup_interval*1000); } else // make sure it gets cleaned up on login-server start regardless of interval-based cleanups ipban_cleanup(0,0,0,0); } @@ -100,7 +100,7 @@ void ipban_final(void) if( login_config.ipban_cleanup_interval > 0 ) // release data - iTimer->delete_timer(cleanup_timer_id, ipban_cleanup); + timer->delete(cleanup_timer_id, ipban_cleanup); ipban_cleanup(0,0,0,0); // always clean up on login-server stop diff --git a/src/login/login.c b/src/login/login.c index f92f0094d..b603117e4 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -103,7 +103,7 @@ struct online_login_data* add_online_user(int char_server, int account_id) p->char_server = char_server; if( p->waiting_disconnect != INVALID_TIMER ) { - iTimer->delete_timer(p->waiting_disconnect, waiting_disconnect_timer); + timer->delete(p->waiting_disconnect, waiting_disconnect_timer); p->waiting_disconnect = INVALID_TIMER; } return p; @@ -116,7 +116,7 @@ void remove_online_user(int account_id) if( p == NULL ) return; if( p->waiting_disconnect != INVALID_TIMER ) - iTimer->delete_timer(p->waiting_disconnect, waiting_disconnect_timer); + timer->delete(p->waiting_disconnect, waiting_disconnect_timer); idb_remove(online_db, account_id); } @@ -145,7 +145,7 @@ static int online_db_setoffline(DBKey key, DBData *data, va_list ap) p->char_server = -1; if( p->waiting_disconnect != INVALID_TIMER ) { - iTimer->delete_timer(p->waiting_disconnect, waiting_disconnect_timer); + timer->delete(p->waiting_disconnect, waiting_disconnect_timer); p->waiting_disconnect = INVALID_TIMER; } } @@ -793,7 +793,7 @@ int parse_fromchar(int fd) p->char_server = id; if (p->waiting_disconnect != INVALID_TIMER) { - iTimer->delete_timer(p->waiting_disconnect, waiting_disconnect_timer); + timer->delete(p->waiting_disconnect, waiting_disconnect_timer); p->waiting_disconnect = INVALID_TIMER; } } @@ -902,12 +902,12 @@ int parse_fromchar(int fd) int mmo_auth_new(const char* userid, const char* pass, const char sex, const char* last_ip) { static int num_regs = 0; // registration counter static unsigned int new_reg_tick = 0; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); struct mmo_account acc; //Account Registration Flood Protection by [Kevin] if( new_reg_tick == 0 ) - new_reg_tick = iTimer->gettick(); + new_reg_tick = timer->gettick(); if( DIFF_TICK(tick, new_reg_tick) < 0 && num_regs >= allowed_regs ) { ShowNotice("Account registration denied (registration limit exceeded)\n"); return 3; @@ -1151,7 +1151,7 @@ void login_auth_ok(struct login_session_data* sd) WBUFL(buf,2) = sd->account_id; charif_sendallwos(-1, buf, 6); if( data->waiting_disconnect == INVALID_TIMER ) - data->waiting_disconnect = iTimer->add_timer(iTimer->gettick()+AUTH_TIMEOUT, waiting_disconnect_timer, sd->account_id, 0); + data->waiting_disconnect = timer->add(timer->gettick()+AUTH_TIMEOUT, waiting_disconnect_timer, sd->account_id, 0); WFIFOHEAD(fd,3); WFIFOW(fd,0) = 0x81; @@ -1218,7 +1218,7 @@ void login_auth_ok(struct login_session_data* sd) data = add_online_user(-1, sd->account_id); // schedule deletion of this node - data->waiting_disconnect = iTimer->add_timer(iTimer->gettick()+AUTH_TIMEOUT, waiting_disconnect_timer, sd->account_id, 0); + data->waiting_disconnect = timer->add(timer->gettick()+AUTH_TIMEOUT, waiting_disconnect_timer, sd->account_id, 0); } } @@ -1796,7 +1796,7 @@ int do_init(int argc, char** argv) // Online user database init online_db = idb_alloc(DB_OPT_RELEASE_DATA); - iTimer->add_timer_func_list(waiting_disconnect_timer, "waiting_disconnect_timer"); + timer->add_func_list(waiting_disconnect_timer, "waiting_disconnect_timer"); // Interserver auth init auth_db = idb_alloc(DB_OPT_RELEASE_DATA); @@ -1805,13 +1805,13 @@ int do_init(int argc, char** argv) set_defaultparse(parse_login); // every 10 minutes cleanup online account db. - iTimer->add_timer_func_list(online_data_cleanup, "online_data_cleanup"); - iTimer->add_timer_interval(iTimer->gettick() + 600*1000, online_data_cleanup, 0, 0, 600*1000); + timer->add_func_list(online_data_cleanup, "online_data_cleanup"); + timer->add_interval(timer->gettick() + 600*1000, online_data_cleanup, 0, 0, 600*1000); // add timer to detect ip address change and perform update if (login_config.ip_sync_interval) { - iTimer->add_timer_func_list(sync_ip_addresses, "sync_ip_addresses"); - iTimer->add_timer_interval(iTimer->gettick() + login_config.ip_sync_interval, sync_ip_addresses, 0, 0, login_config.ip_sync_interval); + timer->add_func_list(sync_ip_addresses, "sync_ip_addresses"); + timer->add_interval(timer->gettick() + login_config.ip_sync_interval, sync_ip_addresses, 0, 0, login_config.ip_sync_interval); } // Account database init diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2466c2cca..23653f803 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -912,7 +912,7 @@ ACMD(hide) if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank ) {// register the player for ranking calculations - sd->pvp_timer = iTimer->add_timer( iTimer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0 ); + sd->pvp_timer = timer->add( timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0 ); } //bugreport:2266 iMap->foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl); @@ -926,7 +926,7 @@ ACMD(hide) if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {// unregister the player for ranking - iTimer->delete_timer( sd->pvp_timer, pc->calc_pvprank_timer ); + timer->delete( sd->pvp_timer, pc->calc_pvprank_timer ); sd->pvp_timer = INVALID_TIMER; } } @@ -1096,7 +1096,7 @@ ACMD(heal) if ( hp < 0 && sp <= 0 ) { iStatus->damage(NULL, &sd->bl, -hp, -sp, 0, 0); - clif->damage(&sd->bl,&sd->bl, iTimer->gettick(), 0, 0, -hp, 0, 4, 0); + clif->damage(&sd->bl,&sd->bl, timer->gettick(), 0, 0, -hp, 0, 4, 0); clif->message(fd, msg_txt(156)); // HP or/and SP modified. return true; } @@ -1107,7 +1107,7 @@ ACMD(heal) iStatus->heal(&sd->bl, hp, 0, 0); else { iStatus->damage(NULL, &sd->bl, -hp, 0, 0, 0); - clif->damage(&sd->bl,&sd->bl, iTimer->gettick(), 0, 0, -hp, 0, 4, 0); + clif->damage(&sd->bl,&sd->bl, timer->gettick(), 0, 0, -hp, 0, 4, 0); } } @@ -1470,7 +1470,7 @@ static int atcommand_pvpoff_sub(struct block_list *bl,va_list ap) TBL_PC* sd = (TBL_PC*)bl; clif->pvpset(sd, 0, 0, 2); if (sd->pvp_timer != INVALID_TIMER) { - iTimer->delete_timer(sd->pvp_timer, pc->calc_pvprank_timer); + timer->delete(sd->pvp_timer, pc->calc_pvprank_timer); sd->pvp_timer = INVALID_TIMER; } return 0; @@ -1505,7 +1505,7 @@ static int atcommand_pvpon_sub(struct block_list *bl,va_list ap) { TBL_PC* sd = (TBL_PC*)bl; if (sd->pvp_timer == INVALID_TIMER) { - sd->pvp_timer = iTimer->add_timer(iTimer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0); + sd->pvp_timer = timer->add(timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0); sd->pvp_rank = 0; sd->pvp_lastusers = 0; sd->pvp_point = 5; @@ -4206,7 +4206,7 @@ ACMD(nuke) if ((pl_sd = iMap->nick2sd(atcmd_player_name)) != NULL) { if (pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) { // you can kill only lower or same GM level - skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, iTimer->gettick(), 0); + skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, timer->gettick(), 0); clif->message(fd, msg_txt(109)); // Player has been nuked! } else { clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. @@ -4419,25 +4419,25 @@ ACMD(servertime) clif->message(fd, msg_txt(232)); // Game time: The game is in permanent night. } else if (battle_config.night_duration == 0) if (iMap->night_flag == 1) { // we start with night - timer_data = iTimer->get_timer(pc->day_timer_tid); - sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,iTimer->gettick())/1000)); // Game time: The game is actualy in night for %s. + timer_data = timer->get(pc->day_timer_tid); + sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in night for %s. clif->message(fd, temp); clif->message(fd, msg_txt(234)); // Game time: After, the game will be in permanent daylight. } else clif->message(fd, msg_txt(231)); // Game time: The game is in permanent daylight. else if (battle_config.day_duration == 0) if (iMap->night_flag == 0) { // we start with day - timer_data = iTimer->get_timer(pc->night_timer_tid); - sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,iTimer->gettick())/1000)); // Game time: The game is actualy in daylight for %s. + timer_data = timer->get(pc->night_timer_tid); + sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in daylight for %s. clif->message(fd, temp); clif->message(fd, msg_txt(236)); // Game time: After, the game will be in permanent night. } else clif->message(fd, msg_txt(232)); // Game time: The game is in permanent night. else { if (iMap->night_flag == 0) { - timer_data = iTimer->get_timer(pc->night_timer_tid); - timer_data2 = iTimer->get_timer(pc->day_timer_tid); - sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,iTimer->gettick())/1000)); // Game time: The game is actualy in daylight for %s. + timer_data = timer->get(pc->night_timer_tid); + timer_data2 = timer->get(pc->day_timer_tid); + sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,timer->gettick())/1000)); // Game time: The game is actualy in daylight for %s. clif->message(fd, temp); if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0) sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s. @@ -4447,9 +4447,9 @@ ACMD(servertime) sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s. clif->message(fd, temp); } else { - timer_data = iTimer->get_timer(pc->day_timer_tid); - timer_data2 = iTimer->get_timer(pc->night_timer_tid); - sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,iTimer->gettick()) / 1000)); // Game time: The game is actualy in night for %s. + timer_data = timer->get(pc->day_timer_tid); + timer_data2 = timer->get(pc->night_timer_tid); + sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,timer->gettick()) / 1000)); // Game time: The game is actualy in night for %s. clif->message(fd, temp); if (DIFF_TICK(timer_data->tick,timer_data2->tick) > 0) sprintf(temp, msg_txt(239), txt_time((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s. @@ -5131,7 +5131,7 @@ ACMD(npcmove) x = cap_value(x, 0, map[m].xs-1); y = cap_value(y, 0, map[m].ys-1); iMap->foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); - iMap->moveblock(&nd->bl, x, y, iTimer->gettick()); + iMap->moveblock(&nd->bl, x, y, timer->gettick()); iMap->foreachinrange(clif->insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); clif->message(fd, msg_txt(1155)); // NPC moved. @@ -5455,7 +5455,7 @@ ACMD(displayskill) return false; } status = iStatus->get_status_data(&sd->bl); - tick = iTimer->gettick(); + tick = timer->gettick(); clif->skill_damage(&sd->bl,&sd->bl, tick, status->amotion, status->dmotion, 1, 1, skill_id, skill_lv, 5); clif->skill_nodamage(&sd->bl, &sd->bl, skill_id, skill_lv, 1); clif->skill_poseffect(&sd->bl, skill_id, skill_lv, sd->bl.x, sd->bl.y, tick); @@ -6216,9 +6216,9 @@ ACMD(pettalk) nullpo_retr(-1, sd); if ( battle_config.min_chat_delay ) { - if( DIFF_TICK(sd->cantalk_tick, iTimer->gettick()) > 0 ) + if( DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0 ) return true; - sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay; + sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay; } if(!sd->status.pet_id || !(pd=sd->pd)) @@ -6339,7 +6339,7 @@ ACMD(summon) int mob_id = 0; int duration = 0; struct mob_data *md; - unsigned int tick=iTimer->gettick(); + unsigned int tick=timer->gettick(); nullpo_retr(-1, sd); @@ -6369,7 +6369,7 @@ ACMD(summon) md->master_id=sd->bl.id; md->special_state.ai=1; - md->deletetimer=iTimer->add_timer(tick+(duration*60000),mob->timer_delete,md->bl.id,0); + md->deletetimer=timer->add(tick+(duration*60000),mob->timer_delete,md->bl.id,0); clif->specialeffect(&md->bl,344,AREA); mob->spawn(md); sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000); @@ -6492,7 +6492,7 @@ ACMD(uptime) minute = 60, days = 0, hours = 0, minutes = 0; nullpo_retr(-1, sd); - seconds = iTimer->get_uptime(); + seconds = timer->get_uptime(); days = seconds/day; seconds -= (seconds/day>0)?(seconds/day)*day:0; hours = seconds/hour; @@ -7044,9 +7044,9 @@ ACMD(homtalk) nullpo_retr(-1, sd); if ( battle_config.min_chat_delay ) { - if( DIFF_TICK(sd->cantalk_tick, iTimer->gettick()) > 0 ) + if( DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0 ) return true; - sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay; + sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay; } if (sd->sc.count && //no "chatting" while muted. diff --git a/src/map/battle.c b/src/map/battle.c index 85fa2cb98..a8022ea84 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -277,9 +277,9 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, iMap->freeblock_lock(); status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope] if( attack_type && !iStatus->isdead(target) && additional_effects ) - skill->additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, iTimer->gettick()); + skill->additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, timer->gettick()); if( dmg_lv > ATK_BLOCK && attack_type ) - skill->counter_additional_effect(src, target, skill_id, skill_lv, attack_type, iTimer->gettick()); + skill->counter_additional_effect(src, target, skill_id, skill_lv, attack_type, timer->gettick()); iMap->freeblock_unlock(); return 0; } @@ -302,7 +302,7 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, ((TBL_PC*)src)->delayed_damage++; } - iTimer->add_timer(tick+amotion, battle->delay_damage_sub, 0, (intptr_t)dat); + timer->add(tick+amotion, battle->delay_damage_sub, 0, (intptr_t)dat); return 0; } @@ -365,7 +365,7 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d y = sg->val3 & 0xffff; skill->unitsetting(src,su->group->skill_id,su->group->skill_lv,x,y,1); sg->val3 = -1; - sg->limit = DIFF_TICK(iTimer->gettick(),sg->tick)+300; + sg->limit = DIFF_TICK(timer->gettick(),sg->tick)+300; } } } @@ -2664,7 +2664,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam delay = 200; else delay = 100; - unit->set_walkdelay(bl, iTimer->gettick(), delay, 1); + unit->set_walkdelay(bl, timer->gettick(), delay, 1); if(sc->data[SC_CR_SHRINK] && rnd()%100<5*sce->val1) skill->blown(bl,src,skill->get_blewcount(CR_SHRINK,1),-1,0); @@ -2734,9 +2734,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam if (((sce=sc->data[SC_NJ_UTSUSEMI]) || sc->data[SC_NJ_BUNSINJYUTSU]) && flag&BF_WEAPON && !(skill->get_nk(skill_id)&NK_NO_CARDFIX_ATK)) { - skill->additional_effect (src, bl, skill_id, skill_lv, flag, ATK_BLOCK, iTimer->gettick() ); + skill->additional_effect (src, bl, skill_id, skill_lv, flag, ATK_BLOCK, timer->gettick() ); if( !iStatus->isdead(src) ) - skill->counter_additional_effect( src, bl, skill_id, skill_lv, flag, iTimer->gettick() ); + skill->counter_additional_effect( src, bl, skill_id, skill_lv, flag, timer->gettick() ); if (sce) { clif->specialeffect(bl, 462, AREA); skill->blown(src,bl,sce->val3,-1,0); @@ -2873,7 +2873,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam damage -= damage * sc->data[SC_PAIN_KILLER]->val3 / 100; } if((sce=sc->data[SC_MAGMA_FLOW]) && (rnd()%100 <= sce->val2) ){ - skill->castend_damage_id(bl,src,MH_MAGMA_FLOW,sce->val1,iTimer->gettick(),0); + skill->castend_damage_id(bl,src,MH_MAGMA_FLOW,sce->val1,timer->gettick(),0); } if( (sce = sc->data[SC_STONEHARDSKIN]) && flag&(BF_SHORT|BF_WEAPON) && damage > 0 ) { @@ -2970,7 +2970,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam if( s_bl->type == BL_PC ) ((TBL_PC*)s_bl)->shadowform_id = 0; } else { - iStatus->damage(bl, s_bl, damage, 0, clif->damage(s_bl, s_bl, iTimer->gettick(), 500, 500, damage, -1, 0, 0), 0); + iStatus->damage(bl, s_bl, damage, 0, clif->damage(s_bl, s_bl, timer->gettick(), 500, 500, damage, -1, 0, 0), 0); return ATK_NONE; } } @@ -3052,9 +3052,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam if( bl->type == BL_MOB && !iStatus->isdead(bl) && src != bl) { if (damage > 0 ) - mob->skill_event((TBL_MOB*)bl,src,iTimer->gettick(),flag); + mob->skill_event((TBL_MOB*)bl,src,timer->gettick(),flag); if (skill_id) - mob->skill_event((TBL_MOB*)bl,src,iTimer->gettick(),MSC_SKILLUSED|(skill_id<<16)); + mob->skill_event((TBL_MOB*)bl,src,timer->gettick(),MSC_SKILLUSED|(skill_id<<16)); } if( sd ) { if( pc_ismadogear(sd) && rnd()%100 < 50 ) { @@ -5054,7 +5054,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list change = true; if( change ) sd->state.autocast = 1; - iMap->foreachinshootrange(battle->damage_area,target,skill->get_splash(LG_REFLECTDAMAGE,1),BL_CHAR,iTimer->gettick(),target,wd.amotion,sstatus->dmotion,rdamage,tstatus->race); + iMap->foreachinshootrange(battle->damage_area,target,skill->get_splash(LG_REFLECTDAMAGE,1),BL_CHAR,timer->gettick(),target,wd.amotion,sstatus->dmotion,rdamage,tstatus->race); if( change ) sd->state.autocast = 0; } @@ -5062,8 +5062,8 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list //Use Reflect Shield to signal this kind of skill trigger. [Skotlex] if( tsd && src != target ) battle->drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src)); - battle->delay_damage(iTimer->gettick(), wd.amotion,target,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true); - skill->additional_effect(target, src, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,iTimer->gettick()); + battle->delay_damage(timer->gettick(), wd.amotion,target,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true); + skill->additional_effect(target, src, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,timer->gettick()); } } } @@ -5113,7 +5113,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list rnd()%100 < tsc->data[SC_SWORDREJECT]->val2 ) { ATK_RATER(50) - status_fix_damage(target,src,wd.damage,clif->damage(target,src,iTimer->gettick(),0,0,wd.damage,0,0,0)); + status_fix_damage(target,src,wd.damage,clif->damage(target,src,timer->gettick(),0,0,wd.damage,0,0,0)); clif->skill_nodamage(target,target,ST_REJECTSWORD,tsc->data[SC_SWORDREJECT]->val1,1); if( --(tsc->data[SC_SWORDREJECT]->val3) <= 0 ) status_change_end(target, SC_SWORDREJECT, INVALID_TIMER); @@ -5200,9 +5200,9 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i if (ratio > 5000) ratio = 5000; // Maximum of 5000% ATK rdamage = rdamage * ratio / 100 + (*dmg) * (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; skill->blown(bl, src, skill->get_blewcount(SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1), unit->getdir(src), 0); - clif->skill_damage(bl, src, iTimer->gettick(), status_get_amotion(src), 0, rdamage, + clif->skill_damage(bl, src, timer->gettick(), status_get_amotion(src), 0, rdamage, 1, SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1, 6); // This is how official does - clif->damage(src, bl, iTimer->gettick(), status_get_amotion(src)+1000, 0, rdamage/10, 1, 0, 0); + clif->damage(src, bl, timer->gettick(), status_get_amotion(src)+1000, 0, rdamage/10, 1, 0, 0); iStatus->damage(src, bl, iStatus->damage(bl, src, rdamage, 0, 0, 1)/10, 0, 0, 1); status_change_end(bl, SC_CRESCENTELBOW, INVALID_TIMER); return 0; // Just put here to minimize redundancy @@ -5210,18 +5210,18 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i if( flag & BF_SHORT) {//Bounces back part of the damage. if ( sd && sd->bonus.short_weapon_damage_return ){ NORMALIZE_RDAMAGE(damage * sd->bonus.short_weapon_damage_return / 100); - *delay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + *delay = clif->damage(src, src, timer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); } if( sc && sc->count ) { if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION ){ NORMALIZE_RDAMAGE(damage * sc->data[SC_REFLECTSHIELD]->val2 / 100); - *delay = clif->skill_damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, CR_REFLECTSHIELD, 1, 4); + *delay = clif->skill_damage(src, src, timer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, CR_REFLECTSHIELD, 1, 4); } if( sc->data[SC_LG_REFLECTDAMAGE] && rand()%100 < (30 + 10*sc->data[SC_LG_REFLECTDAMAGE]->val1) ) { if( skill_id != HT_LANDMINE && skill_id != HT_CLAYMORETRAP && skill_id != RA_CLUSTERBOMB && (skill_id <= RA_VERDURETRAP || skill_id > RA_ICEBOUNDTRAP) && skill_id != MA_LANDMINE ){ NORMALIZE_RDAMAGE((*dmg) * sc->data[SC_LG_REFLECTDAMAGE]->val2 / 100); - *delay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + *delay = clif->damage(src, src, timer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); } } if( sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION && !is_boss(src) ) { @@ -5231,22 +5231,22 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i if( !iMap->check_dir(dir,t_dir) ) { int64 rd1 = damage * sc->data[SC_DEATHBOUND]->val2 / 100; // Amplify damage. trdamage += rdamage = rd1 - (*dmg = rd1 * 30 / 100); // not normalized as intended. - clif->skill_damage(src, bl, iTimer->gettick(), status_get_amotion(src), 0, -3000, 1, RK_DEATHBOUND, sc->data[SC_DEATHBOUND]->val1, 6); + clif->skill_damage(src, bl, timer->gettick(), status_get_amotion(src), 0, -3000, 1, RK_DEATHBOUND, sc->data[SC_DEATHBOUND]->val1, 6); skill->blown(bl, src, skill->get_blewcount(RK_DEATHBOUND, sc->data[SC_DEATHBOUND]->val1), unit->getdir(src), 0); if( skill_id ) status_change_end(bl, SC_DEATHBOUND, INVALID_TIMER); - *delay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + *delay = clif->damage(src, src, timer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); } } if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !is_boss(src) ){ NORMALIZE_RDAMAGE(damage * sc->data[SC_SHIELDSPELL_DEF]->val2 / 100); - *delay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + *delay = clif->damage(src, src, timer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); } } } else { if (sd && sd->bonus.long_weapon_damage_return){ NORMALIZE_RDAMAGE(damage * sd->bonus.long_weapon_damage_return / 100); - *delay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + *delay = clif->damage(src, src, timer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); } } @@ -5503,7 +5503,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t } if(tsc && tsc->data[SC_KAAHI] && tsc->data[SC_KAAHI]->val4 == INVALID_TIMER && tstatus->hp < tstatus->max_hp) - tsc->data[SC_KAAHI]->val4 = iTimer->add_timer(tick + skill->get_time2(SL_KAAHI,tsc->data[SC_KAAHI]->val1), iStatus->kaahi_heal_timer, target->id, SC_KAAHI); //Activate heal. + tsc->data[SC_KAAHI]->val4 = timer->add(tick + skill->get_time2(SL_KAAHI,tsc->data[SC_KAAHI]->val1), iStatus->kaahi_heal_timer, target->id, SC_KAAHI); //Activate heal. wd = battle->calc_attack(BF_WEAPON, src, target, 0, 0, flag); @@ -5563,7 +5563,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t (d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == target->id) ) && check_distance_bl(target, d_bl, sce->val3) ) { - clif->damage(d_bl, d_bl, iTimer->gettick(), 0, 0, damage, 0, 0, 0); + clif->damage(d_bl, d_bl, timer->gettick(), 0, 0, damage, 0, 0, 0); status_fix_damage(NULL, d_bl, damage, 0); } else @@ -6774,11 +6774,11 @@ int battle_config_read(const char* cfgName) void do_init_battle(void) { delay_damage_ers = ers_new(sizeof(struct delay_damage),"battle.c::delay_damage_ers",ERS_OPT_CLEAR); - iTimer->add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub"); + timer->add_func_list(battle_delay_damage_sub, "battle_delay_damage_sub"); #ifndef STATS_OPT_OUT - iTimer->add_timer_func_list(Hercules_report_timer, "Hercules_report_timer"); - iTimer->add_timer_interval(iTimer->gettick()+30000, Hercules_report_timer, 0, 0, 60000 * 30); + timer->add_func_list(Hercules_report_timer, "Hercules_report_timer"); + timer->add_interval(timer->gettick()+30000, Hercules_report_timer, 0, 0, 60000 * 30); #endif } diff --git a/src/map/battleground.c b/src/map/battleground.c index e72683880..1bc142b7f 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -460,7 +460,7 @@ void bg_queue_ready_ack (struct bg_arena *arena, struct map_session_data *sd, bo } /* check if all are ready then cancell timer, and start game */ if( count == queue->items ) { - iTimer->delete_timer(arena->begin_timer,bg->begin_timer); + timer->delete(arena->begin_timer,bg->begin_timer); arena->begin_timer = INVALID_TIMER; bg->begin(arena); } @@ -556,7 +556,7 @@ void bg_queue_pregame(struct bg_arena *arena) { clif->bgqueue_battlebegins(sd,arena->id,SELF); } } - arena->begin_timer = iTimer->add_timer( iTimer->gettick() + (arena->pregame_duration*1000), bg->begin_timer, arena->id, 0 ); + arena->begin_timer = timer->add( timer->gettick() + (arena->pregame_duration*1000), bg->begin_timer, arena->id, 0 ); } int bg_fillup_timer(int tid, unsigned int tick, int id, intptr_t data) { bg->queue_pregame(bg->arena[id]); @@ -568,12 +568,12 @@ void bg_queue_check(struct bg_arena *arena) { int count = script->hq[arena->queue_id].items; if( count == arena->max_players ) { if( arena->fillup_timer != INVALID_TIMER ) { - iTimer->delete_timer(arena->fillup_timer,bg->fillup_timer); + timer->delete(arena->fillup_timer,bg->fillup_timer); arena->fillup_timer = INVALID_TIMER; } bg->queue_pregame(arena); } else if( count >= arena->min_players && arena->fillup_timer == INVALID_TIMER ) { - arena->fillup_timer = iTimer->add_timer( iTimer->gettick() + (arena->fillup_duration*1000), bg->fillup_timer, arena->id, 0 ); + arena->fillup_timer = timer->add( timer->gettick() + (arena->fillup_duration*1000), bg->fillup_timer, arena->id, 0 ); } } void bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type) { @@ -764,8 +764,8 @@ enum BATTLEGROUNDS_QUEUE_ACK bg_canqueue(struct map_session_data *sd, struct bg_ } void do_init_battleground(void) { bg->team_db = idb_alloc(DB_OPT_RELEASE_DATA); - iTimer->add_timer_func_list(bg->send_xy_timer, "bg_send_xy_timer"); - iTimer->add_timer_interval(iTimer->gettick() + battle_config.bg_update_interval, bg->send_xy_timer, 0, 0, battle_config.bg_update_interval); + timer->add_func_list(bg->send_xy_timer, "bg_send_xy_timer"); + timer->add_interval(timer->gettick() + battle_config.bg_update_interval, bg->send_xy_timer, 0, 0, battle_config.bg_update_interval); bg->config_read(); } diff --git a/src/map/chrif.c b/src/map/chrif.c index 524286da1..dcca72cc8 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -186,7 +186,7 @@ static bool chrif_sd_to_auth(TBL_PC* sd, enum sd_state state) { node->sex = sd->status.sex; node->fd = sd->fd; node->sd = sd; //Data from logged on char. - node->node_created = iTimer->gettick(); //timestamp for node timeouts + node->node_created = timer->gettick(); //timestamp for node timeouts node->state = state; sd->state.active = 0; @@ -691,11 +691,11 @@ int auth_db_cleanup_sub(DBKey key, DBData *data, va_list ap) { struct auth_node *node = DB->data2ptr(data); const char* states[] = { "Login", "Logout", "Map change" }; - if(DIFF_TICK(iTimer->gettick(),node->node_created)>60000) { + if(DIFF_TICK(timer->gettick(),node->node_created)>60000) { switch (node->state) { case ST_LOGOUT: //Re-save attempt (->sd should never be null here). - node->node_created = iTimer->gettick(); //Refresh tick (avoid char-server load if connection is really bad) + node->node_created = timer->gettick(); //Refresh tick (avoid char-server load if connection is really bad) chrif->save(node->sd, 1); break; default: @@ -1170,10 +1170,10 @@ int chrif_save_scdata(struct map_session_data *sd) { //parses the sc_data of the unsigned int tick; struct status_change_data data; struct status_change *sc = &sd->sc; - const struct TimerData *timer; + const struct TimerData *td; chrif_check(-1); - tick = iTimer->gettick(); + tick = timer->gettick(); WFIFOHEAD(char_fd, 14 + SC_MAX*sizeof(struct status_change_data)); WFIFOW(char_fd,0) = 0x2b1c; @@ -1184,10 +1184,10 @@ int chrif_save_scdata(struct map_session_data *sd) { //parses the sc_data of the if (!sc->data[i]) continue; if (sc->data[i]->timer != INVALID_TIMER) { - timer = iTimer->get_timer(sc->data[i]->timer); - if (timer == NULL || timer->func != iStatus->change_timer || DIFF_TICK(timer->tick,tick) < 0) + td = timer->get(sc->data[i]->timer); + if (td == NULL || td->func != iStatus->change_timer || DIFF_TICK(td->tick,tick) < 0) continue; - data.tick = DIFF_TICK(timer->tick,tick); //Duration that is left before ending. + data.tick = DIFF_TICK(td->tick,tick); //Duration that is left before ending. } else data.tick = -1; //Infinite duration data.type = i; @@ -1342,7 +1342,7 @@ void chrif_on_disconnect(void) { iMap->eraseallipport(); //Attempt to reconnect in a second. [Skotlex] - iTimer->add_timer(iTimer->gettick() + 1000, check_connect_char_server, 0, 0); + timer->add(timer->gettick() + 1000, check_connect_char_server, 0, 0); } @@ -1643,17 +1643,17 @@ int do_init_chrif(void) { auth_db = idb_alloc(DB_OPT_BASE); auth_db_ers = ers_new(sizeof(struct auth_node),"chrif.c::auth_db_ers",ERS_OPT_NONE); - iTimer->add_timer_func_list(check_connect_char_server, "check_connect_char_server"); - iTimer->add_timer_func_list(auth_db_cleanup, "auth_db_cleanup"); + timer->add_func_list(check_connect_char_server, "check_connect_char_server"); + timer->add_func_list(auth_db_cleanup, "auth_db_cleanup"); // establish map-char connection if not present - iTimer->add_timer_interval(iTimer->gettick() + 1000, check_connect_char_server, 0, 0, 10 * 1000); + timer->add_interval(timer->gettick() + 1000, check_connect_char_server, 0, 0, 10 * 1000); // wipe stale data for timed-out client connection requests - iTimer->add_timer_interval(iTimer->gettick() + 1000, auth_db_cleanup, 0, 0, 30 * 1000); + timer->add_interval(timer->gettick() + 1000, auth_db_cleanup, 0, 0, 30 * 1000); // send the user count every 10 seconds, to hide the charserver's online counting problem - iTimer->add_timer_interval(iTimer->gettick() + 1000, send_usercount_tochar, 0, 0, UPDATE_INTERVAL); + timer->add_interval(timer->gettick() + 1000, send_usercount_tochar, 0, 0, UPDATE_INTERVAL); return 0; } diff --git a/src/map/clif.c b/src/map/clif.c index c61630bb5..74d827847 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -594,7 +594,7 @@ void clif_authok(struct map_session_data *sd) struct packet_authok p; p.PacketType = authokType; - p.startTime = iTimer->gettick(); + p.startTime = timer->gettick(); WBUFPOS(&p.PosDir[0],0,sd->bl.x,sd->bl.y,sd->ud.dir); /* do the stupid client math */ p.xSize = p.ySize = 5; /* not-used */ @@ -797,7 +797,7 @@ void clif_clearunit_delayed(struct block_list* bl, clr_type type, unsigned int t { struct block_list *tbl = ers_alloc(clif->delay_clearunit_ers, struct block_list); memcpy (tbl, bl, sizeof (struct block_list)); - iTimer->add_timer(tick, clif->clearunit_delayed_sub, (int)type, (intptr_t)tbl); + timer->add(tick, clif->clearunit_delayed_sub, (int)type, (intptr_t)tbl); } void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, unsigned short *lhand) @@ -1152,7 +1152,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; - p.moveStartTime = iTimer->gettick(); + p.moveStartTime = timer->gettick(); #if PACKETVER < 7 p.shield = vd->shield; #endif @@ -1530,7 +1530,7 @@ void clif_walkok(struct map_session_data *sd) WFIFOHEAD(fd, packet_len(0x87)); WFIFOW(fd,0)=0x87; - WFIFOL(fd,2)=iTimer->gettick(); + WFIFOL(fd,2)=timer->gettick(); WFIFOPOS2(fd,6,sd->bl.x,sd->bl.y,sd->ud.to_x,sd->ud.to_y,8,8); WFIFOSET(fd,packet_len(0x87)); } @@ -1601,7 +1601,7 @@ void clif_move(struct unit_data *ud) WBUFW(buf,0)=0x86; WBUFL(buf,2)=bl->id; WBUFPOS2(buf,6,bl->x,bl->y,ud->to_x,ud->to_y,8,8); - WBUFL(buf,12)=iTimer->gettick(); + WBUFL(buf,12)=timer->gettick(); clif->send(buf, packet_len(0x86), bl, AREA_WOS); if (disguised(bl)) { WBUFL(buf,2)=-bl->id; @@ -1627,14 +1627,14 @@ int clif_delayquit(int tid, unsigned int tick, int id, intptr_t data) { *------------------------------------------*/ void clif_quitsave(int fd,struct map_session_data *sd) { if (!battle_config.prevent_logout || - DIFF_TICK(iTimer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) + DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) iMap->quit(sd); else if (sd->fd) { //Disassociate session from player (session is deleted after this function was called) //And set a timer to make him quit later. session[sd->fd]->session_data = NULL; sd->fd = 0; - iTimer->add_timer(iTimer->gettick() + 10000, clif->delayquit, sd->bl.id, 0); + timer->add(timer->gettick() + 10000, clif->delayquit, sd->bl.id, 0); } } @@ -3730,7 +3730,7 @@ void clif_useitemack(struct map_session_data *sd,int index,int amount,bool ok) } void clif_hercules_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) { - if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), iTimer->gettick()) > 0 && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { + if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) { clif->colormes(sd->fd,COLOR_RED,msg_txt(1455)); return; } else { @@ -3740,7 +3740,7 @@ void clif_hercules_chsys_send(struct hChSysCh *channel, struct map_session_data if( channel->type == hChSys_IRC ) ircbot->relay(sd->status.name,msg); if( channel->msg_delay != 0 ) - sd->hchsysch_tick = iTimer->gettick(); + sd->hchsysch_tick = timer->gettick(); } } @@ -9417,7 +9417,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { if(map[sd->bl.m].flag.pvp && !(sd->sc.option&OPTION_INVISIBLE)) { if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris] if (!map[sd->bl.m].flag.pvp_nocalcrank) - sd->pvp_timer = iTimer->add_timer(iTimer->gettick()+200, pc->calc_pvprank_timer, sd->bl.id, 0); + sd->pvp_timer = timer->add(timer->gettick()+200, pc->calc_pvprank_timer, sd->bl.id, 0); sd->pvp_rank = 0; sd->pvp_lastusers = 0; sd->pvp_point = 5; @@ -9465,7 +9465,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { if( battle_config.hom_setting&0x8 ) status_calc_bl(&sd->hd->bl, SCB_SPEED); //Homunc mimic their master's speed on each map change if( !(battle_config.hom_setting&0x2) ) - skill->unit_move(&sd->hd->bl,iTimer->gettick(),1); // apply land skills immediately + skill->unit_move(&sd->hd->bl,timer->gettick(),1); // apply land skills immediately } if( sd->md ) { @@ -9641,7 +9641,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { // Trigger skill effects if you appear standing on them if(!battle_config.pc_invincible_time) - skill->unit_move(&sd->bl,iTimer->gettick(),1); + skill->unit_move(&sd->bl,timer->gettick(),1); } @@ -9666,7 +9666,7 @@ void clif_parse_TickSend(int fd, struct map_session_data *sd) { sd->client_tick = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); - clif->notify_time(sd, iTimer->gettick()); + clif->notify_time(sd, timer->gettick()); } @@ -9746,7 +9746,7 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd) { int npc_id = sd->progressbar.npc_id; - if( iTimer->gettick() < sd->progressbar.timeout && sd->st ) + if( timer->gettick() < sd->progressbar.timeout && sd->st ) sd->st->state = END; sd->state.workinprogress = sd->progressbar.npc_id = sd->progressbar.timeout = 0; @@ -9813,7 +9813,7 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd) { /* Rovert's prevent logout option fixed [Valaris] */ if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && - (!battle_config.prevent_logout || DIFF_TICK(iTimer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) + (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { set_eof(fd); @@ -9896,9 +9896,9 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) return; if( battle_config.min_chat_delay ) { //[Skotlex] - if (DIFF_TICK(sd->cantalk_tick, iTimer->gettick()) > 0) + if (DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0) return; - sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay; + sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay; } if( (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE ) { @@ -9941,16 +9941,16 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) unsigned char mylen = 1; if( sd->disguise == -1 ) { - sd->fontcolor_tid = iTimer->add_timer(iTimer->gettick()+5000, clif->undisguise_timer, sd->bl.id, 0); + sd->fontcolor_tid = timer->add(timer->gettick()+5000, clif->undisguise_timer, sd->bl.id, 0); pc->disguise(sd,sd->status.class_); if( pc_isdead(sd) ) clif_clearunit_single(-sd->bl.id, CLR_DEAD, sd->fd); if( unit->is_walking(&sd->bl) ) clif->move(&sd->ud); } else if ( sd->disguise == sd->status.class_ && sd->fontcolor_tid != INVALID_TIMER ) { - const struct TimerData *timer; - if( (timer = iTimer->get_timer(sd->fontcolor_tid)) ) { - iTimer->settick_timer(sd->fontcolor_tid, timer->tick+5000); + const struct TimerData *td; + if( (td = timer->get(sd->fontcolor_tid)) ) { + timer->settick(sd->fontcolor_tid, td->tick+5000); } } @@ -10337,7 +10337,7 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) clif->pActionRequest_sub(sd, RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[1]), RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]), - iTimer->gettick() + timer->gettick() ); } @@ -10355,7 +10355,7 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) { case 0x01: /* Rovert's Prevent logout option - Fixed [Valaris] */ if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && - (!battle_config.prevent_logout || DIFF_TICK(iTimer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) + (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { //Send to char-server for character selection. chrif->charselectreq(sd, session[fd]->client_addr); } else { @@ -10387,10 +10387,10 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) return; if (battle_config.min_chat_delay) { //[Skotlex] - if (DIFF_TICK(sd->cantalk_tick, iTimer->gettick()) > 0) { + if (DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0) { return; } - sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay; + sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay; } // Chat logging type 'W' / Whisper @@ -10827,7 +10827,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) switch (bl->type) { case BL_MOB: case BL_PC: - clif->pActionRequest_sub(sd, 0x07, bl->id, iTimer->gettick()); + clif->pActionRequest_sub(sd, 0x07, bl->id, timer->gettick()); break; case BL_NPC: if( sd->ud.skill_id < RK_ENCHANTBLADE && sd->ud.skilltimer != INVALID_TIMER ) {// TODO: should only work with none 3rd job skills @@ -11326,7 +11326,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) { uint16 skill_id, skill_lv; int tmp, target_id; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); skill_lv = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]); skill_id = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[1]); @@ -11426,7 +11426,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) *------------------------------------------*/ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill_lv, uint16 skill_id, short x, short y, int skillmoreinfo) { - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); if( !(skill->get_inf(skill_id)&INF_GROUND_SKILL) ) return; //Using a target skill on the ground? WRONG. @@ -12200,9 +12200,9 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd) if( battle_config.min_chat_delay ) { //[Skotlex] - if (DIFF_TICK(sd->cantalk_tick, iTimer->gettick()) > 0) + if (DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0) return; - sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay; + sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay; } party->send_message(sd, text, textlen); @@ -13041,9 +13041,9 @@ void clif_parse_GuildMessage(int fd, struct map_session_data* sd) if( battle_config.min_chat_delay ) { //[Skotlex] - if (DIFF_TICK(sd->cantalk_tick, iTimer->gettick()) > 0) + if (DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0) return; - sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay; + sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay; } if( sd->bg_id ) @@ -14834,7 +14834,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd) return; } - if( DIFF_TICK(sd->cansendmail_tick, iTimer->gettick()) > 0 ) { + if( DIFF_TICK(sd->cansendmail_tick, timer->gettick()) > 0 ) { clif->message(sd->fd,msg_txt(675)); //"Cannot send mails too fast!!." clif->mail_send(fd, true); // fail return; @@ -14872,7 +14872,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd) if( !intif->Mail_send(sd->status.account_id, &msg) ) mail->deliveryfail(sd, &msg); - sd->cansendmail_tick = iTimer->gettick() + 1000; // 1 Second flood Protection + sd->cansendmail_tick = timer->gettick() + 1000; // 1 Second flood Protection } @@ -15411,11 +15411,11 @@ void clif_bossmapinfo(int fd, struct mob_data *md, short flag) } else WFIFOB(fd,2) = 2; // First Time } else if (md->spawn_timer != INVALID_TIMER) { // Boss is Dead - const struct TimerData * timer_data = iTimer->get_timer(md->spawn_timer); + const struct TimerData * timer_data = timer->get(md->spawn_timer); unsigned int seconds; int hours, minutes; - seconds = DIFF_TICK(timer_data->tick, iTimer->gettick()) / 1000 + 60; + seconds = DIFF_TICK(timer_data->tick, timer->gettick()) / 1000 + 60; hours = seconds / (60 * 60); seconds = seconds - (60 * 60 * hours); minutes = seconds / 60; @@ -15961,9 +15961,9 @@ void clif_parse_BattleChat(int fd, struct map_session_data* sd) return; if( battle_config.min_chat_delay ) { - if( DIFF_TICK(sd->cantalk_tick, iTimer->gettick()) > 0 ) + if( DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0 ) return; - sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay; + sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay; } bg->send_message(sd, text, textlen); @@ -17397,11 +17397,11 @@ void clif_maptypeproperty2(struct block_list *bl,enum send_target t) { p.flag.guild = 1; p.flag.siege = map_flag_gvg2(bl->m) ? 1: 0; p.flag.mineffect = 1; - p.flag.nolockon = 0; + p.flag.nolockon = 1; p.flag.countpk = map[bl->m].flag.pvp ? 1 : 0; p.flag.nopartyformation = 0; - p.flag.noitemconsumption = 0; - p.flag.summonstarmiracle = 0; + p.flag.noitemconsumption = 1; + p.flag.summonstarmiracle = 1; p.flag.bg = map[bl->m].flag.battleground ? 1 : 0; clif->send(&p,sizeof(p),bl,t); @@ -17909,8 +17909,8 @@ int do_init_clif(void) { exit(EXIT_FAILURE); } - iTimer->add_timer_func_list(clif->clearunit_delayed_sub, "clif_clearunit_delayed_sub"); - iTimer->add_timer_func_list(clif->delayquit, "clif_delayquit"); + timer->add_func_list(clif->clearunit_delayed_sub, "clif_clearunit_delayed_sub"); + timer->add_func_list(clif->delayquit, "clif_delayquit"); clif->delay_clearunit_ers = ers_new(sizeof(struct block_list),"clif.c::delay_clearunit_ers",ERS_OPT_CLEAR); diff --git a/src/map/elemental.c b/src/map/elemental.c index 855d9e2c6..3a6ab2105 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -145,8 +145,8 @@ int elemental_get_lifetime(struct elemental_data *ed) { if( ed == NULL || ed->summon_timer == INVALID_TIMER ) return 0; - td = iTimer->get_timer(ed->summon_timer); - return (td != NULL) ? DIFF_TICK(td->tick, iTimer->gettick()) : 0; + td = timer->get(ed->summon_timer); + return (td != NULL) ? DIFF_TICK(td->tick, timer->gettick()) : 0; } int elemental_save(struct elemental_data *ed) { @@ -190,7 +190,7 @@ static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t dat void elemental_summon_stop(struct elemental_data *ed) { nullpo_retv(ed); if( ed->summon_timer != INVALID_TIMER ) - iTimer->delete_timer(ed->summon_timer, elemental_summon_end); + timer->delete(ed->summon_timer, elemental_summon_end); ed->summon_timer = INVALID_TIMER; } @@ -215,7 +215,7 @@ int elemental_delete(struct elemental_data *ed, int reply) { void elemental_summon_init(struct elemental_data *ed) { if( ed->summon_timer == INVALID_TIMER ) - ed->summon_timer = iTimer->add_timer(iTimer->gettick() + ed->elemental.life_time, elemental_summon_end, ed->master->bl.id, 0); + ed->summon_timer = timer->add(timer->gettick() + ed->elemental.life_time, elemental_summon_end, ed->master->bl.id, 0); ed->regen.state.block = 0; } @@ -257,7 +257,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) { iMap->addiddb(&ed->bl); status_calc_elemental(ed,1); - ed->last_spdrain_time = ed->last_thinktime = iTimer->gettick(); + ed->last_spdrain_time = ed->last_thinktime = timer->gettick(); ed->summon_timer = INVALID_TIMER; elemental_summon_init(ed); } else { @@ -430,9 +430,9 @@ int elemental_action(struct elemental_data *ed, struct block_list *bl, unsigned ed->ud.skill_lv = skill_lv; if( skill->get_inf(skill_id) & INF_GROUND_SKILL ) - ed->ud.skilltimer = iTimer->add_timer( tick+iStatus->get_speed(&ed->bl)*walk_dist, skill->castend_pos, ed->bl.id, 0 ); + ed->ud.skilltimer = timer->add( tick+iStatus->get_speed(&ed->bl)*walk_dist, skill->castend_pos, ed->bl.id, 0 ); else - ed->ud.skilltimer = iTimer->add_timer( tick+iStatus->get_speed(&ed->bl)*walk_dist, skill->castend_id, ed->bl.id, 0 ); + ed->ud.skilltimer = timer->add( tick+iStatus->get_speed(&ed->bl)*walk_dist, skill->castend_id, ed->bl.id, 0 ); } return 1; @@ -490,11 +490,11 @@ int elemental_change_mode_ack(struct elemental_data *ed, int mode) { if( ed->ud.skilltimer != INVALID_TIMER ) return 0; - else if( DIFF_TICK(iTimer->gettick(), ed->ud.canact_tick) < 0 ) + else if( DIFF_TICK(timer->gettick(), ed->ud.canact_tick) < 0 ) return 0; ed->target_id = bl->id; // Set new target - ed->last_thinktime = iTimer->gettick(); + ed->last_thinktime = timer->gettick(); if( skill->get_inf(skill_id) & INF_GROUND_SKILL ) unit->skilluse_pos(&ed->bl, bl->x, bl->y, skill_id, skill_lv); @@ -931,8 +931,8 @@ int do_init_elemental(void) { read_elementaldb(); elemental->read_skilldb(); - iTimer->add_timer_func_list(elemental_ai_timer,"elemental_ai_timer"); - iTimer->add_timer_interval(iTimer->gettick()+MIN_ELETHINKTIME,elemental_ai_timer,0,0,MIN_ELETHINKTIME); + timer->add_func_list(elemental_ai_timer,"elemental_ai_timer"); + timer->add_interval(timer->gettick()+MIN_ELETHINKTIME,elemental_ai_timer,0,0,MIN_ELETHINKTIME); return 0; } diff --git a/src/map/guild.c b/src/map/guild.c index 6219fc770..b6dde5700 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2235,10 +2235,10 @@ void do_init_guild(void) { memset(guild_skill_tree,0,sizeof(guild_skill_tree)); sv->readdb(iMap->db_path, "guild_skill_tree.txt", ',', 2+MAX_GUILD_SKILL_REQUIRE*2, 2+MAX_GUILD_SKILL_REQUIRE*2, -1, &guild_read_guildskill_tree_db); //guild skill tree [Komurka] - iTimer->add_timer_func_list(guild_payexp_timer,"guild_payexp_timer"); - iTimer->add_timer_func_list(guild_send_xy_timer, "guild_send_xy_timer"); - iTimer->add_timer_interval(iTimer->gettick()+GUILD_PAYEXP_INVERVAL,guild_payexp_timer,0,0,GUILD_PAYEXP_INVERVAL); - iTimer->add_timer_interval(iTimer->gettick()+GUILD_SEND_XY_INVERVAL,guild_send_xy_timer,0,0,GUILD_SEND_XY_INVERVAL); + timer->add_func_list(guild_payexp_timer,"guild_payexp_timer"); + timer->add_func_list(guild_send_xy_timer, "guild_send_xy_timer"); + timer->add_interval(timer->gettick()+GUILD_PAYEXP_INVERVAL,guild_payexp_timer,0,0,GUILD_PAYEXP_INVERVAL); + timer->add_interval(timer->gettick()+GUILD_SEND_XY_INVERVAL,guild_send_xy_timer,0,0,GUILD_SEND_XY_INVERVAL); } void do_final_guild(void) { diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 81971ebef..92b92106d 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -416,7 +416,7 @@ bool homunculus_evolve(struct homun_data *hd) { status_calc_homunculus(hd,1); if (!(battle_config.hom_setting&0x2)) - skill->unit_move(&sd->hd->bl,iTimer->gettick(),1); // apply land skills immediately + skill->unit_move(&sd->hd->bl,timer->gettick(),1); // apply land skills immediately return true; } @@ -463,7 +463,7 @@ bool homunculus_mutate(struct homun_data *hd, int homun_id) { status_calc_homunculus(hd,1); if (!(battle_config.hom_setting&0x2)) - skill->unit_move(&sd->hd->bl,iTimer->gettick(),1); // apply land skills immediately + skill->unit_move(&sd->hd->bl,timer->gettick(),1); // apply land skills immediately return true; } @@ -647,14 +647,14 @@ int homunculus_hunger_timer(int tid, unsigned int tick, int id, intptr_t data) { } clif->send_homdata(sd,SP_HUNGRY,hd->homunculus.hunger); - hd->hungry_timer = iTimer->add_timer(tick+hd->homunculusDB->hungryDelay,homun->hunger_timer,sd->bl.id,0); //simple Fix albator + hd->hungry_timer = timer->add(tick+hd->homunculusDB->hungryDelay,homun->hunger_timer,sd->bl.id,0); //simple Fix albator return 0; } void homunculus_hunger_timer_delete(struct homun_data *hd) { nullpo_retv(hd); if(hd->hungry_timer != INVALID_TIMER) { - iTimer->delete_timer(hd->hungry_timer,homun->hunger_timer); + timer->delete(hd->hungry_timer,homun->hunger_timer); hd->hungry_timer = INVALID_TIMER; } } @@ -765,7 +765,7 @@ bool homunculus_create(struct map_session_data *sd, struct s_homunculus *hom) { void homunculus_init_timers(struct homun_data * hd) { if (hd->hungry_timer == INVALID_TIMER) - hd->hungry_timer = iTimer->add_timer(iTimer->gettick()+hd->homunculusDB->hungryDelay,homun->hunger_timer,hd->master->bl.id,0); + hd->hungry_timer = timer->add(timer->gettick()+hd->homunculusDB->hungryDelay,homun->hunger_timer,hd->master->bl.id,0); hd->regen.state.block = 0; //Restore HP/SP block. } @@ -1235,7 +1235,7 @@ void do_init_homunculus(void) { homun->exp_db_read(); homun->skill_db_read(); // Add homunc timer function to timer func list [Toms] - iTimer->add_timer_func_list(homun->hunger_timer, "homunculus_hunger_timer"); + timer->add_func_list(homun->hunger_timer, "homunculus_hunger_timer"); //Stock view data for homuncs memset(&homun->viewdb, 0, sizeof(homun->viewdb)); diff --git a/src/map/instance.c b/src/map/instance.c index 98a0dfc8f..563c4326f 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -375,7 +375,7 @@ void instance_del_map(int16 m) { iMap->foreachinmap(instance_cleanup_sub, m, BL_ALL); if( map[m].mob_delete_timer != INVALID_TIMER ) - iTimer->delete_timer(map[m].mob_delete_timer, iMap->removemobs_timer); + timer->delete(map[m].mob_delete_timer, iMap->removemobs_timer); mapindex_removemap( map[m].index ); @@ -508,9 +508,9 @@ void instance_destroy(int instance_id) { db_destroy(instances[instance_id].vars); if( instances[instance_id].progress_timer != INVALID_TIMER ) - iTimer->delete_timer( instances[instance_id].progress_timer, instance_destroy_timer); + timer->delete( instances[instance_id].progress_timer, instance_destroy_timer); if( instances[instance_id].idle_timer != INVALID_TIMER ) - iTimer->delete_timer( instances[instance_id].idle_timer, instance_destroy_timer); + timer->delete( instances[instance_id].idle_timer, instance_destroy_timer); instances[instance_id].vars = NULL; @@ -536,13 +536,13 @@ void instance_check_idle(int instance_id) { idle = false; if( instances[instance_id].idle_timer != INVALID_TIMER && !idle ) { - iTimer->delete_timer(instances[instance_id].idle_timer, instance_destroy_timer); + timer->delete(instances[instance_id].idle_timer, instance_destroy_timer); instances[instance_id].idle_timer = INVALID_TIMER; instances[instance_id].idle_timeout = 0; clif->instance(instance_id, 3, 0); // Notify instance users normal instance expiration } else if( instances[instance_id].idle_timer == INVALID_TIMER && idle ) { instances[instance_id].idle_timeout = now + instances[instance_id].idle_timeoutval; - instances[instance_id].idle_timer = iTimer->add_timer( iTimer->gettick() + instances[instance_id].idle_timeoutval * 1000, instance_destroy_timer, instance_id, 0); + instances[instance_id].idle_timer = timer->add( timer->gettick() + instances[instance_id].idle_timeoutval * 1000, instance_destroy_timer, instance_id, 0); clif->instance(instance_id, 4, 0); // Notify instance users it will be destroyed of no user join it again in "X" time } } @@ -558,13 +558,13 @@ void instance_set_timeout(int instance_id, unsigned int progress_timeout, unsign return; if( instances[instance_id].progress_timer != INVALID_TIMER ) - iTimer->delete_timer( instances[instance_id].progress_timer, instance_destroy_timer); + timer->delete( instances[instance_id].progress_timer, instance_destroy_timer); if( instances[instance_id].idle_timer != INVALID_TIMER ) - iTimer->delete_timer( instances[instance_id].idle_timer, instance_destroy_timer); + timer->delete( instances[instance_id].idle_timer, instance_destroy_timer); if( progress_timeout ) { instances[instance_id].progress_timeout = now + progress_timeout; - instances[instance_id].progress_timer = iTimer->add_timer( iTimer->gettick() + progress_timeout * 1000, instance_destroy_timer, instance_id, 0); + instances[instance_id].progress_timer = timer->add( timer->gettick() + progress_timeout * 1000, instance_destroy_timer, instance_id, 0); } else { instances[instance_id].progress_timeout = 0; instances[instance_id].progress_timer = INVALID_TIMER; @@ -613,7 +613,7 @@ void do_final_instance(void) { } void do_init_instance(void) { - iTimer->add_timer_func_list(instance_destroy_timer, "instance_destroy_timer"); + timer->add_func_list(instance_destroy_timer, "instance_destroy_timer"); } void instance_defaults(void) { diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index b17015b66..5225672af 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -27,7 +27,7 @@ char send_string[IRC_MESSAGE_LENGTH]; /** * Timer callback to (re-)connect to an IRC server - * @see iTimer->do_timer + * @see timer->do_timer */ int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) { struct hSockOpt opt; @@ -37,12 +37,12 @@ int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) { opt.silent = 1; opt.setTimeo = 0; - ircbot->last_try = iTimer->gettick(); + ircbot->last_try = timer->gettick(); if( ( ircbot->fd = make_connection(ircbot->ip,hChSys.irc_server_port,&opt) ) > 0 ){ session[ircbot->fd]->func_parse = ircbot->parse; session[ircbot->fd]->flag.server = 1; - iTimer->add_timer(iTimer->gettick() + 3000, ircbot->identify_timer, 0, 0); + timer->add(timer->gettick() + 3000, ircbot->identify_timer, 0, 0); ircbot->isOn = true; } return 0; @@ -50,7 +50,7 @@ int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) { /** * Timer callback to send identification commands to an IRC server - * @see iTimer->do_timer + * @see timer->do_timer */ int irc_identify_timer(int tid, unsigned int tick, int id, intptr_t data) { if( !ircbot->isOn ) @@ -61,14 +61,14 @@ int irc_identify_timer(int tid, unsigned int tick, int id, intptr_t data) { sprintf(send_string, "NICK %s", hChSys.irc_nick); ircbot->send(send_string); - iTimer->add_timer(iTimer->gettick() + 3000, ircbot->join_timer, 0, 0); + timer->add(timer->gettick() + 3000, ircbot->join_timer, 0, 0); return 0; } /** * Timer callback to join channels (and optionally send NickServ commands) - * @see iTimer->do_timer + * @see timer->do_timer */ int irc_join_timer(int tid, unsigned int tick, int id, intptr_t data) { if( !ircbot->isOn ) @@ -119,7 +119,7 @@ int irc_parse(int fd) { ircbot->isIn = false; ircbot->fails = 0; ircbot->ip = host2ip(hChSys.irc_server); - iTimer->add_timer(iTimer->gettick() + 120000, ircbot->connect_timer, 0, 0); + timer->add(timer->gettick() + 120000, ircbot->connect_timer, 0, 0); return 0; } @@ -427,8 +427,8 @@ void irc_bot_init(void) { ircbot->isIn = false; ircbot->isOn = false; - iTimer->add_timer_func_list(ircbot->connect_timer, "irc_connect_timer"); - iTimer->add_timer(iTimer->gettick() + 7000, ircbot->connect_timer, 0, 0); + timer->add_func_list(ircbot->connect_timer, "irc_connect_timer"); + timer->add(timer->gettick() + 7000, ircbot->connect_timer, 0, 0); } /** diff --git a/src/map/map.c b/src/map/map.c index d4568766a..aff696f06 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1204,7 +1204,7 @@ void map_clearflooritem(struct block_list *bl) { struct flooritem_data* fitem = (struct flooritem_data*)bl; if( fitem->cleartimer ) - iTimer->delete_timer(fitem->cleartimer,iMap->clearflooritem_timer); + timer->delete(fitem->cleartimer,iMap->clearflooritem_timer); clif->clearflooritem(fitem, 0); iMap->deliddb(&fitem->bl); @@ -1359,7 +1359,7 @@ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,i } fitem->first_get_charid = first_charid; - fitem->first_get_tick = iTimer->gettick() + (flags&1 ? battle_config.mvp_item_first_get_time : battle_config.item_first_get_time); + fitem->first_get_tick = timer->gettick() + (flags&1 ? battle_config.mvp_item_first_get_time : battle_config.item_first_get_time); fitem->second_get_charid = second_charid; fitem->second_get_tick = fitem->first_get_tick + (flags&1 ? battle_config.mvp_item_second_get_time : battle_config.item_second_get_time); fitem->third_get_charid = third_charid; @@ -1369,7 +1369,7 @@ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,i fitem->item_data.amount=amount; fitem->subx=(r&3)*3+3; fitem->suby=((r>>2)&3)*3+3; - fitem->cleartimer=iTimer->add_timer(iTimer->gettick()+battle_config.flooritem_lifetime,iMap->clearflooritem_timer,fitem->bl.id,0); + fitem->cleartimer=timer->add(timer->gettick()+battle_config.flooritem_lifetime,iMap->clearflooritem_timer,fitem->bl.id,0); iMap->addiddb(&fitem->bl); iMap->addblock(&fitem->bl); @@ -2096,7 +2096,7 @@ void map_spawnmobs(int16 m) int i, k=0; if (map[m].mob_delete_timer != INVALID_TIMER) { //Mobs have not been removed yet [Skotlex] - iTimer->delete_timer(map[m].mob_delete_timer, iMap->removemobs_timer); + timer->delete(map[m].mob_delete_timer, iMap->removemobs_timer); map[m].mob_delete_timer = INVALID_TIMER; return; } @@ -2170,7 +2170,7 @@ void map_removemobs(int16 m) if (map[m].mob_delete_timer != INVALID_TIMER) // should never happen return; //Mobs are already scheduled for removal - map[m].mob_delete_timer = iTimer->add_timer(iTimer->gettick()+battle_config.mob_remove_delay, iMap->removemobs_timer, m, 0); + map[m].mob_delete_timer = timer->add(timer->gettick()+battle_config.mob_remove_delay, iMap->removemobs_timer, m, 0); } /*========================================== @@ -2867,7 +2867,7 @@ void map_clean(int i) { if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random] int j; if(map[i].mob_delete_timer != INVALID_TIMER) - iTimer->delete_timer(map[i].mob_delete_timer, iMap->removemobs_timer); + timer->delete(map[i].mob_delete_timer, iMap->removemobs_timer); for (j=0; jdelete_timer(map[i].mob_delete_timer, iMap->removemobs_timer); + timer->delete(map[i].mob_delete_timer, iMap->removemobs_timer); for (j=0; jadd_timer_func_list(map_freeblock_timer, "map_freeblock_timer"); - iTimer->add_timer_func_list(map_clearflooritem_timer, "map_clearflooritem_timer"); - iTimer->add_timer_func_list(map_removemobs_timer, "map_removemobs_timer"); - iTimer->add_timer_interval(iTimer->gettick()+1000, map_freeblock_timer, 0, 0, 60*1000); + timer->add_func_list(map_freeblock_timer, "map_freeblock_timer"); + timer->add_func_list(map_clearflooritem_timer, "map_clearflooritem_timer"); + timer->add_func_list(map_removemobs_timer, "map_removemobs_timer"); + timer->add_interval(timer->gettick()+1000, map_freeblock_timer, 0, 0, 60*1000); HPM->load_sub = HPM_map_plugin_load_sub; HPM->symbol_defaults_sub = map_hp_symbols; diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index c0bfeb987..0a0b8f75f 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -295,8 +295,8 @@ void mapreg_init(void) { mapreg->load(); - iTimer->add_timer_func_list(mapreg->save_timer, "mapreg_script_autosave_mapreg"); - iTimer->add_timer_interval(iTimer->gettick() + MAPREG_AUTOSAVE_INTERVAL, mapreg->save_timer, 0, 0, MAPREG_AUTOSAVE_INTERVAL); + timer->add_func_list(mapreg->save_timer, "mapreg_script_autosave_mapreg"); + timer->add_interval(timer->gettick() + MAPREG_AUTOSAVE_INTERVAL, mapreg->save_timer, 0, 0, MAPREG_AUTOSAVE_INTERVAL); } bool mapreg_config_read(const char* w1, const char* w2) { diff --git a/src/map/mercenary.c b/src/map/mercenary.c index bf802c643..0e89d62a9 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -93,8 +93,8 @@ int mercenary_get_lifetime(struct mercenary_data *md) if( md == NULL || md->contract_timer == INVALID_TIMER ) return 0; - td = iTimer->get_timer(md->contract_timer); - return (td != NULL) ? DIFF_TICK(td->tick, iTimer->gettick()) : 0; + td = timer->get(md->contract_timer); + return (td != NULL) ? DIFF_TICK(td->tick, timer->gettick()) : 0; } int mercenary_get_guild(struct mercenary_data *md) @@ -269,14 +269,14 @@ void merc_contract_stop(struct mercenary_data *md) { nullpo_retv(md); if( md->contract_timer != INVALID_TIMER ) - iTimer->delete_timer(md->contract_timer, merc_contract_end); + timer->delete(md->contract_timer, merc_contract_end); md->contract_timer = INVALID_TIMER; } void merc_contract_init(struct mercenary_data *md) { if( md->contract_timer == INVALID_TIMER ) - md->contract_timer = iTimer->add_timer(iTimer->gettick() + md->mercenary.life_time, merc_contract_end, md->master->bl.id, 0); + md->contract_timer = timer->add(timer->gettick() + md->mercenary.life_time, merc_contract_end, md->master->bl.id, 0); md->regen.state.block = 0; } diff --git a/src/map/mob.c b/src/map/mob.c index 146f82239..4506ca242 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -341,7 +341,7 @@ bool mob_ksprotected (struct block_list *src, struct block_list *target) *t_sd; // Mob Target struct status_change_entry *sce; struct mob_data *md; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); char output[128]; if( !battle_config.ksprotection ) @@ -491,7 +491,7 @@ int mob_once_spawn(struct map_session_data* sd, int16 m, int16 x, int16 y, const memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH); } else if (gc->guild_id) //Guild not yet available, retry in 5. - iTimer->add_timer(iTimer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,md->guardian_data->guild_id); + timer->add(timer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,md->guardian_data->guild_id); } } // end addition [Valaris] @@ -709,7 +709,7 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam memcpy (md->guardian_data->guild_name, g->name, NAME_LENGTH); md->guardian_data->guardup_lv = guild->checkskill(g,GD_GUARDUP); } else if (md->guardian_data->guild_id) - iTimer->add_timer(iTimer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,md->guardian_data->guild_id); + timer->add(timer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,md->guardian_data->guild_id); mob->spawn(md); return md->bl.id; @@ -873,8 +873,8 @@ int mob_setdelayspawn(struct mob_data *md) spawntime = 5000; if( md->spawn_timer != INVALID_TIMER ) - iTimer->delete_timer(md->spawn_timer, mob->delayspawn); - md->spawn_timer = iTimer->add_timer(iTimer->gettick()+spawntime, mob->delayspawn, md->bl.id, 0); + timer->delete(md->spawn_timer, mob->delayspawn); + md->spawn_timer = timer->add(timer->gettick()+spawntime, mob->delayspawn, md->bl.id, 0); return 0; } @@ -895,7 +895,7 @@ int mob_count_sub(struct block_list *bl, va_list ap) { int mob_spawn (struct mob_data *md) { int i=0; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); int c =0; md->last_thinktime = tick; @@ -918,16 +918,16 @@ int mob_spawn (struct mob_data *md) if( !iMap->search_freecell(&md->bl, -1, &md->bl.x, &md->bl.y, md->spawn->xs, md->spawn->ys, battle_config.no_spawn_on_player?4:0) ) { // retry again later if( md->spawn_timer != INVALID_TIMER ) - iTimer->delete_timer(md->spawn_timer, mob->delayspawn); - md->spawn_timer = iTimer->add_timer(tick+5000,mob->delayspawn,md->bl.id,0); + timer->delete(md->spawn_timer, mob->delayspawn); + md->spawn_timer = timer->add(tick+5000,mob->delayspawn,md->bl.id,0); return 1; } } else if( battle_config.no_spawn_on_player > 99 && iMap->foreachinrange(mob->count_sub, &md->bl, AREA_SIZE, BL_PC) ) { // retry again later (players on sight) if( md->spawn_timer != INVALID_TIMER ) - iTimer->delete_timer(md->spawn_timer, mob->delayspawn); - md->spawn_timer = iTimer->add_timer(tick+5000,mob->delayspawn,md->bl.id,0); + timer->delete(md->spawn_timer, mob->delayspawn); + md->spawn_timer = timer->add(tick+5000,mob->delayspawn,md->bl.id,0); return 1; } } @@ -941,7 +941,7 @@ int mob_spawn (struct mob_data *md) md->ud.target_to = 0; if( md->spawn_timer != INVALID_TIMER ) { - iTimer->delete_timer(md->spawn_timer, mob->delayspawn); + timer->delete(md->spawn_timer, mob->delayspawn); md->spawn_timer = INVALID_TIMER; } @@ -2049,7 +2049,7 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage) { //Log damage if (src) mob->log_damage(md, src, damage); - md->dmgtick = iTimer->gettick(); + md->dmgtick = timer->gettick(); } if (battle_config.show_mob_info&3) @@ -2073,7 +2073,7 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage) { if( md->special_state.ai == 2 ) {//LOne WOlf explained that ANYONE can trigger the marine countdown skill. [Skotlex] md->state.alchemist = 1; - mob->skill_use(md, iTimer->gettick(), MSC_ALCHEMIST); + mob->skill_use(md, timer->gettick(), MSC_ALCHEMIST); } } @@ -2094,7 +2094,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } pt[DAMAGELOG_SIZE]; int i, temp, count, m = md->bl.m, pnum = 0; int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are elligible for exp distribution - unsigned int mvp_damage, tick = iTimer->gettick(); + unsigned int mvp_damage, tick = timer->gettick(); bool rebirth, homkillonly; status = &md->status; @@ -2441,7 +2441,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) mob->item_drop(md, dlist, mob->setlootitem(&md->lootitem[i]), 1, 10000, homkillonly); } if (dlist->item) //There are drop items. - iTimer->add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob->delay_item_drop, 0, (intptr_t)dlist); + timer->add(tick + (!battle_config.delay_battle_damage?500:0), mob->delay_item_drop, 0, (intptr_t)dlist); else //No drops ers_free(item_drop_list_ers, dlist); } else if (md->lootitem && md->lootitem_count) { //Loot MUST drop! @@ -2455,7 +2455,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) dlist->item = NULL; for(i = 0; i < md->lootitem_count; i++) mob->item_drop(md, dlist, mob->setlootitem(&md->lootitem[i]), 1, 10000, homkillonly); - iTimer->add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob->delay_item_drop, 0, (intptr_t)dlist); + timer->add(tick + (!battle_config.delay_battle_damage?500:0), mob->delay_item_drop, 0, (intptr_t)dlist); } if(mvp_sd && md->db->mexp > 0 && !md->special_state.ai) { @@ -2594,7 +2594,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } if(md->deletetimer != INVALID_TIMER) { - iTimer->delete_timer(md->deletetimer,mob->timer_delete); + timer->delete(md->deletetimer,mob->timer_delete); md->deletetimer = INVALID_TIMER; } /** @@ -2636,7 +2636,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) void mob_revive(struct mob_data *md, unsigned int hp) { - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); md->state.skillstate = MSS_IDLE; md->last_thinktime = tick; md->next_walktime = tick+rnd()%50+5000; @@ -2721,7 +2721,7 @@ int mob_random_class (int *value, size_t count) *------------------------------------------*/ int mob_class_change (struct mob_data *md, int class_) { - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); int i, c, hp_rate; nullpo_ret(md); @@ -3520,8 +3520,8 @@ int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, cons if (duration) //Auto Delete after a while. { if( md->deletetimer != INVALID_TIMER ) - iTimer->delete_timer(md->deletetimer, mob->timer_delete); - md->deletetimer = iTimer->add_timer (iTimer->gettick() + duration, mob->timer_delete, md->bl.id, 0); + timer->delete(md->deletetimer, mob->timer_delete); + md->deletetimer = timer->add (timer->gettick() + duration, mob->timer_delete, md->bl.id, 0); } } @@ -4655,15 +4655,15 @@ int do_init_mob(void) mob->load(); - iTimer->add_timer_func_list(mob->delayspawn,"mob_delayspawn"); - iTimer->add_timer_func_list(mob->delay_item_drop,"mob_delay_item_drop"); - iTimer->add_timer_func_list(mob->ai_hard,"mob_ai_hard"); - iTimer->add_timer_func_list(mob->ai_lazy,"mob_ai_lazy"); - iTimer->add_timer_func_list(mob->timer_delete,"mob_timer_delete"); - iTimer->add_timer_func_list(mob->spawn_guardian_sub,"mob_spawn_guardian_sub"); - iTimer->add_timer_func_list(mob->respawn,"mob_respawn"); - iTimer->add_timer_interval(iTimer->gettick()+MIN_MOBTHINKTIME,mob->ai_hard,0,0,MIN_MOBTHINKTIME); - iTimer->add_timer_interval(iTimer->gettick()+MIN_MOBTHINKTIME*10,mob->ai_lazy,0,0,MIN_MOBTHINKTIME*10); + timer->add_func_list(mob->delayspawn,"mob_delayspawn"); + timer->add_func_list(mob->delay_item_drop,"mob_delay_item_drop"); + timer->add_func_list(mob->ai_hard,"mob_ai_hard"); + timer->add_func_list(mob->ai_lazy,"mob_ai_lazy"); + timer->add_func_list(mob->timer_delete,"mob_timer_delete"); + timer->add_func_list(mob->spawn_guardian_sub,"mob_spawn_guardian_sub"); + timer->add_func_list(mob->respawn,"mob_respawn"); + timer->add_interval(timer->gettick()+MIN_MOBTHINKTIME,mob->ai_hard,0,0,MIN_MOBTHINKTIME); + timer->add_interval(timer->gettick()+MIN_MOBTHINKTIME*10,mob->ai_lazy,0,0,MIN_MOBTHINKTIME*10); return 0; } diff --git a/src/map/npc.c b/src/map/npc.c index 51d01d711..2439969a9 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -251,7 +251,7 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat clif->scriptclear(sd,sd->npc_id); sd->npc_idle_timer = INVALID_TIMER; } else //Create a new instance of ourselves to continue - sd->npc_idle_timer = iTimer->add_timer(iTimer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0); + sd->npc_idle_timer = timer->add(timer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0); return 0; } #endif @@ -451,7 +451,7 @@ void npc_event_do_oninit(void) { ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs."CL_CLL"\n", npc->event_doall("OnInit")); - iTimer->add_timer_interval(iTimer->gettick()+100,npc->event_do_clock,0,0,1000); + timer->add_interval(timer->gettick()+100,npc->event_do_clock,0,0,1000); } /*========================================== @@ -537,9 +537,9 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) next = nd->u.scr.timer_event[ ted->next ].timer - nd->u.scr.timer_event[ ted->next - 1 ].timer; ted->time += next; if( sd ) - sd->npc_timer_id = iTimer->add_timer(tick+next,npc->timerevent,id,(intptr_t)ted); + sd->npc_timer_id = timer->add(tick+next,npc->timerevent,id,(intptr_t)ted); else - nd->u.scr.timerid = iTimer->add_timer(tick+next,npc->timerevent,id,(intptr_t)ted); + nd->u.scr.timerid = timer->add(tick+next,npc->timerevent,id,(intptr_t)ted); } else { @@ -569,7 +569,7 @@ int npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) int npc_timerevent_start(struct npc_data* nd, int rid) { int j; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); struct map_session_data *sd = NULL; //Player to whom script is attached. nullpo_ret(nd); @@ -600,13 +600,13 @@ int npc_timerevent_start(struct npc_data* nd, int rid) if( sd ) { ted->rid = sd->bl.id; // Attach only the player if attachplayerrid was used. - sd->npc_timer_id = iTimer->add_timer(tick+next,npc->timerevent,nd->bl.id,(intptr_t)ted); + sd->npc_timer_id = timer->add(tick+next,npc->timerevent,nd->bl.id,(intptr_t)ted); } else { ted->rid = 0; nd->u.scr.timertick = tick; // Set when timer is started - nd->u.scr.timerid = iTimer->add_timer(tick+next,npc->timerevent,nd->bl.id,(intptr_t)ted); + nd->u.scr.timerid = timer->add(tick+next,npc->timerevent,nd->bl.id,(intptr_t)ted); } } else if (!sd) { @@ -639,16 +639,16 @@ int npc_timerevent_stop(struct npc_data* nd) // Delete timer if ( *tid != INVALID_TIMER ) { - td = iTimer->get_timer(*tid); + td = timer->get(*tid); if( td && td->data ) ers_free(npc->timer_event_ers, (void*)td->data); - iTimer->delete_timer(*tid,npc->timerevent); + timer->delete(*tid,npc->timerevent); *tid = INVALID_TIMER; } if( !sd && nd->u.scr.timertick ) { - nd->u.scr.timer += DIFF_TICK(iTimer->gettick(),nd->u.scr.timertick); // Set 'timer' to the time that has passed since the beginning of the timers + nd->u.scr.timer += DIFF_TICK(timer->gettick(),nd->u.scr.timertick); // Set 'timer' to the time that has passed since the beginning of the timers nd->u.scr.timertick = 0; // Set 'tick' to zero so that we know it's off. } @@ -666,7 +666,7 @@ void npc_timerevent_quit(struct map_session_data* sd) // Check timer existance if( sd->npc_timer_id == INVALID_TIMER ) return; - if( !(td = iTimer->get_timer(sd->npc_timer_id)) ) + if( !(td = timer->get(sd->npc_timer_id)) ) { sd->npc_timer_id = INVALID_TIMER; return; @@ -675,7 +675,7 @@ void npc_timerevent_quit(struct map_session_data* sd) // Delete timer nd = (struct npc_data *)iMap->id2bl(td->id); ted = (struct timer_event_data*)td->data; - iTimer->delete_timer(sd->npc_timer_id, npc->timerevent); + timer->delete(sd->npc_timer_id, npc->timerevent); sd->npc_timer_id = INVALID_TIMER; // Execute OnTimerQuit @@ -702,7 +702,7 @@ void npc_timerevent_quit(struct map_session_data* sd) old_timer = nd->u.scr.timer; nd->u.scr.rid = sd->bl.id; - nd->u.scr.timertick = iTimer->gettick(); + nd->u.scr.timertick = timer->gettick(); nd->u.scr.timer = ted->time; //Execute label @@ -730,7 +730,7 @@ int npc_gettimerevent_tick(struct npc_data* nd) tick = nd->u.scr.timer; // The last time it's active(start, stop or event trigger) if( nd->u.scr.timertick ) // It's a running timer - tick += DIFF_TICK(iTimer->gettick(), nd->u.scr.timertick); + tick += DIFF_TICK(timer->gettick(), nd->u.scr.timertick); return tick; } @@ -1212,13 +1212,13 @@ int npc_scriptcont(struct map_session_data* sd, int id, bool closing) /** * Update the last NPC iteration **/ - sd->npc_idle_tick = iTimer->gettick(); + sd->npc_idle_tick = timer->gettick(); #endif /** * WPE can get to this point with a progressbar; we deny it. **/ - if( sd->progressbar.npc_id && DIFF_TICK(sd->progressbar.timeout,iTimer->gettick()) > 0 ) + if( sd->progressbar.npc_id && DIFF_TICK(sd->progressbar.timeout,timer->gettick()) > 0 ) return 1; if( closing && sd->st->state == CLOSE ) @@ -1824,14 +1824,14 @@ int npc_unload(struct npc_data* nd, bool single) { for( bl = (struct block_list*)mapit->first(iter); mapit->exists(iter); bl = (struct block_list*)mapit->next(iter) ) { struct map_session_data *sd = ((TBL_PC*)bl); if( sd && sd->npc_timer_id != INVALID_TIMER ) { - const struct TimerData *td = iTimer->get_timer(sd->npc_timer_id); + const struct TimerData *td = timer->get(sd->npc_timer_id); if( td && td->id != nd->bl.id ) continue; if( td && td->data ) ers_free(npc->timer_event_ers, (void*)td->data); - iTimer->delete_timer(sd->npc_timer_id, npc->timerevent); + timer->delete(sd->npc_timer_id, npc->timerevent); sd->npc_timer_id = INVALID_TIMER; } } @@ -1839,10 +1839,10 @@ int npc_unload(struct npc_data* nd, bool single) { if (nd->u.scr.timerid != INVALID_TIMER) { const struct TimerData *td; - td = iTimer->get_timer(nd->u.scr.timerid); + td = timer->get(nd->u.scr.timerid); if (td && td->data) ers_free(npc->timer_event_ers, (void*)td->data); - iTimer->delete_timer(nd->u.scr.timerid, npc->timerevent); + timer->delete(nd->u.scr.timerid, npc->timerevent); } if (nd->u.scr.timer_event) aFree(nd->u.scr.timer_event); @@ -2768,7 +2768,7 @@ void npc_movenpc(struct npc_data* nd, int16 x, int16 y) y = cap_value(y, 0, map[m].ys-1); iMap->foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); - iMap->moveblock(&nd->bl, x, y, iTimer->gettick()); + iMap->moveblock(&nd->bl, x, y, timer->gettick()); iMap->foreachinrange(clif->insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); } @@ -3785,7 +3785,7 @@ int npc_reload(void) { } if( map[m].mob_delete_timer != INVALID_TIMER ) { // Mobs were removed anyway,so delete the timer [Inkfish] - iTimer->delete_timer(map[m].mob_delete_timer, iMap->removemobs_timer); + timer->delete(map[m].mob_delete_timer, iMap->removemobs_timer); map[m].mob_delete_timer = INVALID_TIMER; } } @@ -3937,7 +3937,7 @@ int do_init_npc(void) npc->base_ud.attacktimer = INVALID_TIMER; npc->base_ud.attackabletime = npc->base_ud.canact_tick = - npc->base_ud.canmove_tick = iTimer->gettick(); + npc->base_ud.canmove_tick = timer->gettick(); //Stock view data for normal npcs. memset(&npc_viewdb, 0, sizeof(npc_viewdb)); @@ -3988,8 +3988,8 @@ int do_init_npc(void) if (battle_config.warp_point_debug) npc->debug_warps(); - iTimer->add_timer_func_list(npc->event_do_clock,"npc_event_do_clock"); - iTimer->add_timer_func_list(npc->timerevent,"npc_timerevent"); + timer->add_func_list(npc->event_do_clock,"npc_event_do_clock"); + timer->add_func_list(npc->timerevent,"npc_timerevent"); // Init dummy NPC npc->fake_nd = (struct npc_data *)aCalloc(1,sizeof(struct npc_data)); diff --git a/src/map/party.c b/src/map/party.c index 629bf9227..88d6cc0bf 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -123,8 +123,8 @@ void do_init_party(void) { party_db = idb_alloc(DB_OPT_RELEASE_DATA); party_booking_db = idb_alloc(DB_OPT_RELEASE_DATA); // Party Booking [Spiria] - iTimer->add_timer_func_list(party_send_xy_timer, "party_send_xy_timer"); - iTimer->add_timer_interval(iTimer->gettick()+battle_config.party_update_interval, party_send_xy_timer, 0, 0, battle_config.party_update_interval); + timer->add_func_list(party_send_xy_timer, "party_send_xy_timer"); + timer->add_interval(timer->gettick()+battle_config.party_update_interval, party_send_xy_timer, 0, 0, battle_config.party_update_interval); } /// Party data lookup using party id. diff --git a/src/map/pc.c b/src/map/pc.c index b8380a840..949a66d8c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -179,8 +179,8 @@ void pc_setinvincibletimer(struct map_session_data* sd, int val) { val += map[sd->bl.m].invincible_time_inc; if( sd->invincible_timer != INVALID_TIMER ) - iTimer->delete_timer(sd->invincible_timer,pc_invincible_timer); - sd->invincible_timer = iTimer->add_timer(iTimer->gettick()+val,pc_invincible_timer,sd->bl.id,0); + timer->delete(sd->invincible_timer,pc_invincible_timer); + sd->invincible_timer = timer->add(timer->gettick()+val,pc_invincible_timer,sd->bl.id,0); } void pc_delinvincibletimer(struct map_session_data* sd) @@ -189,9 +189,9 @@ void pc_delinvincibletimer(struct map_session_data* sd) if( sd->invincible_timer != INVALID_TIMER ) { - iTimer->delete_timer(sd->invincible_timer,pc_invincible_timer); + timer->delete(sd->invincible_timer,pc_invincible_timer); sd->invincible_timer = INVALID_TIMER; - skill->unit_move(&sd->bl,iTimer->gettick(),1); + skill->unit_move(&sd->bl,timer->gettick(),1); } } @@ -240,15 +240,15 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max) if( sd->spiritball && sd->spiritball >= max ) { if(sd->spirit_timer[0] != INVALID_TIMER) - iTimer->delete_timer(sd->spirit_timer[0],pc_spiritball_timer); + timer->delete(sd->spirit_timer[0],pc_spiritball_timer); sd->spiritball--; if( sd->spiritball != 0 ) memmove(sd->spirit_timer+0, sd->spirit_timer+1, (sd->spiritball)*sizeof(int)); sd->spirit_timer[sd->spiritball] = INVALID_TIMER; } - tid = iTimer->add_timer(iTimer->gettick()+interval, pc_spiritball_timer, sd->bl.id, 0); - ARR_FIND(0, sd->spiritball, i, sd->spirit_timer[i] == INVALID_TIMER || DIFF_TICK(iTimer->get_timer(tid)->tick, iTimer->get_timer(sd->spirit_timer[i])->tick) < 0); + tid = timer->add(timer->gettick()+interval, pc_spiritball_timer, sd->bl.id, 0); + ARR_FIND(0, sd->spiritball, i, sd->spirit_timer[i] == INVALID_TIMER || DIFF_TICK(timer->get(tid)->tick, timer->get(sd->spirit_timer[i])->tick) < 0); if( i != sd->spiritball ) memmove(sd->spirit_timer+i+1, sd->spirit_timer+i, (sd->spiritball-i)*sizeof(int)); sd->spirit_timer[i] = tid; @@ -282,7 +282,7 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type) for(i=0;ispirit_timer[i] != INVALID_TIMER) { - iTimer->delete_timer(sd->spirit_timer[i],pc_spiritball_timer); + timer->delete(sd->spirit_timer[i],pc_spiritball_timer); sd->spirit_timer[i] = INVALID_TIMER; } } @@ -488,7 +488,7 @@ int pc_inventory_rental_clear(struct map_session_data *sd) { if( sd->rental_timer != INVALID_TIMER ) { - iTimer->delete_timer(sd->rental_timer, pc_inventory_rental_end); + timer->delete(sd->rental_timer, pc_inventory_rental_end); sd->rental_timer = INVALID_TIMER; } @@ -523,7 +523,7 @@ void pc_inventory_rentals(struct map_session_data *sd) } if( c > 0 ) // min(next_tick,3600000) 1 hour each timer to keep announcing to the owner, and to avoid a but with rental time > 15 days - sd->rental_timer = iTimer->add_timer(iTimer->gettick() + min(next_tick,3600000), pc_inventory_rental_end, sd->bl.id, 0); + sd->rental_timer = timer->add(timer->gettick() + min(next_tick,3600000), pc_inventory_rental_end, sd->bl.id, 0); else sd->rental_timer = INVALID_TIMER; } @@ -538,15 +538,15 @@ void pc_inventory_rental_add(struct map_session_data *sd, int seconds) if( sd->rental_timer != INVALID_TIMER ) { const struct TimerData * td; - td = iTimer->get_timer(sd->rental_timer); - if( DIFF_TICK(td->tick, iTimer->gettick()) > tick ) + td = timer->get(sd->rental_timer); + if( DIFF_TICK(td->tick, timer->gettick()) > tick ) { // Update Timer as this one ends first than the current one pc->inventory_rental_clear(sd); - sd->rental_timer = iTimer->add_timer(iTimer->gettick() + tick, pc_inventory_rental_end, sd->bl.id, 0); + sd->rental_timer = timer->add(timer->gettick() + tick, pc_inventory_rental_end, sd->bl.id, 0); } } else - sd->rental_timer = iTimer->add_timer(iTimer->gettick() + min(tick,3600000), pc_inventory_rental_end, sd->bl.id, 0); + sd->rental_timer = timer->add(timer->gettick() + min(tick,3600000), pc_inventory_rental_end, sd->bl.id, 0); } /** @@ -637,7 +637,7 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo sd->client_tick = client_tick; sd->state.active = 0; //to be set to 1 after player is fully authed and loaded. sd->bl.type = BL_PC; - sd->canlog_tick = iTimer->gettick(); + sd->canlog_tick = timer->gettick(); //Required to prevent homunculus copuing a base speed of 0. sd->battle_status.speed = sd->base_status.speed = DEFAULT_WALK_SPEED; return 0; @@ -978,7 +978,7 @@ int pc_isequip(struct map_session_data *sd,int n) *------------------------------------------*/ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) { int i; - unsigned long tick = iTimer->gettick(); + unsigned long tick = timer->gettick(); uint32 ip = session[sd->fd]->client_addr; sd->login_id2 = login_id2; @@ -1327,7 +1327,7 @@ int pc_reg_received(struct map_session_data *sd) map[sd->bl.m].users_pvp--; if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {// unregister the player for ranking - iTimer->delete_timer( sd->pvp_timer, pc->calc_pvprank_timer ); + timer->delete( sd->pvp_timer, pc->calc_pvprank_timer ); sd->pvp_timer = INVALID_TIMER; } clif->changeoption(&sd->bl); @@ -1991,7 +1991,7 @@ int pc_delautobonus(struct map_session_data* sd, struct s_autobonus *autobonus,c } else { // Logout / Unequipped an item with an activated bonus - iTimer->delete_timer(autobonus[i].active,pc->endautobonus); + timer->delete(autobonus[i].active,pc->endautobonus); autobonus[i].active = INVALID_TIMER; } } @@ -2019,7 +2019,7 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus) script->run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]); } - autobonus->active = iTimer->add_timer(iTimer->gettick()+autobonus->duration, pc->endautobonus, sd->bl.id, (intptr_t)autobonus); + autobonus->active = timer->add(timer->gettick()+autobonus->duration, pc->endautobonus, sd->bl.id, (intptr_t)autobonus); sd->state.autobonus |= autobonus->pos; status_calc_pc(sd,0); @@ -4090,7 +4090,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) { int flag=0; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); struct map_session_data *first_sd = NULL,*second_sd = NULL,*third_sd = NULL; struct party_data *p=NULL; @@ -4344,7 +4344,7 @@ int pc_isUseitem(struct map_session_data *sd,int n) * 1 = success *------------------------------------------*/ int pc_useitem(struct map_session_data *sd,int n) { - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); int amount, nameid, i; struct script_code *item_script; @@ -4892,8 +4892,8 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y if (sd->sc.data[SC_KNOWLEDGE]) { struct status_change_entry *sce = sd->sc.data[SC_KNOWLEDGE]; if (sce->timer != INVALID_TIMER) - iTimer->delete_timer(sce->timer, iStatus->change_timer); - sce->timer = iTimer->add_timer(iTimer->gettick() + skill->get_time(SG_KNOWLEDGE, sce->val1), iStatus->change_timer, sd->bl.id, SC_KNOWLEDGE); + timer->delete(sce->timer, iStatus->change_timer); + sce->timer = timer->add(timer->gettick() + skill->get_time(SG_KNOWLEDGE, sce->val1), iStatus->change_timer, sd->bl.id, SC_KNOWLEDGE); } status_change_end(&sd->bl, SC_PROPERTYWALK, INVALID_TIMER); status_change_end(&sd->bl, SC_CLOAKING, INVALID_TIMER); @@ -5736,7 +5736,7 @@ int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) } else pc->setpos(sd, map_id2index(tbl->m), tbl->x, tbl->y, CLR_TELEPORT); } - sd->followtimer = iTimer->add_timer( + sd->followtimer = timer->add( tick + 1000, // increase time a bit to loosen up map's load pc_follow_timer, sd->bl.id, 0); return 0; @@ -5747,7 +5747,7 @@ int pc_stop_following (struct map_session_data *sd) nullpo_ret(sd); if (sd->followtimer != INVALID_TIMER) { - iTimer->delete_timer(sd->followtimer,pc_follow_timer); + timer->delete(sd->followtimer,pc_follow_timer); sd->followtimer = INVALID_TIMER; } sd->followtarget = -1; @@ -5767,7 +5767,7 @@ int pc_follow(struct map_session_data *sd,int target_id) pc->stop_following(sd); sd->followtarget = target_id; - pc_follow_timer(INVALID_TIMER, iTimer->gettick(), sd->bl.id, 0); + pc_follow_timer(INVALID_TIMER, timer->gettick(), sd->bl.id, 0); return 0; } @@ -6705,7 +6705,7 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h if( sd->status.ele_id > 0 ) elemental->set_target(sd,src); - sd->canlog_tick = iTimer->gettick(); + sd->canlog_tick = timer->gettick(); } /*========================================== @@ -6713,7 +6713,7 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h *------------------------------------------*/ int pc_dead(struct map_session_data *sd,struct block_list *src) { int i=0,j=0,k=0; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); for(k = 0; k < 5; k++) if (sd->devotion[k]){ @@ -6910,7 +6910,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { pc->setinvincibletimer(sd, battle_config.pc_invincible_time); sc_start(&sd->bl,iStatus->skill2sc(MO_STEELBODY),100,1,skill->get_time(MO_STEELBODY,1)); if(map_flag_gvg2(sd->bl.m)) - pc_respawn_timer(INVALID_TIMER, iTimer->gettick(), sd->bl.id, 0); + pc_respawn_timer(INVALID_TIMER, timer->gettick(), sd->bl.id, 0); return 0; } } @@ -7027,18 +7027,18 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { } if( sd->pvp_point < 0 ) { - iTimer->add_timer(tick+1, pc_respawn_timer,sd->bl.id,0); + timer->add(tick+1, pc_respawn_timer,sd->bl.id,0); return 1|8; } } //GvG if( map_flag_gvg2(sd->bl.m) ) { - iTimer->add_timer(tick+1, pc_respawn_timer, sd->bl.id, 0); + timer->add(tick+1, pc_respawn_timer, sd->bl.id, 0); return 1|8; } else if( sd->bg_id ) { struct battleground_data *bgd = bg->team_search(sd->bg_id); if( bgd && bgd->mapindex > 0 ) { // Respawn by BG - iTimer->add_timer(tick+1000, pc_respawn_timer, sd->bl.id, 0); + timer->add(tick+1000, pc_respawn_timer, sd->bl.id, 0); return 1|8; } } @@ -7046,7 +7046,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { //Reset "can log out" tick. if( battle_config.prevent_logout ) - sd->canlog_tick = iTimer->gettick() - battle_config.prevent_logout; + sd->canlog_tick = timer->gettick() - battle_config.prevent_logout; return 1; } @@ -8352,7 +8352,7 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name) if( i == MAX_EVENTTIMER ) return 0; - sd->eventtimer[i] = iTimer->add_timer(iTimer->gettick()+tick, pc_eventtimer, sd->bl.id, (intptr_t)aStrdup(name)); + sd->eventtimer[i] = timer->add(timer->gettick()+tick, pc_eventtimer, sd->bl.id, (intptr_t)aStrdup(name)); sd->eventcount++; return 1; @@ -8374,13 +8374,13 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name) // find the named event timer ARR_FIND( 0, MAX_EVENTTIMER, i, sd->eventtimer[i] != INVALID_TIMER && - (p = (char *)(iTimer->get_timer(sd->eventtimer[i])->data)) != NULL && + (p = (char *)(timer->get(sd->eventtimer[i])->data)) != NULL && strcmp(p, name) == 0 ); if( i == MAX_EVENTTIMER ) return 0; // not found - iTimer->delete_timer(sd->eventtimer[i],pc_eventtimer); + timer->delete(sd->eventtimer[i],pc_eventtimer); sd->eventtimer[i] = INVALID_TIMER; sd->eventcount--; aFree(p); @@ -8399,8 +8399,8 @@ int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick) for(i=0;ieventtimer[i] != INVALID_TIMER && strcmp( - (char *)(iTimer->get_timer(sd->eventtimer[i])->data), name)==0 ){ - iTimer->addtick_timer(sd->eventtimer[i],tick); + (char *)(timer->get(sd->eventtimer[i])->data), name)==0 ){ + timer->addtick(sd->eventtimer[i],tick); break; } @@ -8421,8 +8421,8 @@ int pc_cleareventtimer(struct map_session_data *sd) for(i=0;ieventtimer[i] != INVALID_TIMER ){ - char *p = (char *)(iTimer->get_timer(sd->eventtimer[i])->data); - iTimer->delete_timer(sd->eventtimer[i],pc_eventtimer); + char *p = (char *)(timer->get(sd->eventtimer[i])->data); + timer->delete(sd->eventtimer[i],pc_eventtimer); sd->eventtimer[i] = INVALID_TIMER; sd->eventcount--; if (p) aFree(p); @@ -8599,7 +8599,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) return 0; } - if( DIFF_TICK(sd->canequip_tick,iTimer->gettick()) > 0 ) + if( DIFF_TICK(sd->canequip_tick,timer->gettick()) > 0 ) { clif->equipitemack(sd,n,0,0); return 0; @@ -9096,7 +9096,7 @@ int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data) } if( pc->calc_pvprank(sd) > 0 ) - sd->pvp_timer = iTimer->add_timer(iTimer->gettick()+PVP_CALCRANK_INTERVAL,pc->calc_pvprank_timer,id,data); + sd->pvp_timer = timer->add(timer->gettick()+PVP_CALCRANK_INTERVAL,pc->calc_pvprank_timer,id,data); return 0; } @@ -9337,7 +9337,7 @@ int pc_autosave(int tid, unsigned int tick, int id, intptr_t data) interval = iMap->autosave_interval/(iMap->usercount()+1); if(interval < iMap->minsave_interval) interval = iMap->minsave_interval; - iTimer->add_timer(iTimer->gettick()+interval,pc_autosave,0,0); + timer->add(timer->gettick()+interval,pc_autosave,0,0); return 0; } @@ -9497,15 +9497,15 @@ int pc_add_charm(struct map_session_data *sd,int interval,int max,int type) if( sd->charm[type] && sd->charm[type] >= max ) { if(sd->charm_timer[type][0] != INVALID_TIMER) - iTimer->delete_timer(sd->charm_timer[type][0],pc_charm_timer); + timer->delete(sd->charm_timer[type][0],pc_charm_timer); sd->charm[type]--; if( sd->charm[type] != 0 ) memmove(sd->charm_timer[type]+0, sd->charm_timer[type]+1, (sd->charm[type])*sizeof(int)); sd->charm_timer[type][sd->charm[type]] = INVALID_TIMER; } - tid = iTimer->add_timer(iTimer->gettick()+interval, pc_charm_timer, sd->bl.id, 0); - ARR_FIND(0, sd->charm[type], i, sd->charm_timer[type][i] == INVALID_TIMER || DIFF_TICK(iTimer->get_timer(tid)->tick, iTimer->get_timer(sd->charm_timer[type][i])->tick) < 0); + tid = timer->add(timer->gettick()+interval, pc_charm_timer, sd->bl.id, 0); + ARR_FIND(0, sd->charm[type], i, sd->charm_timer[type][i] == INVALID_TIMER || DIFF_TICK(timer->get(tid)->tick, timer->get(sd->charm_timer[type][i])->tick) < 0); if( i != sd->charm[type] ) memmove(sd->charm_timer[type]+i+1, sd->charm_timer[type]+i, (sd->charm[type]-i)*sizeof(int)); sd->charm_timer[type][i] = tid; @@ -9536,7 +9536,7 @@ int pc_del_charm(struct map_session_data *sd,int count,int type) for(i = 0; i < count; i++) { if(sd->charm_timer[type][i] != INVALID_TIMER) { - iTimer->delete_timer(sd->charm_timer[type][i],pc_charm_timer); + timer->delete(sd->charm_timer[type][i],pc_charm_timer); sd->charm_timer[type][i] = INVALID_TIMER; } } @@ -10143,7 +10143,7 @@ void pc_itemcd_do(struct map_session_data *sd, bool load) { return; } for(i = 0; i < MAX_ITEMDELAYS; i++) { - if( cd->nameid[i] && DIFF_TICK(iTimer->gettick(),cd->tick[i]) < 0 ) { + if( cd->nameid[i] && DIFF_TICK(timer->gettick(),cd->tick[i]) < 0 ) { sd->item_delay[cursor].tick = cd->tick[i]; sd->item_delay[cursor].nameid = cd->nameid[i]; cursor++; @@ -10157,7 +10157,7 @@ void pc_itemcd_do(struct map_session_data *sd, bool load) { idb_put( itemcd_db, sd->status.char_id, cd ); } for(i = 0; i < MAX_ITEMDELAYS; i++) { - if( sd->item_delay[i].nameid && DIFF_TICK(iTimer->gettick(),sd->item_delay[i].tick) < 0 ) { + if( sd->item_delay[i].nameid && DIFF_TICK(timer->gettick(),sd->item_delay[i].tick) < 0 ) { cd->tick[cursor] = sd->item_delay[i].tick; cd->nameid[cursor] = sd->item_delay[i].nameid; cursor++; @@ -10186,17 +10186,17 @@ int do_init_pc(void) { pc->readdb(); - iTimer->add_timer_func_list(pc_invincible_timer, "pc_invincible_timer"); - iTimer->add_timer_func_list(pc_eventtimer, "pc_eventtimer"); - iTimer->add_timer_func_list(pc_inventory_rental_end, "pc_inventory_rental_end"); - iTimer->add_timer_func_list(pc->calc_pvprank_timer, "pc->calc_pvprank_timer"); - iTimer->add_timer_func_list(pc_autosave, "pc_autosave"); - iTimer->add_timer_func_list(pc_spiritball_timer, "pc_spiritball_timer"); - iTimer->add_timer_func_list(pc_follow_timer, "pc_follow_timer"); - iTimer->add_timer_func_list(pc->endautobonus, "pc->endautobonus"); - iTimer->add_timer_func_list(pc_charm_timer, "pc_charm_timer"); + timer->add_func_list(pc_invincible_timer, "pc_invincible_timer"); + timer->add_func_list(pc_eventtimer, "pc_eventtimer"); + timer->add_func_list(pc_inventory_rental_end, "pc_inventory_rental_end"); + timer->add_func_list(pc->calc_pvprank_timer, "pc->calc_pvprank_timer"); + timer->add_func_list(pc_autosave, "pc_autosave"); + timer->add_func_list(pc_spiritball_timer, "pc_spiritball_timer"); + timer->add_func_list(pc_follow_timer, "pc_follow_timer"); + timer->add_func_list(pc->endautobonus, "pc->endautobonus"); + timer->add_func_list(pc_charm_timer, "pc_charm_timer"); - iTimer->add_timer(iTimer->gettick() + iMap->autosave_interval, pc_autosave, 0, 0); + timer->add(timer->gettick() + iMap->autosave_interval, pc_autosave, 0, 0); // 0=day, 1=night [Yor] iMap->night_flag = battle_config.night_at_start ? 1 : 0; @@ -10205,11 +10205,11 @@ int do_init_pc(void) { int day_duration = battle_config.day_duration; int night_duration = battle_config.night_duration; // add night/day timer [Yor] - iTimer->add_timer_func_list(pc->map_day_timer, "pc->map_day_timer"); - iTimer->add_timer_func_list(pc->map_night_timer, "pc->map_night_timer"); + timer->add_func_list(pc->map_day_timer, "pc->map_day_timer"); + timer->add_func_list(pc->map_night_timer, "pc->map_night_timer"); - pc->day_timer_tid = iTimer->add_timer_interval(iTimer->gettick() + (iMap->night_flag ? 0 : day_duration) + night_duration, pc->map_day_timer, 0, 0, day_duration + night_duration); - pc->night_timer_tid = iTimer->add_timer_interval(iTimer->gettick() + day_duration + (iMap->night_flag ? night_duration : 0), pc->map_night_timer, 0, 0, day_duration + night_duration); + pc->day_timer_tid = timer->add_interval(timer->gettick() + (iMap->night_flag ? 0 : day_duration) + night_duration, pc->map_day_timer, 0, 0, day_duration + night_duration); + pc->night_timer_tid = timer->add_interval(timer->gettick() + day_duration + (iMap->night_flag ? night_duration : 0), pc->map_night_timer, 0, 0, day_duration + night_duration); } do_init_pc_groups(); diff --git a/src/map/pet.c b/src/map/pet.c index 8498517ef..b4714cc06 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -102,7 +102,7 @@ int pet_attackskill(struct pet_data *pd, int target_id) (battle_config.pet_equip_required && !pd->pet.equip)) return 0; - if (DIFF_TICK(pd->ud.canact_tick, iTimer->gettick()) > 0) + if (DIFF_TICK(pd->ud.canact_tick, timer->gettick()) > 0) return 0; if (rnd()%100 < (pd->a_skill->rate +pd->pet.intimate*pd->a_skill->bonusrate/1000)) @@ -183,7 +183,7 @@ int pet_sc_check(struct map_session_data *sd, int type) || pd->recovery->type != type ) return 1; - pd->recovery->timer = iTimer->add_timer(iTimer->gettick()+pd->recovery->delay*1000,pet->recovery_timer,sd->bl.id,0); + pd->recovery->timer = timer->add(timer->gettick()+pd->recovery->delay*1000,pet->recovery_timer,sd->bl.id,0); return 0; } @@ -233,7 +233,7 @@ int pet_hungry(int tid, unsigned int tick, int id, intptr_t data) interval = pd->petDB->hungry_delay; if(interval <= 0) interval = 1; - pd->pet_hungry_timer = iTimer->add_timer(tick+interval,pet->hungry,sd->bl.id,0); + pd->pet_hungry_timer = timer->add(tick+interval,pet->hungry,sd->bl.id,0); return 0; } @@ -263,7 +263,7 @@ int pet_hungry_timer_delete(struct pet_data *pd) { nullpo_ret(pd); if(pd->pet_hungry_timer != INVALID_TIMER) { - iTimer->delete_timer(pd->pet_hungry_timer,pet->hungry); + timer->delete(pd->pet_hungry_timer,pet->hungry); pd->pet_hungry_timer = INVALID_TIMER; } @@ -365,7 +365,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) iMap->addiddb(&pd->bl); status_calc_pet(pd,1); - pd->last_thinktime = iTimer->gettick(); + pd->last_thinktime = timer->gettick(); pd->state.skillbonus = 0; if( battle_config.pet_status_support ) script->run(pet->db[i].pet_script,0,sd->bl.id,0); @@ -378,7 +378,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) interval = pd->petDB->hungry_delay; if( interval <= 0 ) interval = 1; - pd->pet_hungry_timer = iTimer->add_timer(iTimer->gettick() + interval, pet->hungry, sd->bl.id, 0); + pd->pet_hungry_timer = timer->add(timer->gettick() + interval, pet->hungry, sd->bl.id, 0); return 0; } @@ -672,16 +672,16 @@ int pet_equipitem(struct map_session_data *sd,int index) clif->send_petdata(NULL, sd->pd, 3, sd->pd->vd.head_bottom); if (battle_config.pet_equip_required) { //Skotlex: start support timers if need - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); if (pd->s_skill && pd->s_skill->timer == INVALID_TIMER) { if (pd->s_skill->id) - pd->s_skill->timer=iTimer->add_timer(tick+pd->s_skill->delay*1000, pet->skill_support_timer, sd->bl.id, 0); + pd->s_skill->timer=timer->add(tick+pd->s_skill->delay*1000, pet->skill_support_timer, sd->bl.id, 0); else - pd->s_skill->timer=iTimer->add_timer(tick+pd->s_skill->delay*1000, pet->heal_timer, sd->bl.id, 0); + pd->s_skill->timer=timer->add(tick+pd->s_skill->delay*1000, pet->heal_timer, sd->bl.id, 0); } if (pd->bonus && pd->bonus->timer == INVALID_TIMER) - pd->bonus->timer=iTimer->add_timer(tick+pd->bonus->delay*1000, pet->skill_bonus_timer, sd->bl.id, 0); + pd->bonus->timer=timer->add(tick+pd->bonus->delay*1000, pet->skill_bonus_timer, sd->bl.id, 0); } return 0; @@ -716,14 +716,14 @@ int pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) if( pd->s_skill && pd->s_skill->timer != INVALID_TIMER ) { if( pd->s_skill->id ) - iTimer->delete_timer(pd->s_skill->timer, pet->skill_support_timer); + timer->delete(pd->s_skill->timer, pet->skill_support_timer); else - iTimer->delete_timer(pd->s_skill->timer, pet->heal_timer); + timer->delete(pd->s_skill->timer, pet->heal_timer); pd->s_skill->timer = INVALID_TIMER; } if( pd->bonus && pd->bonus->timer != INVALID_TIMER ) { - iTimer->delete_timer(pd->bonus->timer, pet->skill_bonus_timer); + timer->delete(pd->bonus->timer, pet->skill_bonus_timer); pd->bonus->timer = INVALID_TIMER; } } @@ -1032,10 +1032,10 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd) memset(pd->loot->item,0,pd->loot->max * sizeof(struct item)); pd->loot->count = 0; pd->loot->weight = 0; - pd->ud.canact_tick = iTimer->gettick()+10000; //prevent picked up during 10*1000ms + pd->ud.canact_tick = timer->gettick()+10000; //prevent picked up during 10*1000ms if (dlist->item) - iTimer->add_timer(iTimer->gettick()+540,pet->delay_item_drop,0,(intptr_t)dlist); + timer->add(timer->gettick()+540,pet->delay_item_drop,0,(intptr_t)dlist); else ers_free(pet->item_drop_list_ers, dlist); return 1; @@ -1049,7 +1049,7 @@ int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) struct map_session_data *sd=iMap->id2sd(id); struct pet_data *pd; int bonus; - int timer = 0; + int next = 0; if(sd == NULL || sd->pd==NULL || sd->pd->bonus == NULL) return 1; @@ -1065,10 +1065,10 @@ int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) // determine the time for the next timer if (pd->state.skillbonus && pd->bonus->delay > 0) { bonus = 0; - timer = pd->bonus->delay*1000; // the duration until pet bonuses will be reactivated again + next = pd->bonus->delay*1000; // the duration until pet bonuses will be reactivated again } else if (pd->pet.intimate) { bonus = 1; - timer = pd->bonus->duration*1000; // the duration for pet bonuses to be in effect + next = pd->bonus->duration*1000; // the duration for pet bonuses to be in effect } else { //Lost pet... pd->bonus->timer = INVALID_TIMER; return 0; @@ -1079,7 +1079,7 @@ int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) status_calc_pc(sd, 0); } // wait for the next timer - pd->bonus->timer=iTimer->add_timer(tick+timer,pet->skill_bonus_timer,sd->bl.id,0); + pd->bonus->timer=timer->add(tick+next,pet->skill_bonus_timer,sd->bl.id,0); return 0; } @@ -1138,14 +1138,14 @@ int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) (rate = get_percentage(status->hp, status->max_hp)) > pd->s_skill->hp || (rate = (pd->ud.skilltimer != INVALID_TIMER)) //Another skill is in effect ) { //Wait (how long? 1 sec for every 10% of remaining) - pd->s_skill->timer=iTimer->add_timer(iTimer->gettick()+(rate>10?rate:10)*100,pet->heal_timer,sd->bl.id,0); + pd->s_skill->timer=timer->add(timer->gettick()+(rate>10?rate:10)*100,pet->heal_timer,sd->bl.id,0); return 0; } pet_stop_attack(pd); pet_stop_walking(pd,1); clif->skill_nodamage(&pd->bl,&sd->bl,AL_HEAL,pd->s_skill->lv,1); iStatus->heal(&sd->bl, pd->s_skill->lv,0, 0); - pd->s_skill->timer=iTimer->add_timer(tick+pd->s_skill->delay*1000,pet->heal_timer,sd->bl.id,0); + pd->s_skill->timer=timer->add(tick+pd->s_skill->delay*1000,pet->heal_timer,sd->bl.id,0); return 0; } @@ -1172,7 +1172,7 @@ int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data) if (DIFF_TICK(pd->ud.canact_tick, tick) > 0) { //Wait until the pet can act again. - pd->s_skill->timer=iTimer->add_timer(pd->ud.canact_tick,pet->skill_support_timer,sd->bl.id,0); + pd->s_skill->timer=timer->add(pd->ud.canact_tick,pet->skill_support_timer,sd->bl.id,0); return 0; } @@ -1181,13 +1181,13 @@ int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data) (rate = get_percentage(status->hp, status->max_hp)) > pd->s_skill->hp || (rate = (pd->ud.skilltimer != INVALID_TIMER)) //Another skill is in effect ) { //Wait (how long? 1 sec for every 10% of remaining) - pd->s_skill->timer=iTimer->add_timer(tick+(rate>10?rate:10)*100,pet->skill_support_timer,sd->bl.id,0); + pd->s_skill->timer=timer->add(tick+(rate>10?rate:10)*100,pet->skill_support_timer,sd->bl.id,0); return 0; } pet_stop_attack(pd); pet_stop_walking(pd,1); - pd->s_skill->timer=iTimer->add_timer(tick+pd->s_skill->delay*1000,pet->skill_support_timer,sd->bl.id,0); + pd->s_skill->timer=timer->add(tick+pd->s_skill->delay*1000,pet->skill_support_timer,sd->bl.id,0); if (skill->get_inf(pd->s_skill->id) & INF_GROUND_SKILL) unit->skilluse_pos(&pd->bl, sd->bl.x, sd->bl.y, pd->s_skill->id, pd->s_skill->lv); else @@ -1355,14 +1355,14 @@ int do_init_pet(void) pet->item_drop_ers = ers_new(sizeof(struct item_drop),"pet.c::item_drop_ers",ERS_OPT_NONE); pet->item_drop_list_ers = ers_new(sizeof(struct item_drop_list),"pet.c::item_drop_list_ers",ERS_OPT_NONE); - iTimer->add_timer_func_list(pet->hungry,"pet_hungry"); - iTimer->add_timer_func_list(pet->ai_hard,"pet_ai_hard"); - iTimer->add_timer_func_list(pet->skill_bonus_timer,"pet_skill_bonus_timer"); // [Valaris] - iTimer->add_timer_func_list(pet->delay_item_drop,"pet_delay_item_drop"); - iTimer->add_timer_func_list(pet->skill_support_timer, "pet_skill_support_timer"); // [Skotlex] - iTimer->add_timer_func_list(pet->recovery_timer,"pet_recovery_timer"); // [Valaris] - iTimer->add_timer_func_list(pet->heal_timer,"pet_heal_timer"); // [Valaris] - iTimer->add_timer_interval(iTimer->gettick()+MIN_PETTHINKTIME,pet->ai_hard,0,0,MIN_PETTHINKTIME); + timer->add_func_list(pet->hungry,"pet_hungry"); + timer->add_func_list(pet->ai_hard,"pet_ai_hard"); + timer->add_func_list(pet->skill_bonus_timer,"pet_skill_bonus_timer"); // [Valaris] + timer->add_func_list(pet->delay_item_drop,"pet_delay_item_drop"); + timer->add_func_list(pet->skill_support_timer, "pet_skill_support_timer"); // [Skotlex] + timer->add_func_list(pet->recovery_timer,"pet_recovery_timer"); // [Valaris] + timer->add_func_list(pet->heal_timer,"pet_heal_timer"); // [Valaris] + timer->add_interval(timer->gettick()+MIN_PETTHINKTIME,pet->ai_hard,0,0,MIN_PETTHINKTIME); return 0; } diff --git a/src/map/script.c b/src/map/script.c index 7ac638848..bba74e669 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2822,7 +2822,7 @@ void script_free_state(struct script_state* st) { } if( st->sleep.timer != INVALID_TIMER ) - iTimer->delete_timer(st->sleep.timer, script->run_timer); + timer->delete(st->sleep.timer, script->run_timer); if( st->stack ) { script->free_vars(st->stack->var_function); script->pop_stack(st, 0, st->stack->sp); @@ -3381,7 +3381,7 @@ static void script_detach_state(struct script_state* st, bool dequeue_event) * We're done with this NPC session, so we cancel the timer (if existent) and move on **/ if( sd->npc_idle_timer != INVALID_TIMER ) { - iTimer->delete_timer(sd->npc_idle_timer,npc->secure_timeout_timer); + timer->delete(sd->npc_idle_timer,npc->secure_timeout_timer); sd->npc_idle_timer = INVALID_TIMER; } #endif @@ -3421,8 +3421,8 @@ void script_attach_state(struct script_state* st) { **/ #ifdef SECURE_NPCTIMEOUT if( sd->npc_idle_timer == INVALID_TIMER ) - sd->npc_idle_timer = iTimer->add_timer(iTimer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0); - sd->npc_idle_tick = iTimer->gettick(); + sd->npc_idle_timer = timer->add(timer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0); + sd->npc_idle_tick = timer->gettick(); #endif } } @@ -3546,7 +3546,7 @@ void run_script_main(struct script_state *st) //Delay execution sd = iMap->id2sd(st->rid); // Get sd since script might have attached someone while running. [Inkfish] st->sleep.charid = sd?sd->status.char_id:0; - st->sleep.timer = iTimer->add_timer(iTimer->gettick()+st->sleep.tick, + st->sleep.timer = timer->add(timer->gettick()+st->sleep.tick, script->run_timer, st->sleep.charid, (intptr_t)st->id); } else if(st->state != END && st->rid){ //Resume later (st is already attached to player). @@ -8154,7 +8154,7 @@ BUILDIN(savepoint) BUILDIN(gettimetick) /* Asgard Version */ { int type; - time_t timer; + time_t tt; struct tm *t; type=script_getnum(st,2); @@ -8167,14 +8167,14 @@ BUILDIN(gettimetick) /* Asgard Version */ break; case 1: //type 1:(Second Ticks: 0-86399, 00:00:00-23:59:59) - time(&timer); - t=localtime(&timer); + time(&tt); + t=localtime(&tt); script_pushint(st,((t->tm_hour)*3600+(t->tm_min)*60+t->tm_sec)); break; case 0: default: //type 0:(System Ticks) - script_pushint(st,iTimer->gettick()); + script_pushint(st,timer->gettick()); break; } return true; @@ -9724,11 +9724,11 @@ BUILDIN(getstatus) case 4: script_pushint(st, sd->sc.data[id]->val4); break; case 5: { - struct TimerData* timer = (struct TimerData*)iTimer->get_timer(sd->sc.data[id]->timer); + struct TimerData* td = (struct TimerData*)timer->get(sd->sc.data[id]->timer); - if( timer ) + if( td ) {// return the amount of time remaining - script_pushint(st, timer->tick - iTimer->gettick()); + script_pushint(st, td->tick - timer->gettick()); } } break; @@ -10402,7 +10402,7 @@ BUILDIN(getmapflag) static int script_mapflag_pvp_sub(struct block_list *bl,va_list ap) { TBL_PC* sd = (TBL_PC*)bl; if (sd->pvp_timer == INVALID_TIMER) { - sd->pvp_timer = iTimer->add_timer(iTimer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0); + sd->pvp_timer = timer->add(timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0); sd->pvp_rank = 0; sd->pvp_lastusers = 0; sd->pvp_point = 5; @@ -10632,7 +10632,7 @@ BUILDIN(pvpon) if( sd->bl.m != m || sd->pvp_timer != INVALID_TIMER ) continue; // not applicable - sd->pvp_timer = iTimer->add_timer(iTimer->gettick()+200,pc->calc_pvprank_timer,sd->bl.id,0); + sd->pvp_timer = timer->add(timer->gettick()+200,pc->calc_pvprank_timer,sd->bl.id,0); sd->pvp_rank = 0; sd->pvp_lastusers = 0; sd->pvp_point = 5; @@ -10649,7 +10649,7 @@ static int buildin_pvpoff_sub(struct block_list *bl,va_list ap) TBL_PC* sd = (TBL_PC*)bl; clif->pvpset(sd, 0, 0, 2); if (sd->pvp_timer != INVALID_TIMER) { - iTimer->delete_timer(sd->pvp_timer, pc->calc_pvprank_timer); + timer->delete(sd->pvp_timer, pc->calc_pvprank_timer); sd->pvp_timer = INVALID_TIMER; } return 0; @@ -11695,7 +11695,7 @@ BUILDIN(petskillbonus) if (pd->bonus) { //Clear previous bonus if (pd->bonus->timer != INVALID_TIMER) - iTimer->delete_timer(pd->bonus->timer, pet->skill_bonus_timer); + timer->delete(pd->bonus->timer, pet->skill_bonus_timer); } else //init pd->bonus = (struct pet_bonus *) aMalloc(sizeof(struct pet_bonus)); @@ -11711,7 +11711,7 @@ BUILDIN(petskillbonus) if (battle_config.pet_equip_required && pd->pet.equip == 0) pd->bonus->timer = INVALID_TIMER; else - pd->bonus->timer = iTimer->add_timer(iTimer->gettick()+pd->bonus->delay*1000, pet->skill_bonus_timer, sd->bl.id, 0); + pd->bonus->timer = timer->add(timer->gettick()+pd->bonus->delay*1000, pet->skill_bonus_timer, sd->bl.id, 0); return true; } @@ -12065,7 +12065,7 @@ BUILDIN(petrecovery) if (pd->recovery) { //Halt previous bonus if (pd->recovery->timer != INVALID_TIMER) - iTimer->delete_timer(pd->recovery->timer, pet->recovery_timer); + timer->delete(pd->recovery->timer, pet->recovery_timer); } else //Init pd->recovery = (struct pet_recovery *)aMalloc(sizeof(struct pet_recovery)); @@ -12093,9 +12093,9 @@ BUILDIN(petheal) if (pd->s_skill->timer != INVALID_TIMER) { if (pd->s_skill->id) - iTimer->delete_timer(pd->s_skill->timer, pet->skill_support_timer); + timer->delete(pd->s_skill->timer, pet->skill_support_timer); else - iTimer->delete_timer(pd->s_skill->timer, pet->heal_timer); + timer->delete(pd->s_skill->timer, pet->heal_timer); } } else //init memory pd->s_skill = (struct pet_skill_support *) aMalloc(sizeof(struct pet_skill_support)); @@ -12111,7 +12111,7 @@ BUILDIN(petheal) if (battle_config.pet_equip_required && pd->pet.equip == 0) pd->s_skill->timer = INVALID_TIMER; else - pd->s_skill->timer = iTimer->add_timer(iTimer->gettick()+pd->s_skill->delay*1000,pet->heal_timer,sd->bl.id,0); + pd->s_skill->timer = timer->add(timer->gettick()+pd->s_skill->delay*1000,pet->heal_timer,sd->bl.id,0); return true; } @@ -12187,9 +12187,9 @@ BUILDIN(petskillsupport) if (pd->s_skill->timer != INVALID_TIMER) { if (pd->s_skill->id) - iTimer->delete_timer(pd->s_skill->timer, pet->skill_support_timer); + timer->delete(pd->s_skill->timer, pet->skill_support_timer); else - iTimer->delete_timer(pd->s_skill->timer, pet->heal_timer); + timer->delete(pd->s_skill->timer, pet->heal_timer); } } else //init memory pd->s_skill = (struct pet_skill_support *) aMalloc(sizeof(struct pet_skill_support)); @@ -12204,7 +12204,7 @@ BUILDIN(petskillsupport) if (battle_config.pet_equip_required && pd->pet.equip == 0) pd->s_skill->timer = INVALID_TIMER; else - pd->s_skill->timer = iTimer->add_timer(iTimer->gettick()+pd->s_skill->delay*1000,pet->skill_support_timer,sd->bl.id,0); + pd->s_skill->timer = timer->add(timer->gettick()+pd->s_skill->delay*1000,pet->skill_support_timer,sd->bl.id,0); return true; } @@ -12242,7 +12242,7 @@ BUILDIN(npcskilleffect) int y=script_getnum(st,5); if (bl) - clif->skill_poseffect(bl,skill_id,skill_lv,x,y,iTimer->gettick()); + clif->skill_poseffect(bl,skill_id,skill_lv,x,y,timer->gettick()); return true; } @@ -12916,7 +12916,7 @@ BUILDIN(summon) const char *str,*event=""; TBL_PC *sd; struct mob_data *md; - int tick = iTimer->gettick(); + int tick = timer->gettick(); sd=script_rid2sd(st); if (!sd) return true; @@ -12937,8 +12937,8 @@ BUILDIN(summon) md->master_id=sd->bl.id; md->special_state.ai = AI_ATTACK; if( md->deletetimer != INVALID_TIMER ) - iTimer->delete_timer(md->deletetimer, mob->timer_delete); - md->deletetimer = iTimer->add_timer(tick+(timeout>0?timeout*1000:60000),mob->timer_delete,md->bl.id,0); + timer->delete(md->deletetimer, mob->timer_delete); + md->deletetimer = timer->add(tick+(timeout>0?timeout*1000:60000),mob->timer_delete,md->bl.id,0); mob->spawn (md); //Now it is ready for spawning. clif->specialeffect(&md->bl,344,AREA); sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000); @@ -15025,7 +15025,7 @@ BUILDIN(unitattack) switch( unit_bl->type ) { case BL_PC: - clif->pActionRequest_sub(((TBL_PC *)unit_bl), actiontype > 0 ? 0x07 : 0x00, target_bl->id, iTimer->gettick()); + clif->pActionRequest_sub(((TBL_PC *)unit_bl), actiontype > 0 ? 0x07 : 0x00, target_bl->id, timer->gettick()); script_pushint(st, 1); return true; case BL_MOB: @@ -15266,7 +15266,7 @@ BUILDIN(awake) { tst->rid = 0; } - iTimer->delete_timer(tst->sleep.timer, script->run_timer); + timer->delete(tst->sleep.timer, script->run_timer); tst->sleep.timer = INVALID_TIMER; if(tst->state != RERUNLINE) tst->sleep.tick = 0; @@ -16433,7 +16433,7 @@ BUILDIN(progressbar) second = script_getnum(st,3); sd->progressbar.npc_id = st->oid; - sd->progressbar.timeout = iTimer->gettick() + second*1000; + sd->progressbar.timeout = timer->gettick() + second*1000; sd->state.workinprogress = 3; clif->progressbar(sd, strtol(color, (char **)NULL, 0), second); diff --git a/src/map/skill.c b/src/map/skill.c index 6ec9d2fec..3b7378022 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -496,7 +496,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd) // allowing a skill to be cast. This is to prevent no-delay ACT files from spamming skills such as // AC_DOUBLE which do not have a skill delay and are not regarded in terms of attack motion. if( !sd->state.autocast && sd->skillitem != skill_id && sd->canskill_tick && - DIFF_TICK(iTimer->gettick(), sd->canskill_tick) < (sd->battle_status.amotion * (battle_config.skill_amotion_leniency) / 100) ) + DIFF_TICK(timer->gettick(), sd->canskill_tick) < (sd->battle_status.amotion * (battle_config.skill_amotion_leniency) / 100) ) {// attempted to cast a skill before the attack motion has finished return 1; } @@ -2334,8 +2334,8 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds sce->val1 = skill_id; //Update combo-skill sce->val3 = skill_id; if( sce->timer != INVALID_TIMER ) - iTimer->delete_timer(sce->timer, iStatus->change_timer); - sce->timer = iTimer->add_timer(tick+sce->val4, iStatus->change_timer, src->id, SC_COMBOATTACK); + timer->delete(sce->timer, iStatus->change_timer); + sce->timer = timer->add(tick+sce->val4, iStatus->change_timer, src->id, SC_COMBOATTACK); break; } unit->cancel_combo(src); // Cancel combo wait @@ -2717,12 +2717,12 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds ) && check_distance_bl(bl, d_bl, sce->val3) ) { if(!rmdamage){ - clif->damage(d_bl,d_bl, iTimer->gettick(), 0, 0, damage, 0, 0, 0); + clif->damage(d_bl,d_bl, timer->gettick(), 0, 0, damage, 0, 0, 0); status_fix_damage(NULL,d_bl, damage, 0); } else{ //Reflected magics are done directly on the target not on paladin //This check is only for magical skill. //For BF_WEAPON skills types track var rdamage and function battle_calc_return_damage - clif->damage(bl,bl, iTimer->gettick(), 0, 0, damage, 0, 0, 0); + clif->damage(bl,bl, timer->gettick(), 0, 0, damage, 0, 0, 0); status_fix_damage(bl,bl, damage, 0); } } @@ -3307,7 +3307,7 @@ int skill_addtimerskill (struct block_list *src, unsigned int tick, int target, if( i == MAX_SKILLTIMERSKILL ) return 1; ud->skilltimerskill[i] = ers_alloc(skill->timer_ers, struct skill_timerskill); - ud->skilltimerskill[i]->timer = iTimer->add_timer(tick, skill->timerskill, src->id, i); + ud->skilltimerskill[i]->timer = timer->add(tick, skill->timerskill, src->id, i); ud->skilltimerskill[i]->src_id = src->id; ud->skilltimerskill[i]->target_id = target; ud->skilltimerskill[i]->skill_id = skill_id; @@ -3333,7 +3333,7 @@ int skill_cleartimerskill (struct block_list *src) for(i=0;iskilltimerskill[i]) { - iTimer->delete_timer(ud->skilltimerskill[i]->timer, skill->timerskill); + timer->delete(ud->skilltimerskill[i]->timer, skill->timerskill); ers_free(skill->timer_ers, ud->skilltimerskill[i]); ud->skilltimerskill[i]=NULL; } @@ -3346,8 +3346,8 @@ int skill_activate_reverbetion( struct block_list *bl, va_list ap) { if( bl->type != BL_SKILL ) return 0; if( su->alive && (sg = su->group) && sg->skill_id == WM_REVERBERATION ) { - iMap->foreachinrange(skill->trap_splash, bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, bl, iTimer->gettick()); - su->limit=DIFF_TICK(iTimer->gettick(),sg->tick); + iMap->foreachinrange(skill->trap_splash, bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, bl, timer->gettick()); + su->limit=DIFF_TICK(timer->gettick(),sg->tick); sg->unit_id = UNT_USED_TRAPS; } return 0; @@ -4430,7 +4430,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint skill->attack(skill->get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag); else { clif->skill_nodamage(src, bl, skill_id, 0, 1); - skill->addtimerskill(src, iTimer->gettick() + skill->get_time(skill_id, skill_lv) - 1000, bl->id, 0, 0, skill_id, skill_lv, 0, 0); + skill->addtimerskill(src, timer->gettick() + skill->get_time(skill_id, skill_lv) - 1000, bl->id, 0, 0, skill_id, skill_lv, 0, 0); } break; @@ -4567,7 +4567,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint if( sd && !(flag&1) ) {// ensure that the skill last-cast tick is recorded - sd->canskill_tick = iTimer->gettick(); + sd->canskill_tick = timer->gettick(); if( sd->state.arrow_atk ) {// consume arrow on last invocation to this skill. @@ -4810,8 +4810,8 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) case NPC_GRANDDARKNESS: if( (sc = iStatus->get_sc(src)) && sc->data[SC_NOEQUIPSHIELD] ) { - const struct TimerData *timer = iTimer->get_timer(sc->data[SC_NOEQUIPSHIELD]->timer); - if( timer && timer->func == iStatus->change_timer && DIFF_TICK(timer->tick,iTimer->gettick()+skill->get_time(ud->skill_id, ud->skill_lv)) > 0 ) + const struct TimerData *td = timer->get(sc->data[SC_NOEQUIPSHIELD]->timer); + if( td && td->func == iStatus->change_timer && DIFF_TICK(td->tick,timer->gettick()+skill->get_time(ud->skill_id, ud->skill_lv)) > 0 ) break; } sc_start2(src, SC_NOEQUIPSHIELD, 100, 0, 1, skill->get_time(ud->skill_id, ud->skill_lv)); @@ -8560,7 +8560,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( is_boss(bl) ) break; if( sc_start2(bl, type, 100, skill_lv, src->id, skill->get_time(skill_id, skill_lv))) { if( bl->type == BL_MOB ) - mob->unlocktarget((TBL_MOB*)bl,iTimer->gettick()); + mob->unlocktarget((TBL_MOB*)bl,timer->gettick()); unit->stop_attack(bl); clif->bladestop(src, bl->id, 1); iMap->freeblock_unlock(); @@ -9153,8 +9153,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui md->master_id = src->id; md->special_state.ai = AI_ZANZOU; if( md->deletetimer != INVALID_TIMER ) - iTimer->delete_timer(md->deletetimer, mob->timer_delete); - md->deletetimer = iTimer->add_timer (iTimer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0); + timer->delete(md->deletetimer, mob->timer_delete); + md->deletetimer = timer->add (timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0); mob->spawn( md ); pc->setinvincibletimer(sd,500);// unlock target lock clif->skill_nodamage(src,bl,skill_id,skill_lv,1); @@ -9338,8 +9338,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if (md) { md->master_id = src->id; if (md->deletetimer != INVALID_TIMER) - iTimer->delete_timer(md->deletetimer, mob->timer_delete); - md->deletetimer = iTimer->add_timer(iTimer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0); + timer->delete(md->deletetimer, mob->timer_delete); + md->deletetimer = timer->add(timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0); mob->spawn(md); //Now it is ready for spawning. sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_CANATTACK|MD_AGGRESSIVE, 0, 60000); } @@ -9367,7 +9367,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } if( sd && !(flag&1) ) { // ensure that the skill last-cast tick is recorded - sd->canskill_tick = iTimer->gettick(); + sd->canskill_tick = timer->gettick(); if( sd->state.arrow_atk ) { // consume arrow on last invocation to this skill. battle->consume_ammo(sd, skill_id, skill_lv); @@ -9772,7 +9772,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui struct skill_unit_group *sg; if ((sg= skill->locate_element_field(src)) != NULL && ( sg->skill_id == SA_VOLCANO || sg->skill_id == SA_DELUGE || sg->skill_id == SA_VIOLENTGALE )) { - if (sg->limit - DIFF_TICK(iTimer->gettick(), sg->tick) > 0) { + if (sg->limit - DIFF_TICK(timer->gettick(), sg->tick) > 0) { skill->unitsetting(src,skill_id,skill_lv,x,y,0); return 0; // not to consume items } else @@ -10000,8 +10000,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui md->master_id = src->id; md->special_state.ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA; if( md->deletetimer != INVALID_TIMER ) - iTimer->delete_timer(md->deletetimer, mob->timer_delete); - md->deletetimer = iTimer->add_timer (iTimer->gettick() + skill->get_time(skill_id,skill_lv), mob->timer_delete, md->bl.id, 0); + timer->delete(md->deletetimer, mob->timer_delete); + md->deletetimer = timer->add (timer->gettick() + skill->get_time(skill_id,skill_lv), mob->timer_delete, md->bl.id, 0); mob->spawn (md); //Now it is ready for spawning. } } @@ -10099,8 +10099,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui if ((i = skill->get_time(skill_id, skill_lv)) > 0) { if( md->deletetimer != INVALID_TIMER ) - iTimer->delete_timer(md->deletetimer, mob->timer_delete); - md->deletetimer = iTimer->add_timer (tick + i, mob->timer_delete, md->bl.id, 0); + timer->delete(md->deletetimer, mob->timer_delete); + md->deletetimer = timer->add (tick + i, mob->timer_delete, md->bl.id, 0); } mob->spawn (md); } @@ -10199,7 +10199,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case 2: sx = x - i; break; case 6: sx = x + i; break; } - skill->addtimerskill(src,iTimer->gettick() + (50 * i),0,sx,sy,skill_id,skill_lv,dir,flag&2); + skill->addtimerskill(src,timer->gettick() + (50 * i),0,sx,sy,skill_id,skill_lv,dir,flag&2); } } break; @@ -10234,8 +10234,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui md->master_id = src->id; md->special_state.ai = AI_FLORA; if( md->deletetimer != INVALID_TIMER ) - iTimer->delete_timer(md->deletetimer, mob->timer_delete); - md->deletetimer = iTimer->add_timer (iTimer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0); + timer->delete(md->deletetimer, mob->timer_delete); + md->deletetimer = timer->add (timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0); mob->spawn( md ); } } @@ -10370,7 +10370,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui status_change_end(src,SC_CURSEDCIRCLE_ATKER,INVALID_TIMER); if( sd ) {// ensure that the skill last-cast tick is recorded - sd->canskill_tick = iTimer->gettick(); + sd->canskill_tick = timer->gettick(); if( sd->state.arrow_atk && !(flag&1) ) { // consume arrow if this is a ground skill @@ -10490,7 +10490,7 @@ int skill_icewall_block(struct block_list *bl,va_list ap) { return 0; if( !check_distance_bl(bl, target, status_get_range(bl) ) ) { - mob->unlocktarget(md,iTimer->gettick()); + mob->unlocktarget(md,timer->gettick()); mob_stop_walking(md,1); } @@ -10644,7 +10644,7 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill old_sg->skill_id == SA_VIOLENTGALE ) && old_sg->limit > 0) { //Use the previous limit (minus the elapsed time) [Skotlex] - limit = old_sg->limit - DIFF_TICK(iTimer->gettick(), old_sg->tick); + limit = old_sg->limit - DIFF_TICK(timer->gettick(), old_sg->tick); if (limit < 0) //This can happen... limit = skill->get_time(skill_id,skill_lv); } @@ -10859,7 +10859,7 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill group->state.guildaura = ( skill_id >= GD_LEADERSHIP && skill_id <= GD_HAWKEYES )?1:0; group->item_id = req_item; //if tick is greater than current, do not invoke onplace function just yet. [Skotlex] - if (DIFF_TICK(group->tick, iTimer->gettick()) > SKILLUNITTIMER_INTERVAL) + if (DIFF_TICK(group->tick, timer->gettick()) > SKILLUNITTIMER_INTERVAL) active_flag = 0; if(skill_id==HT_TALKIEBOX || skill_id==RG_GRAFFITI){ @@ -10976,7 +10976,7 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill // execute on all targets standing on this cell if (range==0 && active_flag) - iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,iTimer->gettick(),1); + iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,timer->gettick(),1); } if (!group->alive_count) { //No cells? Something that was blocked completely by Land Protector? @@ -11038,7 +11038,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned } else if( sc && battle->check_target(&sg->unit->bl,bl,sg->target_flag) > 0 ) { int sec = skill->get_time2(sg->skill_id,sg->skill_lv); if( iStatus->change_start(bl,type,10000,sg->skill_lv,1,sg->group_id,0,sec,8) ) { - const struct TimerData* td = sc->data[type]?iTimer->get_timer(sc->data[type]->timer):NULL; + const struct TimerData* td = sc->data[type]?timer->get(sc->data[type]->timer):NULL; if( td ) sec = DIFF_TICK(td->tick, tick); iMap->moveblock(bl, src->bl.x, src->bl.y, tick); @@ -11150,8 +11150,8 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned else if (sce->val4 == 1) { //Readjust timers since the effect will not last long. sce->val4 = 0; - iTimer->delete_timer(sce->timer, iStatus->change_timer); - sce->timer = iTimer->add_timer(tick+sg->limit, iStatus->change_timer, bl->id, type); + timer->delete(sce->timer, iStatus->change_timer); + sce->timer = timer->add(tick+sg->limit, iStatus->change_timer, bl->id, type); } break; @@ -11411,7 +11411,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns if( sg->val2 == 0 && tsc && (sg->unit_id == UNT_ANKLESNARE || bl->id != sg->src_id) ) { int sec = skill->get_time2(sg->skill_id,sg->skill_lv); if( iStatus->change_start(bl,type,10000,sg->skill_lv,sg->group_id,0,0,sec, 8) ) { - const struct TimerData* td = tsc->data[type]?iTimer->get_timer(tsc->data[type]->timer):NULL; + const struct TimerData* td = tsc->data[type]?timer->get(tsc->data[type]->timer):NULL; if( td ) sec = DIFF_TICK(td->tick, tick); if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type || !map_flag_gvg2(src->bl.m) ) { @@ -11748,7 +11748,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns if( !sg->val2 ) { int sec = skill->get_time2(sg->skill_id, sg->skill_lv); if( sc_start(bl, type, 100, sg->skill_lv, sec) ) { - const struct TimerData* td = tsc->data[type]?iTimer->get_timer(tsc->data[type]->timer):NULL; + const struct TimerData* td = tsc->data[type]?timer->get(tsc->data[type]->timer):NULL; if( td ) sec = DIFF_TICK(td->tick, tick); ///iMap->moveblock(bl, src->bl.x, src->bl.y, tick); // in official server it doesn't behave like this. [malufett] @@ -12046,11 +12046,11 @@ static int skill_unit_onleft (uint16 skill_id, struct block_list *bl, unsigned i case DC_FORTUNEKISS: case DC_SERVICEFORYOU: if (sce) { - iTimer->delete_timer(sce->timer, iStatus->change_timer); + timer->delete(sce->timer, iStatus->change_timer); //NOTE: It'd be nice if we could get the skill_lv for a more accurate extra time, but alas... //not possible on our current implementation. sce->val4 = 1; //Store the fact that this is a "reduced" duration effect. - sce->timer = iTimer->add_timer(tick+skill->get_time2(skill_id,1), iStatus->change_timer, bl->id, type); + sce->timer = timer->add(tick+skill->get_time2(skill_id,1), iStatus->change_timer, bl->id, type); } break; case PF_FOGWALL: @@ -12060,8 +12060,8 @@ static int skill_unit_onleft (uint16 skill_id, struct block_list *bl, unsigned i if (bl->type == BL_PC) //Players get blind ended inmediately, others have it still for 30 secs. [Skotlex] status_change_end(bl, SC_BLIND, INVALID_TIMER); else { - iTimer->delete_timer(sce->timer, iStatus->change_timer); - sce->timer = iTimer->add_timer(30000+tick, iStatus->change_timer, bl->id, SC_BLIND); + timer->delete(sce->timer, iStatus->change_timer); + sce->timer = timer->add(30000+tick, iStatus->change_timer, bl->id, SC_BLIND); } } } @@ -13091,7 +13091,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id break; case ST_MOVE_ENABLE: if (sc && sc->data[SC_COMBOATTACK] && sc->data[SC_COMBOATTACK]->val1 == skill_id) - sd->ud.canmove_tick = iTimer->gettick(); //When using a combo, cancel the can't move delay to enable the skill. [Skotlex] + sd->ud.canmove_tick = timer->gettick(); //When using a combo, cancel the can't move delay to enable the skill. [Skotlex] if (!unit->can_move(&sd->bl)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); @@ -14741,7 +14741,7 @@ int skill_detonator(struct block_list *bl, va_list ap) iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(unit->group->skill_id,unit->group->skill_lv),unit->group->bl_flag,bl,unit->group->tick); } clif->changetraplook(bl, UNT_USED_TRAPS); - unit->group->limit = DIFF_TICK(iTimer->gettick(),unit->group->tick) + + unit->group->limit = DIFF_TICK(timer->gettick(),unit->group->tick) + (unit_id == UNT_TALKIEBOX ? 5000 : (unit_id == UNT_CLUSTERBOMB || unit_id == UNT_ICEBOUNDTRAP? 2500 : (unit_id == UNT_FIRINGTRAP ? 0 : 1500)) ); unit->group->unit_id = UNT_USED_TRAPS; break; @@ -14963,7 +14963,7 @@ int skill_trap_splash (struct block_list *bl, va_list ap) { case UNT_FIRINGTRAP: case UNT_ICEBOUNDTRAP: clif->changetraplook(bl, UNT_USED_TRAPS); - su->group->limit = DIFF_TICK(iTimer->gettick(),su->group->tick) + 1500; + su->group->limit = DIFF_TICK(timer->gettick(),su->group->tick) + 1500; su->group->unit_id = UNT_USED_TRAPS; } break; @@ -15159,7 +15159,7 @@ int skill_delunit (struct skill_unit* unit) { // invoke onout event if( !unit->range ) - iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,iTimer->gettick(),4); + iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,timer->gettick(),4); // perform ondelete actions switch (group->skill_id) { @@ -15261,7 +15261,7 @@ struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count, if(i == MAX_SKILLUNITGROUP) { // array is full, make room by discarding oldest group int j=0; - unsigned maxdiff=0,x,tick=iTimer->gettick(); + unsigned maxdiff=0,x,tick=timer->gettick(); for(i=0;iskillunit[i];i++) if((x=DIFF_TICK(tick,ud->skillunit[i]->tick))>maxdiff){ maxdiff=x; @@ -15290,7 +15290,7 @@ struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count, group->map = src->m; group->limit = limit; group->interval = interval; - group->tick = iTimer->gettick(); + group->tick = timer->gettick(); group->valstr = NULL; ud->skillunit[i] = group; @@ -15598,7 +15598,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { group->limit = skill->get_time(group->skill_id,group->skill_lv); unit->limit = skill->get_time(group->skill_id,group->skill_lv); // apply effect to all units standing on it - iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,iTimer->gettick(),1); + iMap->foreachincell(skill->unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,timer->gettick(),1); break; case UNT_CALLFAMILY: @@ -15875,7 +15875,7 @@ int skill_unit_move (struct block_list *bl, unsigned int tick, int flag) { int skill_unit_move_unit_group (struct skill_unit_group *group, int16 m, int16 dx, int16 dy) { int i,j; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); int *m_flag; struct skill_unit *unit1; struct skill_unit *unit2; @@ -16731,8 +16731,8 @@ int skill_magicdecoy(struct map_session_data *sd, int nameid) { md->master_id = sd->bl.id; md->special_state.ai = AI_FLORA; if( md->deletetimer != INVALID_TIMER ) - iTimer->delete_timer(md->deletetimer, mob->timer_delete); - md->deletetimer = iTimer->add_timer (iTimer->gettick() + skill->get_time(NC_MAGICDECOY,skill_id), mob->timer_delete, md->bl.id, 0); + timer->delete(md->deletetimer, mob->timer_delete); + md->deletetimer = timer->add (timer->gettick() + skill->get_time(NC_MAGICDECOY,skill_id), mob->timer_delete, md->bl.id, 0); mob->spawn(md); md->status.matk_min = md->status.matk_max = 250 + (50 * skill_id); } @@ -17062,13 +17062,13 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick, #endif cd->entry[cd->cursor]->skidx = idx; cd->entry[cd->cursor]->skill_id = skill_id; - cd->entry[cd->cursor]->started = iTimer->gettick(); + cd->entry[cd->cursor]->started = timer->gettick(); cd->cursor++; } } - sd->blockskill[idx] = 0x1|(0xFE&iTimer->add_timer(iTimer->gettick()+tick,skill->blockpc_end,sd->bl.id,idx)); + sd->blockskill[idx] = 0x1|(0xFE&timer->add(timer->gettick()+tick,skill->blockpc_end,sd->bl.id,idx)); return 0; } @@ -17094,7 +17094,7 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { / return -1; } hd->blockskill[idx] = 1; - return iTimer->add_timer(iTimer->gettick() + tick, skill->blockhomun_end, hd->bl.id, idx); + return timer->add(timer->gettick() + tick, skill->blockhomun_end, hd->bl.id, idx); } int skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) {//[orn] @@ -17119,7 +17119,7 @@ int skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tick) return -1; } md->blockskill[idx] = 1; - return iTimer->add_timer(iTimer->gettick() + tick, skill->blockmerc_end, md->bl.id, idx); + return timer->add(timer->gettick() + tick, skill->blockmerc_end, md->bl.id, idx); } /** * Adds a new skill unit entry for this player to recast after map load @@ -17572,7 +17572,7 @@ void skill_cooldown_save(struct map_session_data * sd) { return; } - now = iTimer->gettick(); + now = timer->gettick(); // process each individual cooldown associated with the character for( i = 0; i < cd->cursor; i++ ) { @@ -17598,7 +17598,7 @@ void skill_cooldown_load(struct map_session_data * sd) { clif->cooldown_list(sd->fd,cd); - now = iTimer->gettick(); + now = timer->gettick(); // process each individual cooldown associated with the character for( i = 0; i < cd->cursor; i++ ) { @@ -18087,13 +18087,13 @@ int do_init_skill (void) { ers_chunk_size(skill->cd_ers, 25); ers_chunk_size(skill->cd_entry_ers, 100); - iTimer->add_timer_func_list(skill->unit_timer,"skill_unit_timer"); - iTimer->add_timer_func_list(skill->castend_id,"skill_castend_id"); - iTimer->add_timer_func_list(skill->castend_pos,"skill_castend_pos"); - iTimer->add_timer_func_list(skill->timerskill,"skill_timerskill"); - iTimer->add_timer_func_list(skill->blockpc_end, "skill_blockpc_end"); + timer->add_func_list(skill->unit_timer,"skill_unit_timer"); + timer->add_func_list(skill->castend_id,"skill_castend_id"); + timer->add_func_list(skill->castend_pos,"skill_castend_pos"); + timer->add_func_list(skill->timerskill,"skill_timerskill"); + timer->add_func_list(skill->blockpc_end, "skill_blockpc_end"); - iTimer->add_timer_interval(iTimer->gettick()+SKILLUNITTIMER_INTERVAL,skill->unit_timer,0,0,SKILLUNITTIMER_INTERVAL); + timer->add_interval(timer->gettick()+SKILLUNITTIMER_INTERVAL,skill->unit_timer,0,0,SKILLUNITTIMER_INTERVAL); return 0; } diff --git a/src/map/status.c b/src/map/status.c index ee5d4bfd5..4f1ca9094 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1157,7 +1157,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, } if (target->type == BL_SKILL) - return skill->unit_ondamaged((struct skill_unit *)target, src, hp, iTimer->gettick()); + return skill->unit_ondamaged((struct skill_unit *)target, src, hp, timer->gettick()); status = iStatus->get_status_data(target); if( status == &dummy_status ) @@ -1259,7 +1259,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, if( status->hp || (flag&8) ) { //Still lives or has been dead before this damage. if (walkdelay) - unit->set_walkdelay(target, iTimer->gettick(), walkdelay, 0); + unit->set_walkdelay(target, timer->gettick(), walkdelay, 0); return (int)(hp+sp); } @@ -1347,7 +1347,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, unit->stop_walking(target,1); unit->skillcastcancel(target,0); clif->clearunit_area(target,CLR_DEAD); - skill->unit_move(target,iTimer->gettick(),4); + skill->unit_move(target,timer->gettick(),4); skill->cleartimerskill(target); } @@ -7302,7 +7302,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val //Kaahi overwrites previous level regardless of existing level. //Delete timer if it exists. if (sce->val4 != INVALID_TIMER) { - iTimer->delete_timer(sce->val4,iStatus->kaahi_heal_timer); + timer->delete(sce->val4,iStatus->kaahi_heal_timer); sce->val4 = INVALID_TIMER; } break; @@ -7882,8 +7882,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val sc_start4(src,SC_RG_CCONFINE_M,100,val1,1,0,0,tick+1000); else { //Increase count of locked enemies and refresh time. (sce2->val2)++; - iTimer->delete_timer(sce2->timer, iStatus->change_timer); - sce2->timer = iTimer->add_timer(iTimer->gettick()+tick+1000, iStatus->change_timer, src->id, SC_RG_CCONFINE_M); + timer->delete(sce2->timer, iStatus->change_timer); + sce2->timer = timer->add(timer->gettick()+tick+1000, iStatus->change_timer, src->id, SC_RG_CCONFINE_M); } } else //Status failed. return 0; @@ -7917,8 +7917,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val struct unit_data *ud = unit->bl2ud(bl); if (ud && !val3) { tick += 300 * battle_config.combo_delay_rate/100; - ud->attackabletime = iTimer->gettick()+tick; - unit->set_walkdelay(bl, iTimer->gettick(), tick, 1); + ud->attackabletime = timer->gettick()+tick; + unit->set_walkdelay(bl, timer->gettick(), tick, 1); } val3 = 0; val4 = tick; @@ -7928,7 +7928,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val val2 = 11-val1; //Chance to consume: 11-skill_lv% break; case SC_RUN: - val4 = iTimer->gettick(); //Store time at which you started running. + val4 = timer->gettick(); //Store time at which you started running. tick = -1; break; case SC_KAAHI: @@ -8325,7 +8325,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val tick_time = 1000; // [GodLesZ] tick time break; case SC_WUGDASH: - val4 = iTimer->gettick(); //Store time at which you started running. + val4 = timer->gettick(); //Store time at which you started running. tick = -1; break; case SC__SHADOWFORM: { @@ -9115,7 +9115,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val //Don't trust the previous sce assignment, in case the SC ended somewhere between there and here. if((sce=sc->data[type])) {// reuse old sc if( sce->timer != INVALID_TIMER ) - iTimer->delete_timer(sce->timer, iStatus->change_timer); + timer->delete(sce->timer, iStatus->change_timer); } else {// new sc ++(sc->count); sce = sc->data[type] = ers_alloc(sc_data_ers, struct status_change_entry); @@ -9125,7 +9125,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val sce->val3 = val3; sce->val4 = val4; if (tick >= 0) - sce->timer = iTimer->add_timer(iTimer->gettick() + tick, iStatus->change_timer, bl->id, type); + sce->timer = timer->add(timer->gettick() + tick, iStatus->change_timer, bl->id, type); else sce->timer = INVALID_TIMER; //Infinite duration @@ -9270,7 +9270,7 @@ int status_change_clear(struct block_list* bl, int type) { //If for some reason status_change_end decides to still keep the status when quitting. [Skotlex] (sc->count)--; if (sc->data[i]->timer != INVALID_TIMER) - iTimer->delete_timer(sc->data[i]->timer, iStatus->change_timer); + timer->delete(sc->data[i]->timer, iStatus->change_timer); ers_free(sc_data_ers, sc->data[i]); sc->data[i] = NULL; } @@ -9319,7 +9319,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const //Do not end infinite endure. return 0; if (sce->timer != INVALID_TIMER) //Could be a SC with infinite duration - iTimer->delete_timer(sce->timer,iStatus->change_timer); + timer->delete(sce->timer,iStatus->change_timer); if (sc->opt1) switch (type) { //"Ugly workaround" [Skotlex] @@ -9335,7 +9335,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const //since these SC are not affected by it, and it lets us know //if we have already delayed this attack or not. sce->val1 = 0; - sce->timer = iTimer->add_timer(iTimer->gettick()+10, iStatus->change_timer, bl->id, type); + sce->timer = timer->add(timer->gettick()+10, iStatus->change_timer, bl->id, type); return 1; } } @@ -9375,7 +9375,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const unit->stop_walking(bl,1); } if (begin_spurt && sce->val1 >= 7 && - DIFF_TICK(iTimer->gettick(), sce->val4) <= 1000 && + DIFF_TICK(timer->gettick(), sce->val4) <= 1000 && (!sd || (sd->weapontype1 == 0 && sd->weapontype2 == 0)) ) sc_start(bl,SC_STRUP,100,sce->val1,skill->get_time2(iStatus->sc2skill(type), sce->val1)); @@ -9515,7 +9515,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const { struct block_list *src=iMap->id2bl(sce->val3); if(src && tid != INVALID_TIMER) - skill->castend_damage_id(src, bl, sce->val2, sce->val1, iTimer->gettick(), SD_LEVEL ); + skill->castend_damage_id(src, bl, sce->val2, sce->val1, timer->gettick(), SD_LEVEL ); } break; case SC_RG_CCONFINE_S: @@ -9536,7 +9536,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const +skill->get_range2(bl, iStatus->sc2skill(type), sce->val1) +skill->get_range2(bl, TF_BACKSLIDING, 1); //Since most people use this to escape the hold.... iMap->foreachinarea(iStatus->change_timer_sub, - bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,BL_CHAR,bl,sce,type,iTimer->gettick()); + bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,BL_CHAR,bl,sce,type,timer->gettick()); } break; case SC_COMBOATTACK: @@ -9624,7 +9624,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case SC_KAAHI: //Delete timer if it exists. if (sce->val4 != INVALID_TIMER) - iTimer->delete_timer(sce->val4,iStatus->kaahi_heal_timer); + timer->delete(sce->val4,iStatus->kaahi_heal_timer); break; case SC_JAILED: if(tid == INVALID_TIMER) @@ -9676,7 +9676,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const struct block_list* src = iMap->id2bl(sce->val2); if( tid == -1 || !src) break; // Terminated by Damage - status_fix_damage(src,bl,400*sce->val1,clif->damage(bl,bl,iTimer->gettick(),0,0,400*sce->val1,0,0,0)); + status_fix_damage(src,bl,400*sce->val1,clif->damage(bl,bl,timer->gettick(),0,0,400*sce->val1,0,0,0)); } break; case SC_WUGDASH: @@ -9724,7 +9724,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_CURSEDCIRCLE_ATKER: if( sce->val2 ) // used the default area size cause there is a chance the caster could knock back and can't clear the target. - iMap->foreachinrange(iStatus->change_timer_sub, bl, battle_config.area_size,BL_CHAR, bl, sce, SC_CURSEDCIRCLE_TARGET, iTimer->gettick()); + iMap->foreachinrange(iStatus->change_timer_sub, bl, battle_config.area_size,BL_CHAR, bl, sce, SC_CURSEDCIRCLE_TARGET, timer->gettick()); break; case SC_RAISINGDRAGON: if( sd && sce->val2 && !pc_isdead(sd) ) { @@ -9979,7 +9979,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const status_calc_bl(bl,calc_flag); if(opt_flag&4) //Out of hiding, invoke on place. - skill->unit_move(bl,iTimer->gettick(),1); + skill->unit_move(bl,timer->gettick(),1); if(opt_flag&2 && sd && iMap->getcell(bl->m,bl->x,bl->y,CELL_CHKNPC)) npc->touch_areanpc(sd,bl->m,bl->x,bl->y); //Trigger on-touch event. @@ -10061,7 +10061,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) // set the next timer of the sce (don't assume the status still exists) #define sc_timer_next(t,f,i,d) \ if( (sce=sc->data[type]) ) \ - sce->timer = iTimer->add_timer(t,f,i,d); \ + sce->timer = timer->add(t,f,i,d); \ else \ ShowError("status_change_timer: Unexpected NULL status change id: %d data: %d\n", id, data) @@ -11131,14 +11131,14 @@ int status_change_clear_buffs (struct block_list* bl, int type) int status_change_spread( struct block_list *src, struct block_list *bl ) { int i, flag = 0; struct status_change *sc = iStatus->get_sc(src); - const struct TimerData *timer; + const struct TimerData *td; unsigned int tick; struct status_change_data data; if( !sc || !sc->count ) return 0; - tick = iTimer->gettick(); + tick = timer->gettick(); for( i = SC_COMMON_MIN; i < SC_MAX; i++ ) { if( !sc->data[i] || i == SC_COMMON_MAX ) @@ -11171,10 +11171,10 @@ int status_change_spread( struct block_list *src, struct block_list *bl ) { case SC_DEATHHURT: case SC_PARALYSE: if( sc->data[i]->timer != INVALID_TIMER ) { - timer = iTimer->get_timer(sc->data[i]->timer); - if (timer == NULL || timer->func != iStatus->change_timer || DIFF_TICK(timer->tick,tick) < 0) + td = timer->get(sc->data[i]->timer); + if (td == NULL || td->func != iStatus->change_timer || DIFF_TICK(td->tick,tick) < 0) continue; - data.tick = DIFF_TICK(timer->tick,tick); + data.tick = DIFF_TICK(td->tick,tick); } else data.tick = INVALID_TIMER; break; @@ -11616,16 +11616,16 @@ int status_readdb(void) *------------------------------------------*/ int do_init_status(void) { - iTimer->add_timer_func_list(iStatus->change_timer,"status_change_timer"); - iTimer->add_timer_func_list(kaahi_heal_timer,"kaahi_heal_timer"); - iTimer->add_timer_func_list(status_natural_heal_timer,"status_natural_heal_timer"); + timer->add_func_list(iStatus->change_timer,"status_change_timer"); + timer->add_func_list(kaahi_heal_timer,"kaahi_heal_timer"); + timer->add_func_list(status_natural_heal_timer,"status_natural_heal_timer"); initChangeTables(); initDummyData(); iStatus->readdb(); status_calc_sigma(); - natural_heal_prev_tick = iTimer->gettick(); + natural_heal_prev_tick = timer->gettick(); sc_data_ers = ers_new(sizeof(struct status_change_entry),"status.c::sc_data_ers",ERS_OPT_NONE); - iTimer->add_timer_interval(natural_heal_prev_tick + NATURAL_HEAL_INTERVAL, status_natural_heal_timer, 0, 0, NATURAL_HEAL_INTERVAL); + timer->add_interval(natural_heal_prev_tick + NATURAL_HEAL_INTERVAL, status_natural_heal_timer, 0, 0, NATURAL_HEAL_INTERVAL); return 0; } void do_final_status(void) diff --git a/src/map/unit.c b/src/map/unit.c index 0551baaea..1bae8885a 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -133,7 +133,7 @@ int unit_walktoxy_sub(struct block_list *bl) else i = iStatus->get_speed(bl); if( i > 0) - ud->walktimer = iTimer->add_timer(iTimer->gettick()+i,unit->walktoxy_timer,bl->id,i); + ud->walktimer = timer->add(timer->gettick()+i,unit->walktoxy_timer,bl->id,i); return 1; } @@ -213,9 +213,9 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) // mercenary should be warped after being 3 seconds too far from the master [greenbox] if (sd->md->masterteleport_timer == 0) { - sd->md->masterteleport_timer = iTimer->gettick(); + sd->md->masterteleport_timer = timer->gettick(); } - else if (DIFF_TICK(iTimer->gettick(), sd->md->masterteleport_timer) > 3000) + else if (DIFF_TICK(timer->gettick(), sd->md->masterteleport_timer) > 3000) { sd->md->masterteleport_timer = 0; unit->warp( &sd->md->bl, sd->bl.m, sd->bl.x, sd->bl.y, CLR_TELEPORT ); @@ -254,9 +254,9 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) // mercenary should be warped after being 3 seconds too far from the master [greenbox] if (mrd->masterteleport_timer == 0) { - mrd->masterteleport_timer = iTimer->gettick(); + mrd->masterteleport_timer = timer->gettick(); } - else if (DIFF_TICK(iTimer->gettick(), mrd->masterteleport_timer) > 3000) + else if (DIFF_TICK(timer->gettick(), mrd->masterteleport_timer) > 3000) { mrd->masterteleport_timer = 0; unit->warp( bl, mrd->master->bl.id, mrd->master->bl.x, mrd->master->bl.y, CLR_TELEPORT ); @@ -283,7 +283,7 @@ int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) i = iStatus->get_speed(bl); if(i > 0) { - ud->walktimer = iTimer->add_timer(tick+i,unit->walktoxy_timer,id,i); + ud->walktimer = timer->add(tick+i,unit->walktoxy_timer,id,i); if( md && DIFF_TICK(tick,md->dmgtick) < 3000 )//not required not damaged recently clif->move(ud); } else if(ud->state.running) { @@ -361,10 +361,10 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) if ((wpd.path_len > battle_config.max_walk_path) && (bl->type != BL_NPC)) return 0; - if (flag&4 && DIFF_TICK(ud->canmove_tick, iTimer->gettick()) > 0 && - DIFF_TICK(ud->canmove_tick, iTimer->gettick()) < 2000) + if (flag&4 && DIFF_TICK(ud->canmove_tick, timer->gettick()) > 0 && + DIFF_TICK(ud->canmove_tick, timer->gettick()) < 2000) { // Delay walking command. [Skotlex] - iTimer->add_timer(ud->canmove_tick+1, unit->delay_walktoxy_timer, bl->id, (x<<16)|(y&0xFFFF)); + timer->add(ud->canmove_tick+1, unit->delay_walktoxy_timer, bl->id, (x<<16)|(y&0xFFFF)); return 1; } @@ -388,7 +388,7 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) } if(ud->attacktimer != INVALID_TIMER) { - iTimer->delete_timer( ud->attacktimer, unit->attack_timer ); + timer->delete( ud->attacktimer, unit->attack_timer ); ud->attacktimer = INVALID_TIMER; } @@ -412,7 +412,7 @@ int unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data) if (ud && ud->walktimer == INVALID_TIMER && ud->target == data) { if (DIFF_TICK(ud->canmove_tick, tick) > 0) //Keep waiting? - iTimer->add_timer(ud->canmove_tick+1, unit->walktobl_sub, id, data); + timer->add(ud->canmove_tick+1, unit->walktobl_sub, id, data); else if (unit->can_move(bl)) { if (unit->walktoxy_sub(bl)) @@ -461,9 +461,9 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int return 1; } - if(DIFF_TICK(ud->canmove_tick, iTimer->gettick()) > 0) + if(DIFF_TICK(ud->canmove_tick, timer->gettick()) > 0) { //Can't move, wait a bit before invoking the movement. - iTimer->add_timer(ud->canmove_tick+1, unit->walktobl_sub, bl->id, ud->target); + timer->add(ud->canmove_tick+1, unit->walktobl_sub, bl->id, ud->target); return 1; } @@ -471,7 +471,7 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int return 0; if(ud->attacktimer != INVALID_TIMER) { - iTimer->delete_timer( ud->attacktimer, unit->attack_timer ); + timer->delete( ud->attacktimer, unit->attack_timer ); ud->attacktimer = INVALID_TIMER; } @@ -595,7 +595,7 @@ int unit_wugdash(struct block_list *bl, struct map_session_data *sd) { if( sd ){ clif->fixpos(bl); - skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, iTimer->gettick(), SD_LEVEL); + skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, timer->gettick(), SD_LEVEL); } return 0; } @@ -612,7 +612,7 @@ int unit_wugdash(struct block_list *bl, struct map_session_data *sd) { if( sd ){ clif->fixpos(bl); - skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, iTimer->gettick(), SD_LEVEL); + skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, timer->gettick(), SD_LEVEL); } return 0; } @@ -659,7 +659,7 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool iMap->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, sd?BL_ALL:BL_PC, bl); - iMap->moveblock(bl, dst_x, dst_y, iTimer->gettick()); + iMap->moveblock(bl, dst_x, dst_y, timer->gettick()); ud->walktimer = -2; // arbitrary non-INVALID_TIMER value to make the clif code send walking packets iMap->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, sd?BL_ALL:BL_PC, bl); @@ -754,7 +754,7 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag) if(su) { skill->unit_move_unit_group(su->group, bl->m, dx, dy); } else { - iMap->moveblock(bl, nx, ny, iTimer->gettick()); + iMap->moveblock(bl, nx, ny, timer->gettick()); } iMap->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl); @@ -847,7 +847,7 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type) iMap->addblock(bl); clif->spawn(bl); - skill->unit_move(bl,iTimer->gettick(),1); + skill->unit_move(bl,timer->gettick(),1); return 0; } @@ -871,13 +871,13 @@ int unit_stop_walking(struct block_list *bl,int type) if(!ud || ud->walktimer == INVALID_TIMER) return 0; //NOTE: We are using timer data after deleting it because we know the - //iTimer->delete_timer function does not messes with it. If the function's + //timer->delete function does not messes with it. If the function's //behaviour changes in the future, this code could break! - td = iTimer->get_timer(ud->walktimer); - iTimer->delete_timer(ud->walktimer, unit->walktoxy_timer); + td = timer->get(ud->walktimer); + timer->delete(ud->walktimer, unit->walktoxy_timer); ud->walktimer = INVALID_TIMER; ud->state.change_walk_target = 0; - tick = iTimer->gettick(); + tick = timer->gettick(); if( (type&0x02 && !ud->walkpath.path_pos) //Force moving at least one cell. || (type&0x04 && td && DIFF_TICK(td->tick, tick) <= td->data/2) //Enough time has passed to cover half-cell ) { @@ -893,7 +893,7 @@ int unit_stop_walking(struct block_list *bl,int type) ud->to_x = bl->x; ud->to_y = bl->y; if(bl->type == BL_PET && type&~0xff) - ud->canmove_tick = iTimer->gettick() + (type>>8); + ud->canmove_tick = timer->gettick() + (type>>8); //Readded, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin] if (ud->state.running) { @@ -939,7 +939,7 @@ int unit_can_move(struct block_list *bl) { if (ud->skilltimer != INVALID_TIMER && ud->skill_id != LG_EXEEDBREAK && (!sd || !pc->checkskill(sd, SA_FREECAST) || skill->get_inf2(ud->skill_id)&INF2_GUILD_SKILL)) return 0; // prevent moving while casting - if (DIFF_TICK(ud->canmove_tick, iTimer->gettick()) > 0) + if (DIFF_TICK(ud->canmove_tick, timer->gettick()) > 0) return 0; if (sd && ( @@ -1061,13 +1061,13 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int //Resume running after can move again [Kevin] if(ud->state.running) { - iTimer->add_timer(ud->canmove_tick, unit->resume_running, bl->id, (intptr_t)ud); + timer->add(ud->canmove_tick, unit->resume_running, bl->id, (intptr_t)ud); } else { unit->stop_walking(bl,2|4); if(ud->target) - iTimer->add_timer(ud->canmove_tick+1, unit->walktobl_sub, bl->id, ud->target); + timer->add(ud->canmove_tick+1, unit->walktobl_sub, bl->id, ud->target); } } } @@ -1081,7 +1081,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui struct status_change *sc; struct map_session_data *sd = NULL; struct block_list * target = NULL; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); int temp = 0, range; nullpo_ret(src); @@ -1421,7 +1421,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui if( casttime > 0 ) { - ud->skilltimer = iTimer->add_timer( tick+casttime, skill->castend_id, src->id, 0 ); + ud->skilltimer = timer->add( tick+casttime, skill->castend_id, src->id, 0 ); if( sd && (pc->checkskill(sd,SA_FREECAST) > 0 || skill_id == LG_EXEEDBREAK) ) status_calc_bl(&sd->bl, SCB_SPEED); } else @@ -1445,7 +1445,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui struct unit_data *ud = NULL; struct status_change *sc; struct block_list bl; - unsigned int tick = iTimer->gettick(); + unsigned int tick = timer->gettick(); int range; nullpo_ret(src); @@ -1556,7 +1556,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui // in official this is triggered even if no cast time. clif->skillcasting(src, src->id, 0, skill_x, skill_y, skill_id, skill->get_ele(skill_id, skill_lv), casttime); if( casttime > 0 ) { - ud->skilltimer = iTimer->add_timer( tick+casttime, skill->castend_pos, src->id, 0 ); + ud->skilltimer = timer->add( tick+casttime, skill->castend_pos, src->id, 0 ); if( (sd && pc->checkskill(sd,SA_FREECAST) > 0) || skill_id == LG_EXEEDBREAK) status_calc_bl(&sd->bl, SCB_SPEED); } else { @@ -1595,7 +1595,7 @@ int unit_stop_attack(struct block_list *bl) if(!ud || ud->attacktimer == INVALID_TIMER) return 0; - iTimer->delete_timer( ud->attacktimer, unit->attack_timer ); + timer->delete( ud->attacktimer, unit->attack_timer ); ud->attacktimer = INVALID_TIMER; unit->set_target(ud, 0); return 0; @@ -1611,7 +1611,7 @@ int unit_unattackable(struct block_list *bl) } if(bl->type == BL_MOB) - mob->unlocktarget((struct mob_data*)bl, iTimer->gettick()) ; + mob->unlocktarget((struct mob_data*)bl, timer->gettick()) ; else if(bl->type == BL_PET) pet->unlocktarget((struct pet_data*)bl); return 0; @@ -1663,11 +1663,11 @@ int unit_attack(struct block_list *src,int target_id,int continuous) if(src->type == BL_MOB) ((TBL_MOB*)src)->state.skillstate = ((TBL_MOB*)src)->state.aggressive?MSS_ANGRY:MSS_BERSERK; - if(DIFF_TICK(ud->attackabletime, iTimer->gettick()) > 0) + if(DIFF_TICK(ud->attackabletime, timer->gettick()) > 0) //Do attack next time it is possible. [Skotlex] - ud->attacktimer=iTimer->add_timer(ud->attackabletime,unit->attack_timer,src->id,0); + ud->attacktimer=timer->add(ud->attackabletime,unit->attack_timer,src->id,0); else //Attack NOW. - unit->attack_timer(INVALID_TIMER, iTimer->gettick(), src->id, 0); + unit->attack_timer(INVALID_TIMER, timer->gettick(), src->id, 0); return 0; } @@ -1684,13 +1684,13 @@ int unit_cancel_combo(struct block_list *bl) ud = unit->bl2ud(bl); nullpo_ret(ud); - ud->attackabletime = iTimer->gettick() + status_get_amotion(bl); + ud->attackabletime = timer->gettick() + status_get_amotion(bl); if (ud->attacktimer == INVALID_TIMER) return 1; //Nothing more to do. - iTimer->delete_timer(ud->attacktimer, unit->attack_timer); - ud->attacktimer=iTimer->add_timer(ud->attackabletime,unit->attack_timer,bl->id,0); + timer->delete(ud->attacktimer, unit->attack_timer); + ud->attacktimer=timer->add(ud->attackabletime,unit->attack_timer,bl->id,0); return 1; } /*========================================== @@ -1857,7 +1857,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick) if( ud->state.attack_continue ) { if( DIFF_TICK(ud->canact_tick, ud->attackabletime) > 0 ) ud->attackabletime = ud->canact_tick; - ud->attacktimer=iTimer->add_timer(ud->attackabletime,unit->attack_timer,src->id,0); + ud->attacktimer=timer->add(ud->attackabletime,unit->attack_timer,src->id,0); } return 1; } @@ -1927,7 +1927,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick) if(ud->state.attack_continue) { if( src->type == BL_PC ) ((TBL_PC*)src)->idletime = last_tick; - ud->attacktimer = iTimer->add_timer(ud->attackabletime,unit->attack_timer,src->id,0); + ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0); } return 1; @@ -1951,7 +1951,7 @@ int unit_skillcastcancel(struct block_list *bl,int type) { struct map_session_data *sd = NULL; struct unit_data *ud = unit->bl2ud( bl); - unsigned int tick=iTimer->gettick(); + unsigned int tick=timer->gettick(); int ret=0, skill_id; nullpo_ret(bl); @@ -1978,9 +1978,9 @@ int unit_skillcastcancel(struct block_list *bl,int type) skill_id = ud->skill_id; if (skill->get_inf(skill_id) & INF_GROUND_SKILL) - ret = iTimer->delete_timer( ud->skilltimer, skill->castend_pos ); + ret = timer->delete( ud->skilltimer, skill->castend_pos ); else - ret = iTimer->delete_timer( ud->skilltimer, skill->castend_id ); + ret = timer->delete( ud->skilltimer, skill->castend_id ); if( ret < 0 ) ShowError("delete timer error : skill_id : %d\n",ret); @@ -2015,7 +2015,7 @@ void unit_dataset(struct block_list *bl) { ud->attacktimer = INVALID_TIMER; ud->attackabletime = ud->canact_tick = - ud->canmove_tick = iTimer->gettick(); + ud->canmove_tick = timer->gettick(); } /*========================================== @@ -2090,7 +2090,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i unit->skillcastcancel(bl,0); // Do not reset can-act delay. [Skotlex] - ud->attackabletime = ud->canmove_tick /*= ud->canact_tick*/ = iTimer->gettick(); + ud->attackabletime = ud->canmove_tick /*= ud->canact_tick*/ = timer->gettick(); if(sc && sc->count ) { //map-change/warp dispells. status_change_end(bl, SC_BLADESTOP, INVALID_TIMER); status_change_end(bl, SC_BASILICA, INVALID_TIMER); @@ -2126,7 +2126,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i } if (bl->type&(BL_CHAR|BL_PET)) { - skill->unit_move(bl,iTimer->gettick(),4); + skill->unit_move(bl,timer->gettick(),4); skill->cleartimerskill(bl); } @@ -2172,7 +2172,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i sd->adopt_invite = 0; if(sd->pvp_timer != INVALID_TIMER) { - iTimer->delete_timer(sd->pvp_timer,pc->calc_pvprank_timer); + timer->delete(sd->pvp_timer,pc->calc_pvprank_timer); sd->pvp_timer = INVALID_TIMER; sd->pvp_rank = 0; } @@ -2433,9 +2433,9 @@ int unit_free(struct block_list *bl, clr_type clrtype) { if (pd->s_skill->timer != INVALID_TIMER) { if (pd->s_skill->id) - iTimer->delete_timer(pd->s_skill->timer, pet->skill_support_timer); + timer->delete(pd->s_skill->timer, pet->skill_support_timer); else - iTimer->delete_timer(pd->s_skill->timer, pet->heal_timer); + timer->delete(pd->s_skill->timer, pet->heal_timer); } aFree(pd->s_skill); pd->s_skill = NULL; @@ -2443,14 +2443,14 @@ int unit_free(struct block_list *bl, clr_type clrtype) if( pd->recovery ) { if(pd->recovery->timer != INVALID_TIMER) - iTimer->delete_timer(pd->recovery->timer, pet->recovery_timer); + timer->delete(pd->recovery->timer, pet->recovery_timer); aFree(pd->recovery); pd->recovery = NULL; } if( pd->bonus ) { if (pd->bonus->timer != INVALID_TIMER) - iTimer->delete_timer(pd->bonus->timer, pet->skill_bonus_timer); + timer->delete(pd->bonus->timer, pet->skill_bonus_timer); aFree(pd->bonus); pd->bonus = NULL; } @@ -2478,12 +2478,12 @@ int unit_free(struct block_list *bl, clr_type clrtype) struct mob_data *md = (struct mob_data*)bl; if( md->spawn_timer != INVALID_TIMER ) { - iTimer->delete_timer(md->spawn_timer,mob->delayspawn); + timer->delete(md->spawn_timer,mob->delayspawn); md->spawn_timer = INVALID_TIMER; } if( md->deletetimer != INVALID_TIMER ) { - iTimer->delete_timer(md->deletetimer,mob->timer_delete); + timer->delete(md->deletetimer,mob->timer_delete); md->deletetimer = INVALID_TIMER; } if( md->lootitem ) @@ -2593,10 +2593,10 @@ int unit_free(struct block_list *bl, clr_type clrtype) } int do_init_unit(void) { - iTimer->add_timer_func_list(unit->attack_timer, "unit_attack_timer"); - iTimer->add_timer_func_list(unit->walktoxy_timer,"unit_walktoxy_timer"); - iTimer->add_timer_func_list(unit->walktobl_sub, "unit_walktobl_sub"); - iTimer->add_timer_func_list(unit->delay_walktoxy_timer,"unit_delay_walktoxy_timer"); + timer->add_func_list(unit->attack_timer, "unit_attack_timer"); + timer->add_func_list(unit->walktoxy_timer,"unit_walktoxy_timer"); + timer->add_func_list(unit->walktobl_sub, "unit_walktobl_sub"); + timer->add_func_list(unit->delay_walktoxy_timer,"unit_delay_walktoxy_timer"); return 0; } -- cgit v1.2.3-70-g09d2 From a49787ff1589d86efa87263676761ddcbecd64ce Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 4 Oct 2013 16:12:09 -0300 Subject: HPM: Hooking! http://hercules.ws/board/topic/2399-hpm-hooking-now-available/ Signed-off-by: shennetsind --- Hercules-10.sln | 4 + Hercules-12.sln | 4 + Hercules-9.sln | 5 + conf/plugins.conf | 4 +- src/common/HPM.c | 110 +- src/common/HPM.h | 8 +- src/common/HPMi.h | 23 +- src/map/HPMmap.c | 31 +- src/map/battle.c | 26 +- src/map/battle.h | 10 +- src/map/map.c | 5 + src/map/pc.c | 18 +- src/map/pc.h | 4 - src/map/skill.c | 15 +- src/map/skill.h | 4 - src/plugins/HPMHooking.c | 173 + src/plugins/HPMHooking/HPMHooking.GetSymbol.inc | 37 + src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 9663 +++ .../HPMHooking/HPMHooking.HookingPoints.inc | 2445 + src/plugins/HPMHooking/HPMHooking.Hooks.inc | 63639 +++++++++++++++++++ src/plugins/HPMHooking/HPMHooking.sources.inc | 37 + src/plugins/Makefile.in | 47 +- src/plugins/sample.c | 32 +- vcproj-10/plugin-HPMHooking.vcxproj | 118 + vcproj-12/plugin-HPMHooking.vcxproj | 120 + vcproj-9/plugin-HPMHooking.vcproj | 187 + 26 files changed, 76665 insertions(+), 104 deletions(-) create mode 100644 src/plugins/HPMHooking.c create mode 100644 src/plugins/HPMHooking/HPMHooking.GetSymbol.inc create mode 100644 src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc create mode 100644 src/plugins/HPMHooking/HPMHooking.HookingPoints.inc create mode 100644 src/plugins/HPMHooking/HPMHooking.Hooks.inc create mode 100644 src/plugins/HPMHooking/HPMHooking.sources.inc create mode 100644 vcproj-10/plugin-HPMHooking.vcxproj create mode 100644 vcproj-12/plugin-HPMHooking.vcxproj create mode 100644 vcproj-9/plugin-HPMHooking.vcproj (limited to 'src/common/HPM.c') diff --git a/Hercules-10.sln b/Hercules-10.sln index f61f4655f..b663ad491 100755 --- a/Hercules-10.sln +++ b/Hercules-10.sln @@ -10,6 +10,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-10\mapca EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-10\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-10\plugin-HPMHooking.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -34,6 +36,8 @@ Global {D356871D-58E1-450B-967A-E7E9646175AF}.Release|Win32.Build.0 = Release|Win32 {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.ActiveCfg = Debug|Win32 {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32 + {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Hercules-12.sln b/Hercules-12.sln index d4e5229ab..8fef6c9ef 100644 --- a/Hercules-12.sln +++ b/Hercules-12.sln @@ -10,6 +10,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-12\mapca EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-12\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-12\plugin-HPMHooking.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -36,6 +38,8 @@ Global {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.Build.0 = Debug|Win32 {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32 {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.Build.0 = Release|Win32 + {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32 + {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Hercules-9.sln b/Hercules-9.sln index 66f4522b2..740cddc16 100644 --- a/Hercules-9.sln +++ b/Hercules-9.sln @@ -10,6 +10,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-9\mapcac EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-9\plugin-sample.vcproj", "{D356871D-58E1-450B-967A-E7E9646175AF}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-9\plugin-HPMHooking.vcproj", "{D356871D-58E1-450B-967A-E7E9646175AF}" +EndProject + Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -36,6 +39,8 @@ Global {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/conf/plugins.conf b/conf/plugins.conf index 58ecb7144..c88a4fb50 100644 --- a/conf/plugins.conf +++ b/conf/plugins.conf @@ -30,9 +30,9 @@ Please note that your scripts need to be saved in the .c (source code) extension and placed in the /src/plugin/ folder. ----------------------------------------- */ - plugins_list:[ + "HPMHooking" //"db2sql", //"sample", //"other" -] +] \ No newline at end of file diff --git a/src/common/HPM.c b/src/common/HPM.c index 9895ae95d..8be9298f9 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -40,7 +40,7 @@ void hplugin_export_symbol(void *var, char *name) { HPM->symbols[HPM->symbol_count - 1]->ptr = var; } -void *hplugin_import_symbol(char *name) { +void *hplugin_import_symbol(char *name, unsigned int pID) { unsigned int i; for( i = 0; i < HPM->symbol_count; i++ ) { @@ -48,7 +48,7 @@ void *hplugin_import_symbol(char *name) { return HPM->symbols[i]->ptr; } - ShowError("HPM:get_symbol: '"CL_WHITE"%s"CL_RESET"' not found!\n",name); + ShowError("HPM:get_symbol:%s: '"CL_WHITE"%s"CL_RESET"' not found!\n",HPM->pid2name(pID),name); return NULL; } @@ -59,7 +59,7 @@ bool hplugin_iscompatible(char* version) { return false; sscanf(version, "%u.%u", &req_major, &req_minor); - + return ( req_major == HPM->version[0] && req_minor <= HPM->version[1] ) ? true : false; } @@ -108,7 +108,7 @@ bool hplugin_populate(struct hplugin *plugin, const char *filename) { return true; } -void hplugin_load(const char* filename) { +struct hplugin *hplugin_load(const char* filename) { struct hplugin *plugin; struct hplugin_info *info; struct HPMi_interface **HPMi; @@ -118,7 +118,7 @@ void hplugin_load(const char* filename) { if( HPM->exists(filename) ) { ShowWarning("HPM:plugin_load: attempting to load duplicate '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); - return; + return NULL; } plugin = HPM->create(); @@ -126,30 +126,33 @@ void hplugin_load(const char* filename) { if( !( plugin->dll = plugin_open(filename) ) ){ ShowWarning("HPM:plugin_load: failed to load '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); HPM->unload(plugin); - return; + return NULL; } if( !( info = plugin_import(plugin->dll, "pinfo",struct hplugin_info*) ) ) { ShowDebug("HPM:plugin_load: failed to retrieve 'plugin_info' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); HPM->unload(plugin); - return; + return NULL; } if( !(info->type & SERVER_TYPE) ) { HPM->unload(plugin); - return; + return NULL; } if( !HPM->iscompatible(info->req_version) ) { ShowWarning("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' incompatible version '%s' -> '%s', skipping...\n", filename, info->req_version, HPM_VERSION); HPM->unload(plugin); - return; + return NULL; } - + + plugin->info = info; + plugin->filename = aStrdup(filename); + if( !( import_symbol_ref = plugin_import(plugin->dll, "import_symbol",void **) ) ) { ShowWarning("HPM:plugin_load: failed to retrieve 'import_symbol' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); HPM->unload(plugin); - return; + return NULL; } *import_symbol_ref = HPM->import_symbol; @@ -157,21 +160,21 @@ void hplugin_load(const char* filename) { if( !( sql_handle = plugin_import(plugin->dll, "mysql_handle",Sql **) ) ) { ShowWarning("HPM:plugin_load: failed to retrieve 'mysql_handle' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); HPM->unload(plugin); - return; + return NULL; } - *sql_handle = HPM->import_symbol("sql_handle"); + *sql_handle = HPM->import_symbol("sql_handle",plugin->idx); if( !( HPMi = plugin_import(plugin->dll, "HPMi",struct HPMi_interface **) ) ) { ShowWarning("HPM:plugin_load: failed to retrieve 'HPMi' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); HPM->unload(plugin); - return; + return NULL; } if( !( *HPMi = plugin_import(plugin->dll, "HPMi_s",struct HPMi_interface *) ) ) { ShowWarning("HPM:plugin_load: failed to retrieve 'HPMi_s' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); HPM->unload(plugin); - return; + return NULL; } plugin->hpi = *HPMi; @@ -184,30 +187,34 @@ void hplugin_load(const char* filename) { if( ( plugin->hpi->event[HPET_READY] = plugin_import(plugin->dll, "server_online",void (*)(void)) ) ) anyEvent = true; + if( ( plugin->hpi->event[HPET_POST_FINAL] = plugin_import(plugin->dll, "server_post_final",void (*)(void)) ) ) + anyEvent = true; + if( !anyEvent ) { ShowWarning("HPM:plugin_load: no events found for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); HPM->unload(plugin); - return; + return NULL; } if( !HPM->populate(plugin,filename) ) - return; + return NULL; + /* id */ plugin->hpi->pid = plugin->idx; /* core */ - plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand"); - plugin->hpi->addPacket = HPM->import_symbol("addPacket"); - plugin->hpi->addToSession = HPM->import_symbol("addToSession"); - plugin->hpi->getFromSession = HPM->import_symbol("getFromSession"); - plugin->hpi->removeFromSession = HPM->import_symbol("removeFromSession"); + plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand",plugin->idx); + plugin->hpi->addPacket = HPM->import_symbol("addPacket",plugin->idx); + plugin->hpi->addToSession = HPM->import_symbol("addToSession",plugin->idx); + plugin->hpi->getFromSession = HPM->import_symbol("getFromSession",plugin->idx); + plugin->hpi->removeFromSession = HPM->import_symbol("removeFromSession",plugin->idx); + plugin->hpi->AddHook = HPM->import_symbol("AddHook",plugin->idx); + plugin->hpi->HookStop = HPM->import_symbol("HookStop",plugin->idx); + plugin->hpi->HookStopped = HPM->import_symbol("HookStopped",plugin->idx); /* server specific */ if( HPM->load_sub ) HPM->load_sub(plugin); - - plugin->info = info; - plugin->filename = aStrdup(filename); - - return; + + return plugin; } void hplugin_unload(struct hplugin* plugin) { @@ -253,8 +260,26 @@ void hplugins_config_read(void) { int length = config_setting_length(plist), i; char filename[60]; for(i = 0; i < length; i++) { - snprintf(filename, 60, "plugins/%s%s", config_setting_get_string_elem(plist,i), DLL_EXT); - HPM->load(filename); + if( !strcmpi(config_setting_get_string_elem(plist,i),"HPMHooking") ) {//must load it first + struct hplugin *plugin; + snprintf(filename, 60, "plugins/%s%s", config_setting_get_string_elem(plist,i), DLL_EXT); + if( ( plugin = HPM->load(filename) ) ) { + bool (*func)(bool *fr); + bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); + if( ( func = plugin_import(plugin->dll, "Hooked",bool (*)(bool *)) ) && ( addhook_sub = plugin_import(plugin->dll, "HPM_Plugin_AddHook",bool (*)(enum HPluginHookType, const char *, void *, unsigned int)) ) ) { + if( func(&HPM->force_return) ) { + HPM->hooking = true; + HPM->addhook_sub = addhook_sub; + } + } + } + } + } + for(i = 0; i < length; i++) { + if( strcmpi(config_setting_get_string_elem(plist,i),"HPMHooking") ) {//now all others + snprintf(filename, 60, "plugins/%s%s", config_setting_get_string_elem(plist,i), DLL_EXT); + HPM->load(filename); + } } config_destroy(&plugins_conf); } @@ -436,6 +461,25 @@ void* HPM_realloc(void *p, size_t size, const char *file, int line, const char * char* HPM_astrdup(const char *p, const char *file, int line, const char *func) { return iMalloc->astrdup(p,HPM_file2ptr(file),line,func); } +/* todo: add ability for tracking using pID for the upcoming runtime load/unload support. */ +bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) { + if( !HPM->hooking ) { + ShowError("HPM:AddHook Fail! '%s' tried to hook to '%s' but HPMHooking is disabled!\n",HPM->pid2name(pID),target); + return false; + } + /* search if target is a known hook point within 'common' */ + /* if not check if a sub-hooking list is available (from the server) and run it by */ + if( HPM->addhook_sub && HPM->addhook_sub(type,target,hook,pID) ) + return true; + return false; +} +void HPM_HookStop (const char *func, unsigned int pID) { + /* track? */ + HPM->force_return = true; +} +bool HPM_HookStopped (void) { + return HPM->force_return; +} void hplugins_share_defaults(void) { /* console */ @@ -447,6 +491,9 @@ void hplugins_share_defaults(void) { HPM->share(hplugins_addToSession,"addToSession"); HPM->share(hplugins_getFromSession,"getFromSession"); HPM->share(hplugins_removeFromSession,"removeFromSession"); + HPM->share(HPM_AddHook,"AddHook"); + HPM->share(HPM_HookStop,"HookStop"); + HPM->share(HPM_HookStopped,"HookStopped"); /* core */ HPM->share(&runflag,"runflag"); HPM->share(arg_v,"arg_v"); @@ -489,7 +536,7 @@ void hpm_init(void) { HPMiMalloc->realloc = HPM_realloc; HPMiMalloc->astrdup = HPM_astrdup; - sscanf(HPM_VERSION, "%d.%d", &HPM->version[0], &HPM->version[1]); + sscanf(HPM_VERSION, "%u.%u", &HPM->version[0], &HPM->version[1]); if( HPM->version[0] == 0 && HPM->version[1] == 0 ) { ShowError("HPM:init:failed to retrieve HPM version!!\n"); @@ -554,6 +601,8 @@ void hpm_defaults(void) { HPM->fnames = NULL; HPM->fnamec = 0; + HPM->force_return = false; + HPM->hooking = false; HPM->init = hpm_init; HPM->final = hpm_final; @@ -573,4 +622,5 @@ void hpm_defaults(void) { HPM->pid2name = hplugins_id2name; HPM->parse_packets = hplugins_parse_packets; HPM->load_sub = NULL; + HPM->addhook_sub = NULL; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 614498fd3..395555948 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -79,6 +79,9 @@ struct HPM_interface { /* vars */ unsigned int version[2]; bool off; + bool hooking; + /* hooking */ + bool force_return; /* data */ struct hplugin **plugins; unsigned int plugin_count; @@ -94,12 +97,12 @@ struct HPM_interface { void (*init) (void); void (*final) (void); struct hplugin * (*create) (void); - void (*load) (const char* filename); + struct hplugin * (*load) (const char* filename); void (*unload) (struct hplugin* plugin); bool (*exists) (const char *filename); bool (*iscompatible) (char* version); void (*event) (enum hp_event_types type); - void *(*import_symbol) (char *); + void *(*import_symbol) (char *name, unsigned int pID); void (*share) (void *, char *); void (*symbol_defaults) (void); void (*config_read) (void); @@ -108,6 +111,7 @@ struct HPM_interface { char *(*pid2name) (unsigned int pid); unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point); void (*load_sub) (struct hplugin *plugin); + bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); } HPM_s; struct HPM_interface *HPM; diff --git a/src/common/HPMi.h b/src/common/HPMi.h index c8bce8ee8..9c2a6184e 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -35,7 +35,7 @@ struct map_session_data; /* after */ #include "../common/showmsg.h" -#define HPM_VERSION "0.2" +#define HPM_VERSION "1.0" struct hplugin_info { char* name; @@ -44,10 +44,10 @@ struct hplugin_info { char* req_version; }; -HPExport void *(*import_symbol) (char *name); +HPExport void *(*import_symbol) (char *name, unsigned int pID); HPExport Sql *mysql_handle; -#define GET_SYMBOL(n) import_symbol(n) +#define GET_SYMBOL(n) import_symbol(n,HPMi->pid) #define SERVER_TYPE_ALL SERVER_TYPE_LOGIN|SERVER_TYPE_CHAR|SERVER_TYPE_MAP @@ -55,6 +55,7 @@ enum hp_event_types { HPET_INIT,/* server starts */ HPET_FINAL,/* server is shutting down */ HPET_READY,/* server is ready (online) */ + HPET_POST_FINAL,/* server is done shutting down */ HPET_MAX, }; @@ -70,6 +71,18 @@ enum HPluginPacketHookingPoints { hpPHP_MAX, }; +enum HPluginHookType { + HOOK_TYPE_PRE, + HOOK_TYPE_POST, +}; + +#define addHookPre(tname,hook) HPMi->AddHook(HOOK_TYPE_PRE,tname,hook,HPMi->pid) +#define addHookPost(tname,hook) HPMi->AddHook(HOOK_TYPE_POST,tname,hook,HPMi->pid) +/* need better names ;/ */ +/* will not run the original function after pre-hook processing is complete (other hooks will run) */ +#define hookStop() HPMi->HookStop(__func__,HPMi->pid) +#define hookStopped() HPMi->HookStopped() + /* Hercules Plugin Mananger Include Interface */ HPExport struct HPMi_interface { /* */ @@ -89,6 +102,10 @@ HPExport struct HPMi_interface { void (*removeFromSession) (struct socket_data *sess, unsigned int id, unsigned int type); /* packet */ bool (*addPacket) (unsigned short cmd, unsigned short length, void (*receive)(int fd), unsigned int point, unsigned int pluginID); + /* Hooking */ + bool (*AddHook) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); + void (*HookStop) (const char *func, unsigned int pID); + bool (*HookStopped) (void); } HPMi_s; #ifndef _HPM_H_ HPExport struct HPMi_interface *HPMi; diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 17d72bc98..3ba9ae725 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -10,12 +10,29 @@ #include "pc.h" #include "map.h" +// +#include "chat.h" +#include "chrif.h" +#include "duel.h" +#include "elemental.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" +#include "irc-bot.h" +#include "mail.h" +#include "mapreg.h" +#include "mercenary.h" +#include "party.h" +#include "pet.h" +#include "quest.h" +#include "storage.h" +#include "trade.h" + #include #include #include #include - void HPM_map_addToMSD(struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree) { struct HPluginData *HPData; unsigned int i; @@ -80,10 +97,10 @@ void HPM_map_removeFromMSD(struct map_session_data *sd, unsigned int id, unsigne } void HPM_map_plugin_load_sub(struct hplugin *plugin) { - plugin->hpi->addCommand = HPM->import_symbol("addCommand"); - plugin->hpi->addScript = HPM->import_symbol("addScript"); + plugin->hpi->addCommand = HPM->import_symbol("addCommand",plugin->idx); + plugin->hpi->addScript = HPM->import_symbol("addScript",plugin->idx); /* */ - plugin->hpi->addToMSD = HPM->import_symbol("addToMSD"); - plugin->hpi->getFromMSD = HPM->import_symbol("getFromMSD"); - plugin->hpi->removeFromMSD = HPM->import_symbol("removeFromMSD"); -} + plugin->hpi->addToMSD = HPM->import_symbol("addToMSD",plugin->idx); + plugin->hpi->getFromMSD = HPM->import_symbol("getFromMSD",plugin->idx); + plugin->hpi->removeFromMSD = HPM->import_symbol("removeFromMSD",plugin->idx); +} \ No newline at end of file diff --git a/src/map/battle.c b/src/map/battle.c index 6e6e7eab5..c79dee7ee 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -410,8 +410,8 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d } return damage*ratio/100; } -#ifdef RENEWAL int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, struct weapon_atk *watk, int nk, bool n_ele, short s_ele, short s_ele_, int size, int type, int flag, int flag2){ // [malufett] +#ifdef RENEWAL int64 damage, eatk = 0; struct status_change *sc; struct map_session_data *sd; @@ -470,8 +470,10 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u damage = battle->calc_cardfix(BF_WEAPON, src, bl, nk, s_ele, s_ele_, damage, 0, flag2); return damage; -} +#else + return 0; #endif +} /*========================================== * Calculates the standard damage of a normal attack assuming it hits, * it calculates nothing extra fancy, is needed for magnum break's WATK_ELEMENT bonus. [Skotlex] @@ -484,7 +486,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u * &8: Skip target size adjustment (Extremity Fist?) *&16: Arrow attack but BOW, REVOLVER, RIFLE, SHOTGUN, GATLING or GRENADE type weapon not equipped (i.e. shuriken, kunai and venom knives not affected by DEX) */ -#ifdef RENEWAL +/* 'battle_calc_base_damage' is used on renewal, 'battle_calc_base_damage2' otherwise. */ int64 battle_calc_base_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2) { int64 damage, batk; struct status_data *st = status->get_status_data(src); @@ -495,8 +497,10 @@ int64 battle_calc_base_damage(struct block_list *src, struct block_list *bl, uin damage = batk + 3 * battle->calc_weapon_damage(src, bl, skill_id, skill_lv, &st->lhw, nk, n_ele, s_ele, s_ele_, status_get_size(bl), type, flag, flag2) / 4; else damage = (batk << 1) + battle->calc_weapon_damage(src, bl, skill_id, skill_lv, &st->rhw, nk, n_ele, s_ele, s_ele_, status_get_size(bl), type, flag, flag2); -#else -static int64 battle_calc_base_damage(struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag) { + + return damage; +} +int64 battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag) { unsigned int atkmin=0, atkmax=0; short type = 0; int64 damage = 0; @@ -572,7 +576,6 @@ static int64 battle_calc_base_damage(struct status_data *st, struct weapon_atk * damage += damage * sd->weapon_atk_rate[sd->weapontype1] / 100; } } -#endif return damage; } @@ -856,10 +859,10 @@ int64 battle_calc_elefix(struct block_list *src, struct block_list *target, uint sc = status->get_sc(src); if( sc && sc->data[SC_SUB_WEAPONPROPERTY] ) { // Descriptions indicate this means adding a percent of a normal attack in another element. [Skotlex] - int64 temp = battle->calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100; + int64 temp = battle->calc_base_damage2(sstatus, &sstatus->rhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100; damage += battle->attr_fix(src, target, temp, sc->data[SC_SUB_WEAPONPROPERTY]->val1, tstatus->def_ele, tstatus->ele_lv); if( left ) { - temp = battle->calc_base_damage(sstatus, &sstatus->lhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100; + temp = battle->calc_base_damage2(sstatus, &sstatus->lhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100; damage += battle->attr_fix(src, target, temp, sc->data[SC_SUB_WEAPONPROPERTY]->val1, tstatus->def_ele, tstatus->ele_lv); } } @@ -4514,9 +4517,9 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list wd.damage2 = battle->calc_masteryfix(src, target, skill_id, skill_lv, wd.damage2, wd.div_, 1, flag.weapon); } #else - wd.damage = battle->calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, i); + wd.damage = battle->calc_base_damage2(sstatus, &sstatus->rhw, sc, tstatus->size, sd, i); if (flag.lh) - wd.damage2 = battle->calc_base_damage(sstatus, &sstatus->lhw, sc, tstatus->size, sd, i); + wd.damage2 = battle->calc_base_damage2(sstatus, &sstatus->lhw, sc, tstatus->size, sd, i); #endif if (nk&NK_SPLASHSPLIT){ // Divide ATK among targets if(wflag>0) @@ -6784,9 +6787,7 @@ void battle_defaults(void) { battle->calc_masteryfix = battle_calc_masteryfix; battle->calc_skillratio = battle_calc_skillratio; battle->calc_sizefix = battle_calc_sizefix; -#ifdef RENEWAL battle->calc_weapon_damage = battle_calc_weapon_damage; -#endif battle->calc_defense = battle_calc_defense; battle->get_master = battle_get_master; battle->get_targeted = battle_gettargeted; @@ -6804,6 +6805,7 @@ void battle_defaults(void) { battle->blewcount_bonus = battle_blewcount_bonus; battle->range_type = battle_range_type; battle->calc_base_damage = battle_calc_base_damage; + battle->calc_base_damage2 = battle_calc_base_damage2; battle->calc_misc_attack = battle_calc_misc_attack; battle->calc_magic_attack = battle_calc_magic_attack; battle->adjust_skill_damage = battle_adjust_skill_damage; diff --git a/src/map/battle.h b/src/map/battle.h index 8878962b8..6d5d5f186 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -523,10 +523,8 @@ struct battle_interface { int (*calc_skillratio) (int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag); /* applies size modifiers */ int64 (*calc_sizefix) (struct map_session_data *sd, int64 damage, int type, int size, bool ignore); -#ifdef RENEWAL /* get weapon damage */ int64 (*calc_weapon_damage) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, struct weapon_atk *watk, int nk, bool n_ele, short s_ele, short s_ele_, int size, int type, int flag, int flag2); -#endif /* applies defense reductions */ int64 (*calc_defense) (int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int flag, int pdef); /* get master (who does this unit respond to?) */ @@ -554,12 +552,8 @@ struct battle_interface { int (*blewcount_bonus) (struct map_session_data *sd, uint16 skill_id); /* skill range criteria */ int (*range_type) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv); - int64 (*calc_base_damage) -#ifdef RENEWAL - (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2); -#else - (struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag); -#endif + int64 (*calc_base_damage) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2); + int64 (*calc_base_damage2) (struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag); struct Damage (*calc_misc_attack) (struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag); struct Damage (*calc_magic_attack) (struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag); int (*adjust_skill_damage) (int m, unsigned short skill_id); diff --git a/src/map/map.c b/src/map/map.c index 0457de5bb..0c684542d 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5016,8 +5016,10 @@ void do_final(void) struct s_mapiterator* iter; ShowStatus("Terminating...\n"); + hChSys.closing = true; HPM->event(HPET_FINAL); + if (map->cpsd) aFree(map->cpsd); //Ladies and babies first. @@ -5090,6 +5092,8 @@ void do_final(void) if( !map->enable_grf ) aFree(map->cache_buffer); + HPM->event(HPET_POST_FINAL); + ShowStatus("Finished.\n"); } @@ -5263,6 +5267,7 @@ void map_hp_symbols(void) { HPM->share(itemdb,"itemdb"); HPM->share(logs,"logs"); HPM->share(mail,"mail"); + HPM->share(instance,"instance"); HPM->share(script,"script"); HPM->share(searchstore,"searchstore"); HPM->share(skill,"skill"); diff --git a/src/map/pc.c b/src/map/pc.c index 58972a204..6b7d6c735 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9460,13 +9460,12 @@ int pc_del_charm(struct map_session_data *sd,int count,int type) clif->charm(sd, type); return 0; } -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) /*========================================== * Renewal EXP/Itemdrop rate modifier base on level penalty * 1=exp 2=itemdrop *------------------------------------------*/ -int pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int type) -{ +int pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int type) { +#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) int rate = 100, i; if( diff < 0 ) @@ -9489,8 +9488,10 @@ int pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int } return rate; -} +#else + return 100; #endif +} int pc_split_str(char *str,char **val,int num) { int i; @@ -9810,8 +9811,8 @@ void pc_read_skill_tree(void) { clif->skillinfoblock(sd); mapit->free(iter); } -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) bool pc_readdb_levelpenalty(char* fields[], int columns, int current) { +#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) int type, race, diff; type = atoi(fields[0]); @@ -9834,10 +9835,9 @@ bool pc_readdb_levelpenalty(char* fields[], int columns, int current) { diff = min(MAX_LEVEL + ( ~(diff) + 1 ), MAX_LEVEL*2); pc->level_penalty[type][race][diff] = atoi(fields[3]); - +#endif return true; } -#endif /*========================================== * pc DB reading. @@ -10371,9 +10371,7 @@ void pc_defaults(void) { pc->del_charm = pc_del_charm; pc->baselevelchanged = pc_baselevelchanged; -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) pc->level_penalty_mod = pc_level_penalty_mod; -#endif pc->calc_skillpoint = pc_calc_skillpoint; @@ -10395,9 +10393,7 @@ void pc_defaults(void) { pc->eventtimer = pc_eventtimer; pc->daynight_timer_sub = pc_daynight_timer_sub; pc->charm_timer = pc_charm_timer; -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) pc->readdb_levelpenalty = pc_readdb_levelpenalty; -#endif pc->autosave = pc_autosave; pc->follow_timer = pc_follow_timer; pc->read_skill_tree = pc_read_skill_tree; diff --git a/src/map/pc.h b/src/map/pc.h index bf2f9d7c5..fadb922b5 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -931,9 +931,7 @@ struct pc_interface { int (*del_charm) (struct map_session_data *sd,int count,int type); void (*baselevelchanged) (struct map_session_data *sd); -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) int (*level_penalty_mod) (int diff, unsigned char race, unsigned short mode, int type); -#endif int (*calc_skillpoint) (struct map_session_data* sd); int (*invincible_timer) (int tid, unsigned int tick, int id, intptr_t data); @@ -954,9 +952,7 @@ struct pc_interface { int (*eventtimer) (int tid, unsigned int tick, int id, intptr_t data); int (*daynight_timer_sub) (struct map_session_data *sd,va_list ap); int (*charm_timer) (int tid, unsigned int tick, int id, intptr_t data); -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) bool (*readdb_levelpenalty) (char* fields[], int columns, int current); -#endif int (*autosave) (int tid, unsigned int tick, int id, intptr_t data); int (*follow_timer) (int tid, unsigned int tick, int id, intptr_t data); void (*read_skill_tree) (void); diff --git a/src/map/skill.c b/src/map/skill.c index dd87f27d9..f359e81d4 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -185,9 +185,13 @@ int skill_get_unit_bl_target( uint16 skill_id ) { skill_get (skill->db[skill_ int skill_get_unit_flag( uint16 skill_id ) { skill_get (skill->db[skill_id].unit_flag, skill_id); } int skill_get_unit_layout_type( uint16 skill_id ,uint16 skill_lv ){ skill_get2 (skill->db[skill_id].unit_layout_type[skill_glv(skill_lv-1)], skill_id, skill_lv); } int skill_get_cooldown( uint16 skill_id, uint16 skill_lv ) { skill_get2 (skill->db[skill_id].cooldown[skill_glv(skill_lv-1)], skill_id, skill_lv); } +int skill_get_fixed_cast( uint16 skill_id ,uint16 skill_lv ) { #ifdef RENEWAL_CAST -int skill_get_fixed_cast( uint16 skill_id ,uint16 skill_lv ){ skill_get2 (skill->db[skill_id].fixed_cast[skill_glv(skill_lv-1)], skill_id, skill_lv); } + skill_get2 (skill->db[skill_id].fixed_cast[skill_glv(skill_lv-1)], skill_id, skill_lv); +#else + return 0; #endif +} int skill_tree_get_max(uint16 skill_id, int b_class) { int i; @@ -13792,8 +13796,8 @@ int skill_castfix_sc (struct block_list *bl, int time) { //ShowInfo("Castime castfix_sc = %d\n",time); return time; } -#ifdef RENEWAL_CAST int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv) { +#ifdef RENEWAL_CAST struct status_change *sc = status->get_sc(bl); struct map_session_data *sd = BL_CAST(BL_PC,bl); int fixed = skill->get_fixed_cast(skill_id, skill_lv), fixcast_r = 0, varcast_r = 0, i = 0; @@ -13907,10 +13911,9 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 time = (1 - sqrt( ((float)(status_get_dex(bl)*2 + status_get_int(bl)) / battle_config.vcast_stat_scale) )) * time; // underflow checking/capping time = max(time, 0) + (1 - (float)min(fixcast_r, 100) / 100) * max(fixed,0); - +#endif return (int)time; } -#endif /*========================================== * Does delay reductions based on dex/agi, sc data, item bonuses, ... @@ -18156,9 +18159,7 @@ void skill_defaults(void) { skill->unit_ondamaged = skill_unit_ondamaged; skill->cast_fix = skill_castfix; skill->cast_fix_sc = skill_castfix_sc; -#ifdef RENEWAL_CAST skill->vf_cast_fix = skill_vfcastfix; -#endif skill->delay_fix = skill_delay_fix; skill->check_condition_castbegin = skill_check_condition_castbegin; skill->check_condition_castend = skill_check_condition_castend; @@ -18222,9 +18223,7 @@ void skill_defaults(void) { skill->check_condition_mob_master_sub = skill_check_condition_mob_master_sub; skill->brandishspear_first = skill_brandishspear_first; skill->brandishspear_dir = skill_brandishspear_dir; -#ifdef RENEWAL_CAST skill->get_fixed_cast = skill_get_fixed_cast; -#endif skill->sit_count = skill_sit_count; skill->sit_in = skill_sit_in; skill->sit_out = skill_sit_out; diff --git a/src/map/skill.h b/src/map/skill.h index d2546c706..592721f1e 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -1893,9 +1893,7 @@ struct skill_interface { int (*unit_ondamaged) (struct skill_unit *src,struct block_list *bl,int64 damage,unsigned int tick); int (*cast_fix) ( struct block_list *bl, uint16 skill_id, uint16 skill_lv); int (*cast_fix_sc) ( struct block_list *bl, int time); -#ifdef RENEWAL_CAST int (*vf_cast_fix) ( struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv); -#endif int (*delay_fix) ( struct block_list *bl, uint16 skill_id, uint16 skill_lv); int (*check_condition_castbegin) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); int (*check_condition_castend) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); @@ -1959,9 +1957,7 @@ struct skill_interface { int (*check_condition_mob_master_sub) (struct block_list *bl, va_list ap); void (*brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y); void (*brandishspear_dir) (struct square* tc, uint8 dir, int are); -#ifdef RENEWAL_CAST int (*get_fixed_cast) ( uint16 skill_id ,uint16 skill_lv ); -#endif int (*sit_count) (struct block_list *bl, va_list ap); int (*sit_in) (struct block_list *bl, va_list ap); int (*sit_out) (struct block_list *bl, va_list ap); diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c new file mode 100644 index 000000000..8b4f06ae0 --- /dev/null +++ b/src/plugins/HPMHooking.c @@ -0,0 +1,173 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Sample Hercules Plugin + +#include +#include +#include + +#include "../common/HPMi.h" +#include "../common/mmo.h" +#include "../common/socket.h" +#include "../common/malloc.h" +#include "../common/db.h" + +#include "../map/map.h" +#include "../map/path.h" +#include "../map/chrif.h" +#include "../map/clif.h" +#include "../map/duel.h" +#include "../map/intif.h" +#include "../map/npc.h" +#include "../map/pc.h" +#include "../map/status.h" +#include "../map/mob.h" +#include "../map/npc.h" +#include "../map/chat.h" +#include "../map/itemdb.h" +#include "../map/storage.h" +#include "../map/skill.h" +#include "../map/trade.h" +#include "../map/party.h" +#include "../map/unit.h" +#include "../map/battle.h" +#include "../map/battleground.h" +#include "../map/quest.h" +#include "../map/script.h" +#include "../map/mapreg.h" +#include "../map/guild.h" +#include "../map/pet.h" +#include "../map/homunculus.h" +#include "../map/instance.h" +#include "../map/mercenary.h" +#include "../map/elemental.h" +#include "../map/atcommand.h" +#include "../map/log.h" +#include "../map/mail.h" +#include "../map/irc-bot.h" + +HPExport struct hplugin_info pinfo = { + "HPMHooking", // Plugin name + SERVER_TYPE_MAP,// Which server types this plugin works with? + "0.1", // Plugin version + HPM_VERSION, // HPM Version (don't change, macro is automatically updated) +}; + +#define HP_POP(x) #x , (void**)(&x) +#define HP_POP2(x) (void*)x +DBMap *hp_db;/* hooking points db -- for quick lookup */ + +struct HookingPointData { + char* name; + void **sref; + void *tref; + int idx; +}; + +struct HPMHookPoint { + void *func; + unsigned int pID; +}; + +struct HPMHooksCore { + #include "../plugins/HPMHooking/HPMHooking.HPMHooksCore.inc" + struct { + int total; + } data; +} HPMHooks; + +bool *HPMforce_return; + +void HPM_HP_final(void); +void HPM_HP_load(void); + +HPExport void server_post_final (void) { + HPM_HP_final(); +} + +HPExport bool Hooked (bool *fr) { + HPMforce_return = fr; + DB = GET_SYMBOL("DB"); + iMalloc = GET_SYMBOL("iMalloc"); +#include "../plugins/HPMHooking/HPMHooking.GetSymbol.inc" + HPM_HP_load(); + return true; +} + + +HPExport bool HPM_Plugin_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) { + struct HookingPointData *hpd; + + if( hp_db && (hpd = strdb_get(hp_db,target)) ) { + struct HPMHookPoint **hp = NULL; + int *count = NULL; + + if( type == HOOK_TYPE_PRE ) { + hp = (struct HPMHookPoint **)((char *)&HPMHooks.list + (sizeof(struct HPMHookPoint *)*hpd->idx)); + count = (int *)((char *)&HPMHooks.count + (sizeof(int)*hpd->idx)); + } else { + hp = (struct HPMHookPoint **)((char *)&HPMHooks.list + (sizeof(struct HPMHookPoint *)*(hpd->idx+1))); + count = (int *)((char *)&HPMHooks.count + (sizeof(int)*(hpd->idx+1))); + } + + if( hp ) { + *count += 1; + + RECREATE(*hp, struct HPMHookPoint, *count); + + (*hp)[*count - 1].func = hook; + (*hp)[*count - 1].pID = pID; + + *(hpd->sref) = hpd->tref; + + return true; + } + } + + return false; +} + +#include "../plugins/HPMHooking/HPMHooking.Hooks.inc" + +void HPM_HP_final(void) { + int i, len = HPMHooks.data.total * 2; + + if( hp_db ) + db_destroy(hp_db); + + for(i = 0; i < len; i++) { + int *count = (int *)((char *)&HPMHooks.count + (sizeof(int)*(i))); + + if( count && *count ) { + struct HPMHookPoint **hp = (struct HPMHookPoint **)((char *)&HPMHooks.list + (sizeof(struct HPMHookPoint *)*(i))); + + if( hp && *hp ) + aFree(*hp); + } + } + +} + +void HPM_HP_load(void) { + #include "../plugins/HPMHooking/HPMHooking.HookingPoints.inc" + int i, len = ARRAYLENGTH(HookingPoints); + + memset(&HPMHooks,0,sizeof(struct HPMHooksCore)); + + hp_db = strdb_alloc(DB_OPT_BASE|DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, HookingPointsLenMax); + + for(i = 0; i < len; i++) { + struct HookingPointData *hpd = NULL; + + CREATE(hpd, struct HookingPointData, 1); + + memcpy(hpd, &HookingPoints[i], sizeof(struct HookingPointData)); + + strdb_put(hp_db, HookingPoints[i].name, hpd); + + HPMHooks.data.total++; + } + + #include "../plugins/HPMHooking/HPMHooking.sources.inc" +} + diff --git a/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc new file mode 100644 index 000000000..5caceb75a --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc @@ -0,0 +1,37 @@ +if( !(atcommand = GET_SYMBOL("atcommand") ) ) return false; +if( !(battle = GET_SYMBOL("battle") ) ) return false; +if( !(bg = GET_SYMBOL("battlegrounds") ) ) return false; +if( !(buyingstore = GET_SYMBOL("buyingstore") ) ) return false; +if( !(chat = GET_SYMBOL("chat") ) ) return false; +if( !(chrif = GET_SYMBOL("chrif") ) ) return false; +if( !(clif = GET_SYMBOL("clif") ) ) return false; +if( !(duel = GET_SYMBOL("duel") ) ) return false; +if( !(elemental = GET_SYMBOL("elemental") ) ) return false; +if( !(guild = GET_SYMBOL("guild") ) ) return false; +if( !(gstorage = GET_SYMBOL("gstorage") ) ) return false; +if( !(homun = GET_SYMBOL("homun") ) ) return false; +if( !(instance = GET_SYMBOL("instance") ) ) return false; +if( !(intif = GET_SYMBOL("intif") ) ) return false; +if( !(ircbot = GET_SYMBOL("ircbot") ) ) return false; +if( !(itemdb = GET_SYMBOL("itemdb") ) ) return false; +if( !(logs = GET_SYMBOL("logs") ) ) return false; +if( !(mail = GET_SYMBOL("mail") ) ) return false; +if( !(map = GET_SYMBOL("map") ) ) return false; +if( !(mapit = GET_SYMBOL("mapit") ) ) return false; +if( !(mapreg = GET_SYMBOL("mapreg") ) ) return false; +if( !(mercenary = GET_SYMBOL("mercenary") ) ) return false; +if( !(mob = GET_SYMBOL("mob") ) ) return false; +if( !(npc = GET_SYMBOL("npc") ) ) return false; +if( !(party = GET_SYMBOL("party") ) ) return false; +if( !(path = GET_SYMBOL("path") ) ) return false; +if( !(pc = GET_SYMBOL("pc") ) ) return false; +if( !(pet = GET_SYMBOL("pet") ) ) return false; +if( !(quest = GET_SYMBOL("quest") ) ) return false; +if( !(script = GET_SYMBOL("script") ) ) return false; +if( !(searchstore = GET_SYMBOL("searchstore") ) ) return false; +if( !(skill = GET_SYMBOL("skill") ) ) return false; +if( !(status = GET_SYMBOL("status") ) ) return false; +if( !(storage = GET_SYMBOL("storage") ) ) return false; +if( !(trade = GET_SYMBOL("trade") ) ) return false; +if( !(unit = GET_SYMBOL("unit") ) ) return false; +if( !(vending = GET_SYMBOL("vending") ) ) return false; diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc new file mode 100644 index 000000000..c73747a10 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -0,0 +1,9663 @@ +struct { +struct HPMHookPoint *HP_atcommand_init_pre; +struct HPMHookPoint *HP_atcommand_init_post; +struct HPMHookPoint *HP_atcommand_final_pre; +struct HPMHookPoint *HP_atcommand_final_post; +struct HPMHookPoint *HP_atcommand_parse_pre; +struct HPMHookPoint *HP_atcommand_parse_post; +struct HPMHookPoint *HP_atcommand_create_pre; +struct HPMHookPoint *HP_atcommand_create_post; +struct HPMHookPoint *HP_atcommand_can_use_pre; +struct HPMHookPoint *HP_atcommand_can_use_post; +struct HPMHookPoint *HP_atcommand_can_use2_pre; +struct HPMHookPoint *HP_atcommand_can_use2_post; +struct HPMHookPoint *HP_atcommand_load_groups_pre; +struct HPMHookPoint *HP_atcommand_load_groups_post; +struct HPMHookPoint *HP_atcommand_exists_pre; +struct HPMHookPoint *HP_atcommand_exists_post; +struct HPMHookPoint *HP_atcommand_msg_read_pre; +struct HPMHookPoint *HP_atcommand_msg_read_post; +struct HPMHookPoint *HP_atcommand_final_msg_pre; +struct HPMHookPoint *HP_atcommand_final_msg_post; +struct HPMHookPoint *HP_atcommand_get_bind_byname_pre; +struct HPMHookPoint *HP_atcommand_get_bind_byname_post; +struct HPMHookPoint *HP_atcommand_get_info_byname_pre; +struct HPMHookPoint *HP_atcommand_get_info_byname_post; +struct HPMHookPoint *HP_atcommand_check_alias_pre; +struct HPMHookPoint *HP_atcommand_check_alias_post; +struct HPMHookPoint *HP_atcommand_get_suggestions_pre; +struct HPMHookPoint *HP_atcommand_get_suggestions_post; +struct HPMHookPoint *HP_atcommand_config_read_pre; +struct HPMHookPoint *HP_atcommand_config_read_post; +struct HPMHookPoint *HP_atcommand_stopattack_pre; +struct HPMHookPoint *HP_atcommand_stopattack_post; +struct HPMHookPoint *HP_atcommand_pvpoff_sub_pre; +struct HPMHookPoint *HP_atcommand_pvpoff_sub_post; +struct HPMHookPoint *HP_atcommand_pvpon_sub_pre; +struct HPMHookPoint *HP_atcommand_pvpon_sub_post; +struct HPMHookPoint *HP_atcommand_atkillmonster_sub_pre; +struct HPMHookPoint *HP_atcommand_atkillmonster_sub_post; +struct HPMHookPoint *HP_atcommand_raise_sub_pre; +struct HPMHookPoint *HP_atcommand_raise_sub_post; +struct HPMHookPoint *HP_atcommand_get_jail_time_pre; +struct HPMHookPoint *HP_atcommand_get_jail_time_post; +struct HPMHookPoint *HP_atcommand_cleanfloor_sub_pre; +struct HPMHookPoint *HP_atcommand_cleanfloor_sub_post; +struct HPMHookPoint *HP_atcommand_mutearea_sub_pre; +struct HPMHookPoint *HP_atcommand_mutearea_sub_post; +struct HPMHookPoint *HP_atcommand_commands_sub_pre; +struct HPMHookPoint *HP_atcommand_commands_sub_post; +struct HPMHookPoint *HP_atcommand_cmd_db_clear_pre; +struct HPMHookPoint *HP_atcommand_cmd_db_clear_post; +struct HPMHookPoint *HP_atcommand_cmd_db_clear_sub_pre; +struct HPMHookPoint *HP_atcommand_cmd_db_clear_sub_post; +struct HPMHookPoint *HP_atcommand_doload_pre; +struct HPMHookPoint *HP_atcommand_doload_post; +struct HPMHookPoint *HP_atcommand_base_commands_pre; +struct HPMHookPoint *HP_atcommand_base_commands_post; +struct HPMHookPoint *HP_battle_init_pre; +struct HPMHookPoint *HP_battle_init_post; +struct HPMHookPoint *HP_battle_final_pre; +struct HPMHookPoint *HP_battle_final_post; +struct HPMHookPoint *HP_battle_calc_attack_pre; +struct HPMHookPoint *HP_battle_calc_attack_post; +struct HPMHookPoint *HP_battle_calc_damage_pre; +struct HPMHookPoint *HP_battle_calc_damage_post; +struct HPMHookPoint *HP_battle_calc_gvg_damage_pre; +struct HPMHookPoint *HP_battle_calc_gvg_damage_post; +struct HPMHookPoint *HP_battle_calc_bg_damage_pre; +struct HPMHookPoint *HP_battle_calc_bg_damage_post; +struct HPMHookPoint *HP_battle_weapon_attack_pre; +struct HPMHookPoint *HP_battle_weapon_attack_post; +struct HPMHookPoint *HP_battle_calc_weapon_attack_pre; +struct HPMHookPoint *HP_battle_calc_weapon_attack_post; +struct HPMHookPoint *HP_battle_delay_damage_pre; +struct HPMHookPoint *HP_battle_delay_damage_post; +struct HPMHookPoint *HP_battle_drain_pre; +struct HPMHookPoint *HP_battle_drain_post; +struct HPMHookPoint *HP_battle_calc_return_damage_pre; +struct HPMHookPoint *HP_battle_calc_return_damage_post; +struct HPMHookPoint *HP_battle_attr_ratio_pre; +struct HPMHookPoint *HP_battle_attr_ratio_post; +struct HPMHookPoint *HP_battle_attr_fix_pre; +struct HPMHookPoint *HP_battle_attr_fix_post; +struct HPMHookPoint *HP_battle_calc_cardfix_pre; +struct HPMHookPoint *HP_battle_calc_cardfix_post; +struct HPMHookPoint *HP_battle_calc_elefix_pre; +struct HPMHookPoint *HP_battle_calc_elefix_post; +struct HPMHookPoint *HP_battle_calc_masteryfix_pre; +struct HPMHookPoint *HP_battle_calc_masteryfix_post; +struct HPMHookPoint *HP_battle_calc_skillratio_pre; +struct HPMHookPoint *HP_battle_calc_skillratio_post; +struct HPMHookPoint *HP_battle_calc_sizefix_pre; +struct HPMHookPoint *HP_battle_calc_sizefix_post; +struct HPMHookPoint *HP_battle_calc_weapon_damage_pre; +struct HPMHookPoint *HP_battle_calc_weapon_damage_post; +struct HPMHookPoint *HP_battle_calc_defense_pre; +struct HPMHookPoint *HP_battle_calc_defense_post; +struct HPMHookPoint *HP_battle_get_master_pre; +struct HPMHookPoint *HP_battle_get_master_post; +struct HPMHookPoint *HP_battle_get_targeted_pre; +struct HPMHookPoint *HP_battle_get_targeted_post; +struct HPMHookPoint *HP_battle_get_enemy_pre; +struct HPMHookPoint *HP_battle_get_enemy_post; +struct HPMHookPoint *HP_battle_get_target_pre; +struct HPMHookPoint *HP_battle_get_target_post; +struct HPMHookPoint *HP_battle_get_current_skill_pre; +struct HPMHookPoint *HP_battle_get_current_skill_post; +struct HPMHookPoint *HP_battle_check_undead_pre; +struct HPMHookPoint *HP_battle_check_undead_post; +struct HPMHookPoint *HP_battle_check_target_pre; +struct HPMHookPoint *HP_battle_check_target_post; +struct HPMHookPoint *HP_battle_check_range_pre; +struct HPMHookPoint *HP_battle_check_range_post; +struct HPMHookPoint *HP_battle_consume_ammo_pre; +struct HPMHookPoint *HP_battle_consume_ammo_post; +struct HPMHookPoint *HP_battle_get_targeted_sub_pre; +struct HPMHookPoint *HP_battle_get_targeted_sub_post; +struct HPMHookPoint *HP_battle_get_enemy_sub_pre; +struct HPMHookPoint *HP_battle_get_enemy_sub_post; +struct HPMHookPoint *HP_battle_get_enemy_area_sub_pre; +struct HPMHookPoint *HP_battle_get_enemy_area_sub_post; +struct HPMHookPoint *HP_battle_delay_damage_sub_pre; +struct HPMHookPoint *HP_battle_delay_damage_sub_post; +struct HPMHookPoint *HP_battle_blewcount_bonus_pre; +struct HPMHookPoint *HP_battle_blewcount_bonus_post; +struct HPMHookPoint *HP_battle_range_type_pre; +struct HPMHookPoint *HP_battle_range_type_post; +struct HPMHookPoint *HP_battle_calc_base_damage_pre; +struct HPMHookPoint *HP_battle_calc_base_damage_post; +struct HPMHookPoint *HP_battle_calc_base_damage2_pre; +struct HPMHookPoint *HP_battle_calc_base_damage2_post; +struct HPMHookPoint *HP_battle_calc_misc_attack_pre; +struct HPMHookPoint *HP_battle_calc_misc_attack_post; +struct HPMHookPoint *HP_battle_calc_magic_attack_pre; +struct HPMHookPoint *HP_battle_calc_magic_attack_post; +struct HPMHookPoint *HP_battle_adjust_skill_damage_pre; +struct HPMHookPoint *HP_battle_adjust_skill_damage_post; +struct HPMHookPoint *HP_battle_add_mastery_pre; +struct HPMHookPoint *HP_battle_add_mastery_post; +struct HPMHookPoint *HP_battle_calc_drain_pre; +struct HPMHookPoint *HP_battle_calc_drain_post; +struct HPMHookPoint *HP_battle_config_read_pre; +struct HPMHookPoint *HP_battle_config_read_post; +struct HPMHookPoint *HP_battle_config_set_defaults_pre; +struct HPMHookPoint *HP_battle_config_set_defaults_post; +struct HPMHookPoint *HP_battle_config_set_value_pre; +struct HPMHookPoint *HP_battle_config_set_value_post; +struct HPMHookPoint *HP_battle_config_get_value_pre; +struct HPMHookPoint *HP_battle_config_get_value_post; +struct HPMHookPoint *HP_battle_config_adjust_pre; +struct HPMHookPoint *HP_battle_config_adjust_post; +struct HPMHookPoint *HP_battle_get_enemy_area_pre; +struct HPMHookPoint *HP_battle_get_enemy_area_post; +struct HPMHookPoint *HP_battle_damage_area_pre; +struct HPMHookPoint *HP_battle_damage_area_post; +struct HPMHookPoint *HP_bg_init_pre; +struct HPMHookPoint *HP_bg_init_post; +struct HPMHookPoint *HP_bg_final_pre; +struct HPMHookPoint *HP_bg_final_post; +struct HPMHookPoint *HP_bg_name2arena_pre; +struct HPMHookPoint *HP_bg_name2arena_post; +struct HPMHookPoint *HP_bg_queue_add_pre; +struct HPMHookPoint *HP_bg_queue_add_post; +struct HPMHookPoint *HP_bg_can_queue_pre; +struct HPMHookPoint *HP_bg_can_queue_post; +struct HPMHookPoint *HP_bg_id2pos_pre; +struct HPMHookPoint *HP_bg_id2pos_post; +struct HPMHookPoint *HP_bg_queue_pc_cleanup_pre; +struct HPMHookPoint *HP_bg_queue_pc_cleanup_post; +struct HPMHookPoint *HP_bg_begin_pre; +struct HPMHookPoint *HP_bg_begin_post; +struct HPMHookPoint *HP_bg_begin_timer_pre; +struct HPMHookPoint *HP_bg_begin_timer_post; +struct HPMHookPoint *HP_bg_queue_pregame_pre; +struct HPMHookPoint *HP_bg_queue_pregame_post; +struct HPMHookPoint *HP_bg_fillup_timer_pre; +struct HPMHookPoint *HP_bg_fillup_timer_post; +struct HPMHookPoint *HP_bg_queue_ready_ack_pre; +struct HPMHookPoint *HP_bg_queue_ready_ack_post; +struct HPMHookPoint *HP_bg_match_over_pre; +struct HPMHookPoint *HP_bg_match_over_post; +struct HPMHookPoint *HP_bg_queue_check_pre; +struct HPMHookPoint *HP_bg_queue_check_post; +struct HPMHookPoint *HP_bg_team_search_pre; +struct HPMHookPoint *HP_bg_team_search_post; +struct HPMHookPoint *HP_bg_getavailablesd_pre; +struct HPMHookPoint *HP_bg_getavailablesd_post; +struct HPMHookPoint *HP_bg_team_delete_pre; +struct HPMHookPoint *HP_bg_team_delete_post; +struct HPMHookPoint *HP_bg_team_warp_pre; +struct HPMHookPoint *HP_bg_team_warp_post; +struct HPMHookPoint *HP_bg_send_dot_remove_pre; +struct HPMHookPoint *HP_bg_send_dot_remove_post; +struct HPMHookPoint *HP_bg_team_join_pre; +struct HPMHookPoint *HP_bg_team_join_post; +struct HPMHookPoint *HP_bg_team_leave_pre; +struct HPMHookPoint *HP_bg_team_leave_post; +struct HPMHookPoint *HP_bg_member_respawn_pre; +struct HPMHookPoint *HP_bg_member_respawn_post; +struct HPMHookPoint *HP_bg_create_pre; +struct HPMHookPoint *HP_bg_create_post; +struct HPMHookPoint *HP_bg_team_get_id_pre; +struct HPMHookPoint *HP_bg_team_get_id_post; +struct HPMHookPoint *HP_bg_send_message_pre; +struct HPMHookPoint *HP_bg_send_message_post; +struct HPMHookPoint *HP_bg_send_xy_timer_sub_pre; +struct HPMHookPoint *HP_bg_send_xy_timer_sub_post; +struct HPMHookPoint *HP_bg_send_xy_timer_pre; +struct HPMHookPoint *HP_bg_send_xy_timer_post; +struct HPMHookPoint *HP_bg_config_read_pre; +struct HPMHookPoint *HP_bg_config_read_post; +struct HPMHookPoint *HP_buyingstore_setup_pre; +struct HPMHookPoint *HP_buyingstore_setup_post; +struct HPMHookPoint *HP_buyingstore_create_pre; +struct HPMHookPoint *HP_buyingstore_create_post; +struct HPMHookPoint *HP_buyingstore_close_pre; +struct HPMHookPoint *HP_buyingstore_close_post; +struct HPMHookPoint *HP_buyingstore_open_pre; +struct HPMHookPoint *HP_buyingstore_open_post; +struct HPMHookPoint *HP_buyingstore_trade_pre; +struct HPMHookPoint *HP_buyingstore_trade_post; +struct HPMHookPoint *HP_buyingstore_search_pre; +struct HPMHookPoint *HP_buyingstore_search_post; +struct HPMHookPoint *HP_buyingstore_searchall_pre; +struct HPMHookPoint *HP_buyingstore_searchall_post; +struct HPMHookPoint *HP_buyingstore_getuid_pre; +struct HPMHookPoint *HP_buyingstore_getuid_post; +struct HPMHookPoint *HP_chat_create_pc_chat_pre; +struct HPMHookPoint *HP_chat_create_pc_chat_post; +struct HPMHookPoint *HP_chat_join_pre; +struct HPMHookPoint *HP_chat_join_post; +struct HPMHookPoint *HP_chat_leave_pre; +struct HPMHookPoint *HP_chat_leave_post; +struct HPMHookPoint *HP_chat_change_owner_pre; +struct HPMHookPoint *HP_chat_change_owner_post; +struct HPMHookPoint *HP_chat_change_status_pre; +struct HPMHookPoint *HP_chat_change_status_post; +struct HPMHookPoint *HP_chat_kick_pre; +struct HPMHookPoint *HP_chat_kick_post; +struct HPMHookPoint *HP_chat_create_npc_chat_pre; +struct HPMHookPoint *HP_chat_create_npc_chat_post; +struct HPMHookPoint *HP_chat_delete_npc_chat_pre; +struct HPMHookPoint *HP_chat_delete_npc_chat_post; +struct HPMHookPoint *HP_chat_enable_event_pre; +struct HPMHookPoint *HP_chat_enable_event_post; +struct HPMHookPoint *HP_chat_disable_event_pre; +struct HPMHookPoint *HP_chat_disable_event_post; +struct HPMHookPoint *HP_chat_npc_kick_all_pre; +struct HPMHookPoint *HP_chat_npc_kick_all_post; +struct HPMHookPoint *HP_chat_trigger_event_pre; +struct HPMHookPoint *HP_chat_trigger_event_post; +struct HPMHookPoint *HP_chat_create_pre; +struct HPMHookPoint *HP_chat_create_post; +struct HPMHookPoint *HP_chrif_final_pre; +struct HPMHookPoint *HP_chrif_final_post; +struct HPMHookPoint *HP_chrif_init_pre; +struct HPMHookPoint *HP_chrif_init_post; +struct HPMHookPoint *HP_chrif_setuserid_pre; +struct HPMHookPoint *HP_chrif_setuserid_post; +struct HPMHookPoint *HP_chrif_setpasswd_pre; +struct HPMHookPoint *HP_chrif_setpasswd_post; +struct HPMHookPoint *HP_chrif_checkdefaultlogin_pre; +struct HPMHookPoint *HP_chrif_checkdefaultlogin_post; +struct HPMHookPoint *HP_chrif_setip_pre; +struct HPMHookPoint *HP_chrif_setip_post; +struct HPMHookPoint *HP_chrif_setport_pre; +struct HPMHookPoint *HP_chrif_setport_post; +struct HPMHookPoint *HP_chrif_isconnected_pre; +struct HPMHookPoint *HP_chrif_isconnected_post; +struct HPMHookPoint *HP_chrif_check_shutdown_pre; +struct HPMHookPoint *HP_chrif_check_shutdown_post; +struct HPMHookPoint *HP_chrif_search_pre; +struct HPMHookPoint *HP_chrif_search_post; +struct HPMHookPoint *HP_chrif_auth_check_pre; +struct HPMHookPoint *HP_chrif_auth_check_post; +struct HPMHookPoint *HP_chrif_auth_delete_pre; +struct HPMHookPoint *HP_chrif_auth_delete_post; +struct HPMHookPoint *HP_chrif_auth_finished_pre; +struct HPMHookPoint *HP_chrif_auth_finished_post; +struct HPMHookPoint *HP_chrif_authreq_pre; +struct HPMHookPoint *HP_chrif_authreq_post; +struct HPMHookPoint *HP_chrif_authok_pre; +struct HPMHookPoint *HP_chrif_authok_post; +struct HPMHookPoint *HP_chrif_scdata_request_pre; +struct HPMHookPoint *HP_chrif_scdata_request_post; +struct HPMHookPoint *HP_chrif_save_pre; +struct HPMHookPoint *HP_chrif_save_post; +struct HPMHookPoint *HP_chrif_charselectreq_pre; +struct HPMHookPoint *HP_chrif_charselectreq_post; +struct HPMHookPoint *HP_chrif_changemapserver_pre; +struct HPMHookPoint *HP_chrif_changemapserver_post; +struct HPMHookPoint *HP_chrif_searchcharid_pre; +struct HPMHookPoint *HP_chrif_searchcharid_post; +struct HPMHookPoint *HP_chrif_changeemail_pre; +struct HPMHookPoint *HP_chrif_changeemail_post; +struct HPMHookPoint *HP_chrif_char_ask_name_pre; +struct HPMHookPoint *HP_chrif_char_ask_name_post; +struct HPMHookPoint *HP_chrif_updatefamelist_pre; +struct HPMHookPoint *HP_chrif_updatefamelist_post; +struct HPMHookPoint *HP_chrif_buildfamelist_pre; +struct HPMHookPoint *HP_chrif_buildfamelist_post; +struct HPMHookPoint *HP_chrif_save_scdata_pre; +struct HPMHookPoint *HP_chrif_save_scdata_post; +struct HPMHookPoint *HP_chrif_ragsrvinfo_pre; +struct HPMHookPoint *HP_chrif_ragsrvinfo_post; +struct HPMHookPoint *HP_chrif_char_offline_pre; +struct HPMHookPoint *HP_chrif_char_offline_post; +struct HPMHookPoint *HP_chrif_char_offline_nsd_pre; +struct HPMHookPoint *HP_chrif_char_offline_nsd_post; +struct HPMHookPoint *HP_chrif_char_reset_offline_pre; +struct HPMHookPoint *HP_chrif_char_reset_offline_post; +struct HPMHookPoint *HP_chrif_send_users_tochar_pre; +struct HPMHookPoint *HP_chrif_send_users_tochar_post; +struct HPMHookPoint *HP_chrif_char_online_pre; +struct HPMHookPoint *HP_chrif_char_online_post; +struct HPMHookPoint *HP_chrif_changesex_pre; +struct HPMHookPoint *HP_chrif_changesex_post; +struct HPMHookPoint *HP_chrif_divorce_pre; +struct HPMHookPoint *HP_chrif_divorce_post; +struct HPMHookPoint *HP_chrif_removefriend_pre; +struct HPMHookPoint *HP_chrif_removefriend_post; +struct HPMHookPoint *HP_chrif_send_report_pre; +struct HPMHookPoint *HP_chrif_send_report_post; +struct HPMHookPoint *HP_chrif_flush_fifo_pre; +struct HPMHookPoint *HP_chrif_flush_fifo_post; +struct HPMHookPoint *HP_chrif_skillid2idx_pre; +struct HPMHookPoint *HP_chrif_skillid2idx_post; +struct HPMHookPoint *HP_chrif_sd_to_auth_pre; +struct HPMHookPoint *HP_chrif_sd_to_auth_post; +struct HPMHookPoint *HP_chrif_check_connect_char_server_pre; +struct HPMHookPoint *HP_chrif_check_connect_char_server_post; +struct HPMHookPoint *HP_chrif_auth_logout_pre; +struct HPMHookPoint *HP_chrif_auth_logout_post; +struct HPMHookPoint *HP_chrif_save_ack_pre; +struct HPMHookPoint *HP_chrif_save_ack_post; +struct HPMHookPoint *HP_chrif_reconnect_pre; +struct HPMHookPoint *HP_chrif_reconnect_post; +struct HPMHookPoint *HP_chrif_auth_db_cleanup_sub_pre; +struct HPMHookPoint *HP_chrif_auth_db_cleanup_sub_post; +struct HPMHookPoint *HP_chrif_char_ask_name_answer_pre; +struct HPMHookPoint *HP_chrif_char_ask_name_answer_post; +struct HPMHookPoint *HP_chrif_auth_db_final_pre; +struct HPMHookPoint *HP_chrif_auth_db_final_post; +struct HPMHookPoint *HP_chrif_send_usercount_tochar_pre; +struct HPMHookPoint *HP_chrif_send_usercount_tochar_post; +struct HPMHookPoint *HP_chrif_auth_db_cleanup_pre; +struct HPMHookPoint *HP_chrif_auth_db_cleanup_post; +struct HPMHookPoint *HP_chrif_connect_pre; +struct HPMHookPoint *HP_chrif_connect_post; +struct HPMHookPoint *HP_chrif_connectack_pre; +struct HPMHookPoint *HP_chrif_connectack_post; +struct HPMHookPoint *HP_chrif_sendmap_pre; +struct HPMHookPoint *HP_chrif_sendmap_post; +struct HPMHookPoint *HP_chrif_sendmapack_pre; +struct HPMHookPoint *HP_chrif_sendmapack_post; +struct HPMHookPoint *HP_chrif_recvmap_pre; +struct HPMHookPoint *HP_chrif_recvmap_post; +struct HPMHookPoint *HP_chrif_changemapserverack_pre; +struct HPMHookPoint *HP_chrif_changemapserverack_post; +struct HPMHookPoint *HP_chrif_changedsex_pre; +struct HPMHookPoint *HP_chrif_changedsex_post; +struct HPMHookPoint *HP_chrif_divorceack_pre; +struct HPMHookPoint *HP_chrif_divorceack_post; +struct HPMHookPoint *HP_chrif_accountban_pre; +struct HPMHookPoint *HP_chrif_accountban_post; +struct HPMHookPoint *HP_chrif_recvfamelist_pre; +struct HPMHookPoint *HP_chrif_recvfamelist_post; +struct HPMHookPoint *HP_chrif_load_scdata_pre; +struct HPMHookPoint *HP_chrif_load_scdata_post; +struct HPMHookPoint *HP_chrif_update_ip_pre; +struct HPMHookPoint *HP_chrif_update_ip_post; +struct HPMHookPoint *HP_chrif_disconnectplayer_pre; +struct HPMHookPoint *HP_chrif_disconnectplayer_post; +struct HPMHookPoint *HP_chrif_removemap_pre; +struct HPMHookPoint *HP_chrif_removemap_post; +struct HPMHookPoint *HP_chrif_updatefamelist_ack_pre; +struct HPMHookPoint *HP_chrif_updatefamelist_ack_post; +struct HPMHookPoint *HP_chrif_keepalive_pre; +struct HPMHookPoint *HP_chrif_keepalive_post; +struct HPMHookPoint *HP_chrif_keepalive_ack_pre; +struct HPMHookPoint *HP_chrif_keepalive_ack_post; +struct HPMHookPoint *HP_chrif_deadopt_pre; +struct HPMHookPoint *HP_chrif_deadopt_post; +struct HPMHookPoint *HP_chrif_authfail_pre; +struct HPMHookPoint *HP_chrif_authfail_post; +struct HPMHookPoint *HP_chrif_on_ready_pre; +struct HPMHookPoint *HP_chrif_on_ready_post; +struct HPMHookPoint *HP_chrif_on_disconnect_pre; +struct HPMHookPoint *HP_chrif_on_disconnect_post; +struct HPMHookPoint *HP_chrif_parse_pre; +struct HPMHookPoint *HP_chrif_parse_post; +struct HPMHookPoint *HP_clif_init_pre; +struct HPMHookPoint *HP_clif_init_post; +struct HPMHookPoint *HP_clif_final_pre; +struct HPMHookPoint *HP_clif_final_post; +struct HPMHookPoint *HP_clif_setip_pre; +struct HPMHookPoint *HP_clif_setip_post; +struct HPMHookPoint *HP_clif_setbindip_pre; +struct HPMHookPoint *HP_clif_setbindip_post; +struct HPMHookPoint *HP_clif_setport_pre; +struct HPMHookPoint *HP_clif_setport_post; +struct HPMHookPoint *HP_clif_refresh_ip_pre; +struct HPMHookPoint *HP_clif_refresh_ip_post; +struct HPMHookPoint *HP_clif_send_pre; +struct HPMHookPoint *HP_clif_send_post; +struct HPMHookPoint *HP_clif_send_sub_pre; +struct HPMHookPoint *HP_clif_send_sub_post; +struct HPMHookPoint *HP_clif_parse_pre; +struct HPMHookPoint *HP_clif_parse_post; +struct HPMHookPoint *HP_clif_parse_cmd_pre; +struct HPMHookPoint *HP_clif_parse_cmd_post; +struct HPMHookPoint *HP_clif_decrypt_cmd_pre; +struct HPMHookPoint *HP_clif_decrypt_cmd_post; +struct HPMHookPoint *HP_clif_authok_pre; +struct HPMHookPoint *HP_clif_authok_post; +struct HPMHookPoint *HP_clif_authrefuse_pre; +struct HPMHookPoint *HP_clif_authrefuse_post; +struct HPMHookPoint *HP_clif_authfail_fd_pre; +struct HPMHookPoint *HP_clif_authfail_fd_post; +struct HPMHookPoint *HP_clif_charselectok_pre; +struct HPMHookPoint *HP_clif_charselectok_post; +struct HPMHookPoint *HP_clif_dropflooritem_pre; +struct HPMHookPoint *HP_clif_dropflooritem_post; +struct HPMHookPoint *HP_clif_clearflooritem_pre; +struct HPMHookPoint *HP_clif_clearflooritem_post; +struct HPMHookPoint *HP_clif_additem_pre; +struct HPMHookPoint *HP_clif_additem_post; +struct HPMHookPoint *HP_clif_dropitem_pre; +struct HPMHookPoint *HP_clif_dropitem_post; +struct HPMHookPoint *HP_clif_delitem_pre; +struct HPMHookPoint *HP_clif_delitem_post; +struct HPMHookPoint *HP_clif_takeitem_pre; +struct HPMHookPoint *HP_clif_takeitem_post; +struct HPMHookPoint *HP_clif_arrowequip_pre; +struct HPMHookPoint *HP_clif_arrowequip_post; +struct HPMHookPoint *HP_clif_arrow_fail_pre; +struct HPMHookPoint *HP_clif_arrow_fail_post; +struct HPMHookPoint *HP_clif_use_card_pre; +struct HPMHookPoint *HP_clif_use_card_post; +struct HPMHookPoint *HP_clif_cart_additem_pre; +struct HPMHookPoint *HP_clif_cart_additem_post; +struct HPMHookPoint *HP_clif_cart_delitem_pre; +struct HPMHookPoint *HP_clif_cart_delitem_post; +struct HPMHookPoint *HP_clif_equipitemack_pre; +struct HPMHookPoint *HP_clif_equipitemack_post; +struct HPMHookPoint *HP_clif_unequipitemack_pre; +struct HPMHookPoint *HP_clif_unequipitemack_post; +struct HPMHookPoint *HP_clif_useitemack_pre; +struct HPMHookPoint *HP_clif_useitemack_post; +struct HPMHookPoint *HP_clif_addcards_pre; +struct HPMHookPoint *HP_clif_addcards_post; +struct HPMHookPoint *HP_clif_addcards2_pre; +struct HPMHookPoint *HP_clif_addcards2_post; +struct HPMHookPoint *HP_clif_item_sub_pre; +struct HPMHookPoint *HP_clif_item_sub_post; +struct HPMHookPoint *HP_clif_getareachar_item_pre; +struct HPMHookPoint *HP_clif_getareachar_item_post; +struct HPMHookPoint *HP_clif_cart_additem_ack_pre; +struct HPMHookPoint *HP_clif_cart_additem_ack_post; +struct HPMHookPoint *HP_clif_cashshop_load_pre; +struct HPMHookPoint *HP_clif_cashshop_load_post; +struct HPMHookPoint *HP_clif_package_announce_pre; +struct HPMHookPoint *HP_clif_package_announce_post; +struct HPMHookPoint *HP_clif_clearunit_single_pre; +struct HPMHookPoint *HP_clif_clearunit_single_post; +struct HPMHookPoint *HP_clif_clearunit_area_pre; +struct HPMHookPoint *HP_clif_clearunit_area_post; +struct HPMHookPoint *HP_clif_clearunit_delayed_pre; +struct HPMHookPoint *HP_clif_clearunit_delayed_post; +struct HPMHookPoint *HP_clif_walkok_pre; +struct HPMHookPoint *HP_clif_walkok_post; +struct HPMHookPoint *HP_clif_move_pre; +struct HPMHookPoint *HP_clif_move_post; +struct HPMHookPoint *HP_clif_move2_pre; +struct HPMHookPoint *HP_clif_move2_post; +struct HPMHookPoint *HP_clif_blown_pre; +struct HPMHookPoint *HP_clif_blown_post; +struct HPMHookPoint *HP_clif_slide_pre; +struct HPMHookPoint *HP_clif_slide_post; +struct HPMHookPoint *HP_clif_fixpos_pre; +struct HPMHookPoint *HP_clif_fixpos_post; +struct HPMHookPoint *HP_clif_changelook_pre; +struct HPMHookPoint *HP_clif_changelook_post; +struct HPMHookPoint *HP_clif_changetraplook_pre; +struct HPMHookPoint *HP_clif_changetraplook_post; +struct HPMHookPoint *HP_clif_refreshlook_pre; +struct HPMHookPoint *HP_clif_refreshlook_post; +struct HPMHookPoint *HP_clif_class_change_pre; +struct HPMHookPoint *HP_clif_class_change_post; +struct HPMHookPoint *HP_clif_skill_setunit_pre; +struct HPMHookPoint *HP_clif_skill_setunit_post; +struct HPMHookPoint *HP_clif_skill_delunit_pre; +struct HPMHookPoint *HP_clif_skill_delunit_post; +struct HPMHookPoint *HP_clif_skillunit_update_pre; +struct HPMHookPoint *HP_clif_skillunit_update_post; +struct HPMHookPoint *HP_clif_clearunit_delayed_sub_pre; +struct HPMHookPoint *HP_clif_clearunit_delayed_sub_post; +struct HPMHookPoint *HP_clif_set_unit_idle_pre; +struct HPMHookPoint *HP_clif_set_unit_idle_post; +struct HPMHookPoint *HP_clif_spawn_unit_pre; +struct HPMHookPoint *HP_clif_spawn_unit_post; +struct HPMHookPoint *HP_clif_set_unit_walking_pre; +struct HPMHookPoint *HP_clif_set_unit_walking_post; +struct HPMHookPoint *HP_clif_calc_walkdelay_pre; +struct HPMHookPoint *HP_clif_calc_walkdelay_post; +struct HPMHookPoint *HP_clif_getareachar_skillunit_pre; +struct HPMHookPoint *HP_clif_getareachar_skillunit_post; +struct HPMHookPoint *HP_clif_getareachar_unit_pre; +struct HPMHookPoint *HP_clif_getareachar_unit_post; +struct HPMHookPoint *HP_clif_clearchar_skillunit_pre; +struct HPMHookPoint *HP_clif_clearchar_skillunit_post; +struct HPMHookPoint *HP_clif_getareachar_pre; +struct HPMHookPoint *HP_clif_getareachar_post; +struct HPMHookPoint *HP_clif_spawn_pre; +struct HPMHookPoint *HP_clif_spawn_post; +struct HPMHookPoint *HP_clif_changemap_pre; +struct HPMHookPoint *HP_clif_changemap_post; +struct HPMHookPoint *HP_clif_changemapcell_pre; +struct HPMHookPoint *HP_clif_changemapcell_post; +struct HPMHookPoint *HP_clif_map_property_pre; +struct HPMHookPoint *HP_clif_map_property_post; +struct HPMHookPoint *HP_clif_pvpset_pre; +struct HPMHookPoint *HP_clif_pvpset_post; +struct HPMHookPoint *HP_clif_map_property_mapall_pre; +struct HPMHookPoint *HP_clif_map_property_mapall_post; +struct HPMHookPoint *HP_clif_bossmapinfo_pre; +struct HPMHookPoint *HP_clif_bossmapinfo_post; +struct HPMHookPoint *HP_clif_map_type_pre; +struct HPMHookPoint *HP_clif_map_type_post; +struct HPMHookPoint *HP_clif_maptypeproperty2_pre; +struct HPMHookPoint *HP_clif_maptypeproperty2_post; +struct HPMHookPoint *HP_clif_changemapserver_pre; +struct HPMHookPoint *HP_clif_changemapserver_post; +struct HPMHookPoint *HP_clif_npcbuysell_pre; +struct HPMHookPoint *HP_clif_npcbuysell_post; +struct HPMHookPoint *HP_clif_buylist_pre; +struct HPMHookPoint *HP_clif_buylist_post; +struct HPMHookPoint *HP_clif_selllist_pre; +struct HPMHookPoint *HP_clif_selllist_post; +struct HPMHookPoint *HP_clif_cashshop_show_pre; +struct HPMHookPoint *HP_clif_cashshop_show_post; +struct HPMHookPoint *HP_clif_npc_buy_result_pre; +struct HPMHookPoint *HP_clif_npc_buy_result_post; +struct HPMHookPoint *HP_clif_npc_sell_result_pre; +struct HPMHookPoint *HP_clif_npc_sell_result_post; +struct HPMHookPoint *HP_clif_cashshop_ack_pre; +struct HPMHookPoint *HP_clif_cashshop_ack_post; +struct HPMHookPoint *HP_clif_scriptmes_pre; +struct HPMHookPoint *HP_clif_scriptmes_post; +struct HPMHookPoint *HP_clif_scriptnext_pre; +struct HPMHookPoint *HP_clif_scriptnext_post; +struct HPMHookPoint *HP_clif_scriptclose_pre; +struct HPMHookPoint *HP_clif_scriptclose_post; +struct HPMHookPoint *HP_clif_scriptmenu_pre; +struct HPMHookPoint *HP_clif_scriptmenu_post; +struct HPMHookPoint *HP_clif_scriptinput_pre; +struct HPMHookPoint *HP_clif_scriptinput_post; +struct HPMHookPoint *HP_clif_scriptinputstr_pre; +struct HPMHookPoint *HP_clif_scriptinputstr_post; +struct HPMHookPoint *HP_clif_cutin_pre; +struct HPMHookPoint *HP_clif_cutin_post; +struct HPMHookPoint *HP_clif_sendfakenpc_pre; +struct HPMHookPoint *HP_clif_sendfakenpc_post; +struct HPMHookPoint *HP_clif_scriptclear_pre; +struct HPMHookPoint *HP_clif_scriptclear_post; +struct HPMHookPoint *HP_clif_viewpoint_pre; +struct HPMHookPoint *HP_clif_viewpoint_post; +struct HPMHookPoint *HP_clif_damage_pre; +struct HPMHookPoint *HP_clif_damage_post; +struct HPMHookPoint *HP_clif_sitting_pre; +struct HPMHookPoint *HP_clif_sitting_post; +struct HPMHookPoint *HP_clif_standing_pre; +struct HPMHookPoint *HP_clif_standing_post; +struct HPMHookPoint *HP_clif_arrow_create_list_pre; +struct HPMHookPoint *HP_clif_arrow_create_list_post; +struct HPMHookPoint *HP_clif_refresh_pre; +struct HPMHookPoint *HP_clif_refresh_post; +struct HPMHookPoint *HP_clif_fame_blacksmith_pre; +struct HPMHookPoint *HP_clif_fame_blacksmith_post; +struct HPMHookPoint *HP_clif_fame_alchemist_pre; +struct HPMHookPoint *HP_clif_fame_alchemist_post; +struct HPMHookPoint *HP_clif_fame_taekwon_pre; +struct HPMHookPoint *HP_clif_fame_taekwon_post; +struct HPMHookPoint *HP_clif_ranklist_pre; +struct HPMHookPoint *HP_clif_ranklist_post; +struct HPMHookPoint *HP_clif_update_rankingpoint_pre; +struct HPMHookPoint *HP_clif_update_rankingpoint_post; +struct HPMHookPoint *HP_clif_pRanklist_pre; +struct HPMHookPoint *HP_clif_pRanklist_post; +struct HPMHookPoint *HP_clif_hotkeys_pre; +struct HPMHookPoint *HP_clif_hotkeys_post; +struct HPMHookPoint *HP_clif_insight_pre; +struct HPMHookPoint *HP_clif_insight_post; +struct HPMHookPoint *HP_clif_outsight_pre; +struct HPMHookPoint *HP_clif_outsight_post; +struct HPMHookPoint *HP_clif_skillcastcancel_pre; +struct HPMHookPoint *HP_clif_skillcastcancel_post; +struct HPMHookPoint *HP_clif_skill_fail_pre; +struct HPMHookPoint *HP_clif_skill_fail_post; +struct HPMHookPoint *HP_clif_skill_cooldown_pre; +struct HPMHookPoint *HP_clif_skill_cooldown_post; +struct HPMHookPoint *HP_clif_skill_memomessage_pre; +struct HPMHookPoint *HP_clif_skill_memomessage_post; +struct HPMHookPoint *HP_clif_skill_mapinfomessage_pre; +struct HPMHookPoint *HP_clif_skill_mapinfomessage_post; +struct HPMHookPoint *HP_clif_skill_produce_mix_list_pre; +struct HPMHookPoint *HP_clif_skill_produce_mix_list_post; +struct HPMHookPoint *HP_clif_cooking_list_pre; +struct HPMHookPoint *HP_clif_cooking_list_post; +struct HPMHookPoint *HP_clif_autospell_pre; +struct HPMHookPoint *HP_clif_autospell_post; +struct HPMHookPoint *HP_clif_combo_delay_pre; +struct HPMHookPoint *HP_clif_combo_delay_post; +struct HPMHookPoint *HP_clif_status_change_pre; +struct HPMHookPoint *HP_clif_status_change_post; +struct HPMHookPoint *HP_clif_insert_card_pre; +struct HPMHookPoint *HP_clif_insert_card_post; +struct HPMHookPoint *HP_clif_inventorylist_pre; +struct HPMHookPoint *HP_clif_inventorylist_post; +struct HPMHookPoint *HP_clif_equiplist_pre; +struct HPMHookPoint *HP_clif_equiplist_post; +struct HPMHookPoint *HP_clif_cartlist_pre; +struct HPMHookPoint *HP_clif_cartlist_post; +struct HPMHookPoint *HP_clif_favorite_item_pre; +struct HPMHookPoint *HP_clif_favorite_item_post; +struct HPMHookPoint *HP_clif_clearcart_pre; +struct HPMHookPoint *HP_clif_clearcart_post; +struct HPMHookPoint *HP_clif_item_identify_list_pre; +struct HPMHookPoint *HP_clif_item_identify_list_post; +struct HPMHookPoint *HP_clif_item_identified_pre; +struct HPMHookPoint *HP_clif_item_identified_post; +struct HPMHookPoint *HP_clif_item_repair_list_pre; +struct HPMHookPoint *HP_clif_item_repair_list_post; +struct HPMHookPoint *HP_clif_item_repaireffect_pre; +struct HPMHookPoint *HP_clif_item_repaireffect_post; +struct HPMHookPoint *HP_clif_item_damaged_pre; +struct HPMHookPoint *HP_clif_item_damaged_post; +struct HPMHookPoint *HP_clif_item_refine_list_pre; +struct HPMHookPoint *HP_clif_item_refine_list_post; +struct HPMHookPoint *HP_clif_item_skill_pre; +struct HPMHookPoint *HP_clif_item_skill_post; +struct HPMHookPoint *HP_clif_mvp_item_pre; +struct HPMHookPoint *HP_clif_mvp_item_post; +struct HPMHookPoint *HP_clif_mvp_exp_pre; +struct HPMHookPoint *HP_clif_mvp_exp_post; +struct HPMHookPoint *HP_clif_mvp_noitem_pre; +struct HPMHookPoint *HP_clif_mvp_noitem_post; +struct HPMHookPoint *HP_clif_changed_dir_pre; +struct HPMHookPoint *HP_clif_changed_dir_post; +struct HPMHookPoint *HP_clif_charnameack_pre; +struct HPMHookPoint *HP_clif_charnameack_post; +struct HPMHookPoint *HP_clif_monster_hp_bar_pre; +struct HPMHookPoint *HP_clif_monster_hp_bar_post; +struct HPMHookPoint *HP_clif_hpmeter_pre; +struct HPMHookPoint *HP_clif_hpmeter_post; +struct HPMHookPoint *HP_clif_hpmeter_single_pre; +struct HPMHookPoint *HP_clif_hpmeter_single_post; +struct HPMHookPoint *HP_clif_hpmeter_sub_pre; +struct HPMHookPoint *HP_clif_hpmeter_sub_post; +struct HPMHookPoint *HP_clif_upgrademessage_pre; +struct HPMHookPoint *HP_clif_upgrademessage_post; +struct HPMHookPoint *HP_clif_get_weapon_view_pre; +struct HPMHookPoint *HP_clif_get_weapon_view_post; +struct HPMHookPoint *HP_clif_gospel_info_pre; +struct HPMHookPoint *HP_clif_gospel_info_post; +struct HPMHookPoint *HP_clif_feel_req_pre; +struct HPMHookPoint *HP_clif_feel_req_post; +struct HPMHookPoint *HP_clif_starskill_pre; +struct HPMHookPoint *HP_clif_starskill_post; +struct HPMHookPoint *HP_clif_feel_info_pre; +struct HPMHookPoint *HP_clif_feel_info_post; +struct HPMHookPoint *HP_clif_hate_info_pre; +struct HPMHookPoint *HP_clif_hate_info_post; +struct HPMHookPoint *HP_clif_mission_info_pre; +struct HPMHookPoint *HP_clif_mission_info_post; +struct HPMHookPoint *HP_clif_feel_hate_reset_pre; +struct HPMHookPoint *HP_clif_feel_hate_reset_post; +struct HPMHookPoint *HP_clif_partytickack_pre; +struct HPMHookPoint *HP_clif_partytickack_post; +struct HPMHookPoint *HP_clif_equiptickack_pre; +struct HPMHookPoint *HP_clif_equiptickack_post; +struct HPMHookPoint *HP_clif_viewequip_ack_pre; +struct HPMHookPoint *HP_clif_viewequip_ack_post; +struct HPMHookPoint *HP_clif_viewequip_fail_pre; +struct HPMHookPoint *HP_clif_viewequip_fail_post; +struct HPMHookPoint *HP_clif_equpcheckbox_pre; +struct HPMHookPoint *HP_clif_equpcheckbox_post; +struct HPMHookPoint *HP_clif_displayexp_pre; +struct HPMHookPoint *HP_clif_displayexp_post; +struct HPMHookPoint *HP_clif_font_pre; +struct HPMHookPoint *HP_clif_font_post; +struct HPMHookPoint *HP_clif_progressbar_pre; +struct HPMHookPoint *HP_clif_progressbar_post; +struct HPMHookPoint *HP_clif_progressbar_abort_pre; +struct HPMHookPoint *HP_clif_progressbar_abort_post; +struct HPMHookPoint *HP_clif_showdigit_pre; +struct HPMHookPoint *HP_clif_showdigit_post; +struct HPMHookPoint *HP_clif_elementalconverter_list_pre; +struct HPMHookPoint *HP_clif_elementalconverter_list_post; +struct HPMHookPoint *HP_clif_spellbook_list_pre; +struct HPMHookPoint *HP_clif_spellbook_list_post; +struct HPMHookPoint *HP_clif_magicdecoy_list_pre; +struct HPMHookPoint *HP_clif_magicdecoy_list_post; +struct HPMHookPoint *HP_clif_poison_list_pre; +struct HPMHookPoint *HP_clif_poison_list_post; +struct HPMHookPoint *HP_clif_autoshadowspell_list_pre; +struct HPMHookPoint *HP_clif_autoshadowspell_list_post; +struct HPMHookPoint *HP_clif_skill_itemlistwindow_pre; +struct HPMHookPoint *HP_clif_skill_itemlistwindow_post; +struct HPMHookPoint *HP_clif_sc_load_pre; +struct HPMHookPoint *HP_clif_sc_load_post; +struct HPMHookPoint *HP_clif_sc_end_pre; +struct HPMHookPoint *HP_clif_sc_end_post; +struct HPMHookPoint *HP_clif_initialstatus_pre; +struct HPMHookPoint *HP_clif_initialstatus_post; +struct HPMHookPoint *HP_clif_cooldown_list_pre; +struct HPMHookPoint *HP_clif_cooldown_list_post; +struct HPMHookPoint *HP_clif_updatestatus_pre; +struct HPMHookPoint *HP_clif_updatestatus_post; +struct HPMHookPoint *HP_clif_changestatus_pre; +struct HPMHookPoint *HP_clif_changestatus_post; +struct HPMHookPoint *HP_clif_statusupack_pre; +struct HPMHookPoint *HP_clif_statusupack_post; +struct HPMHookPoint *HP_clif_movetoattack_pre; +struct HPMHookPoint *HP_clif_movetoattack_post; +struct HPMHookPoint *HP_clif_solved_charname_pre; +struct HPMHookPoint *HP_clif_solved_charname_post; +struct HPMHookPoint *HP_clif_charnameupdate_pre; +struct HPMHookPoint *HP_clif_charnameupdate_post; +struct HPMHookPoint *HP_clif_delayquit_pre; +struct HPMHookPoint *HP_clif_delayquit_post; +struct HPMHookPoint *HP_clif_getareachar_pc_pre; +struct HPMHookPoint *HP_clif_getareachar_pc_post; +struct HPMHookPoint *HP_clif_disconnect_ack_pre; +struct HPMHookPoint *HP_clif_disconnect_ack_post; +struct HPMHookPoint *HP_clif_PVPInfo_pre; +struct HPMHookPoint *HP_clif_PVPInfo_post; +struct HPMHookPoint *HP_clif_blacksmith_pre; +struct HPMHookPoint *HP_clif_blacksmith_post; +struct HPMHookPoint *HP_clif_alchemist_pre; +struct HPMHookPoint *HP_clif_alchemist_post; +struct HPMHookPoint *HP_clif_taekwon_pre; +struct HPMHookPoint *HP_clif_taekwon_post; +struct HPMHookPoint *HP_clif_ranking_pk_pre; +struct HPMHookPoint *HP_clif_ranking_pk_post; +struct HPMHookPoint *HP_clif_quitsave_pre; +struct HPMHookPoint *HP_clif_quitsave_post; +struct HPMHookPoint *HP_clif_misceffect_pre; +struct HPMHookPoint *HP_clif_misceffect_post; +struct HPMHookPoint *HP_clif_changeoption_pre; +struct HPMHookPoint *HP_clif_changeoption_post; +struct HPMHookPoint *HP_clif_changeoption2_pre; +struct HPMHookPoint *HP_clif_changeoption2_post; +struct HPMHookPoint *HP_clif_emotion_pre; +struct HPMHookPoint *HP_clif_emotion_post; +struct HPMHookPoint *HP_clif_talkiebox_pre; +struct HPMHookPoint *HP_clif_talkiebox_post; +struct HPMHookPoint *HP_clif_wedding_effect_pre; +struct HPMHookPoint *HP_clif_wedding_effect_post; +struct HPMHookPoint *HP_clif_divorced_pre; +struct HPMHookPoint *HP_clif_divorced_post; +struct HPMHookPoint *HP_clif_callpartner_pre; +struct HPMHookPoint *HP_clif_callpartner_post; +struct HPMHookPoint *HP_clif_skill_damage_pre; +struct HPMHookPoint *HP_clif_skill_damage_post; +struct HPMHookPoint *HP_clif_skill_nodamage_pre; +struct HPMHookPoint *HP_clif_skill_nodamage_post; +struct HPMHookPoint *HP_clif_skill_poseffect_pre; +struct HPMHookPoint *HP_clif_skill_poseffect_post; +struct HPMHookPoint *HP_clif_skill_estimation_pre; +struct HPMHookPoint *HP_clif_skill_estimation_post; +struct HPMHookPoint *HP_clif_skill_warppoint_pre; +struct HPMHookPoint *HP_clif_skill_warppoint_post; +struct HPMHookPoint *HP_clif_skillcasting_pre; +struct HPMHookPoint *HP_clif_skillcasting_post; +struct HPMHookPoint *HP_clif_produce_effect_pre; +struct HPMHookPoint *HP_clif_produce_effect_post; +struct HPMHookPoint *HP_clif_devotion_pre; +struct HPMHookPoint *HP_clif_devotion_post; +struct HPMHookPoint *HP_clif_spiritball_pre; +struct HPMHookPoint *HP_clif_spiritball_post; +struct HPMHookPoint *HP_clif_spiritball_single_pre; +struct HPMHookPoint *HP_clif_spiritball_single_post; +struct HPMHookPoint *HP_clif_bladestop_pre; +struct HPMHookPoint *HP_clif_bladestop_post; +struct HPMHookPoint *HP_clif_mvp_effect_pre; +struct HPMHookPoint *HP_clif_mvp_effect_post; +struct HPMHookPoint *HP_clif_heal_pre; +struct HPMHookPoint *HP_clif_heal_post; +struct HPMHookPoint *HP_clif_resurrection_pre; +struct HPMHookPoint *HP_clif_resurrection_post; +struct HPMHookPoint *HP_clif_refine_pre; +struct HPMHookPoint *HP_clif_refine_post; +struct HPMHookPoint *HP_clif_weather_pre; +struct HPMHookPoint *HP_clif_weather_post; +struct HPMHookPoint *HP_clif_specialeffect_pre; +struct HPMHookPoint *HP_clif_specialeffect_post; +struct HPMHookPoint *HP_clif_specialeffect_single_pre; +struct HPMHookPoint *HP_clif_specialeffect_single_post; +struct HPMHookPoint *HP_clif_specialeffect_value_pre; +struct HPMHookPoint *HP_clif_specialeffect_value_post; +struct HPMHookPoint *HP_clif_millenniumshield_pre; +struct HPMHookPoint *HP_clif_millenniumshield_post; +struct HPMHookPoint *HP_clif_charm_pre; +struct HPMHookPoint *HP_clif_charm_post; +struct HPMHookPoint *HP_clif_charm_single_pre; +struct HPMHookPoint *HP_clif_charm_single_post; +struct HPMHookPoint *HP_clif_snap_pre; +struct HPMHookPoint *HP_clif_snap_post; +struct HPMHookPoint *HP_clif_weather_check_pre; +struct HPMHookPoint *HP_clif_weather_check_post; +struct HPMHookPoint *HP_clif_playBGM_pre; +struct HPMHookPoint *HP_clif_playBGM_post; +struct HPMHookPoint *HP_clif_soundeffect_pre; +struct HPMHookPoint *HP_clif_soundeffect_post; +struct HPMHookPoint *HP_clif_soundeffectall_pre; +struct HPMHookPoint *HP_clif_soundeffectall_post; +struct HPMHookPoint *HP_clif_GlobalMessage_pre; +struct HPMHookPoint *HP_clif_GlobalMessage_post; +struct HPMHookPoint *HP_clif_createchat_pre; +struct HPMHookPoint *HP_clif_createchat_post; +struct HPMHookPoint *HP_clif_dispchat_pre; +struct HPMHookPoint *HP_clif_dispchat_post; +struct HPMHookPoint *HP_clif_joinchatfail_pre; +struct HPMHookPoint *HP_clif_joinchatfail_post; +struct HPMHookPoint *HP_clif_joinchatok_pre; +struct HPMHookPoint *HP_clif_joinchatok_post; +struct HPMHookPoint *HP_clif_addchat_pre; +struct HPMHookPoint *HP_clif_addchat_post; +struct HPMHookPoint *HP_clif_changechatowner_pre; +struct HPMHookPoint *HP_clif_changechatowner_post; +struct HPMHookPoint *HP_clif_clearchat_pre; +struct HPMHookPoint *HP_clif_clearchat_post; +struct HPMHookPoint *HP_clif_leavechat_pre; +struct HPMHookPoint *HP_clif_leavechat_post; +struct HPMHookPoint *HP_clif_changechatstatus_pre; +struct HPMHookPoint *HP_clif_changechatstatus_post; +struct HPMHookPoint *HP_clif_wis_message_pre; +struct HPMHookPoint *HP_clif_wis_message_post; +struct HPMHookPoint *HP_clif_wis_end_pre; +struct HPMHookPoint *HP_clif_wis_end_post; +struct HPMHookPoint *HP_clif_disp_onlyself_pre; +struct HPMHookPoint *HP_clif_disp_onlyself_post; +struct HPMHookPoint *HP_clif_disp_message_pre; +struct HPMHookPoint *HP_clif_disp_message_post; +struct HPMHookPoint *HP_clif_broadcast_pre; +struct HPMHookPoint *HP_clif_broadcast_post; +struct HPMHookPoint *HP_clif_broadcast2_pre; +struct HPMHookPoint *HP_clif_broadcast2_post; +struct HPMHookPoint *HP_clif_messagecolor_pre; +struct HPMHookPoint *HP_clif_messagecolor_post; +struct HPMHookPoint *HP_clif_disp_overhead_pre; +struct HPMHookPoint *HP_clif_disp_overhead_post; +struct HPMHookPoint *HP_clif_msg_pre; +struct HPMHookPoint *HP_clif_msg_post; +struct HPMHookPoint *HP_clif_msg_value_pre; +struct HPMHookPoint *HP_clif_msg_value_post; +struct HPMHookPoint *HP_clif_msg_skill_pre; +struct HPMHookPoint *HP_clif_msg_skill_post; +struct HPMHookPoint *HP_clif_msgtable_pre; +struct HPMHookPoint *HP_clif_msgtable_post; +struct HPMHookPoint *HP_clif_msgtable_num_pre; +struct HPMHookPoint *HP_clif_msgtable_num_post; +struct HPMHookPoint *HP_clif_message_pre; +struct HPMHookPoint *HP_clif_message_post; +struct HPMHookPoint *HP_clif_messageln_pre; +struct HPMHookPoint *HP_clif_messageln_post; +struct HPMHookPoint *HP_clif_colormes_pre; +struct HPMHookPoint *HP_clif_colormes_post; +struct HPMHookPoint *HP_clif_process_message_pre; +struct HPMHookPoint *HP_clif_process_message_post; +struct HPMHookPoint *HP_clif_wisexin_pre; +struct HPMHookPoint *HP_clif_wisexin_post; +struct HPMHookPoint *HP_clif_wisall_pre; +struct HPMHookPoint *HP_clif_wisall_post; +struct HPMHookPoint *HP_clif_PMIgnoreList_pre; +struct HPMHookPoint *HP_clif_PMIgnoreList_post; +struct HPMHookPoint *HP_clif_traderequest_pre; +struct HPMHookPoint *HP_clif_traderequest_post; +struct HPMHookPoint *HP_clif_tradestart_pre; +struct HPMHookPoint *HP_clif_tradestart_post; +struct HPMHookPoint *HP_clif_tradeadditem_pre; +struct HPMHookPoint *HP_clif_tradeadditem_post; +struct HPMHookPoint *HP_clif_tradeitemok_pre; +struct HPMHookPoint *HP_clif_tradeitemok_post; +struct HPMHookPoint *HP_clif_tradedeal_lock_pre; +struct HPMHookPoint *HP_clif_tradedeal_lock_post; +struct HPMHookPoint *HP_clif_tradecancelled_pre; +struct HPMHookPoint *HP_clif_tradecancelled_post; +struct HPMHookPoint *HP_clif_tradecompleted_pre; +struct HPMHookPoint *HP_clif_tradecompleted_post; +struct HPMHookPoint *HP_clif_tradeundo_pre; +struct HPMHookPoint *HP_clif_tradeundo_post; +struct HPMHookPoint *HP_clif_openvendingreq_pre; +struct HPMHookPoint *HP_clif_openvendingreq_post; +struct HPMHookPoint *HP_clif_showvendingboard_pre; +struct HPMHookPoint *HP_clif_showvendingboard_post; +struct HPMHookPoint *HP_clif_closevendingboard_pre; +struct HPMHookPoint *HP_clif_closevendingboard_post; +struct HPMHookPoint *HP_clif_vendinglist_pre; +struct HPMHookPoint *HP_clif_vendinglist_post; +struct HPMHookPoint *HP_clif_buyvending_pre; +struct HPMHookPoint *HP_clif_buyvending_post; +struct HPMHookPoint *HP_clif_openvending_pre; +struct HPMHookPoint *HP_clif_openvending_post; +struct HPMHookPoint *HP_clif_vendingreport_pre; +struct HPMHookPoint *HP_clif_vendingreport_post; +struct HPMHookPoint *HP_clif_storagelist_pre; +struct HPMHookPoint *HP_clif_storagelist_post; +struct HPMHookPoint *HP_clif_updatestorageamount_pre; +struct HPMHookPoint *HP_clif_updatestorageamount_post; +struct HPMHookPoint *HP_clif_storageitemadded_pre; +struct HPMHookPoint *HP_clif_storageitemadded_post; +struct HPMHookPoint *HP_clif_storageitemremoved_pre; +struct HPMHookPoint *HP_clif_storageitemremoved_post; +struct HPMHookPoint *HP_clif_storageclose_pre; +struct HPMHookPoint *HP_clif_storageclose_post; +struct HPMHookPoint *HP_clif_skillinfoblock_pre; +struct HPMHookPoint *HP_clif_skillinfoblock_post; +struct HPMHookPoint *HP_clif_skillup_pre; +struct HPMHookPoint *HP_clif_skillup_post; +struct HPMHookPoint *HP_clif_skillinfo_pre; +struct HPMHookPoint *HP_clif_skillinfo_post; +struct HPMHookPoint *HP_clif_addskill_pre; +struct HPMHookPoint *HP_clif_addskill_post; +struct HPMHookPoint *HP_clif_deleteskill_pre; +struct HPMHookPoint *HP_clif_deleteskill_post; +struct HPMHookPoint *HP_clif_party_created_pre; +struct HPMHookPoint *HP_clif_party_created_post; +struct HPMHookPoint *HP_clif_party_member_info_pre; +struct HPMHookPoint *HP_clif_party_member_info_post; +struct HPMHookPoint *HP_clif_party_info_pre; +struct HPMHookPoint *HP_clif_party_info_post; +struct HPMHookPoint *HP_clif_party_invite_pre; +struct HPMHookPoint *HP_clif_party_invite_post; +struct HPMHookPoint *HP_clif_party_inviteack_pre; +struct HPMHookPoint *HP_clif_party_inviteack_post; +struct HPMHookPoint *HP_clif_party_option_pre; +struct HPMHookPoint *HP_clif_party_option_post; +struct HPMHookPoint *HP_clif_party_withdraw_pre; +struct HPMHookPoint *HP_clif_party_withdraw_post; +struct HPMHookPoint *HP_clif_party_message_pre; +struct HPMHookPoint *HP_clif_party_message_post; +struct HPMHookPoint *HP_clif_party_xy_pre; +struct HPMHookPoint *HP_clif_party_xy_post; +struct HPMHookPoint *HP_clif_party_xy_single_pre; +struct HPMHookPoint *HP_clif_party_xy_single_post; +struct HPMHookPoint *HP_clif_party_hp_pre; +struct HPMHookPoint *HP_clif_party_hp_post; +struct HPMHookPoint *HP_clif_party_xy_remove_pre; +struct HPMHookPoint *HP_clif_party_xy_remove_post; +struct HPMHookPoint *HP_clif_party_show_picker_pre; +struct HPMHookPoint *HP_clif_party_show_picker_post; +struct HPMHookPoint *HP_clif_partyinvitationstate_pre; +struct HPMHookPoint *HP_clif_partyinvitationstate_post; +struct HPMHookPoint *HP_clif_guild_created_pre; +struct HPMHookPoint *HP_clif_guild_created_post; +struct HPMHookPoint *HP_clif_guild_belonginfo_pre; +struct HPMHookPoint *HP_clif_guild_belonginfo_post; +struct HPMHookPoint *HP_clif_guild_masterormember_pre; +struct HPMHookPoint *HP_clif_guild_masterormember_post; +struct HPMHookPoint *HP_clif_guild_basicinfo_pre; +struct HPMHookPoint *HP_clif_guild_basicinfo_post; +struct HPMHookPoint *HP_clif_guild_allianceinfo_pre; +struct HPMHookPoint *HP_clif_guild_allianceinfo_post; +struct HPMHookPoint *HP_clif_guild_memberlist_pre; +struct HPMHookPoint *HP_clif_guild_memberlist_post; +struct HPMHookPoint *HP_clif_guild_skillinfo_pre; +struct HPMHookPoint *HP_clif_guild_skillinfo_post; +struct HPMHookPoint *HP_clif_guild_send_onlineinfo_pre; +struct HPMHookPoint *HP_clif_guild_send_onlineinfo_post; +struct HPMHookPoint *HP_clif_guild_memberlogin_notice_pre; +struct HPMHookPoint *HP_clif_guild_memberlogin_notice_post; +struct HPMHookPoint *HP_clif_guild_invite_pre; +struct HPMHookPoint *HP_clif_guild_invite_post; +struct HPMHookPoint *HP_clif_guild_inviteack_pre; +struct HPMHookPoint *HP_clif_guild_inviteack_post; +struct HPMHookPoint *HP_clif_guild_leave_pre; +struct HPMHookPoint *HP_clif_guild_leave_post; +struct HPMHookPoint *HP_clif_guild_expulsion_pre; +struct HPMHookPoint *HP_clif_guild_expulsion_post; +struct HPMHookPoint *HP_clif_guild_positionchanged_pre; +struct HPMHookPoint *HP_clif_guild_positionchanged_post; +struct HPMHookPoint *HP_clif_guild_memberpositionchanged_pre; +struct HPMHookPoint *HP_clif_guild_memberpositionchanged_post; +struct HPMHookPoint *HP_clif_guild_emblem_pre; +struct HPMHookPoint *HP_clif_guild_emblem_post; +struct HPMHookPoint *HP_clif_guild_emblem_area_pre; +struct HPMHookPoint *HP_clif_guild_emblem_area_post; +struct HPMHookPoint *HP_clif_guild_notice_pre; +struct HPMHookPoint *HP_clif_guild_notice_post; +struct HPMHookPoint *HP_clif_guild_message_pre; +struct HPMHookPoint *HP_clif_guild_message_post; +struct HPMHookPoint *HP_clif_guild_skillup_pre; +struct HPMHookPoint *HP_clif_guild_skillup_post; +struct HPMHookPoint *HP_clif_guild_reqalliance_pre; +struct HPMHookPoint *HP_clif_guild_reqalliance_post; +struct HPMHookPoint *HP_clif_guild_allianceack_pre; +struct HPMHookPoint *HP_clif_guild_allianceack_post; +struct HPMHookPoint *HP_clif_guild_delalliance_pre; +struct HPMHookPoint *HP_clif_guild_delalliance_post; +struct HPMHookPoint *HP_clif_guild_oppositionack_pre; +struct HPMHookPoint *HP_clif_guild_oppositionack_post; +struct HPMHookPoint *HP_clif_guild_broken_pre; +struct HPMHookPoint *HP_clif_guild_broken_post; +struct HPMHookPoint *HP_clif_guild_xy_pre; +struct HPMHookPoint *HP_clif_guild_xy_post; +struct HPMHookPoint *HP_clif_guild_xy_single_pre; +struct HPMHookPoint *HP_clif_guild_xy_single_post; +struct HPMHookPoint *HP_clif_guild_xy_remove_pre; +struct HPMHookPoint *HP_clif_guild_xy_remove_post; +struct HPMHookPoint *HP_clif_guild_positionnamelist_pre; +struct HPMHookPoint *HP_clif_guild_positionnamelist_post; +struct HPMHookPoint *HP_clif_guild_positioninfolist_pre; +struct HPMHookPoint *HP_clif_guild_positioninfolist_post; +struct HPMHookPoint *HP_clif_guild_expulsionlist_pre; +struct HPMHookPoint *HP_clif_guild_expulsionlist_post; +struct HPMHookPoint *HP_clif_validate_emblem_pre; +struct HPMHookPoint *HP_clif_validate_emblem_post; +struct HPMHookPoint *HP_clif_bg_hp_pre; +struct HPMHookPoint *HP_clif_bg_hp_post; +struct HPMHookPoint *HP_clif_bg_xy_pre; +struct HPMHookPoint *HP_clif_bg_xy_post; +struct HPMHookPoint *HP_clif_bg_xy_remove_pre; +struct HPMHookPoint *HP_clif_bg_xy_remove_post; +struct HPMHookPoint *HP_clif_bg_message_pre; +struct HPMHookPoint *HP_clif_bg_message_post; +struct HPMHookPoint *HP_clif_bg_updatescore_pre; +struct HPMHookPoint *HP_clif_bg_updatescore_post; +struct HPMHookPoint *HP_clif_bg_updatescore_single_pre; +struct HPMHookPoint *HP_clif_bg_updatescore_single_post; +struct HPMHookPoint *HP_clif_sendbgemblem_area_pre; +struct HPMHookPoint *HP_clif_sendbgemblem_area_post; +struct HPMHookPoint *HP_clif_sendbgemblem_single_pre; +struct HPMHookPoint *HP_clif_sendbgemblem_single_post; +struct HPMHookPoint *HP_clif_instance_pre; +struct HPMHookPoint *HP_clif_instance_post; +struct HPMHookPoint *HP_clif_instance_join_pre; +struct HPMHookPoint *HP_clif_instance_join_post; +struct HPMHookPoint *HP_clif_instance_leave_pre; +struct HPMHookPoint *HP_clif_instance_leave_post; +struct HPMHookPoint *HP_clif_catch_process_pre; +struct HPMHookPoint *HP_clif_catch_process_post; +struct HPMHookPoint *HP_clif_pet_roulette_pre; +struct HPMHookPoint *HP_clif_pet_roulette_post; +struct HPMHookPoint *HP_clif_sendegg_pre; +struct HPMHookPoint *HP_clif_sendegg_post; +struct HPMHookPoint *HP_clif_send_petstatus_pre; +struct HPMHookPoint *HP_clif_send_petstatus_post; +struct HPMHookPoint *HP_clif_send_petdata_pre; +struct HPMHookPoint *HP_clif_send_petdata_post; +struct HPMHookPoint *HP_clif_pet_emotion_pre; +struct HPMHookPoint *HP_clif_pet_emotion_post; +struct HPMHookPoint *HP_clif_pet_food_pre; +struct HPMHookPoint *HP_clif_pet_food_post; +struct HPMHookPoint *HP_clif_friendslist_toggle_sub_pre; +struct HPMHookPoint *HP_clif_friendslist_toggle_sub_post; +struct HPMHookPoint *HP_clif_friendslist_send_pre; +struct HPMHookPoint *HP_clif_friendslist_send_post; +struct HPMHookPoint *HP_clif_friendslist_reqack_pre; +struct HPMHookPoint *HP_clif_friendslist_reqack_post; +struct HPMHookPoint *HP_clif_friendslist_toggle_pre; +struct HPMHookPoint *HP_clif_friendslist_toggle_post; +struct HPMHookPoint *HP_clif_friendlist_req_pre; +struct HPMHookPoint *HP_clif_friendlist_req_post; +struct HPMHookPoint *HP_clif_GM_kickack_pre; +struct HPMHookPoint *HP_clif_GM_kickack_post; +struct HPMHookPoint *HP_clif_GM_kick_pre; +struct HPMHookPoint *HP_clif_GM_kick_post; +struct HPMHookPoint *HP_clif_manner_message_pre; +struct HPMHookPoint *HP_clif_manner_message_post; +struct HPMHookPoint *HP_clif_GM_silence_pre; +struct HPMHookPoint *HP_clif_GM_silence_post; +struct HPMHookPoint *HP_clif_account_name_pre; +struct HPMHookPoint *HP_clif_account_name_post; +struct HPMHookPoint *HP_clif_check_pre; +struct HPMHookPoint *HP_clif_check_post; +struct HPMHookPoint *HP_clif_hominfo_pre; +struct HPMHookPoint *HP_clif_hominfo_post; +struct HPMHookPoint *HP_clif_homskillinfoblock_pre; +struct HPMHookPoint *HP_clif_homskillinfoblock_post; +struct HPMHookPoint *HP_clif_homskillup_pre; +struct HPMHookPoint *HP_clif_homskillup_post; +struct HPMHookPoint *HP_clif_hom_food_pre; +struct HPMHookPoint *HP_clif_hom_food_post; +struct HPMHookPoint *HP_clif_send_homdata_pre; +struct HPMHookPoint *HP_clif_send_homdata_post; +struct HPMHookPoint *HP_clif_quest_send_list_pre; +struct HPMHookPoint *HP_clif_quest_send_list_post; +struct HPMHookPoint *HP_clif_quest_send_mission_pre; +struct HPMHookPoint *HP_clif_quest_send_mission_post; +struct HPMHookPoint *HP_clif_quest_add_pre; +struct HPMHookPoint *HP_clif_quest_add_post; +struct HPMHookPoint *HP_clif_quest_delete_pre; +struct HPMHookPoint *HP_clif_quest_delete_post; +struct HPMHookPoint *HP_clif_quest_update_status_pre; +struct HPMHookPoint *HP_clif_quest_update_status_post; +struct HPMHookPoint *HP_clif_quest_update_objective_pre; +struct HPMHookPoint *HP_clif_quest_update_objective_post; +struct HPMHookPoint *HP_clif_quest_show_event_pre; +struct HPMHookPoint *HP_clif_quest_show_event_post; +struct HPMHookPoint *HP_clif_mail_window_pre; +struct HPMHookPoint *HP_clif_mail_window_post; +struct HPMHookPoint *HP_clif_mail_read_pre; +struct HPMHookPoint *HP_clif_mail_read_post; +struct HPMHookPoint *HP_clif_mail_delete_pre; +struct HPMHookPoint *HP_clif_mail_delete_post; +struct HPMHookPoint *HP_clif_mail_return_pre; +struct HPMHookPoint *HP_clif_mail_return_post; +struct HPMHookPoint *HP_clif_mail_send_pre; +struct HPMHookPoint *HP_clif_mail_send_post; +struct HPMHookPoint *HP_clif_mail_new_pre; +struct HPMHookPoint *HP_clif_mail_new_post; +struct HPMHookPoint *HP_clif_mail_refreshinbox_pre; +struct HPMHookPoint *HP_clif_mail_refreshinbox_post; +struct HPMHookPoint *HP_clif_mail_getattachment_pre; +struct HPMHookPoint *HP_clif_mail_getattachment_post; +struct HPMHookPoint *HP_clif_mail_setattachment_pre; +struct HPMHookPoint *HP_clif_mail_setattachment_post; +struct HPMHookPoint *HP_clif_auction_openwindow_pre; +struct HPMHookPoint *HP_clif_auction_openwindow_post; +struct HPMHookPoint *HP_clif_auction_results_pre; +struct HPMHookPoint *HP_clif_auction_results_post; +struct HPMHookPoint *HP_clif_auction_message_pre; +struct HPMHookPoint *HP_clif_auction_message_post; +struct HPMHookPoint *HP_clif_auction_close_pre; +struct HPMHookPoint *HP_clif_auction_close_post; +struct HPMHookPoint *HP_clif_auction_setitem_pre; +struct HPMHookPoint *HP_clif_auction_setitem_post; +struct HPMHookPoint *HP_clif_mercenary_info_pre; +struct HPMHookPoint *HP_clif_mercenary_info_post; +struct HPMHookPoint *HP_clif_mercenary_skillblock_pre; +struct HPMHookPoint *HP_clif_mercenary_skillblock_post; +struct HPMHookPoint *HP_clif_mercenary_message_pre; +struct HPMHookPoint *HP_clif_mercenary_message_post; +struct HPMHookPoint *HP_clif_mercenary_updatestatus_pre; +struct HPMHookPoint *HP_clif_mercenary_updatestatus_post; +struct HPMHookPoint *HP_clif_rental_time_pre; +struct HPMHookPoint *HP_clif_rental_time_post; +struct HPMHookPoint *HP_clif_rental_expired_pre; +struct HPMHookPoint *HP_clif_rental_expired_post; +struct HPMHookPoint *HP_clif_PartyBookingRegisterAck_pre; +struct HPMHookPoint *HP_clif_PartyBookingRegisterAck_post; +struct HPMHookPoint *HP_clif_PartyBookingDeleteAck_pre; +struct HPMHookPoint *HP_clif_PartyBookingDeleteAck_post; +struct HPMHookPoint *HP_clif_PartyBookingSearchAck_pre; +struct HPMHookPoint *HP_clif_PartyBookingSearchAck_post; +struct HPMHookPoint *HP_clif_PartyBookingUpdateNotify_pre; +struct HPMHookPoint *HP_clif_PartyBookingUpdateNotify_post; +struct HPMHookPoint *HP_clif_PartyBookingDeleteNotify_pre; +struct HPMHookPoint *HP_clif_PartyBookingDeleteNotify_post; +struct HPMHookPoint *HP_clif_PartyBookingInsertNotify_pre; +struct HPMHookPoint *HP_clif_PartyBookingInsertNotify_post; +struct HPMHookPoint *HP_clif_PartyBookingVolunteerInfo_pre; +struct HPMHookPoint *HP_clif_PartyBookingVolunteerInfo_post; +struct HPMHookPoint *HP_clif_PartyBookingRefuseVolunteer_pre; +struct HPMHookPoint *HP_clif_PartyBookingRefuseVolunteer_post; +struct HPMHookPoint *HP_clif_PartyBookingCancelVolunteer_pre; +struct HPMHookPoint *HP_clif_PartyBookingCancelVolunteer_post; +struct HPMHookPoint *HP_clif_PartyBookingAddFilteringList_pre; +struct HPMHookPoint *HP_clif_PartyBookingAddFilteringList_post; +struct HPMHookPoint *HP_clif_PartyBookingSubFilteringList_pre; +struct HPMHookPoint *HP_clif_PartyBookingSubFilteringList_post; +struct HPMHookPoint *HP_clif_buyingstore_open_pre; +struct HPMHookPoint *HP_clif_buyingstore_open_post; +struct HPMHookPoint *HP_clif_buyingstore_open_failed_pre; +struct HPMHookPoint *HP_clif_buyingstore_open_failed_post; +struct HPMHookPoint *HP_clif_buyingstore_myitemlist_pre; +struct HPMHookPoint *HP_clif_buyingstore_myitemlist_post; +struct HPMHookPoint *HP_clif_buyingstore_entry_pre; +struct HPMHookPoint *HP_clif_buyingstore_entry_post; +struct HPMHookPoint *HP_clif_buyingstore_entry_single_pre; +struct HPMHookPoint *HP_clif_buyingstore_entry_single_post; +struct HPMHookPoint *HP_clif_buyingstore_disappear_entry_pre; +struct HPMHookPoint *HP_clif_buyingstore_disappear_entry_post; +struct HPMHookPoint *HP_clif_buyingstore_disappear_entry_single_pre; +struct HPMHookPoint *HP_clif_buyingstore_disappear_entry_single_post; +struct HPMHookPoint *HP_clif_buyingstore_itemlist_pre; +struct HPMHookPoint *HP_clif_buyingstore_itemlist_post; +struct HPMHookPoint *HP_clif_buyingstore_trade_failed_buyer_pre; +struct HPMHookPoint *HP_clif_buyingstore_trade_failed_buyer_post; +struct HPMHookPoint *HP_clif_buyingstore_update_item_pre; +struct HPMHookPoint *HP_clif_buyingstore_update_item_post; +struct HPMHookPoint *HP_clif_buyingstore_delete_item_pre; +struct HPMHookPoint *HP_clif_buyingstore_delete_item_post; +struct HPMHookPoint *HP_clif_buyingstore_trade_failed_seller_pre; +struct HPMHookPoint *HP_clif_buyingstore_trade_failed_seller_post; +struct HPMHookPoint *HP_clif_search_store_info_ack_pre; +struct HPMHookPoint *HP_clif_search_store_info_ack_post; +struct HPMHookPoint *HP_clif_search_store_info_failed_pre; +struct HPMHookPoint *HP_clif_search_store_info_failed_post; +struct HPMHookPoint *HP_clif_open_search_store_info_pre; +struct HPMHookPoint *HP_clif_open_search_store_info_post; +struct HPMHookPoint *HP_clif_search_store_info_click_ack_pre; +struct HPMHookPoint *HP_clif_search_store_info_click_ack_post; +struct HPMHookPoint *HP_clif_elemental_info_pre; +struct HPMHookPoint *HP_clif_elemental_info_post; +struct HPMHookPoint *HP_clif_elemental_updatestatus_pre; +struct HPMHookPoint *HP_clif_elemental_updatestatus_post; +struct HPMHookPoint *HP_clif_bgqueue_ack_pre; +struct HPMHookPoint *HP_clif_bgqueue_ack_post; +struct HPMHookPoint *HP_clif_bgqueue_notice_delete_pre; +struct HPMHookPoint *HP_clif_bgqueue_notice_delete_post; +struct HPMHookPoint *HP_clif_bgqueue_update_info_pre; +struct HPMHookPoint *HP_clif_bgqueue_update_info_post; +struct HPMHookPoint *HP_clif_bgqueue_joined_pre; +struct HPMHookPoint *HP_clif_bgqueue_joined_post; +struct HPMHookPoint *HP_clif_bgqueue_pcleft_pre; +struct HPMHookPoint *HP_clif_bgqueue_pcleft_post; +struct HPMHookPoint *HP_clif_bgqueue_battlebegins_pre; +struct HPMHookPoint *HP_clif_bgqueue_battlebegins_post; +struct HPMHookPoint *HP_clif_adopt_reply_pre; +struct HPMHookPoint *HP_clif_adopt_reply_post; +struct HPMHookPoint *HP_clif_adopt_request_pre; +struct HPMHookPoint *HP_clif_adopt_request_post; +struct HPMHookPoint *HP_clif_readbook_pre; +struct HPMHookPoint *HP_clif_readbook_post; +struct HPMHookPoint *HP_clif_notify_time_pre; +struct HPMHookPoint *HP_clif_notify_time_post; +struct HPMHookPoint *HP_clif_user_count_pre; +struct HPMHookPoint *HP_clif_user_count_post; +struct HPMHookPoint *HP_clif_noask_sub_pre; +struct HPMHookPoint *HP_clif_noask_sub_post; +struct HPMHookPoint *HP_clif_bc_ready_pre; +struct HPMHookPoint *HP_clif_bc_ready_post; +struct HPMHookPoint *HP_clif_undisguise_timer_pre; +struct HPMHookPoint *HP_clif_undisguise_timer_post; +struct HPMHookPoint *HP_clif_chsys_create_pre; +struct HPMHookPoint *HP_clif_chsys_create_post; +struct HPMHookPoint *HP_clif_chsys_msg_pre; +struct HPMHookPoint *HP_clif_chsys_msg_post; +struct HPMHookPoint *HP_clif_chsys_msg2_pre; +struct HPMHookPoint *HP_clif_chsys_msg2_post; +struct HPMHookPoint *HP_clif_chsys_send_pre; +struct HPMHookPoint *HP_clif_chsys_send_post; +struct HPMHookPoint *HP_clif_chsys_join_pre; +struct HPMHookPoint *HP_clif_chsys_join_post; +struct HPMHookPoint *HP_clif_chsys_left_pre; +struct HPMHookPoint *HP_clif_chsys_left_post; +struct HPMHookPoint *HP_clif_chsys_delete_pre; +struct HPMHookPoint *HP_clif_chsys_delete_post; +struct HPMHookPoint *HP_clif_chsys_mjoin_pre; +struct HPMHookPoint *HP_clif_chsys_mjoin_post; +struct HPMHookPoint *HP_clif_chsys_quit_pre; +struct HPMHookPoint *HP_clif_chsys_quit_post; +struct HPMHookPoint *HP_clif_chsys_quitg_pre; +struct HPMHookPoint *HP_clif_chsys_quitg_post; +struct HPMHookPoint *HP_clif_chsys_gjoin_pre; +struct HPMHookPoint *HP_clif_chsys_gjoin_post; +struct HPMHookPoint *HP_clif_chsys_gleave_pre; +struct HPMHookPoint *HP_clif_chsys_gleave_post; +struct HPMHookPoint *HP_clif_pWantToConnection_pre; +struct HPMHookPoint *HP_clif_pWantToConnection_post; +struct HPMHookPoint *HP_clif_pLoadEndAck_pre; +struct HPMHookPoint *HP_clif_pLoadEndAck_post; +struct HPMHookPoint *HP_clif_pTickSend_pre; +struct HPMHookPoint *HP_clif_pTickSend_post; +struct HPMHookPoint *HP_clif_pHotkey_pre; +struct HPMHookPoint *HP_clif_pHotkey_post; +struct HPMHookPoint *HP_clif_pProgressbar_pre; +struct HPMHookPoint *HP_clif_pProgressbar_post; +struct HPMHookPoint *HP_clif_pWalkToXY_pre; +struct HPMHookPoint *HP_clif_pWalkToXY_post; +struct HPMHookPoint *HP_clif_pQuitGame_pre; +struct HPMHookPoint *HP_clif_pQuitGame_post; +struct HPMHookPoint *HP_clif_pGetCharNameRequest_pre; +struct HPMHookPoint *HP_clif_pGetCharNameRequest_post; +struct HPMHookPoint *HP_clif_pGlobalMessage_pre; +struct HPMHookPoint *HP_clif_pGlobalMessage_post; +struct HPMHookPoint *HP_clif_pMapMove_pre; +struct HPMHookPoint *HP_clif_pMapMove_post; +struct HPMHookPoint *HP_clif_pChangeDir_pre; +struct HPMHookPoint *HP_clif_pChangeDir_post; +struct HPMHookPoint *HP_clif_pEmotion_pre; +struct HPMHookPoint *HP_clif_pEmotion_post; +struct HPMHookPoint *HP_clif_pHowManyConnections_pre; +struct HPMHookPoint *HP_clif_pHowManyConnections_post; +struct HPMHookPoint *HP_clif_pActionRequest_pre; +struct HPMHookPoint *HP_clif_pActionRequest_post; +struct HPMHookPoint *HP_clif_pActionRequest_sub_pre; +struct HPMHookPoint *HP_clif_pActionRequest_sub_post; +struct HPMHookPoint *HP_clif_pRestart_pre; +struct HPMHookPoint *HP_clif_pRestart_post; +struct HPMHookPoint *HP_clif_pWisMessage_pre; +struct HPMHookPoint *HP_clif_pWisMessage_post; +struct HPMHookPoint *HP_clif_pBroadcast_pre; +struct HPMHookPoint *HP_clif_pBroadcast_post; +struct HPMHookPoint *HP_clif_pTakeItem_pre; +struct HPMHookPoint *HP_clif_pTakeItem_post; +struct HPMHookPoint *HP_clif_pDropItem_pre; +struct HPMHookPoint *HP_clif_pDropItem_post; +struct HPMHookPoint *HP_clif_pUseItem_pre; +struct HPMHookPoint *HP_clif_pUseItem_post; +struct HPMHookPoint *HP_clif_pEquipItem_pre; +struct HPMHookPoint *HP_clif_pEquipItem_post; +struct HPMHookPoint *HP_clif_pUnequipItem_pre; +struct HPMHookPoint *HP_clif_pUnequipItem_post; +struct HPMHookPoint *HP_clif_pNpcClicked_pre; +struct HPMHookPoint *HP_clif_pNpcClicked_post; +struct HPMHookPoint *HP_clif_pNpcBuySellSelected_pre; +struct HPMHookPoint *HP_clif_pNpcBuySellSelected_post; +struct HPMHookPoint *HP_clif_pNpcBuyListSend_pre; +struct HPMHookPoint *HP_clif_pNpcBuyListSend_post; +struct HPMHookPoint *HP_clif_pNpcSellListSend_pre; +struct HPMHookPoint *HP_clif_pNpcSellListSend_post; +struct HPMHookPoint *HP_clif_pCreateChatRoom_pre; +struct HPMHookPoint *HP_clif_pCreateChatRoom_post; +struct HPMHookPoint *HP_clif_pChatAddMember_pre; +struct HPMHookPoint *HP_clif_pChatAddMember_post; +struct HPMHookPoint *HP_clif_pChatRoomStatusChange_pre; +struct HPMHookPoint *HP_clif_pChatRoomStatusChange_post; +struct HPMHookPoint *HP_clif_pChangeChatOwner_pre; +struct HPMHookPoint *HP_clif_pChangeChatOwner_post; +struct HPMHookPoint *HP_clif_pKickFromChat_pre; +struct HPMHookPoint *HP_clif_pKickFromChat_post; +struct HPMHookPoint *HP_clif_pChatLeave_pre; +struct HPMHookPoint *HP_clif_pChatLeave_post; +struct HPMHookPoint *HP_clif_pTradeRequest_pre; +struct HPMHookPoint *HP_clif_pTradeRequest_post; +struct HPMHookPoint *HP_clif_chann_config_read_pre; +struct HPMHookPoint *HP_clif_chann_config_read_post; +struct HPMHookPoint *HP_clif_pTradeAck_pre; +struct HPMHookPoint *HP_clif_pTradeAck_post; +struct HPMHookPoint *HP_clif_pTradeAddItem_pre; +struct HPMHookPoint *HP_clif_pTradeAddItem_post; +struct HPMHookPoint *HP_clif_pTradeOk_pre; +struct HPMHookPoint *HP_clif_pTradeOk_post; +struct HPMHookPoint *HP_clif_pTradeCancel_pre; +struct HPMHookPoint *HP_clif_pTradeCancel_post; +struct HPMHookPoint *HP_clif_pTradeCommit_pre; +struct HPMHookPoint *HP_clif_pTradeCommit_post; +struct HPMHookPoint *HP_clif_pStopAttack_pre; +struct HPMHookPoint *HP_clif_pStopAttack_post; +struct HPMHookPoint *HP_clif_pPutItemToCart_pre; +struct HPMHookPoint *HP_clif_pPutItemToCart_post; +struct HPMHookPoint *HP_clif_pGetItemFromCart_pre; +struct HPMHookPoint *HP_clif_pGetItemFromCart_post; +struct HPMHookPoint *HP_clif_pRemoveOption_pre; +struct HPMHookPoint *HP_clif_pRemoveOption_post; +struct HPMHookPoint *HP_clif_pChangeCart_pre; +struct HPMHookPoint *HP_clif_pChangeCart_post; +struct HPMHookPoint *HP_clif_pStatusUp_pre; +struct HPMHookPoint *HP_clif_pStatusUp_post; +struct HPMHookPoint *HP_clif_pSkillUp_pre; +struct HPMHookPoint *HP_clif_pSkillUp_post; +struct HPMHookPoint *HP_clif_pUseSkillToId_pre; +struct HPMHookPoint *HP_clif_pUseSkillToId_post; +struct HPMHookPoint *HP_clif_pUseSkillToId_homun_pre; +struct HPMHookPoint *HP_clif_pUseSkillToId_homun_post; +struct HPMHookPoint *HP_clif_pUseSkillToId_mercenary_pre; +struct HPMHookPoint *HP_clif_pUseSkillToId_mercenary_post; +struct HPMHookPoint *HP_clif_pUseSkillToPos_pre; +struct HPMHookPoint *HP_clif_pUseSkillToPos_post; +struct HPMHookPoint *HP_clif_pUseSkillToPosSub_pre; +struct HPMHookPoint *HP_clif_pUseSkillToPosSub_post; +struct HPMHookPoint *HP_clif_pUseSkillToPos_homun_pre; +struct HPMHookPoint *HP_clif_pUseSkillToPos_homun_post; +struct HPMHookPoint *HP_clif_pUseSkillToPos_mercenary_pre; +struct HPMHookPoint *HP_clif_pUseSkillToPos_mercenary_post; +struct HPMHookPoint *HP_clif_pUseSkillToPosMoreInfo_pre; +struct HPMHookPoint *HP_clif_pUseSkillToPosMoreInfo_post; +struct HPMHookPoint *HP_clif_pUseSkillMap_pre; +struct HPMHookPoint *HP_clif_pUseSkillMap_post; +struct HPMHookPoint *HP_clif_pRequestMemo_pre; +struct HPMHookPoint *HP_clif_pRequestMemo_post; +struct HPMHookPoint *HP_clif_pProduceMix_pre; +struct HPMHookPoint *HP_clif_pProduceMix_post; +struct HPMHookPoint *HP_clif_pCooking_pre; +struct HPMHookPoint *HP_clif_pCooking_post; +struct HPMHookPoint *HP_clif_pRepairItem_pre; +struct HPMHookPoint *HP_clif_pRepairItem_post; +struct HPMHookPoint *HP_clif_pWeaponRefine_pre; +struct HPMHookPoint *HP_clif_pWeaponRefine_post; +struct HPMHookPoint *HP_clif_pNpcSelectMenu_pre; +struct HPMHookPoint *HP_clif_pNpcSelectMenu_post; +struct HPMHookPoint *HP_clif_pNpcNextClicked_pre; +struct HPMHookPoint *HP_clif_pNpcNextClicked_post; +struct HPMHookPoint *HP_clif_pNpcAmountInput_pre; +struct HPMHookPoint *HP_clif_pNpcAmountInput_post; +struct HPMHookPoint *HP_clif_pNpcStringInput_pre; +struct HPMHookPoint *HP_clif_pNpcStringInput_post; +struct HPMHookPoint *HP_clif_pNpcCloseClicked_pre; +struct HPMHookPoint *HP_clif_pNpcCloseClicked_post; +struct HPMHookPoint *HP_clif_pItemIdentify_pre; +struct HPMHookPoint *HP_clif_pItemIdentify_post; +struct HPMHookPoint *HP_clif_pSelectArrow_pre; +struct HPMHookPoint *HP_clif_pSelectArrow_post; +struct HPMHookPoint *HP_clif_pAutoSpell_pre; +struct HPMHookPoint *HP_clif_pAutoSpell_post; +struct HPMHookPoint *HP_clif_pUseCard_pre; +struct HPMHookPoint *HP_clif_pUseCard_post; +struct HPMHookPoint *HP_clif_pInsertCard_pre; +struct HPMHookPoint *HP_clif_pInsertCard_post; +struct HPMHookPoint *HP_clif_pSolveCharName_pre; +struct HPMHookPoint *HP_clif_pSolveCharName_post; +struct HPMHookPoint *HP_clif_pResetChar_pre; +struct HPMHookPoint *HP_clif_pResetChar_post; +struct HPMHookPoint *HP_clif_pLocalBroadcast_pre; +struct HPMHookPoint *HP_clif_pLocalBroadcast_post; +struct HPMHookPoint *HP_clif_pMoveToKafra_pre; +struct HPMHookPoint *HP_clif_pMoveToKafra_post; +struct HPMHookPoint *HP_clif_pMoveFromKafra_pre; +struct HPMHookPoint *HP_clif_pMoveFromKafra_post; +struct HPMHookPoint *HP_clif_pMoveToKafraFromCart_pre; +struct HPMHookPoint *HP_clif_pMoveToKafraFromCart_post; +struct HPMHookPoint *HP_clif_pMoveFromKafraToCart_pre; +struct HPMHookPoint *HP_clif_pMoveFromKafraToCart_post; +struct HPMHookPoint *HP_clif_pCloseKafra_pre; +struct HPMHookPoint *HP_clif_pCloseKafra_post; +struct HPMHookPoint *HP_clif_pStoragePassword_pre; +struct HPMHookPoint *HP_clif_pStoragePassword_post; +struct HPMHookPoint *HP_clif_pCreateParty_pre; +struct HPMHookPoint *HP_clif_pCreateParty_post; +struct HPMHookPoint *HP_clif_pCreateParty2_pre; +struct HPMHookPoint *HP_clif_pCreateParty2_post; +struct HPMHookPoint *HP_clif_pPartyInvite_pre; +struct HPMHookPoint *HP_clif_pPartyInvite_post; +struct HPMHookPoint *HP_clif_pPartyInvite2_pre; +struct HPMHookPoint *HP_clif_pPartyInvite2_post; +struct HPMHookPoint *HP_clif_pReplyPartyInvite_pre; +struct HPMHookPoint *HP_clif_pReplyPartyInvite_post; +struct HPMHookPoint *HP_clif_pReplyPartyInvite2_pre; +struct HPMHookPoint *HP_clif_pReplyPartyInvite2_post; +struct HPMHookPoint *HP_clif_pLeaveParty_pre; +struct HPMHookPoint *HP_clif_pLeaveParty_post; +struct HPMHookPoint *HP_clif_pRemovePartyMember_pre; +struct HPMHookPoint *HP_clif_pRemovePartyMember_post; +struct HPMHookPoint *HP_clif_pPartyChangeOption_pre; +struct HPMHookPoint *HP_clif_pPartyChangeOption_post; +struct HPMHookPoint *HP_clif_pPartyMessage_pre; +struct HPMHookPoint *HP_clif_pPartyMessage_post; +struct HPMHookPoint *HP_clif_pPartyChangeLeader_pre; +struct HPMHookPoint *HP_clif_pPartyChangeLeader_post; +struct HPMHookPoint *HP_clif_pPartyBookingRegisterReq_pre; +struct HPMHookPoint *HP_clif_pPartyBookingRegisterReq_post; +struct HPMHookPoint *HP_clif_pPartyBookingSearchReq_pre; +struct HPMHookPoint *HP_clif_pPartyBookingSearchReq_post; +struct HPMHookPoint *HP_clif_pPartyBookingDeleteReq_pre; +struct HPMHookPoint *HP_clif_pPartyBookingDeleteReq_post; +struct HPMHookPoint *HP_clif_pPartyBookingUpdateReq_pre; +struct HPMHookPoint *HP_clif_pPartyBookingUpdateReq_post; +struct HPMHookPoint *HP_clif_pCloseVending_pre; +struct HPMHookPoint *HP_clif_pCloseVending_post; +struct HPMHookPoint *HP_clif_pVendingListReq_pre; +struct HPMHookPoint *HP_clif_pVendingListReq_post; +struct HPMHookPoint *HP_clif_pPurchaseReq_pre; +struct HPMHookPoint *HP_clif_pPurchaseReq_post; +struct HPMHookPoint *HP_clif_pPurchaseReq2_pre; +struct HPMHookPoint *HP_clif_pPurchaseReq2_post; +struct HPMHookPoint *HP_clif_pOpenVending_pre; +struct HPMHookPoint *HP_clif_pOpenVending_post; +struct HPMHookPoint *HP_clif_pCreateGuild_pre; +struct HPMHookPoint *HP_clif_pCreateGuild_post; +struct HPMHookPoint *HP_clif_pGuildCheckMaster_pre; +struct HPMHookPoint *HP_clif_pGuildCheckMaster_post; +struct HPMHookPoint *HP_clif_pGuildRequestInfo_pre; +struct HPMHookPoint *HP_clif_pGuildRequestInfo_post; +struct HPMHookPoint *HP_clif_pGuildChangePositionInfo_pre; +struct HPMHookPoint *HP_clif_pGuildChangePositionInfo_post; +struct HPMHookPoint *HP_clif_pGuildChangeMemberPosition_pre; +struct HPMHookPoint *HP_clif_pGuildChangeMemberPosition_post; +struct HPMHookPoint *HP_clif_pGuildRequestEmblem_pre; +struct HPMHookPoint *HP_clif_pGuildRequestEmblem_post; +struct HPMHookPoint *HP_clif_pGuildChangeEmblem_pre; +struct HPMHookPoint *HP_clif_pGuildChangeEmblem_post; +struct HPMHookPoint *HP_clif_pGuildChangeNotice_pre; +struct HPMHookPoint *HP_clif_pGuildChangeNotice_post; +struct HPMHookPoint *HP_clif_pGuildInvite_pre; +struct HPMHookPoint *HP_clif_pGuildInvite_post; +struct HPMHookPoint *HP_clif_pGuildReplyInvite_pre; +struct HPMHookPoint *HP_clif_pGuildReplyInvite_post; +struct HPMHookPoint *HP_clif_pGuildLeave_pre; +struct HPMHookPoint *HP_clif_pGuildLeave_post; +struct HPMHookPoint *HP_clif_pGuildExpulsion_pre; +struct HPMHookPoint *HP_clif_pGuildExpulsion_post; +struct HPMHookPoint *HP_clif_pGuildMessage_pre; +struct HPMHookPoint *HP_clif_pGuildMessage_post; +struct HPMHookPoint *HP_clif_pGuildRequestAlliance_pre; +struct HPMHookPoint *HP_clif_pGuildRequestAlliance_post; +struct HPMHookPoint *HP_clif_pGuildReplyAlliance_pre; +struct HPMHookPoint *HP_clif_pGuildReplyAlliance_post; +struct HPMHookPoint *HP_clif_pGuildDelAlliance_pre; +struct HPMHookPoint *HP_clif_pGuildDelAlliance_post; +struct HPMHookPoint *HP_clif_pGuildOpposition_pre; +struct HPMHookPoint *HP_clif_pGuildOpposition_post; +struct HPMHookPoint *HP_clif_pGuildBreak_pre; +struct HPMHookPoint *HP_clif_pGuildBreak_post; +struct HPMHookPoint *HP_clif_pPetMenu_pre; +struct HPMHookPoint *HP_clif_pPetMenu_post; +struct HPMHookPoint *HP_clif_pCatchPet_pre; +struct HPMHookPoint *HP_clif_pCatchPet_post; +struct HPMHookPoint *HP_clif_pSelectEgg_pre; +struct HPMHookPoint *HP_clif_pSelectEgg_post; +struct HPMHookPoint *HP_clif_pSendEmotion_pre; +struct HPMHookPoint *HP_clif_pSendEmotion_post; +struct HPMHookPoint *HP_clif_pChangePetName_pre; +struct HPMHookPoint *HP_clif_pChangePetName_post; +struct HPMHookPoint *HP_clif_pGMKick_pre; +struct HPMHookPoint *HP_clif_pGMKick_post; +struct HPMHookPoint *HP_clif_pGMKickAll_pre; +struct HPMHookPoint *HP_clif_pGMKickAll_post; +struct HPMHookPoint *HP_clif_pGMShift_pre; +struct HPMHookPoint *HP_clif_pGMShift_post; +struct HPMHookPoint *HP_clif_pGMRemove2_pre; +struct HPMHookPoint *HP_clif_pGMRemove2_post; +struct HPMHookPoint *HP_clif_pGMRecall_pre; +struct HPMHookPoint *HP_clif_pGMRecall_post; +struct HPMHookPoint *HP_clif_pGMRecall2_pre; +struct HPMHookPoint *HP_clif_pGMRecall2_post; +struct HPMHookPoint *HP_clif_pGM_Monster_Item_pre; +struct HPMHookPoint *HP_clif_pGM_Monster_Item_post; +struct HPMHookPoint *HP_clif_pGMHide_pre; +struct HPMHookPoint *HP_clif_pGMHide_post; +struct HPMHookPoint *HP_clif_pGMReqNoChat_pre; +struct HPMHookPoint *HP_clif_pGMReqNoChat_post; +struct HPMHookPoint *HP_clif_pGMRc_pre; +struct HPMHookPoint *HP_clif_pGMRc_post; +struct HPMHookPoint *HP_clif_pGMReqAccountName_pre; +struct HPMHookPoint *HP_clif_pGMReqAccountName_post; +struct HPMHookPoint *HP_clif_pGMChangeMapType_pre; +struct HPMHookPoint *HP_clif_pGMChangeMapType_post; +struct HPMHookPoint *HP_clif_pPMIgnore_pre; +struct HPMHookPoint *HP_clif_pPMIgnore_post; +struct HPMHookPoint *HP_clif_pPMIgnoreAll_pre; +struct HPMHookPoint *HP_clif_pPMIgnoreAll_post; +struct HPMHookPoint *HP_clif_pPMIgnoreList_pre; +struct HPMHookPoint *HP_clif_pPMIgnoreList_post; +struct HPMHookPoint *HP_clif_pNoviceDoriDori_pre; +struct HPMHookPoint *HP_clif_pNoviceDoriDori_post; +struct HPMHookPoint *HP_clif_pNoviceExplosionSpirits_pre; +struct HPMHookPoint *HP_clif_pNoviceExplosionSpirits_post; +struct HPMHookPoint *HP_clif_pFriendsListAdd_pre; +struct HPMHookPoint *HP_clif_pFriendsListAdd_post; +struct HPMHookPoint *HP_clif_pFriendsListReply_pre; +struct HPMHookPoint *HP_clif_pFriendsListReply_post; +struct HPMHookPoint *HP_clif_pFriendsListRemove_pre; +struct HPMHookPoint *HP_clif_pFriendsListRemove_post; +struct HPMHookPoint *HP_clif_pPVPInfo_pre; +struct HPMHookPoint *HP_clif_pPVPInfo_post; +struct HPMHookPoint *HP_clif_pBlacksmith_pre; +struct HPMHookPoint *HP_clif_pBlacksmith_post; +struct HPMHookPoint *HP_clif_pAlchemist_pre; +struct HPMHookPoint *HP_clif_pAlchemist_post; +struct HPMHookPoint *HP_clif_pTaekwon_pre; +struct HPMHookPoint *HP_clif_pTaekwon_post; +struct HPMHookPoint *HP_clif_pRankingPk_pre; +struct HPMHookPoint *HP_clif_pRankingPk_post; +struct HPMHookPoint *HP_clif_pFeelSaveOk_pre; +struct HPMHookPoint *HP_clif_pFeelSaveOk_post; +struct HPMHookPoint *HP_clif_pChangeHomunculusName_pre; +struct HPMHookPoint *HP_clif_pChangeHomunculusName_post; +struct HPMHookPoint *HP_clif_pHomMoveToMaster_pre; +struct HPMHookPoint *HP_clif_pHomMoveToMaster_post; +struct HPMHookPoint *HP_clif_pHomMoveTo_pre; +struct HPMHookPoint *HP_clif_pHomMoveTo_post; +struct HPMHookPoint *HP_clif_pHomAttack_pre; +struct HPMHookPoint *HP_clif_pHomAttack_post; +struct HPMHookPoint *HP_clif_pHomMenu_pre; +struct HPMHookPoint *HP_clif_pHomMenu_post; +struct HPMHookPoint *HP_clif_pAutoRevive_pre; +struct HPMHookPoint *HP_clif_pAutoRevive_post; +struct HPMHookPoint *HP_clif_pCheck_pre; +struct HPMHookPoint *HP_clif_pCheck_post; +struct HPMHookPoint *HP_clif_pMail_refreshinbox_pre; +struct HPMHookPoint *HP_clif_pMail_refreshinbox_post; +struct HPMHookPoint *HP_clif_pMail_read_pre; +struct HPMHookPoint *HP_clif_pMail_read_post; +struct HPMHookPoint *HP_clif_pMail_getattach_pre; +struct HPMHookPoint *HP_clif_pMail_getattach_post; +struct HPMHookPoint *HP_clif_pMail_delete_pre; +struct HPMHookPoint *HP_clif_pMail_delete_post; +struct HPMHookPoint *HP_clif_pMail_return_pre; +struct HPMHookPoint *HP_clif_pMail_return_post; +struct HPMHookPoint *HP_clif_pMail_setattach_pre; +struct HPMHookPoint *HP_clif_pMail_setattach_post; +struct HPMHookPoint *HP_clif_pMail_winopen_pre; +struct HPMHookPoint *HP_clif_pMail_winopen_post; +struct HPMHookPoint *HP_clif_pMail_send_pre; +struct HPMHookPoint *HP_clif_pMail_send_post; +struct HPMHookPoint *HP_clif_pAuction_cancelreg_pre; +struct HPMHookPoint *HP_clif_pAuction_cancelreg_post; +struct HPMHookPoint *HP_clif_pAuction_setitem_pre; +struct HPMHookPoint *HP_clif_pAuction_setitem_post; +struct HPMHookPoint *HP_clif_pAuction_register_pre; +struct HPMHookPoint *HP_clif_pAuction_register_post; +struct HPMHookPoint *HP_clif_pAuction_cancel_pre; +struct HPMHookPoint *HP_clif_pAuction_cancel_post; +struct HPMHookPoint *HP_clif_pAuction_close_pre; +struct HPMHookPoint *HP_clif_pAuction_close_post; +struct HPMHookPoint *HP_clif_pAuction_bid_pre; +struct HPMHookPoint *HP_clif_pAuction_bid_post; +struct HPMHookPoint *HP_clif_pAuction_search_pre; +struct HPMHookPoint *HP_clif_pAuction_search_post; +struct HPMHookPoint *HP_clif_pAuction_buysell_pre; +struct HPMHookPoint *HP_clif_pAuction_buysell_post; +struct HPMHookPoint *HP_clif_pcashshop_buy_pre; +struct HPMHookPoint *HP_clif_pcashshop_buy_post; +struct HPMHookPoint *HP_clif_pAdopt_request_pre; +struct HPMHookPoint *HP_clif_pAdopt_request_post; +struct HPMHookPoint *HP_clif_pAdopt_reply_pre; +struct HPMHookPoint *HP_clif_pAdopt_reply_post; +struct HPMHookPoint *HP_clif_pViewPlayerEquip_pre; +struct HPMHookPoint *HP_clif_pViewPlayerEquip_post; +struct HPMHookPoint *HP_clif_pEquipTick_pre; +struct HPMHookPoint *HP_clif_pEquipTick_post; +struct HPMHookPoint *HP_clif_pquestStateAck_pre; +struct HPMHookPoint *HP_clif_pquestStateAck_post; +struct HPMHookPoint *HP_clif_pmercenary_action_pre; +struct HPMHookPoint *HP_clif_pmercenary_action_post; +struct HPMHookPoint *HP_clif_pBattleChat_pre; +struct HPMHookPoint *HP_clif_pBattleChat_post; +struct HPMHookPoint *HP_clif_pLessEffect_pre; +struct HPMHookPoint *HP_clif_pLessEffect_post; +struct HPMHookPoint *HP_clif_pItemListWindowSelected_pre; +struct HPMHookPoint *HP_clif_pItemListWindowSelected_post; +struct HPMHookPoint *HP_clif_pReqOpenBuyingStore_pre; +struct HPMHookPoint *HP_clif_pReqOpenBuyingStore_post; +struct HPMHookPoint *HP_clif_pReqCloseBuyingStore_pre; +struct HPMHookPoint *HP_clif_pReqCloseBuyingStore_post; +struct HPMHookPoint *HP_clif_pReqClickBuyingStore_pre; +struct HPMHookPoint *HP_clif_pReqClickBuyingStore_post; +struct HPMHookPoint *HP_clif_pReqTradeBuyingStore_pre; +struct HPMHookPoint *HP_clif_pReqTradeBuyingStore_post; +struct HPMHookPoint *HP_clif_pSearchStoreInfo_pre; +struct HPMHookPoint *HP_clif_pSearchStoreInfo_post; +struct HPMHookPoint *HP_clif_pSearchStoreInfoNextPage_pre; +struct HPMHookPoint *HP_clif_pSearchStoreInfoNextPage_post; +struct HPMHookPoint *HP_clif_pCloseSearchStoreInfo_pre; +struct HPMHookPoint *HP_clif_pCloseSearchStoreInfo_post; +struct HPMHookPoint *HP_clif_pSearchStoreInfoListItemClick_pre; +struct HPMHookPoint *HP_clif_pSearchStoreInfoListItemClick_post; +struct HPMHookPoint *HP_clif_pDebug_pre; +struct HPMHookPoint *HP_clif_pDebug_post; +struct HPMHookPoint *HP_clif_pSkillSelectMenu_pre; +struct HPMHookPoint *HP_clif_pSkillSelectMenu_post; +struct HPMHookPoint *HP_clif_pMoveItem_pre; +struct HPMHookPoint *HP_clif_pMoveItem_post; +struct HPMHookPoint *HP_clif_pDull_pre; +struct HPMHookPoint *HP_clif_pDull_post; +struct HPMHookPoint *HP_clif_pBGQueueRegister_pre; +struct HPMHookPoint *HP_clif_pBGQueueRegister_post; +struct HPMHookPoint *HP_clif_pBGQueueCheckState_pre; +struct HPMHookPoint *HP_clif_pBGQueueCheckState_post; +struct HPMHookPoint *HP_clif_pBGQueueRevokeReq_pre; +struct HPMHookPoint *HP_clif_pBGQueueRevokeReq_post; +struct HPMHookPoint *HP_clif_pBGQueueBattleBeginAck_pre; +struct HPMHookPoint *HP_clif_pBGQueueBattleBeginAck_post; +struct HPMHookPoint *HP_clif_pCashShopOpen_pre; +struct HPMHookPoint *HP_clif_pCashShopOpen_post; +struct HPMHookPoint *HP_clif_pCashShopClose_pre; +struct HPMHookPoint *HP_clif_pCashShopClose_post; +struct HPMHookPoint *HP_clif_pCashShopReqTab_pre; +struct HPMHookPoint *HP_clif_pCashShopReqTab_post; +struct HPMHookPoint *HP_clif_pCashShopSchedule_pre; +struct HPMHookPoint *HP_clif_pCashShopSchedule_post; +struct HPMHookPoint *HP_clif_pCashShopBuy_pre; +struct HPMHookPoint *HP_clif_pCashShopBuy_post; +struct HPMHookPoint *HP_clif_pPartyTick_pre; +struct HPMHookPoint *HP_clif_pPartyTick_post; +struct HPMHookPoint *HP_clif_pGuildInvite2_pre; +struct HPMHookPoint *HP_clif_pGuildInvite2_post; +struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_pre; +struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_post; +struct HPMHookPoint *HP_clif_pPartyBookingSubFilter_pre; +struct HPMHookPoint *HP_clif_pPartyBookingSubFilter_post; +struct HPMHookPoint *HP_clif_pPartyBookingReqVolunteer_pre; +struct HPMHookPoint *HP_clif_pPartyBookingReqVolunteer_post; +struct HPMHookPoint *HP_clif_pPartyBookingRefuseVolunteer_pre; +struct HPMHookPoint *HP_clif_pPartyBookingRefuseVolunteer_post; +struct HPMHookPoint *HP_clif_pPartyBookingCancelVolunteer_pre; +struct HPMHookPoint *HP_clif_pPartyBookingCancelVolunteer_post; +struct HPMHookPoint *HP_duel_create_pre; +struct HPMHookPoint *HP_duel_create_post; +struct HPMHookPoint *HP_duel_invite_pre; +struct HPMHookPoint *HP_duel_invite_post; +struct HPMHookPoint *HP_duel_accept_pre; +struct HPMHookPoint *HP_duel_accept_post; +struct HPMHookPoint *HP_duel_reject_pre; +struct HPMHookPoint *HP_duel_reject_post; +struct HPMHookPoint *HP_duel_leave_pre; +struct HPMHookPoint *HP_duel_leave_post; +struct HPMHookPoint *HP_duel_showinfo_pre; +struct HPMHookPoint *HP_duel_showinfo_post; +struct HPMHookPoint *HP_duel_checktime_pre; +struct HPMHookPoint *HP_duel_checktime_post; +struct HPMHookPoint *HP_duel_init_pre; +struct HPMHookPoint *HP_duel_init_post; +struct HPMHookPoint *HP_duel_final_pre; +struct HPMHookPoint *HP_duel_final_post; +struct HPMHookPoint *HP_elemental_init_pre; +struct HPMHookPoint *HP_elemental_init_post; +struct HPMHookPoint *HP_elemental_final_pre; +struct HPMHookPoint *HP_elemental_final_post; +struct HPMHookPoint *HP_elemental_class_pre; +struct HPMHookPoint *HP_elemental_class_post; +struct HPMHookPoint *HP_elemental_get_viewdata_pre; +struct HPMHookPoint *HP_elemental_get_viewdata_post; +struct HPMHookPoint *HP_elemental_create_pre; +struct HPMHookPoint *HP_elemental_create_post; +struct HPMHookPoint *HP_elemental_data_received_pre; +struct HPMHookPoint *HP_elemental_data_received_post; +struct HPMHookPoint *HP_elemental_save_pre; +struct HPMHookPoint *HP_elemental_save_post; +struct HPMHookPoint *HP_elemental_change_mode_ack_pre; +struct HPMHookPoint *HP_elemental_change_mode_ack_post; +struct HPMHookPoint *HP_elemental_change_mode_pre; +struct HPMHookPoint *HP_elemental_change_mode_post; +struct HPMHookPoint *HP_elemental_heal_pre; +struct HPMHookPoint *HP_elemental_heal_post; +struct HPMHookPoint *HP_elemental_dead_pre; +struct HPMHookPoint *HP_elemental_dead_post; +struct HPMHookPoint *HP_elemental_delete_pre; +struct HPMHookPoint *HP_elemental_delete_post; +struct HPMHookPoint *HP_elemental_summon_stop_pre; +struct HPMHookPoint *HP_elemental_summon_stop_post; +struct HPMHookPoint *HP_elemental_get_lifetime_pre; +struct HPMHookPoint *HP_elemental_get_lifetime_post; +struct HPMHookPoint *HP_elemental_unlocktarget_pre; +struct HPMHookPoint *HP_elemental_unlocktarget_post; +struct HPMHookPoint *HP_elemental_skillnotok_pre; +struct HPMHookPoint *HP_elemental_skillnotok_post; +struct HPMHookPoint *HP_elemental_set_target_pre; +struct HPMHookPoint *HP_elemental_set_target_post; +struct HPMHookPoint *HP_elemental_clean_single_effect_pre; +struct HPMHookPoint *HP_elemental_clean_single_effect_post; +struct HPMHookPoint *HP_elemental_clean_effect_pre; +struct HPMHookPoint *HP_elemental_clean_effect_post; +struct HPMHookPoint *HP_elemental_action_pre; +struct HPMHookPoint *HP_elemental_action_post; +struct HPMHookPoint *HP_elemental_skill_get_requirements_pre; +struct HPMHookPoint *HP_elemental_skill_get_requirements_post; +struct HPMHookPoint *HP_elemental_read_skilldb_pre; +struct HPMHookPoint *HP_elemental_read_skilldb_post; +struct HPMHookPoint *HP_elemental_reload_db_pre; +struct HPMHookPoint *HP_elemental_reload_db_post; +struct HPMHookPoint *HP_elemental_reload_skilldb_pre; +struct HPMHookPoint *HP_elemental_reload_skilldb_post; +struct HPMHookPoint *HP_elemental_search_index_pre; +struct HPMHookPoint *HP_elemental_search_index_post; +struct HPMHookPoint *HP_elemental_summon_init_pre; +struct HPMHookPoint *HP_elemental_summon_init_post; +struct HPMHookPoint *HP_elemental_summon_end_timer_pre; +struct HPMHookPoint *HP_elemental_summon_end_timer_post; +struct HPMHookPoint *HP_elemental_ai_sub_timer_activesearch_pre; +struct HPMHookPoint *HP_elemental_ai_sub_timer_activesearch_post; +struct HPMHookPoint *HP_elemental_ai_sub_timer_pre; +struct HPMHookPoint *HP_elemental_ai_sub_timer_post; +struct HPMHookPoint *HP_elemental_ai_sub_foreachclient_pre; +struct HPMHookPoint *HP_elemental_ai_sub_foreachclient_post; +struct HPMHookPoint *HP_elemental_ai_timer_pre; +struct HPMHookPoint *HP_elemental_ai_timer_post; +struct HPMHookPoint *HP_elemental_read_db_pre; +struct HPMHookPoint *HP_elemental_read_db_post; +struct HPMHookPoint *HP_guild_init_pre; +struct HPMHookPoint *HP_guild_init_post; +struct HPMHookPoint *HP_guild_final_pre; +struct HPMHookPoint *HP_guild_final_post; +struct HPMHookPoint *HP_guild_skill_get_max_pre; +struct HPMHookPoint *HP_guild_skill_get_max_post; +struct HPMHookPoint *HP_guild_checkskill_pre; +struct HPMHookPoint *HP_guild_checkskill_post; +struct HPMHookPoint *HP_guild_check_skill_require_pre; +struct HPMHookPoint *HP_guild_check_skill_require_post; +struct HPMHookPoint *HP_guild_checkcastles_pre; +struct HPMHookPoint *HP_guild_checkcastles_post; +struct HPMHookPoint *HP_guild_isallied_pre; +struct HPMHookPoint *HP_guild_isallied_post; +struct HPMHookPoint *HP_guild_search_pre; +struct HPMHookPoint *HP_guild_search_post; +struct HPMHookPoint *HP_guild_searchname_pre; +struct HPMHookPoint *HP_guild_searchname_post; +struct HPMHookPoint *HP_guild_castle_search_pre; +struct HPMHookPoint *HP_guild_castle_search_post; +struct HPMHookPoint *HP_guild_mapname2gc_pre; +struct HPMHookPoint *HP_guild_mapname2gc_post; +struct HPMHookPoint *HP_guild_mapindex2gc_pre; +struct HPMHookPoint *HP_guild_mapindex2gc_post; +struct HPMHookPoint *HP_guild_getavailablesd_pre; +struct HPMHookPoint *HP_guild_getavailablesd_post; +struct HPMHookPoint *HP_guild_getindex_pre; +struct HPMHookPoint *HP_guild_getindex_post; +struct HPMHookPoint *HP_guild_getposition_pre; +struct HPMHookPoint *HP_guild_getposition_post; +struct HPMHookPoint *HP_guild_payexp_pre; +struct HPMHookPoint *HP_guild_payexp_post; +struct HPMHookPoint *HP_guild_getexp_pre; +struct HPMHookPoint *HP_guild_getexp_post; +struct HPMHookPoint *HP_guild_create_pre; +struct HPMHookPoint *HP_guild_create_post; +struct HPMHookPoint *HP_guild_created_pre; +struct HPMHookPoint *HP_guild_created_post; +struct HPMHookPoint *HP_guild_request_info_pre; +struct HPMHookPoint *HP_guild_request_info_post; +struct HPMHookPoint *HP_guild_recv_noinfo_pre; +struct HPMHookPoint *HP_guild_recv_noinfo_post; +struct HPMHookPoint *HP_guild_recv_info_pre; +struct HPMHookPoint *HP_guild_recv_info_post; +struct HPMHookPoint *HP_guild_npc_request_info_pre; +struct HPMHookPoint *HP_guild_npc_request_info_post; +struct HPMHookPoint *HP_guild_invite_pre; +struct HPMHookPoint *HP_guild_invite_post; +struct HPMHookPoint *HP_guild_reply_invite_pre; +struct HPMHookPoint *HP_guild_reply_invite_post; +struct HPMHookPoint *HP_guild_member_joined_pre; +struct HPMHookPoint *HP_guild_member_joined_post; +struct HPMHookPoint *HP_guild_member_added_pre; +struct HPMHookPoint *HP_guild_member_added_post; +struct HPMHookPoint *HP_guild_leave_pre; +struct HPMHookPoint *HP_guild_leave_post; +struct HPMHookPoint *HP_guild_member_withdraw_pre; +struct HPMHookPoint *HP_guild_member_withdraw_post; +struct HPMHookPoint *HP_guild_expulsion_pre; +struct HPMHookPoint *HP_guild_expulsion_post; +struct HPMHookPoint *HP_guild_skillup_pre; +struct HPMHookPoint *HP_guild_skillup_post; +struct HPMHookPoint *HP_guild_block_skill_pre; +struct HPMHookPoint *HP_guild_block_skill_post; +struct HPMHookPoint *HP_guild_reqalliance_pre; +struct HPMHookPoint *HP_guild_reqalliance_post; +struct HPMHookPoint *HP_guild_reply_reqalliance_pre; +struct HPMHookPoint *HP_guild_reply_reqalliance_post; +struct HPMHookPoint *HP_guild_allianceack_pre; +struct HPMHookPoint *HP_guild_allianceack_post; +struct HPMHookPoint *HP_guild_delalliance_pre; +struct HPMHookPoint *HP_guild_delalliance_post; +struct HPMHookPoint *HP_guild_opposition_pre; +struct HPMHookPoint *HP_guild_opposition_post; +struct HPMHookPoint *HP_guild_check_alliance_pre; +struct HPMHookPoint *HP_guild_check_alliance_post; +struct HPMHookPoint *HP_guild_send_memberinfoshort_pre; +struct HPMHookPoint *HP_guild_send_memberinfoshort_post; +struct HPMHookPoint *HP_guild_recv_memberinfoshort_pre; +struct HPMHookPoint *HP_guild_recv_memberinfoshort_post; +struct HPMHookPoint *HP_guild_change_memberposition_pre; +struct HPMHookPoint *HP_guild_change_memberposition_post; +struct HPMHookPoint *HP_guild_memberposition_changed_pre; +struct HPMHookPoint *HP_guild_memberposition_changed_post; +struct HPMHookPoint *HP_guild_change_position_pre; +struct HPMHookPoint *HP_guild_change_position_post; +struct HPMHookPoint *HP_guild_position_changed_pre; +struct HPMHookPoint *HP_guild_position_changed_post; +struct HPMHookPoint *HP_guild_change_notice_pre; +struct HPMHookPoint *HP_guild_change_notice_post; +struct HPMHookPoint *HP_guild_notice_changed_pre; +struct HPMHookPoint *HP_guild_notice_changed_post; +struct HPMHookPoint *HP_guild_change_emblem_pre; +struct HPMHookPoint *HP_guild_change_emblem_post; +struct HPMHookPoint *HP_guild_emblem_changed_pre; +struct HPMHookPoint *HP_guild_emblem_changed_post; +struct HPMHookPoint *HP_guild_send_message_pre; +struct HPMHookPoint *HP_guild_send_message_post; +struct HPMHookPoint *HP_guild_recv_message_pre; +struct HPMHookPoint *HP_guild_recv_message_post; +struct HPMHookPoint *HP_guild_send_dot_remove_pre; +struct HPMHookPoint *HP_guild_send_dot_remove_post; +struct HPMHookPoint *HP_guild_skillupack_pre; +struct HPMHookPoint *HP_guild_skillupack_post; +struct HPMHookPoint *HP_guild_dobreak_pre; +struct HPMHookPoint *HP_guild_dobreak_post; +struct HPMHookPoint *HP_guild_broken_pre; +struct HPMHookPoint *HP_guild_broken_post; +struct HPMHookPoint *HP_guild_gm_change_pre; +struct HPMHookPoint *HP_guild_gm_change_post; +struct HPMHookPoint *HP_guild_gm_changed_pre; +struct HPMHookPoint *HP_guild_gm_changed_post; +struct HPMHookPoint *HP_guild_castle_map_init_pre; +struct HPMHookPoint *HP_guild_castle_map_init_post; +struct HPMHookPoint *HP_guild_castledatasave_pre; +struct HPMHookPoint *HP_guild_castledatasave_post; +struct HPMHookPoint *HP_guild_castledataloadack_pre; +struct HPMHookPoint *HP_guild_castledataloadack_post; +struct HPMHookPoint *HP_guild_castle_reconnect_pre; +struct HPMHookPoint *HP_guild_castle_reconnect_post; +struct HPMHookPoint *HP_guild_agit_start_pre; +struct HPMHookPoint *HP_guild_agit_start_post; +struct HPMHookPoint *HP_guild_agit_end_pre; +struct HPMHookPoint *HP_guild_agit_end_post; +struct HPMHookPoint *HP_guild_agit2_start_pre; +struct HPMHookPoint *HP_guild_agit2_start_post; +struct HPMHookPoint *HP_guild_agit2_end_pre; +struct HPMHookPoint *HP_guild_agit2_end_post; +struct HPMHookPoint *HP_guild_flag_add_pre; +struct HPMHookPoint *HP_guild_flag_add_post; +struct HPMHookPoint *HP_guild_flag_remove_pre; +struct HPMHookPoint *HP_guild_flag_remove_post; +struct HPMHookPoint *HP_guild_flags_clear_pre; +struct HPMHookPoint *HP_guild_flags_clear_post; +struct HPMHookPoint *HP_guild_aura_refresh_pre; +struct HPMHookPoint *HP_guild_aura_refresh_post; +struct HPMHookPoint *HP_guild_payexp_timer_pre; +struct HPMHookPoint *HP_guild_payexp_timer_post; +struct HPMHookPoint *HP_guild_sd_check_pre; +struct HPMHookPoint *HP_guild_sd_check_post; +struct HPMHookPoint *HP_guild_read_guildskill_tree_db_pre; +struct HPMHookPoint *HP_guild_read_guildskill_tree_db_post; +struct HPMHookPoint *HP_guild_read_castledb_pre; +struct HPMHookPoint *HP_guild_read_castledb_post; +struct HPMHookPoint *HP_guild_payexp_timer_sub_pre; +struct HPMHookPoint *HP_guild_payexp_timer_sub_post; +struct HPMHookPoint *HP_guild_send_xy_timer_sub_pre; +struct HPMHookPoint *HP_guild_send_xy_timer_sub_post; +struct HPMHookPoint *HP_guild_send_xy_timer_pre; +struct HPMHookPoint *HP_guild_send_xy_timer_post; +struct HPMHookPoint *HP_guild_create_expcache_pre; +struct HPMHookPoint *HP_guild_create_expcache_post; +struct HPMHookPoint *HP_guild_eventlist_db_final_pre; +struct HPMHookPoint *HP_guild_eventlist_db_final_post; +struct HPMHookPoint *HP_guild_expcache_db_final_pre; +struct HPMHookPoint *HP_guild_expcache_db_final_post; +struct HPMHookPoint *HP_guild_castle_db_final_pre; +struct HPMHookPoint *HP_guild_castle_db_final_post; +struct HPMHookPoint *HP_guild_broken_sub_pre; +struct HPMHookPoint *HP_guild_broken_sub_post; +struct HPMHookPoint *HP_guild_castle_broken_sub_pre; +struct HPMHookPoint *HP_guild_castle_broken_sub_post; +struct HPMHookPoint *HP_guild_makemember_pre; +struct HPMHookPoint *HP_guild_makemember_post; +struct HPMHookPoint *HP_guild_check_member_pre; +struct HPMHookPoint *HP_guild_check_member_post; +struct HPMHookPoint *HP_guild_get_alliance_count_pre; +struct HPMHookPoint *HP_guild_get_alliance_count_post; +struct HPMHookPoint *HP_guild_castle_reconnect_sub_pre; +struct HPMHookPoint *HP_guild_castle_reconnect_sub_post; +struct HPMHookPoint *HP_gstorage_id2storage_pre; +struct HPMHookPoint *HP_gstorage_id2storage_post; +struct HPMHookPoint *HP_gstorage_id2storage2_pre; +struct HPMHookPoint *HP_gstorage_id2storage2_post; +struct HPMHookPoint *HP_gstorage_init_pre; +struct HPMHookPoint *HP_gstorage_init_post; +struct HPMHookPoint *HP_gstorage_final_pre; +struct HPMHookPoint *HP_gstorage_final_post; +struct HPMHookPoint *HP_gstorage_delete_pre; +struct HPMHookPoint *HP_gstorage_delete_post; +struct HPMHookPoint *HP_gstorage_open_pre; +struct HPMHookPoint *HP_gstorage_open_post; +struct HPMHookPoint *HP_gstorage_additem_pre; +struct HPMHookPoint *HP_gstorage_additem_post; +struct HPMHookPoint *HP_gstorage_delitem_pre; +struct HPMHookPoint *HP_gstorage_delitem_post; +struct HPMHookPoint *HP_gstorage_add_pre; +struct HPMHookPoint *HP_gstorage_add_post; +struct HPMHookPoint *HP_gstorage_get_pre; +struct HPMHookPoint *HP_gstorage_get_post; +struct HPMHookPoint *HP_gstorage_addfromcart_pre; +struct HPMHookPoint *HP_gstorage_addfromcart_post; +struct HPMHookPoint *HP_gstorage_gettocart_pre; +struct HPMHookPoint *HP_gstorage_gettocart_post; +struct HPMHookPoint *HP_gstorage_close_pre; +struct HPMHookPoint *HP_gstorage_close_post; +struct HPMHookPoint *HP_gstorage_pc_quit_pre; +struct HPMHookPoint *HP_gstorage_pc_quit_post; +struct HPMHookPoint *HP_gstorage_save_pre; +struct HPMHookPoint *HP_gstorage_save_post; +struct HPMHookPoint *HP_gstorage_saved_pre; +struct HPMHookPoint *HP_gstorage_saved_post; +struct HPMHookPoint *HP_gstorage_create_pre; +struct HPMHookPoint *HP_gstorage_create_post; +struct HPMHookPoint *HP_homun_init_pre; +struct HPMHookPoint *HP_homun_init_post; +struct HPMHookPoint *HP_homun_final_pre; +struct HPMHookPoint *HP_homun_final_post; +struct HPMHookPoint *HP_homun_reload_pre; +struct HPMHookPoint *HP_homun_reload_post; +struct HPMHookPoint *HP_homun_reload_skill_pre; +struct HPMHookPoint *HP_homun_reload_skill_post; +struct HPMHookPoint *HP_homun_get_viewdata_pre; +struct HPMHookPoint *HP_homun_get_viewdata_post; +struct HPMHookPoint *HP_homun_class2type_pre; +struct HPMHookPoint *HP_homun_class2type_post; +struct HPMHookPoint *HP_homun_damaged_pre; +struct HPMHookPoint *HP_homun_damaged_post; +struct HPMHookPoint *HP_homun_dead_pre; +struct HPMHookPoint *HP_homun_dead_post; +struct HPMHookPoint *HP_homun_vaporize_pre; +struct HPMHookPoint *HP_homun_vaporize_post; +struct HPMHookPoint *HP_homun_delete_pre; +struct HPMHookPoint *HP_homun_delete_post; +struct HPMHookPoint *HP_homun_checkskill_pre; +struct HPMHookPoint *HP_homun_checkskill_post; +struct HPMHookPoint *HP_homun_calc_skilltree_pre; +struct HPMHookPoint *HP_homun_calc_skilltree_post; +struct HPMHookPoint *HP_homun_skill_tree_get_max_pre; +struct HPMHookPoint *HP_homun_skill_tree_get_max_post; +struct HPMHookPoint *HP_homun_skillup_pre; +struct HPMHookPoint *HP_homun_skillup_post; +struct HPMHookPoint *HP_homun_levelup_pre; +struct HPMHookPoint *HP_homun_levelup_post; +struct HPMHookPoint *HP_homun_change_class_pre; +struct HPMHookPoint *HP_homun_change_class_post; +struct HPMHookPoint *HP_homun_evolve_pre; +struct HPMHookPoint *HP_homun_evolve_post; +struct HPMHookPoint *HP_homun_mutate_pre; +struct HPMHookPoint *HP_homun_mutate_post; +struct HPMHookPoint *HP_homun_gainexp_pre; +struct HPMHookPoint *HP_homun_gainexp_post; +struct HPMHookPoint *HP_homun_add_intimacy_pre; +struct HPMHookPoint *HP_homun_add_intimacy_post; +struct HPMHookPoint *HP_homun_consume_intimacy_pre; +struct HPMHookPoint *HP_homun_consume_intimacy_post; +struct HPMHookPoint *HP_homun_healed_pre; +struct HPMHookPoint *HP_homun_healed_post; +struct HPMHookPoint *HP_homun_save_pre; +struct HPMHookPoint *HP_homun_save_post; +struct HPMHookPoint *HP_homun_menu_pre; +struct HPMHookPoint *HP_homun_menu_post; +struct HPMHookPoint *HP_homun_feed_pre; +struct HPMHookPoint *HP_homun_feed_post; +struct HPMHookPoint *HP_homun_hunger_timer_pre; +struct HPMHookPoint *HP_homun_hunger_timer_post; +struct HPMHookPoint *HP_homun_hunger_timer_delete_pre; +struct HPMHookPoint *HP_homun_hunger_timer_delete_post; +struct HPMHookPoint *HP_homun_change_name_pre; +struct HPMHookPoint *HP_homun_change_name_post; +struct HPMHookPoint *HP_homun_change_name_ack_pre; +struct HPMHookPoint *HP_homun_change_name_ack_post; +struct HPMHookPoint *HP_homun_db_search_pre; +struct HPMHookPoint *HP_homun_db_search_post; +struct HPMHookPoint *HP_homun_create_pre; +struct HPMHookPoint *HP_homun_create_post; +struct HPMHookPoint *HP_homun_init_timers_pre; +struct HPMHookPoint *HP_homun_init_timers_post; +struct HPMHookPoint *HP_homun_call_pre; +struct HPMHookPoint *HP_homun_call_post; +struct HPMHookPoint *HP_homun_recv_data_pre; +struct HPMHookPoint *HP_homun_recv_data_post; +struct HPMHookPoint *HP_homun_creation_request_pre; +struct HPMHookPoint *HP_homun_creation_request_post; +struct HPMHookPoint *HP_homun_ressurect_pre; +struct HPMHookPoint *HP_homun_ressurect_post; +struct HPMHookPoint *HP_homun_revive_pre; +struct HPMHookPoint *HP_homun_revive_post; +struct HPMHookPoint *HP_homun_stat_reset_pre; +struct HPMHookPoint *HP_homun_stat_reset_post; +struct HPMHookPoint *HP_homun_shuffle_pre; +struct HPMHookPoint *HP_homun_shuffle_post; +struct HPMHookPoint *HP_homun_read_db_sub_pre; +struct HPMHookPoint *HP_homun_read_db_sub_post; +struct HPMHookPoint *HP_homun_read_db_pre; +struct HPMHookPoint *HP_homun_read_db_post; +struct HPMHookPoint *HP_homun_read_skill_db_sub_pre; +struct HPMHookPoint *HP_homun_read_skill_db_sub_post; +struct HPMHookPoint *HP_homun_skill_db_read_pre; +struct HPMHookPoint *HP_homun_skill_db_read_post; +struct HPMHookPoint *HP_homun_exp_db_read_pre; +struct HPMHookPoint *HP_homun_exp_db_read_post; +struct HPMHookPoint *HP_homun_addspiritball_pre; +struct HPMHookPoint *HP_homun_addspiritball_post; +struct HPMHookPoint *HP_homun_delspiritball_pre; +struct HPMHookPoint *HP_homun_delspiritball_post; +struct HPMHookPoint *HP_instance_init_pre; +struct HPMHookPoint *HP_instance_init_post; +struct HPMHookPoint *HP_instance_final_pre; +struct HPMHookPoint *HP_instance_final_post; +struct HPMHookPoint *HP_instance_create_pre; +struct HPMHookPoint *HP_instance_create_post; +struct HPMHookPoint *HP_instance_add_map_pre; +struct HPMHookPoint *HP_instance_add_map_post; +struct HPMHookPoint *HP_instance_del_map_pre; +struct HPMHookPoint *HP_instance_del_map_post; +struct HPMHookPoint *HP_instance_map2imap_pre; +struct HPMHookPoint *HP_instance_map2imap_post; +struct HPMHookPoint *HP_instance_mapid2imapid_pre; +struct HPMHookPoint *HP_instance_mapid2imapid_post; +struct HPMHookPoint *HP_instance_destroy_pre; +struct HPMHookPoint *HP_instance_destroy_post; +struct HPMHookPoint *HP_instance_start_pre; +struct HPMHookPoint *HP_instance_start_post; +struct HPMHookPoint *HP_instance_check_idle_pre; +struct HPMHookPoint *HP_instance_check_idle_post; +struct HPMHookPoint *HP_instance_check_kick_pre; +struct HPMHookPoint *HP_instance_check_kick_post; +struct HPMHookPoint *HP_instance_set_timeout_pre; +struct HPMHookPoint *HP_instance_set_timeout_post; +struct HPMHookPoint *HP_instance_valid_pre; +struct HPMHookPoint *HP_instance_valid_post; +struct HPMHookPoint *HP_instance_destroy_timer_pre; +struct HPMHookPoint *HP_instance_destroy_timer_post; +struct HPMHookPoint *HP_intif_parse_pre; +struct HPMHookPoint *HP_intif_parse_post; +struct HPMHookPoint *HP_intif_create_pet_pre; +struct HPMHookPoint *HP_intif_create_pet_post; +struct HPMHookPoint *HP_intif_broadcast_pre; +struct HPMHookPoint *HP_intif_broadcast_post; +struct HPMHookPoint *HP_intif_broadcast2_pre; +struct HPMHookPoint *HP_intif_broadcast2_post; +struct HPMHookPoint *HP_intif_main_message_pre; +struct HPMHookPoint *HP_intif_main_message_post; +struct HPMHookPoint *HP_intif_wis_message_pre; +struct HPMHookPoint *HP_intif_wis_message_post; +struct HPMHookPoint *HP_intif_wis_message_to_gm_pre; +struct HPMHookPoint *HP_intif_wis_message_to_gm_post; +struct HPMHookPoint *HP_intif_saveregistry_pre; +struct HPMHookPoint *HP_intif_saveregistry_post; +struct HPMHookPoint *HP_intif_request_registry_pre; +struct HPMHookPoint *HP_intif_request_registry_post; +struct HPMHookPoint *HP_intif_request_guild_storage_pre; +struct HPMHookPoint *HP_intif_request_guild_storage_post; +struct HPMHookPoint *HP_intif_send_guild_storage_pre; +struct HPMHookPoint *HP_intif_send_guild_storage_post; +struct HPMHookPoint *HP_intif_create_party_pre; +struct HPMHookPoint *HP_intif_create_party_post; +struct HPMHookPoint *HP_intif_request_partyinfo_pre; +struct HPMHookPoint *HP_intif_request_partyinfo_post; +struct HPMHookPoint *HP_intif_party_addmember_pre; +struct HPMHookPoint *HP_intif_party_addmember_post; +struct HPMHookPoint *HP_intif_party_changeoption_pre; +struct HPMHookPoint *HP_intif_party_changeoption_post; +struct HPMHookPoint *HP_intif_party_leave_pre; +struct HPMHookPoint *HP_intif_party_leave_post; +struct HPMHookPoint *HP_intif_party_changemap_pre; +struct HPMHookPoint *HP_intif_party_changemap_post; +struct HPMHookPoint *HP_intif_break_party_pre; +struct HPMHookPoint *HP_intif_break_party_post; +struct HPMHookPoint *HP_intif_party_message_pre; +struct HPMHookPoint *HP_intif_party_message_post; +struct HPMHookPoint *HP_intif_party_leaderchange_pre; +struct HPMHookPoint *HP_intif_party_leaderchange_post; +struct HPMHookPoint *HP_intif_guild_create_pre; +struct HPMHookPoint *HP_intif_guild_create_post; +struct HPMHookPoint *HP_intif_guild_request_info_pre; +struct HPMHookPoint *HP_intif_guild_request_info_post; +struct HPMHookPoint *HP_intif_guild_addmember_pre; +struct HPMHookPoint *HP_intif_guild_addmember_post; +struct HPMHookPoint *HP_intif_guild_leave_pre; +struct HPMHookPoint *HP_intif_guild_leave_post; +struct HPMHookPoint *HP_intif_guild_memberinfoshort_pre; +struct HPMHookPoint *HP_intif_guild_memberinfoshort_post; +struct HPMHookPoint *HP_intif_guild_break_pre; +struct HPMHookPoint *HP_intif_guild_break_post; +struct HPMHookPoint *HP_intif_guild_message_pre; +struct HPMHookPoint *HP_intif_guild_message_post; +struct HPMHookPoint *HP_intif_guild_change_gm_pre; +struct HPMHookPoint *HP_intif_guild_change_gm_post; +struct HPMHookPoint *HP_intif_guild_change_basicinfo_pre; +struct HPMHookPoint *HP_intif_guild_change_basicinfo_post; +struct HPMHookPoint *HP_intif_guild_change_memberinfo_pre; +struct HPMHookPoint *HP_intif_guild_change_memberinfo_post; +struct HPMHookPoint *HP_intif_guild_position_pre; +struct HPMHookPoint *HP_intif_guild_position_post; +struct HPMHookPoint *HP_intif_guild_skillup_pre; +struct HPMHookPoint *HP_intif_guild_skillup_post; +struct HPMHookPoint *HP_intif_guild_alliance_pre; +struct HPMHookPoint *HP_intif_guild_alliance_post; +struct HPMHookPoint *HP_intif_guild_notice_pre; +struct HPMHookPoint *HP_intif_guild_notice_post; +struct HPMHookPoint *HP_intif_guild_emblem_pre; +struct HPMHookPoint *HP_intif_guild_emblem_post; +struct HPMHookPoint *HP_intif_guild_castle_dataload_pre; +struct HPMHookPoint *HP_intif_guild_castle_dataload_post; +struct HPMHookPoint *HP_intif_guild_castle_datasave_pre; +struct HPMHookPoint *HP_intif_guild_castle_datasave_post; +struct HPMHookPoint *HP_intif_request_petdata_pre; +struct HPMHookPoint *HP_intif_request_petdata_post; +struct HPMHookPoint *HP_intif_save_petdata_pre; +struct HPMHookPoint *HP_intif_save_petdata_post; +struct HPMHookPoint *HP_intif_delete_petdata_pre; +struct HPMHookPoint *HP_intif_delete_petdata_post; +struct HPMHookPoint *HP_intif_rename_pre; +struct HPMHookPoint *HP_intif_rename_post; +struct HPMHookPoint *HP_intif_homunculus_create_pre; +struct HPMHookPoint *HP_intif_homunculus_create_post; +struct HPMHookPoint *HP_intif_homunculus_requestload_pre; +struct HPMHookPoint *HP_intif_homunculus_requestload_post; +struct HPMHookPoint *HP_intif_homunculus_requestsave_pre; +struct HPMHookPoint *HP_intif_homunculus_requestsave_post; +struct HPMHookPoint *HP_intif_homunculus_requestdelete_pre; +struct HPMHookPoint *HP_intif_homunculus_requestdelete_post; +struct HPMHookPoint *HP_intif_request_questlog_pre; +struct HPMHookPoint *HP_intif_request_questlog_post; +struct HPMHookPoint *HP_intif_quest_save_pre; +struct HPMHookPoint *HP_intif_quest_save_post; +struct HPMHookPoint *HP_intif_mercenary_create_pre; +struct HPMHookPoint *HP_intif_mercenary_create_post; +struct HPMHookPoint *HP_intif_mercenary_request_pre; +struct HPMHookPoint *HP_intif_mercenary_request_post; +struct HPMHookPoint *HP_intif_mercenary_delete_pre; +struct HPMHookPoint *HP_intif_mercenary_delete_post; +struct HPMHookPoint *HP_intif_mercenary_save_pre; +struct HPMHookPoint *HP_intif_mercenary_save_post; +struct HPMHookPoint *HP_intif_Mail_requestinbox_pre; +struct HPMHookPoint *HP_intif_Mail_requestinbox_post; +struct HPMHookPoint *HP_intif_Mail_read_pre; +struct HPMHookPoint *HP_intif_Mail_read_post; +struct HPMHookPoint *HP_intif_Mail_getattach_pre; +struct HPMHookPoint *HP_intif_Mail_getattach_post; +struct HPMHookPoint *HP_intif_Mail_delete_pre; +struct HPMHookPoint *HP_intif_Mail_delete_post; +struct HPMHookPoint *HP_intif_Mail_return_pre; +struct HPMHookPoint *HP_intif_Mail_return_post; +struct HPMHookPoint *HP_intif_Mail_send_pre; +struct HPMHookPoint *HP_intif_Mail_send_post; +struct HPMHookPoint *HP_intif_Auction_requestlist_pre; +struct HPMHookPoint *HP_intif_Auction_requestlist_post; +struct HPMHookPoint *HP_intif_Auction_register_pre; +struct HPMHookPoint *HP_intif_Auction_register_post; +struct HPMHookPoint *HP_intif_Auction_cancel_pre; +struct HPMHookPoint *HP_intif_Auction_cancel_post; +struct HPMHookPoint *HP_intif_Auction_close_pre; +struct HPMHookPoint *HP_intif_Auction_close_post; +struct HPMHookPoint *HP_intif_Auction_bid_pre; +struct HPMHookPoint *HP_intif_Auction_bid_post; +struct HPMHookPoint *HP_intif_elemental_create_pre; +struct HPMHookPoint *HP_intif_elemental_create_post; +struct HPMHookPoint *HP_intif_elemental_request_pre; +struct HPMHookPoint *HP_intif_elemental_request_post; +struct HPMHookPoint *HP_intif_elemental_delete_pre; +struct HPMHookPoint *HP_intif_elemental_delete_post; +struct HPMHookPoint *HP_intif_elemental_save_pre; +struct HPMHookPoint *HP_intif_elemental_save_post; +struct HPMHookPoint *HP_intif_request_accinfo_pre; +struct HPMHookPoint *HP_intif_request_accinfo_post; +struct HPMHookPoint *HP_intif_CheckForCharServer_pre; +struct HPMHookPoint *HP_intif_CheckForCharServer_post; +struct HPMHookPoint *HP_intif_pWisMessage_pre; +struct HPMHookPoint *HP_intif_pWisMessage_post; +struct HPMHookPoint *HP_intif_pWisEnd_pre; +struct HPMHookPoint *HP_intif_pWisEnd_post; +struct HPMHookPoint *HP_intif_pWisToGM_sub_pre; +struct HPMHookPoint *HP_intif_pWisToGM_sub_post; +struct HPMHookPoint *HP_intif_pWisToGM_pre; +struct HPMHookPoint *HP_intif_pWisToGM_post; +struct HPMHookPoint *HP_intif_pRegisters_pre; +struct HPMHookPoint *HP_intif_pRegisters_post; +struct HPMHookPoint *HP_intif_pChangeNameOk_pre; +struct HPMHookPoint *HP_intif_pChangeNameOk_post; +struct HPMHookPoint *HP_intif_pMessageToFD_pre; +struct HPMHookPoint *HP_intif_pMessageToFD_post; +struct HPMHookPoint *HP_intif_pLoadGuildStorage_pre; +struct HPMHookPoint *HP_intif_pLoadGuildStorage_post; +struct HPMHookPoint *HP_intif_pSaveGuildStorage_pre; +struct HPMHookPoint *HP_intif_pSaveGuildStorage_post; +struct HPMHookPoint *HP_intif_pPartyCreated_pre; +struct HPMHookPoint *HP_intif_pPartyCreated_post; +struct HPMHookPoint *HP_intif_pPartyInfo_pre; +struct HPMHookPoint *HP_intif_pPartyInfo_post; +struct HPMHookPoint *HP_intif_pPartyMemberAdded_pre; +struct HPMHookPoint *HP_intif_pPartyMemberAdded_post; +struct HPMHookPoint *HP_intif_pPartyOptionChanged_pre; +struct HPMHookPoint *HP_intif_pPartyOptionChanged_post; +struct HPMHookPoint *HP_intif_pPartyMemberWithdraw_pre; +struct HPMHookPoint *HP_intif_pPartyMemberWithdraw_post; +struct HPMHookPoint *HP_intif_pPartyMove_pre; +struct HPMHookPoint *HP_intif_pPartyMove_post; +struct HPMHookPoint *HP_intif_pPartyBroken_pre; +struct HPMHookPoint *HP_intif_pPartyBroken_post; +struct HPMHookPoint *HP_intif_pPartyMessage_pre; +struct HPMHookPoint *HP_intif_pPartyMessage_post; +struct HPMHookPoint *HP_intif_pGuildCreated_pre; +struct HPMHookPoint *HP_intif_pGuildCreated_post; +struct HPMHookPoint *HP_intif_pGuildInfo_pre; +struct HPMHookPoint *HP_intif_pGuildInfo_post; +struct HPMHookPoint *HP_intif_pGuildMemberAdded_pre; +struct HPMHookPoint *HP_intif_pGuildMemberAdded_post; +struct HPMHookPoint *HP_intif_pGuildMemberWithdraw_pre; +struct HPMHookPoint *HP_intif_pGuildMemberWithdraw_post; +struct HPMHookPoint *HP_intif_pGuildMemberInfoShort_pre; +struct HPMHookPoint *HP_intif_pGuildMemberInfoShort_post; +struct HPMHookPoint *HP_intif_pGuildBroken_pre; +struct HPMHookPoint *HP_intif_pGuildBroken_post; +struct HPMHookPoint *HP_intif_pGuildMessage_pre; +struct HPMHookPoint *HP_intif_pGuildMessage_post; +struct HPMHookPoint *HP_intif_pGuildBasicInfoChanged_pre; +struct HPMHookPoint *HP_intif_pGuildBasicInfoChanged_post; +struct HPMHookPoint *HP_intif_pGuildMemberInfoChanged_pre; +struct HPMHookPoint *HP_intif_pGuildMemberInfoChanged_post; +struct HPMHookPoint *HP_intif_pGuildPosition_pre; +struct HPMHookPoint *HP_intif_pGuildPosition_post; +struct HPMHookPoint *HP_intif_pGuildSkillUp_pre; +struct HPMHookPoint *HP_intif_pGuildSkillUp_post; +struct HPMHookPoint *HP_intif_pGuildAlliance_pre; +struct HPMHookPoint *HP_intif_pGuildAlliance_post; +struct HPMHookPoint *HP_intif_pGuildNotice_pre; +struct HPMHookPoint *HP_intif_pGuildNotice_post; +struct HPMHookPoint *HP_intif_pGuildEmblem_pre; +struct HPMHookPoint *HP_intif_pGuildEmblem_post; +struct HPMHookPoint *HP_intif_pGuildCastleDataLoad_pre; +struct HPMHookPoint *HP_intif_pGuildCastleDataLoad_post; +struct HPMHookPoint *HP_intif_pGuildMasterChanged_pre; +struct HPMHookPoint *HP_intif_pGuildMasterChanged_post; +struct HPMHookPoint *HP_intif_pQuestLog_pre; +struct HPMHookPoint *HP_intif_pQuestLog_post; +struct HPMHookPoint *HP_intif_pQuestSave_pre; +struct HPMHookPoint *HP_intif_pQuestSave_post; +struct HPMHookPoint *HP_intif_pMailInboxReceived_pre; +struct HPMHookPoint *HP_intif_pMailInboxReceived_post; +struct HPMHookPoint *HP_intif_pMailNew_pre; +struct HPMHookPoint *HP_intif_pMailNew_post; +struct HPMHookPoint *HP_intif_pMailGetAttach_pre; +struct HPMHookPoint *HP_intif_pMailGetAttach_post; +struct HPMHookPoint *HP_intif_pMailDelete_pre; +struct HPMHookPoint *HP_intif_pMailDelete_post; +struct HPMHookPoint *HP_intif_pMailReturn_pre; +struct HPMHookPoint *HP_intif_pMailReturn_post; +struct HPMHookPoint *HP_intif_pMailSend_pre; +struct HPMHookPoint *HP_intif_pMailSend_post; +struct HPMHookPoint *HP_intif_pAuctionResults_pre; +struct HPMHookPoint *HP_intif_pAuctionResults_post; +struct HPMHookPoint *HP_intif_pAuctionRegister_pre; +struct HPMHookPoint *HP_intif_pAuctionRegister_post; +struct HPMHookPoint *HP_intif_pAuctionCancel_pre; +struct HPMHookPoint *HP_intif_pAuctionCancel_post; +struct HPMHookPoint *HP_intif_pAuctionClose_pre; +struct HPMHookPoint *HP_intif_pAuctionClose_post; +struct HPMHookPoint *HP_intif_pAuctionMessage_pre; +struct HPMHookPoint *HP_intif_pAuctionMessage_post; +struct HPMHookPoint *HP_intif_pAuctionBid_pre; +struct HPMHookPoint *HP_intif_pAuctionBid_post; +struct HPMHookPoint *HP_intif_pMercenaryReceived_pre; +struct HPMHookPoint *HP_intif_pMercenaryReceived_post; +struct HPMHookPoint *HP_intif_pMercenaryDeleted_pre; +struct HPMHookPoint *HP_intif_pMercenaryDeleted_post; +struct HPMHookPoint *HP_intif_pMercenarySaved_pre; +struct HPMHookPoint *HP_intif_pMercenarySaved_post; +struct HPMHookPoint *HP_intif_pElementalReceived_pre; +struct HPMHookPoint *HP_intif_pElementalReceived_post; +struct HPMHookPoint *HP_intif_pElementalDeleted_pre; +struct HPMHookPoint *HP_intif_pElementalDeleted_post; +struct HPMHookPoint *HP_intif_pElementalSaved_pre; +struct HPMHookPoint *HP_intif_pElementalSaved_post; +struct HPMHookPoint *HP_intif_pCreatePet_pre; +struct HPMHookPoint *HP_intif_pCreatePet_post; +struct HPMHookPoint *HP_intif_pRecvPetData_pre; +struct HPMHookPoint *HP_intif_pRecvPetData_post; +struct HPMHookPoint *HP_intif_pSavePetOk_pre; +struct HPMHookPoint *HP_intif_pSavePetOk_post; +struct HPMHookPoint *HP_intif_pDeletePetOk_pre; +struct HPMHookPoint *HP_intif_pDeletePetOk_post; +struct HPMHookPoint *HP_intif_pCreateHomunculus_pre; +struct HPMHookPoint *HP_intif_pCreateHomunculus_post; +struct HPMHookPoint *HP_intif_pRecvHomunculusData_pre; +struct HPMHookPoint *HP_intif_pRecvHomunculusData_post; +struct HPMHookPoint *HP_intif_pSaveHomunculusOk_pre; +struct HPMHookPoint *HP_intif_pSaveHomunculusOk_post; +struct HPMHookPoint *HP_intif_pDeleteHomunculusOk_pre; +struct HPMHookPoint *HP_intif_pDeleteHomunculusOk_post; +struct HPMHookPoint *HP_ircbot_init_pre; +struct HPMHookPoint *HP_ircbot_init_post; +struct HPMHookPoint *HP_ircbot_final_pre; +struct HPMHookPoint *HP_ircbot_final_post; +struct HPMHookPoint *HP_ircbot_parse_pre; +struct HPMHookPoint *HP_ircbot_parse_post; +struct HPMHookPoint *HP_ircbot_parse_sub_pre; +struct HPMHookPoint *HP_ircbot_parse_sub_post; +struct HPMHookPoint *HP_ircbot_parse_source_pre; +struct HPMHookPoint *HP_ircbot_parse_source_post; +struct HPMHookPoint *HP_ircbot_func_search_pre; +struct HPMHookPoint *HP_ircbot_func_search_post; +struct HPMHookPoint *HP_ircbot_connect_timer_pre; +struct HPMHookPoint *HP_ircbot_connect_timer_post; +struct HPMHookPoint *HP_ircbot_identify_timer_pre; +struct HPMHookPoint *HP_ircbot_identify_timer_post; +struct HPMHookPoint *HP_ircbot_join_timer_pre; +struct HPMHookPoint *HP_ircbot_join_timer_post; +struct HPMHookPoint *HP_ircbot_send_pre; +struct HPMHookPoint *HP_ircbot_send_post; +struct HPMHookPoint *HP_ircbot_relay_pre; +struct HPMHookPoint *HP_ircbot_relay_post; +struct HPMHookPoint *HP_ircbot_pong_pre; +struct HPMHookPoint *HP_ircbot_pong_post; +struct HPMHookPoint *HP_ircbot_privmsg_pre; +struct HPMHookPoint *HP_ircbot_privmsg_post; +struct HPMHookPoint *HP_ircbot_userjoin_pre; +struct HPMHookPoint *HP_ircbot_userjoin_post; +struct HPMHookPoint *HP_ircbot_userleave_pre; +struct HPMHookPoint *HP_ircbot_userleave_post; +struct HPMHookPoint *HP_ircbot_usernick_pre; +struct HPMHookPoint *HP_ircbot_usernick_post; +struct HPMHookPoint *HP_itemdb_init_pre; +struct HPMHookPoint *HP_itemdb_init_post; +struct HPMHookPoint *HP_itemdb_final_pre; +struct HPMHookPoint *HP_itemdb_final_post; +struct HPMHookPoint *HP_itemdb_reload_pre; +struct HPMHookPoint *HP_itemdb_reload_post; +struct HPMHookPoint *HP_itemdb_name_constants_pre; +struct HPMHookPoint *HP_itemdb_name_constants_post; +struct HPMHookPoint *HP_itemdb_force_name_constants_pre; +struct HPMHookPoint *HP_itemdb_force_name_constants_post; +struct HPMHookPoint *HP_itemdb_read_groups_pre; +struct HPMHookPoint *HP_itemdb_read_groups_post; +struct HPMHookPoint *HP_itemdb_read_chains_pre; +struct HPMHookPoint *HP_itemdb_read_chains_post; +struct HPMHookPoint *HP_itemdb_read_packages_pre; +struct HPMHookPoint *HP_itemdb_read_packages_post; +struct HPMHookPoint *HP_itemdb_write_cached_packages_pre; +struct HPMHookPoint *HP_itemdb_write_cached_packages_post; +struct HPMHookPoint *HP_itemdb_read_cached_packages_pre; +struct HPMHookPoint *HP_itemdb_read_cached_packages_post; +struct HPMHookPoint *HP_itemdb_name2id_pre; +struct HPMHookPoint *HP_itemdb_name2id_post; +struct HPMHookPoint *HP_itemdb_search_name_pre; +struct HPMHookPoint *HP_itemdb_search_name_post; +struct HPMHookPoint *HP_itemdb_search_name_array_pre; +struct HPMHookPoint *HP_itemdb_search_name_array_post; +struct HPMHookPoint *HP_itemdb_load_pre; +struct HPMHookPoint *HP_itemdb_load_post; +struct HPMHookPoint *HP_itemdb_search_pre; +struct HPMHookPoint *HP_itemdb_search_post; +struct HPMHookPoint *HP_itemdb_parse_dbrow_pre; +struct HPMHookPoint *HP_itemdb_parse_dbrow_post; +struct HPMHookPoint *HP_itemdb_exists_pre; +struct HPMHookPoint *HP_itemdb_exists_post; +struct HPMHookPoint *HP_itemdb_in_group_pre; +struct HPMHookPoint *HP_itemdb_in_group_post; +struct HPMHookPoint *HP_itemdb_group_item_pre; +struct HPMHookPoint *HP_itemdb_group_item_post; +struct HPMHookPoint *HP_itemdb_chain_item_pre; +struct HPMHookPoint *HP_itemdb_chain_item_post; +struct HPMHookPoint *HP_itemdb_package_item_pre; +struct HPMHookPoint *HP_itemdb_package_item_post; +struct HPMHookPoint *HP_itemdb_searchname_sub_pre; +struct HPMHookPoint *HP_itemdb_searchname_sub_post; +struct HPMHookPoint *HP_itemdb_searchname_array_sub_pre; +struct HPMHookPoint *HP_itemdb_searchname_array_sub_post; +struct HPMHookPoint *HP_itemdb_searchrandomid_pre; +struct HPMHookPoint *HP_itemdb_searchrandomid_post; +struct HPMHookPoint *HP_itemdb_typename_pre; +struct HPMHookPoint *HP_itemdb_typename_post; +struct HPMHookPoint *HP_itemdb_jobid2mapid_pre; +struct HPMHookPoint *HP_itemdb_jobid2mapid_post; +struct HPMHookPoint *HP_itemdb_create_dummy_data_pre; +struct HPMHookPoint *HP_itemdb_create_dummy_data_post; +struct HPMHookPoint *HP_itemdb_create_item_data_pre; +struct HPMHookPoint *HP_itemdb_create_item_data_post; +struct HPMHookPoint *HP_itemdb_isequip_pre; +struct HPMHookPoint *HP_itemdb_isequip_post; +struct HPMHookPoint *HP_itemdb_isequip2_pre; +struct HPMHookPoint *HP_itemdb_isequip2_post; +struct HPMHookPoint *HP_itemdb_isstackable_pre; +struct HPMHookPoint *HP_itemdb_isstackable_post; +struct HPMHookPoint *HP_itemdb_isstackable2_pre; +struct HPMHookPoint *HP_itemdb_isstackable2_post; +struct HPMHookPoint *HP_itemdb_isdropable_sub_pre; +struct HPMHookPoint *HP_itemdb_isdropable_sub_post; +struct HPMHookPoint *HP_itemdb_cantrade_sub_pre; +struct HPMHookPoint *HP_itemdb_cantrade_sub_post; +struct HPMHookPoint *HP_itemdb_canpartnertrade_sub_pre; +struct HPMHookPoint *HP_itemdb_canpartnertrade_sub_post; +struct HPMHookPoint *HP_itemdb_cansell_sub_pre; +struct HPMHookPoint *HP_itemdb_cansell_sub_post; +struct HPMHookPoint *HP_itemdb_cancartstore_sub_pre; +struct HPMHookPoint *HP_itemdb_cancartstore_sub_post; +struct HPMHookPoint *HP_itemdb_canstore_sub_pre; +struct HPMHookPoint *HP_itemdb_canstore_sub_post; +struct HPMHookPoint *HP_itemdb_canguildstore_sub_pre; +struct HPMHookPoint *HP_itemdb_canguildstore_sub_post; +struct HPMHookPoint *HP_itemdb_canmail_sub_pre; +struct HPMHookPoint *HP_itemdb_canmail_sub_post; +struct HPMHookPoint *HP_itemdb_canauction_sub_pre; +struct HPMHookPoint *HP_itemdb_canauction_sub_post; +struct HPMHookPoint *HP_itemdb_isrestricted_pre; +struct HPMHookPoint *HP_itemdb_isrestricted_post; +struct HPMHookPoint *HP_itemdb_isidentified_pre; +struct HPMHookPoint *HP_itemdb_isidentified_post; +struct HPMHookPoint *HP_itemdb_isidentified2_pre; +struct HPMHookPoint *HP_itemdb_isidentified2_post; +struct HPMHookPoint *HP_itemdb_read_itemavail_pre; +struct HPMHookPoint *HP_itemdb_read_itemavail_post; +struct HPMHookPoint *HP_itemdb_read_itemtrade_pre; +struct HPMHookPoint *HP_itemdb_read_itemtrade_post; +struct HPMHookPoint *HP_itemdb_read_itemdelay_pre; +struct HPMHookPoint *HP_itemdb_read_itemdelay_post; +struct HPMHookPoint *HP_itemdb_read_stack_pre; +struct HPMHookPoint *HP_itemdb_read_stack_post; +struct HPMHookPoint *HP_itemdb_read_buyingstore_pre; +struct HPMHookPoint *HP_itemdb_read_buyingstore_post; +struct HPMHookPoint *HP_itemdb_read_nouse_pre; +struct HPMHookPoint *HP_itemdb_read_nouse_post; +struct HPMHookPoint *HP_itemdb_combo_split_atoi_pre; +struct HPMHookPoint *HP_itemdb_combo_split_atoi_post; +struct HPMHookPoint *HP_itemdb_read_combos_pre; +struct HPMHookPoint *HP_itemdb_read_combos_post; +struct HPMHookPoint *HP_itemdb_gendercheck_pre; +struct HPMHookPoint *HP_itemdb_gendercheck_post; +struct HPMHookPoint *HP_itemdb_re_split_atoi_pre; +struct HPMHookPoint *HP_itemdb_re_split_atoi_post; +struct HPMHookPoint *HP_itemdb_readdb_pre; +struct HPMHookPoint *HP_itemdb_readdb_post; +struct HPMHookPoint *HP_itemdb_read_sqldb_pre; +struct HPMHookPoint *HP_itemdb_read_sqldb_post; +struct HPMHookPoint *HP_itemdb_unique_id_pre; +struct HPMHookPoint *HP_itemdb_unique_id_post; +struct HPMHookPoint *HP_itemdb_uid_load_pre; +struct HPMHookPoint *HP_itemdb_uid_load_post; +struct HPMHookPoint *HP_itemdb_read_pre; +struct HPMHookPoint *HP_itemdb_read_post; +struct HPMHookPoint *HP_itemdb_destroy_item_data_pre; +struct HPMHookPoint *HP_itemdb_destroy_item_data_post; +struct HPMHookPoint *HP_itemdb_final_sub_pre; +struct HPMHookPoint *HP_itemdb_final_sub_post; +struct HPMHookPoint *HP_logs_pick_pc_pre; +struct HPMHookPoint *HP_logs_pick_pc_post; +struct HPMHookPoint *HP_logs_pick_mob_pre; +struct HPMHookPoint *HP_logs_pick_mob_post; +struct HPMHookPoint *HP_logs_zeny_pre; +struct HPMHookPoint *HP_logs_zeny_post; +struct HPMHookPoint *HP_logs_npc_pre; +struct HPMHookPoint *HP_logs_npc_post; +struct HPMHookPoint *HP_logs_chat_pre; +struct HPMHookPoint *HP_logs_chat_post; +struct HPMHookPoint *HP_logs_atcommand_pre; +struct HPMHookPoint *HP_logs_atcommand_post; +struct HPMHookPoint *HP_logs_branch_pre; +struct HPMHookPoint *HP_logs_branch_post; +struct HPMHookPoint *HP_logs_mvpdrop_pre; +struct HPMHookPoint *HP_logs_mvpdrop_post; +struct HPMHookPoint *HP_logs_pick_sub_pre; +struct HPMHookPoint *HP_logs_pick_sub_post; +struct HPMHookPoint *HP_logs_zeny_sub_pre; +struct HPMHookPoint *HP_logs_zeny_sub_post; +struct HPMHookPoint *HP_logs_npc_sub_pre; +struct HPMHookPoint *HP_logs_npc_sub_post; +struct HPMHookPoint *HP_logs_chat_sub_pre; +struct HPMHookPoint *HP_logs_chat_sub_post; +struct HPMHookPoint *HP_logs_atcommand_sub_pre; +struct HPMHookPoint *HP_logs_atcommand_sub_post; +struct HPMHookPoint *HP_logs_branch_sub_pre; +struct HPMHookPoint *HP_logs_branch_sub_post; +struct HPMHookPoint *HP_logs_mvpdrop_sub_pre; +struct HPMHookPoint *HP_logs_mvpdrop_sub_post; +struct HPMHookPoint *HP_logs_config_read_pre; +struct HPMHookPoint *HP_logs_config_read_post; +struct HPMHookPoint *HP_logs_config_done_pre; +struct HPMHookPoint *HP_logs_config_done_post; +struct HPMHookPoint *HP_logs_sql_init_pre; +struct HPMHookPoint *HP_logs_sql_init_post; +struct HPMHookPoint *HP_logs_sql_final_pre; +struct HPMHookPoint *HP_logs_sql_final_post; +struct HPMHookPoint *HP_logs_picktype2char_pre; +struct HPMHookPoint *HP_logs_picktype2char_post; +struct HPMHookPoint *HP_logs_chattype2char_pre; +struct HPMHookPoint *HP_logs_chattype2char_post; +struct HPMHookPoint *HP_logs_should_log_item_pre; +struct HPMHookPoint *HP_logs_should_log_item_post; +struct HPMHookPoint *HP_mail_clear_pre; +struct HPMHookPoint *HP_mail_clear_post; +struct HPMHookPoint *HP_mail_removeitem_pre; +struct HPMHookPoint *HP_mail_removeitem_post; +struct HPMHookPoint *HP_mail_removezeny_pre; +struct HPMHookPoint *HP_mail_removezeny_post; +struct HPMHookPoint *HP_mail_setitem_pre; +struct HPMHookPoint *HP_mail_setitem_post; +struct HPMHookPoint *HP_mail_setattachment_pre; +struct HPMHookPoint *HP_mail_setattachment_post; +struct HPMHookPoint *HP_mail_getattachment_pre; +struct HPMHookPoint *HP_mail_getattachment_post; +struct HPMHookPoint *HP_mail_openmail_pre; +struct HPMHookPoint *HP_mail_openmail_post; +struct HPMHookPoint *HP_mail_deliveryfail_pre; +struct HPMHookPoint *HP_mail_deliveryfail_post; +struct HPMHookPoint *HP_mail_invalid_operation_pre; +struct HPMHookPoint *HP_mail_invalid_operation_post; +struct HPMHookPoint *HP_map_zone_init_pre; +struct HPMHookPoint *HP_map_zone_init_post; +struct HPMHookPoint *HP_map_zone_remove_pre; +struct HPMHookPoint *HP_map_zone_remove_post; +struct HPMHookPoint *HP_map_zone_apply_pre; +struct HPMHookPoint *HP_map_zone_apply_post; +struct HPMHookPoint *HP_map_zone_change_pre; +struct HPMHookPoint *HP_map_zone_change_post; +struct HPMHookPoint *HP_map_zone_change2_pre; +struct HPMHookPoint *HP_map_zone_change2_post; +struct HPMHookPoint *HP_map_getcell_pre; +struct HPMHookPoint *HP_map_getcell_post; +struct HPMHookPoint *HP_map_setgatcell_pre; +struct HPMHookPoint *HP_map_setgatcell_post; +struct HPMHookPoint *HP_map_cellfromcache_pre; +struct HPMHookPoint *HP_map_cellfromcache_post; +struct HPMHookPoint *HP_map_setusers_pre; +struct HPMHookPoint *HP_map_setusers_post; +struct HPMHookPoint *HP_map_getusers_pre; +struct HPMHookPoint *HP_map_getusers_post; +struct HPMHookPoint *HP_map_usercount_pre; +struct HPMHookPoint *HP_map_usercount_post; +struct HPMHookPoint *HP_map_freeblock_pre; +struct HPMHookPoint *HP_map_freeblock_post; +struct HPMHookPoint *HP_map_freeblock_lock_pre; +struct HPMHookPoint *HP_map_freeblock_lock_post; +struct HPMHookPoint *HP_map_freeblock_unlock_pre; +struct HPMHookPoint *HP_map_freeblock_unlock_post; +struct HPMHookPoint *HP_map_addblock_pre; +struct HPMHookPoint *HP_map_addblock_post; +struct HPMHookPoint *HP_map_delblock_pre; +struct HPMHookPoint *HP_map_delblock_post; +struct HPMHookPoint *HP_map_moveblock_pre; +struct HPMHookPoint *HP_map_moveblock_post; +struct HPMHookPoint *HP_map_count_oncell_pre; +struct HPMHookPoint *HP_map_count_oncell_post; +struct HPMHookPoint *HP_map_find_skill_unit_oncell_pre; +struct HPMHookPoint *HP_map_find_skill_unit_oncell_post; +struct HPMHookPoint *HP_map_get_new_object_id_pre; +struct HPMHookPoint *HP_map_get_new_object_id_post; +struct HPMHookPoint *HP_map_search_freecell_pre; +struct HPMHookPoint *HP_map_search_freecell_post; +struct HPMHookPoint *HP_map_quit_pre; +struct HPMHookPoint *HP_map_quit_post; +struct HPMHookPoint *HP_map_addnpc_pre; +struct HPMHookPoint *HP_map_addnpc_post; +struct HPMHookPoint *HP_map_clearflooritem_timer_pre; +struct HPMHookPoint *HP_map_clearflooritem_timer_post; +struct HPMHookPoint *HP_map_removemobs_timer_pre; +struct HPMHookPoint *HP_map_removemobs_timer_post; +struct HPMHookPoint *HP_map_clearflooritem_pre; +struct HPMHookPoint *HP_map_clearflooritem_post; +struct HPMHookPoint *HP_map_addflooritem_pre; +struct HPMHookPoint *HP_map_addflooritem_post; +struct HPMHookPoint *HP_map_addnickdb_pre; +struct HPMHookPoint *HP_map_addnickdb_post; +struct HPMHookPoint *HP_map_delnickdb_pre; +struct HPMHookPoint *HP_map_delnickdb_post; +struct HPMHookPoint *HP_map_reqnickdb_pre; +struct HPMHookPoint *HP_map_reqnickdb_post; +struct HPMHookPoint *HP_map_charid2nick_pre; +struct HPMHookPoint *HP_map_charid2nick_post; +struct HPMHookPoint *HP_map_charid2sd_pre; +struct HPMHookPoint *HP_map_charid2sd_post; +struct HPMHookPoint *HP_map_vforeachpc_pre; +struct HPMHookPoint *HP_map_vforeachpc_post; +struct HPMHookPoint *HP_map_vforeachmob_pre; +struct HPMHookPoint *HP_map_vforeachmob_post; +struct HPMHookPoint *HP_map_vforeachnpc_pre; +struct HPMHookPoint *HP_map_vforeachnpc_post; +struct HPMHookPoint *HP_map_vforeachregen_pre; +struct HPMHookPoint *HP_map_vforeachregen_post; +struct HPMHookPoint *HP_map_vforeachiddb_pre; +struct HPMHookPoint *HP_map_vforeachiddb_post; +struct HPMHookPoint *HP_map_vforeachinrange_pre; +struct HPMHookPoint *HP_map_vforeachinrange_post; +struct HPMHookPoint *HP_map_vforeachinshootrange_pre; +struct HPMHookPoint *HP_map_vforeachinshootrange_post; +struct HPMHookPoint *HP_map_vforeachinarea_pre; +struct HPMHookPoint *HP_map_vforeachinarea_post; +struct HPMHookPoint *HP_map_vforcountinrange_pre; +struct HPMHookPoint *HP_map_vforcountinrange_post; +struct HPMHookPoint *HP_map_vforcountinarea_pre; +struct HPMHookPoint *HP_map_vforcountinarea_post; +struct HPMHookPoint *HP_map_vforeachinmovearea_pre; +struct HPMHookPoint *HP_map_vforeachinmovearea_post; +struct HPMHookPoint *HP_map_vforeachincell_pre; +struct HPMHookPoint *HP_map_vforeachincell_post; +struct HPMHookPoint *HP_map_vforeachinpath_pre; +struct HPMHookPoint *HP_map_vforeachinpath_post; +struct HPMHookPoint *HP_map_vforeachinmap_pre; +struct HPMHookPoint *HP_map_vforeachinmap_post; +struct HPMHookPoint *HP_map_vforeachininstance_pre; +struct HPMHookPoint *HP_map_vforeachininstance_post; +struct HPMHookPoint *HP_map_id2sd_pre; +struct HPMHookPoint *HP_map_id2sd_post; +struct HPMHookPoint *HP_map_id2md_pre; +struct HPMHookPoint *HP_map_id2md_post; +struct HPMHookPoint *HP_map_id2nd_pre; +struct HPMHookPoint *HP_map_id2nd_post; +struct HPMHookPoint *HP_map_id2hd_pre; +struct HPMHookPoint *HP_map_id2hd_post; +struct HPMHookPoint *HP_map_id2mc_pre; +struct HPMHookPoint *HP_map_id2mc_post; +struct HPMHookPoint *HP_map_id2cd_pre; +struct HPMHookPoint *HP_map_id2cd_post; +struct HPMHookPoint *HP_map_id2bl_pre; +struct HPMHookPoint *HP_map_id2bl_post; +struct HPMHookPoint *HP_map_blid_exists_pre; +struct HPMHookPoint *HP_map_blid_exists_post; +struct HPMHookPoint *HP_map_mapindex2mapid_pre; +struct HPMHookPoint *HP_map_mapindex2mapid_post; +struct HPMHookPoint *HP_map_mapname2mapid_pre; +struct HPMHookPoint *HP_map_mapname2mapid_post; +struct HPMHookPoint *HP_map_mapname2ipport_pre; +struct HPMHookPoint *HP_map_mapname2ipport_post; +struct HPMHookPoint *HP_map_setipport_pre; +struct HPMHookPoint *HP_map_setipport_post; +struct HPMHookPoint *HP_map_eraseipport_pre; +struct HPMHookPoint *HP_map_eraseipport_post; +struct HPMHookPoint *HP_map_eraseallipport_pre; +struct HPMHookPoint *HP_map_eraseallipport_post; +struct HPMHookPoint *HP_map_addiddb_pre; +struct HPMHookPoint *HP_map_addiddb_post; +struct HPMHookPoint *HP_map_deliddb_pre; +struct HPMHookPoint *HP_map_deliddb_post; +struct HPMHookPoint *HP_map_nick2sd_pre; +struct HPMHookPoint *HP_map_nick2sd_post; +struct HPMHookPoint *HP_map_getmob_boss_pre; +struct HPMHookPoint *HP_map_getmob_boss_post; +struct HPMHookPoint *HP_map_id2boss_pre; +struct HPMHookPoint *HP_map_id2boss_post; +struct HPMHookPoint *HP_map_reloadnpc_pre; +struct HPMHookPoint *HP_map_reloadnpc_post; +struct HPMHookPoint *HP_map_check_dir_pre; +struct HPMHookPoint *HP_map_check_dir_post; +struct HPMHookPoint *HP_map_calc_dir_pre; +struct HPMHookPoint *HP_map_calc_dir_post; +struct HPMHookPoint *HP_map_random_dir_pre; +struct HPMHookPoint *HP_map_random_dir_post; +struct HPMHookPoint *HP_map_cleanup_sub_pre; +struct HPMHookPoint *HP_map_cleanup_sub_post; +struct HPMHookPoint *HP_map_delmap_pre; +struct HPMHookPoint *HP_map_delmap_post; +struct HPMHookPoint *HP_map_flags_init_pre; +struct HPMHookPoint *HP_map_flags_init_post; +struct HPMHookPoint *HP_map_iwall_set_pre; +struct HPMHookPoint *HP_map_iwall_set_post; +struct HPMHookPoint *HP_map_iwall_get_pre; +struct HPMHookPoint *HP_map_iwall_get_post; +struct HPMHookPoint *HP_map_iwall_remove_pre; +struct HPMHookPoint *HP_map_iwall_remove_post; +struct HPMHookPoint *HP_map_addmobtolist_pre; +struct HPMHookPoint *HP_map_addmobtolist_post; +struct HPMHookPoint *HP_map_spawnmobs_pre; +struct HPMHookPoint *HP_map_spawnmobs_post; +struct HPMHookPoint *HP_map_removemobs_pre; +struct HPMHookPoint *HP_map_removemobs_post; +struct HPMHookPoint *HP_map_addmap2db_pre; +struct HPMHookPoint *HP_map_addmap2db_post; +struct HPMHookPoint *HP_map_removemapdb_pre; +struct HPMHookPoint *HP_map_removemapdb_post; +struct HPMHookPoint *HP_map_clean_pre; +struct HPMHookPoint *HP_map_clean_post; +struct HPMHookPoint *HP_map_do_shutdown_pre; +struct HPMHookPoint *HP_map_do_shutdown_post; +struct HPMHookPoint *HP_map_freeblock_timer_pre; +struct HPMHookPoint *HP_map_freeblock_timer_post; +struct HPMHookPoint *HP_map_searchrandfreecell_pre; +struct HPMHookPoint *HP_map_searchrandfreecell_post; +struct HPMHookPoint *HP_map_count_sub_pre; +struct HPMHookPoint *HP_map_count_sub_post; +struct HPMHookPoint *HP_map_create_charid2nick_pre; +struct HPMHookPoint *HP_map_create_charid2nick_post; +struct HPMHookPoint *HP_map_removemobs_sub_pre; +struct HPMHookPoint *HP_map_removemobs_sub_post; +struct HPMHookPoint *HP_map_gat2cell_pre; +struct HPMHookPoint *HP_map_gat2cell_post; +struct HPMHookPoint *HP_map_cell2gat_pre; +struct HPMHookPoint *HP_map_cell2gat_post; +struct HPMHookPoint *HP_map_getcellp_pre; +struct HPMHookPoint *HP_map_getcellp_post; +struct HPMHookPoint *HP_map_setcell_pre; +struct HPMHookPoint *HP_map_setcell_post; +struct HPMHookPoint *HP_map_sub_getcellp_pre; +struct HPMHookPoint *HP_map_sub_getcellp_post; +struct HPMHookPoint *HP_map_sub_setcell_pre; +struct HPMHookPoint *HP_map_sub_setcell_post; +struct HPMHookPoint *HP_map_iwall_nextxy_pre; +struct HPMHookPoint *HP_map_iwall_nextxy_post; +struct HPMHookPoint *HP_map_create_map_data_other_server_pre; +struct HPMHookPoint *HP_map_create_map_data_other_server_post; +struct HPMHookPoint *HP_map_eraseallipport_sub_pre; +struct HPMHookPoint *HP_map_eraseallipport_sub_post; +struct HPMHookPoint *HP_map_init_mapcache_pre; +struct HPMHookPoint *HP_map_init_mapcache_post; +struct HPMHookPoint *HP_map_readfromcache_pre; +struct HPMHookPoint *HP_map_readfromcache_post; +struct HPMHookPoint *HP_map_addmap_pre; +struct HPMHookPoint *HP_map_addmap_post; +struct HPMHookPoint *HP_map_delmapid_pre; +struct HPMHookPoint *HP_map_delmapid_post; +struct HPMHookPoint *HP_map_zone_db_clear_pre; +struct HPMHookPoint *HP_map_zone_db_clear_post; +struct HPMHookPoint *HP_map_list_final_pre; +struct HPMHookPoint *HP_map_list_final_post; +struct HPMHookPoint *HP_map_waterheight_pre; +struct HPMHookPoint *HP_map_waterheight_post; +struct HPMHookPoint *HP_map_readgat_pre; +struct HPMHookPoint *HP_map_readgat_post; +struct HPMHookPoint *HP_map_readallmaps_pre; +struct HPMHookPoint *HP_map_readallmaps_post; +struct HPMHookPoint *HP_map_config_read_pre; +struct HPMHookPoint *HP_map_config_read_post; +struct HPMHookPoint *HP_map_config_read_sub_pre; +struct HPMHookPoint *HP_map_config_read_sub_post; +struct HPMHookPoint *HP_map_reloadnpc_sub_pre; +struct HPMHookPoint *HP_map_reloadnpc_sub_post; +struct HPMHookPoint *HP_map_inter_config_read_pre; +struct HPMHookPoint *HP_map_inter_config_read_post; +struct HPMHookPoint *HP_map_sql_init_pre; +struct HPMHookPoint *HP_map_sql_init_post; +struct HPMHookPoint *HP_map_sql_close_pre; +struct HPMHookPoint *HP_map_sql_close_post; +struct HPMHookPoint *HP_map_zone_mf_cache_pre; +struct HPMHookPoint *HP_map_zone_mf_cache_post; +struct HPMHookPoint *HP_map_zone_str2itemid_pre; +struct HPMHookPoint *HP_map_zone_str2itemid_post; +struct HPMHookPoint *HP_map_zone_str2skillid_pre; +struct HPMHookPoint *HP_map_zone_str2skillid_post; +struct HPMHookPoint *HP_map_zone_bl_type_pre; +struct HPMHookPoint *HP_map_zone_bl_type_post; +struct HPMHookPoint *HP_map_read_zone_db_pre; +struct HPMHookPoint *HP_map_read_zone_db_post; +struct HPMHookPoint *HP_map_db_final_pre; +struct HPMHookPoint *HP_map_db_final_post; +struct HPMHookPoint *HP_map_nick_db_final_pre; +struct HPMHookPoint *HP_map_nick_db_final_post; +struct HPMHookPoint *HP_map_cleanup_db_sub_pre; +struct HPMHookPoint *HP_map_cleanup_db_sub_post; +struct HPMHookPoint *HP_map_abort_sub_pre; +struct HPMHookPoint *HP_map_abort_sub_post; +struct HPMHookPoint *HP_map_helpscreen_pre; +struct HPMHookPoint *HP_map_helpscreen_post; +struct HPMHookPoint *HP_map_versionscreen_pre; +struct HPMHookPoint *HP_map_versionscreen_post; +struct HPMHookPoint *HP_map_arg_next_value_pre; +struct HPMHookPoint *HP_map_arg_next_value_post; +struct HPMHookPoint *HP_mapit_alloc_pre; +struct HPMHookPoint *HP_mapit_alloc_post; +struct HPMHookPoint *HP_mapit_free_pre; +struct HPMHookPoint *HP_mapit_free_post; +struct HPMHookPoint *HP_mapit_first_pre; +struct HPMHookPoint *HP_mapit_first_post; +struct HPMHookPoint *HP_mapit_last_pre; +struct HPMHookPoint *HP_mapit_last_post; +struct HPMHookPoint *HP_mapit_next_pre; +struct HPMHookPoint *HP_mapit_next_post; +struct HPMHookPoint *HP_mapit_prev_pre; +struct HPMHookPoint *HP_mapit_prev_post; +struct HPMHookPoint *HP_mapit_exists_pre; +struct HPMHookPoint *HP_mapit_exists_post; +struct HPMHookPoint *HP_mapreg_init_pre; +struct HPMHookPoint *HP_mapreg_init_post; +struct HPMHookPoint *HP_mapreg_final_pre; +struct HPMHookPoint *HP_mapreg_final_post; +struct HPMHookPoint *HP_mapreg_readreg_pre; +struct HPMHookPoint *HP_mapreg_readreg_post; +struct HPMHookPoint *HP_mapreg_readregstr_pre; +struct HPMHookPoint *HP_mapreg_readregstr_post; +struct HPMHookPoint *HP_mapreg_setreg_pre; +struct HPMHookPoint *HP_mapreg_setreg_post; +struct HPMHookPoint *HP_mapreg_setregstr_pre; +struct HPMHookPoint *HP_mapreg_setregstr_post; +struct HPMHookPoint *HP_mapreg_load_pre; +struct HPMHookPoint *HP_mapreg_load_post; +struct HPMHookPoint *HP_mapreg_save_pre; +struct HPMHookPoint *HP_mapreg_save_post; +struct HPMHookPoint *HP_mapreg_save_timer_pre; +struct HPMHookPoint *HP_mapreg_save_timer_post; +struct HPMHookPoint *HP_mapreg_reload_pre; +struct HPMHookPoint *HP_mapreg_reload_post; +struct HPMHookPoint *HP_mapreg_config_read_pre; +struct HPMHookPoint *HP_mapreg_config_read_post; +struct HPMHookPoint *HP_mercenary_init_pre; +struct HPMHookPoint *HP_mercenary_init_post; +struct HPMHookPoint *HP_mercenary_class_pre; +struct HPMHookPoint *HP_mercenary_class_post; +struct HPMHookPoint *HP_mercenary_get_viewdata_pre; +struct HPMHookPoint *HP_mercenary_get_viewdata_post; +struct HPMHookPoint *HP_mercenary_create_pre; +struct HPMHookPoint *HP_mercenary_create_post; +struct HPMHookPoint *HP_mercenary_data_received_pre; +struct HPMHookPoint *HP_mercenary_data_received_post; +struct HPMHookPoint *HP_mercenary_save_pre; +struct HPMHookPoint *HP_mercenary_save_post; +struct HPMHookPoint *HP_mercenary_heal_pre; +struct HPMHookPoint *HP_mercenary_heal_post; +struct HPMHookPoint *HP_mercenary_dead_pre; +struct HPMHookPoint *HP_mercenary_dead_post; +struct HPMHookPoint *HP_mercenary_delete_pre; +struct HPMHookPoint *HP_mercenary_delete_post; +struct HPMHookPoint *HP_mercenary_contract_stop_pre; +struct HPMHookPoint *HP_mercenary_contract_stop_post; +struct HPMHookPoint *HP_mercenary_get_lifetime_pre; +struct HPMHookPoint *HP_mercenary_get_lifetime_post; +struct HPMHookPoint *HP_mercenary_get_guild_pre; +struct HPMHookPoint *HP_mercenary_get_guild_post; +struct HPMHookPoint *HP_mercenary_get_faith_pre; +struct HPMHookPoint *HP_mercenary_get_faith_post; +struct HPMHookPoint *HP_mercenary_set_faith_pre; +struct HPMHookPoint *HP_mercenary_set_faith_post; +struct HPMHookPoint *HP_mercenary_get_calls_pre; +struct HPMHookPoint *HP_mercenary_get_calls_post; +struct HPMHookPoint *HP_mercenary_set_calls_pre; +struct HPMHookPoint *HP_mercenary_set_calls_post; +struct HPMHookPoint *HP_mercenary_kills_pre; +struct HPMHookPoint *HP_mercenary_kills_post; +struct HPMHookPoint *HP_mercenary_checkskill_pre; +struct HPMHookPoint *HP_mercenary_checkskill_post; +struct HPMHookPoint *HP_mercenary_read_db_pre; +struct HPMHookPoint *HP_mercenary_read_db_post; +struct HPMHookPoint *HP_mercenary_read_skilldb_pre; +struct HPMHookPoint *HP_mercenary_read_skilldb_post; +struct HPMHookPoint *HP_mercenary_killbonus_pre; +struct HPMHookPoint *HP_mercenary_killbonus_post; +struct HPMHookPoint *HP_mercenary_search_index_pre; +struct HPMHookPoint *HP_mercenary_search_index_post; +struct HPMHookPoint *HP_mercenary_contract_end_timer_pre; +struct HPMHookPoint *HP_mercenary_contract_end_timer_post; +struct HPMHookPoint *HP_mercenary_read_db_sub_pre; +struct HPMHookPoint *HP_mercenary_read_db_sub_post; +struct HPMHookPoint *HP_mercenary_read_skill_db_sub_pre; +struct HPMHookPoint *HP_mercenary_read_skill_db_sub_post; +struct HPMHookPoint *HP_mob_init_pre; +struct HPMHookPoint *HP_mob_init_post; +struct HPMHookPoint *HP_mob_final_pre; +struct HPMHookPoint *HP_mob_final_post; +struct HPMHookPoint *HP_mob_reload_pre; +struct HPMHookPoint *HP_mob_reload_post; +struct HPMHookPoint *HP_mob_db_pre; +struct HPMHookPoint *HP_mob_db_post; +struct HPMHookPoint *HP_mob_chat_pre; +struct HPMHookPoint *HP_mob_chat_post; +struct HPMHookPoint *HP_mob_makedummymobdb_pre; +struct HPMHookPoint *HP_mob_makedummymobdb_post; +struct HPMHookPoint *HP_mob_spawn_guardian_sub_pre; +struct HPMHookPoint *HP_mob_spawn_guardian_sub_post; +struct HPMHookPoint *HP_mob_skill_id2skill_idx_pre; +struct HPMHookPoint *HP_mob_skill_id2skill_idx_post; +struct HPMHookPoint *HP_mob_db_searchname_pre; +struct HPMHookPoint *HP_mob_db_searchname_post; +struct HPMHookPoint *HP_mob_db_searchname_array_sub_pre; +struct HPMHookPoint *HP_mob_db_searchname_array_sub_post; +struct HPMHookPoint *HP_mob_mvptomb_create_pre; +struct HPMHookPoint *HP_mob_mvptomb_create_post; +struct HPMHookPoint *HP_mob_mvptomb_destroy_pre; +struct HPMHookPoint *HP_mob_mvptomb_destroy_post; +struct HPMHookPoint *HP_mob_db_searchname_array_pre; +struct HPMHookPoint *HP_mob_db_searchname_array_post; +struct HPMHookPoint *HP_mob_db_checkid_pre; +struct HPMHookPoint *HP_mob_db_checkid_post; +struct HPMHookPoint *HP_mob_get_viewdata_pre; +struct HPMHookPoint *HP_mob_get_viewdata_post; +struct HPMHookPoint *HP_mob_parse_dataset_pre; +struct HPMHookPoint *HP_mob_parse_dataset_post; +struct HPMHookPoint *HP_mob_spawn_dataset_pre; +struct HPMHookPoint *HP_mob_spawn_dataset_post; +struct HPMHookPoint *HP_mob_get_random_id_pre; +struct HPMHookPoint *HP_mob_get_random_id_post; +struct HPMHookPoint *HP_mob_ksprotected_pre; +struct HPMHookPoint *HP_mob_ksprotected_post; +struct HPMHookPoint *HP_mob_once_spawn_sub_pre; +struct HPMHookPoint *HP_mob_once_spawn_sub_post; +struct HPMHookPoint *HP_mob_once_spawn_pre; +struct HPMHookPoint *HP_mob_once_spawn_post; +struct HPMHookPoint *HP_mob_once_spawn_area_pre; +struct HPMHookPoint *HP_mob_once_spawn_area_post; +struct HPMHookPoint *HP_mob_spawn_guardian_pre; +struct HPMHookPoint *HP_mob_spawn_guardian_post; +struct HPMHookPoint *HP_mob_spawn_bg_pre; +struct HPMHookPoint *HP_mob_spawn_bg_post; +struct HPMHookPoint *HP_mob_can_reach_pre; +struct HPMHookPoint *HP_mob_can_reach_post; +struct HPMHookPoint *HP_mob_linksearch_pre; +struct HPMHookPoint *HP_mob_linksearch_post; +struct HPMHookPoint *HP_mob_delayspawn_pre; +struct HPMHookPoint *HP_mob_delayspawn_post; +struct HPMHookPoint *HP_mob_setdelayspawn_pre; +struct HPMHookPoint *HP_mob_setdelayspawn_post; +struct HPMHookPoint *HP_mob_count_sub_pre; +struct HPMHookPoint *HP_mob_count_sub_post; +struct HPMHookPoint *HP_mob_spawn_pre; +struct HPMHookPoint *HP_mob_spawn_post; +struct HPMHookPoint *HP_mob_can_changetarget_pre; +struct HPMHookPoint *HP_mob_can_changetarget_post; +struct HPMHookPoint *HP_mob_target_pre; +struct HPMHookPoint *HP_mob_target_post; +struct HPMHookPoint *HP_mob_ai_sub_hard_activesearch_pre; +struct HPMHookPoint *HP_mob_ai_sub_hard_activesearch_post; +struct HPMHookPoint *HP_mob_ai_sub_hard_changechase_pre; +struct HPMHookPoint *HP_mob_ai_sub_hard_changechase_post; +struct HPMHookPoint *HP_mob_ai_sub_hard_bg_ally_pre; +struct HPMHookPoint *HP_mob_ai_sub_hard_bg_ally_post; +struct HPMHookPoint *HP_mob_ai_sub_hard_lootsearch_pre; +struct HPMHookPoint *HP_mob_ai_sub_hard_lootsearch_post; +struct HPMHookPoint *HP_mob_warpchase_sub_pre; +struct HPMHookPoint *HP_mob_warpchase_sub_post; +struct HPMHookPoint *HP_mob_ai_sub_hard_slavemob_pre; +struct HPMHookPoint *HP_mob_ai_sub_hard_slavemob_post; +struct HPMHookPoint *HP_mob_unlocktarget_pre; +struct HPMHookPoint *HP_mob_unlocktarget_post; +struct HPMHookPoint *HP_mob_randomwalk_pre; +struct HPMHookPoint *HP_mob_randomwalk_post; +struct HPMHookPoint *HP_mob_warpchase_pre; +struct HPMHookPoint *HP_mob_warpchase_post; +struct HPMHookPoint *HP_mob_ai_sub_hard_pre; +struct HPMHookPoint *HP_mob_ai_sub_hard_post; +struct HPMHookPoint *HP_mob_ai_sub_hard_timer_pre; +struct HPMHookPoint *HP_mob_ai_sub_hard_timer_post; +struct HPMHookPoint *HP_mob_ai_sub_foreachclient_pre; +struct HPMHookPoint *HP_mob_ai_sub_foreachclient_post; +struct HPMHookPoint *HP_mob_ai_sub_lazy_pre; +struct HPMHookPoint *HP_mob_ai_sub_lazy_post; +struct HPMHookPoint *HP_mob_ai_lazy_pre; +struct HPMHookPoint *HP_mob_ai_lazy_post; +struct HPMHookPoint *HP_mob_ai_hard_pre; +struct HPMHookPoint *HP_mob_ai_hard_post; +struct HPMHookPoint *HP_mob_setdropitem_pre; +struct HPMHookPoint *HP_mob_setdropitem_post; +struct HPMHookPoint *HP_mob_setlootitem_pre; +struct HPMHookPoint *HP_mob_setlootitem_post; +struct HPMHookPoint *HP_mob_delay_item_drop_pre; +struct HPMHookPoint *HP_mob_delay_item_drop_post; +struct HPMHookPoint *HP_mob_item_drop_pre; +struct HPMHookPoint *HP_mob_item_drop_post; +struct HPMHookPoint *HP_mob_timer_delete_pre; +struct HPMHookPoint *HP_mob_timer_delete_post; +struct HPMHookPoint *HP_mob_deleteslave_sub_pre; +struct HPMHookPoint *HP_mob_deleteslave_sub_post; +struct HPMHookPoint *HP_mob_deleteslave_pre; +struct HPMHookPoint *HP_mob_deleteslave_post; +struct HPMHookPoint *HP_mob_respawn_pre; +struct HPMHookPoint *HP_mob_respawn_post; +struct HPMHookPoint *HP_mob_log_damage_pre; +struct HPMHookPoint *HP_mob_log_damage_post; +struct HPMHookPoint *HP_mob_damage_pre; +struct HPMHookPoint *HP_mob_damage_post; +struct HPMHookPoint *HP_mob_dead_pre; +struct HPMHookPoint *HP_mob_dead_post; +struct HPMHookPoint *HP_mob_revive_pre; +struct HPMHookPoint *HP_mob_revive_post; +struct HPMHookPoint *HP_mob_guardian_guildchange_pre; +struct HPMHookPoint *HP_mob_guardian_guildchange_post; +struct HPMHookPoint *HP_mob_random_class_pre; +struct HPMHookPoint *HP_mob_random_class_post; +struct HPMHookPoint *HP_mob_class_change_pre; +struct HPMHookPoint *HP_mob_class_change_post; +struct HPMHookPoint *HP_mob_heal_pre; +struct HPMHookPoint *HP_mob_heal_post; +struct HPMHookPoint *HP_mob_warpslave_sub_pre; +struct HPMHookPoint *HP_mob_warpslave_sub_post; +struct HPMHookPoint *HP_mob_warpslave_pre; +struct HPMHookPoint *HP_mob_warpslave_post; +struct HPMHookPoint *HP_mob_countslave_sub_pre; +struct HPMHookPoint *HP_mob_countslave_sub_post; +struct HPMHookPoint *HP_mob_countslave_pre; +struct HPMHookPoint *HP_mob_countslave_post; +struct HPMHookPoint *HP_mob_summonslave_pre; +struct HPMHookPoint *HP_mob_summonslave_post; +struct HPMHookPoint *HP_mob_getfriendhprate_sub_pre; +struct HPMHookPoint *HP_mob_getfriendhprate_sub_post; +struct HPMHookPoint *HP_mob_getfriendhprate_pre; +struct HPMHookPoint *HP_mob_getfriendhprate_post; +struct HPMHookPoint *HP_mob_getmasterhpltmaxrate_pre; +struct HPMHookPoint *HP_mob_getmasterhpltmaxrate_post; +struct HPMHookPoint *HP_mob_getfriendstatus_sub_pre; +struct HPMHookPoint *HP_mob_getfriendstatus_sub_post; +struct HPMHookPoint *HP_mob_getfriendstatus_pre; +struct HPMHookPoint *HP_mob_getfriendstatus_post; +struct HPMHookPoint *HP_mob_skill_use_pre; +struct HPMHookPoint *HP_mob_skill_use_post; +struct HPMHookPoint *HP_mob_skill_event_pre; +struct HPMHookPoint *HP_mob_skill_event_post; +struct HPMHookPoint *HP_mob_is_clone_pre; +struct HPMHookPoint *HP_mob_is_clone_post; +struct HPMHookPoint *HP_mob_clone_spawn_pre; +struct HPMHookPoint *HP_mob_clone_spawn_post; +struct HPMHookPoint *HP_mob_clone_delete_pre; +struct HPMHookPoint *HP_mob_clone_delete_post; +struct HPMHookPoint *HP_mob_drop_adjust_pre; +struct HPMHookPoint *HP_mob_drop_adjust_post; +struct HPMHookPoint *HP_mob_item_dropratio_adjust_pre; +struct HPMHookPoint *HP_mob_item_dropratio_adjust_post; +struct HPMHookPoint *HP_mob_parse_dbrow_pre; +struct HPMHookPoint *HP_mob_parse_dbrow_post; +struct HPMHookPoint *HP_mob_readdb_sub_pre; +struct HPMHookPoint *HP_mob_readdb_sub_post; +struct HPMHookPoint *HP_mob_readdb_pre; +struct HPMHookPoint *HP_mob_readdb_post; +struct HPMHookPoint *HP_mob_read_sqldb_pre; +struct HPMHookPoint *HP_mob_read_sqldb_post; +struct HPMHookPoint *HP_mob_readdb_mobavail_pre; +struct HPMHookPoint *HP_mob_readdb_mobavail_post; +struct HPMHookPoint *HP_mob_read_randommonster_pre; +struct HPMHookPoint *HP_mob_read_randommonster_post; +struct HPMHookPoint *HP_mob_parse_row_chatdb_pre; +struct HPMHookPoint *HP_mob_parse_row_chatdb_post; +struct HPMHookPoint *HP_mob_readchatdb_pre; +struct HPMHookPoint *HP_mob_readchatdb_post; +struct HPMHookPoint *HP_mob_parse_row_mobskilldb_pre; +struct HPMHookPoint *HP_mob_parse_row_mobskilldb_post; +struct HPMHookPoint *HP_mob_readskilldb_pre; +struct HPMHookPoint *HP_mob_readskilldb_post; +struct HPMHookPoint *HP_mob_read_sqlskilldb_pre; +struct HPMHookPoint *HP_mob_read_sqlskilldb_post; +struct HPMHookPoint *HP_mob_readdb_race2_pre; +struct HPMHookPoint *HP_mob_readdb_race2_post; +struct HPMHookPoint *HP_mob_readdb_itemratio_pre; +struct HPMHookPoint *HP_mob_readdb_itemratio_post; +struct HPMHookPoint *HP_mob_load_pre; +struct HPMHookPoint *HP_mob_load_post; +struct HPMHookPoint *HP_mob_clear_spawninfo_pre; +struct HPMHookPoint *HP_mob_clear_spawninfo_post; +struct HPMHookPoint *HP_npc_init_pre; +struct HPMHookPoint *HP_npc_init_post; +struct HPMHookPoint *HP_npc_final_pre; +struct HPMHookPoint *HP_npc_final_post; +struct HPMHookPoint *HP_npc_get_new_npc_id_pre; +struct HPMHookPoint *HP_npc_get_new_npc_id_post; +struct HPMHookPoint *HP_npc_get_viewdata_pre; +struct HPMHookPoint *HP_npc_get_viewdata_post; +struct HPMHookPoint *HP_npc_isnear_sub_pre; +struct HPMHookPoint *HP_npc_isnear_sub_post; +struct HPMHookPoint *HP_npc_isnear_pre; +struct HPMHookPoint *HP_npc_isnear_post; +struct HPMHookPoint *HP_npc_ontouch_event_pre; +struct HPMHookPoint *HP_npc_ontouch_event_post; +struct HPMHookPoint *HP_npc_ontouch2_event_pre; +struct HPMHookPoint *HP_npc_ontouch2_event_post; +struct HPMHookPoint *HP_npc_enable_sub_pre; +struct HPMHookPoint *HP_npc_enable_sub_post; +struct HPMHookPoint *HP_npc_enable_pre; +struct HPMHookPoint *HP_npc_enable_post; +struct HPMHookPoint *HP_npc_name2id_pre; +struct HPMHookPoint *HP_npc_name2id_post; +struct HPMHookPoint *HP_npc_event_dequeue_pre; +struct HPMHookPoint *HP_npc_event_dequeue_post; +struct HPMHookPoint *HP_npc_event_export_create_pre; +struct HPMHookPoint *HP_npc_event_export_create_post; +struct HPMHookPoint *HP_npc_event_export_pre; +struct HPMHookPoint *HP_npc_event_export_post; +struct HPMHookPoint *HP_npc_event_sub_pre; +struct HPMHookPoint *HP_npc_event_sub_post; +struct HPMHookPoint *HP_npc_event_doall_sub_pre; +struct HPMHookPoint *HP_npc_event_doall_sub_post; +struct HPMHookPoint *HP_npc_event_do_pre; +struct HPMHookPoint *HP_npc_event_do_post; +struct HPMHookPoint *HP_npc_event_doall_id_pre; +struct HPMHookPoint *HP_npc_event_doall_id_post; +struct HPMHookPoint *HP_npc_event_doall_pre; +struct HPMHookPoint *HP_npc_event_doall_post; +struct HPMHookPoint *HP_npc_event_do_clock_pre; +struct HPMHookPoint *HP_npc_event_do_clock_post; +struct HPMHookPoint *HP_npc_event_do_oninit_pre; +struct HPMHookPoint *HP_npc_event_do_oninit_post; +struct HPMHookPoint *HP_npc_timerevent_export_pre; +struct HPMHookPoint *HP_npc_timerevent_export_post; +struct HPMHookPoint *HP_npc_timerevent_pre; +struct HPMHookPoint *HP_npc_timerevent_post; +struct HPMHookPoint *HP_npc_timerevent_start_pre; +struct HPMHookPoint *HP_npc_timerevent_start_post; +struct HPMHookPoint *HP_npc_timerevent_stop_pre; +struct HPMHookPoint *HP_npc_timerevent_stop_post; +struct HPMHookPoint *HP_npc_timerevent_quit_pre; +struct HPMHookPoint *HP_npc_timerevent_quit_post; +struct HPMHookPoint *HP_npc_gettimerevent_tick_pre; +struct HPMHookPoint *HP_npc_gettimerevent_tick_post; +struct HPMHookPoint *HP_npc_settimerevent_tick_pre; +struct HPMHookPoint *HP_npc_settimerevent_tick_post; +struct HPMHookPoint *HP_npc_event_pre; +struct HPMHookPoint *HP_npc_event_post; +struct HPMHookPoint *HP_npc_touch_areanpc_sub_pre; +struct HPMHookPoint *HP_npc_touch_areanpc_sub_post; +struct HPMHookPoint *HP_npc_touchnext_areanpc_pre; +struct HPMHookPoint *HP_npc_touchnext_areanpc_post; +struct HPMHookPoint *HP_npc_touch_areanpc_pre; +struct HPMHookPoint *HP_npc_touch_areanpc_post; +struct HPMHookPoint *HP_npc_touch_areanpc2_pre; +struct HPMHookPoint *HP_npc_touch_areanpc2_post; +struct HPMHookPoint *HP_npc_check_areanpc_pre; +struct HPMHookPoint *HP_npc_check_areanpc_post; +struct HPMHookPoint *HP_npc_checknear_pre; +struct HPMHookPoint *HP_npc_checknear_post; +struct HPMHookPoint *HP_npc_globalmessage_pre; +struct HPMHookPoint *HP_npc_globalmessage_post; +struct HPMHookPoint *HP_npc_run_tomb_pre; +struct HPMHookPoint *HP_npc_run_tomb_post; +struct HPMHookPoint *HP_npc_click_pre; +struct HPMHookPoint *HP_npc_click_post; +struct HPMHookPoint *HP_npc_scriptcont_pre; +struct HPMHookPoint *HP_npc_scriptcont_post; +struct HPMHookPoint *HP_npc_buysellsel_pre; +struct HPMHookPoint *HP_npc_buysellsel_post; +struct HPMHookPoint *HP_npc_cashshop_buylist_pre; +struct HPMHookPoint *HP_npc_cashshop_buylist_post; +struct HPMHookPoint *HP_npc_buylist_sub_pre; +struct HPMHookPoint *HP_npc_buylist_sub_post; +struct HPMHookPoint *HP_npc_cashshop_buy_pre; +struct HPMHookPoint *HP_npc_cashshop_buy_post; +struct HPMHookPoint *HP_npc_buylist_pre; +struct HPMHookPoint *HP_npc_buylist_post; +struct HPMHookPoint *HP_npc_selllist_sub_pre; +struct HPMHookPoint *HP_npc_selllist_sub_post; +struct HPMHookPoint *HP_npc_selllist_pre; +struct HPMHookPoint *HP_npc_selllist_post; +struct HPMHookPoint *HP_npc_remove_map_pre; +struct HPMHookPoint *HP_npc_remove_map_post; +struct HPMHookPoint *HP_npc_unload_ev_pre; +struct HPMHookPoint *HP_npc_unload_ev_post; +struct HPMHookPoint *HP_npc_unload_ev_label_pre; +struct HPMHookPoint *HP_npc_unload_ev_label_post; +struct HPMHookPoint *HP_npc_unload_dup_sub_pre; +struct HPMHookPoint *HP_npc_unload_dup_sub_post; +struct HPMHookPoint *HP_npc_unload_duplicates_pre; +struct HPMHookPoint *HP_npc_unload_duplicates_post; +struct HPMHookPoint *HP_npc_unload_pre; +struct HPMHookPoint *HP_npc_unload_post; +struct HPMHookPoint *HP_npc_clearsrcfile_pre; +struct HPMHookPoint *HP_npc_clearsrcfile_post; +struct HPMHookPoint *HP_npc_addsrcfile_pre; +struct HPMHookPoint *HP_npc_addsrcfile_post; +struct HPMHookPoint *HP_npc_delsrcfile_pre; +struct HPMHookPoint *HP_npc_delsrcfile_post; +struct HPMHookPoint *HP_npc_parsename_pre; +struct HPMHookPoint *HP_npc_parsename_post; +struct HPMHookPoint *HP_npc_add_warp_pre; +struct HPMHookPoint *HP_npc_add_warp_post; +struct HPMHookPoint *HP_npc_parse_warp_pre; +struct HPMHookPoint *HP_npc_parse_warp_post; +struct HPMHookPoint *HP_npc_parse_shop_pre; +struct HPMHookPoint *HP_npc_parse_shop_post; +struct HPMHookPoint *HP_npc_convertlabel_db_pre; +struct HPMHookPoint *HP_npc_convertlabel_db_post; +struct HPMHookPoint *HP_npc_skip_script_pre; +struct HPMHookPoint *HP_npc_skip_script_post; +struct HPMHookPoint *HP_npc_parse_script_pre; +struct HPMHookPoint *HP_npc_parse_script_post; +struct HPMHookPoint *HP_npc_parse_duplicate_pre; +struct HPMHookPoint *HP_npc_parse_duplicate_post; +struct HPMHookPoint *HP_npc_duplicate4instance_pre; +struct HPMHookPoint *HP_npc_duplicate4instance_post; +struct HPMHookPoint *HP_npc_setcells_pre; +struct HPMHookPoint *HP_npc_setcells_post; +struct HPMHookPoint *HP_npc_unsetcells_sub_pre; +struct HPMHookPoint *HP_npc_unsetcells_sub_post; +struct HPMHookPoint *HP_npc_unsetcells_pre; +struct HPMHookPoint *HP_npc_unsetcells_post; +struct HPMHookPoint *HP_npc_movenpc_pre; +struct HPMHookPoint *HP_npc_movenpc_post; +struct HPMHookPoint *HP_npc_setdisplayname_pre; +struct HPMHookPoint *HP_npc_setdisplayname_post; +struct HPMHookPoint *HP_npc_setclass_pre; +struct HPMHookPoint *HP_npc_setclass_post; +struct HPMHookPoint *HP_npc_do_atcmd_event_pre; +struct HPMHookPoint *HP_npc_do_atcmd_event_post; +struct HPMHookPoint *HP_npc_parse_function_pre; +struct HPMHookPoint *HP_npc_parse_function_post; +struct HPMHookPoint *HP_npc_parse_mob2_pre; +struct HPMHookPoint *HP_npc_parse_mob2_post; +struct HPMHookPoint *HP_npc_parse_mob_pre; +struct HPMHookPoint *HP_npc_parse_mob_post; +struct HPMHookPoint *HP_npc_parse_mapflag_pre; +struct HPMHookPoint *HP_npc_parse_mapflag_post; +struct HPMHookPoint *HP_npc_parsesrcfile_pre; +struct HPMHookPoint *HP_npc_parsesrcfile_post; +struct HPMHookPoint *HP_npc_script_event_pre; +struct HPMHookPoint *HP_npc_script_event_post; +struct HPMHookPoint *HP_npc_read_event_script_pre; +struct HPMHookPoint *HP_npc_read_event_script_post; +struct HPMHookPoint *HP_npc_path_db_clear_sub_pre; +struct HPMHookPoint *HP_npc_path_db_clear_sub_post; +struct HPMHookPoint *HP_npc_ev_label_db_clear_sub_pre; +struct HPMHookPoint *HP_npc_ev_label_db_clear_sub_post; +struct HPMHookPoint *HP_npc_reload_pre; +struct HPMHookPoint *HP_npc_reload_post; +struct HPMHookPoint *HP_npc_unloadfile_pre; +struct HPMHookPoint *HP_npc_unloadfile_post; +struct HPMHookPoint *HP_npc_do_clear_npc_pre; +struct HPMHookPoint *HP_npc_do_clear_npc_post; +struct HPMHookPoint *HP_npc_debug_warps_sub_pre; +struct HPMHookPoint *HP_npc_debug_warps_sub_post; +struct HPMHookPoint *HP_npc_debug_warps_pre; +struct HPMHookPoint *HP_npc_debug_warps_post; +struct HPMHookPoint *HP_party_init_pre; +struct HPMHookPoint *HP_party_init_post; +struct HPMHookPoint *HP_party_final_pre; +struct HPMHookPoint *HP_party_final_post; +struct HPMHookPoint *HP_party_search_pre; +struct HPMHookPoint *HP_party_search_post; +struct HPMHookPoint *HP_party_searchname_pre; +struct HPMHookPoint *HP_party_searchname_post; +struct HPMHookPoint *HP_party_getmemberid_pre; +struct HPMHookPoint *HP_party_getmemberid_post; +struct HPMHookPoint *HP_party_getavailablesd_pre; +struct HPMHookPoint *HP_party_getavailablesd_post; +struct HPMHookPoint *HP_party_create_pre; +struct HPMHookPoint *HP_party_create_post; +struct HPMHookPoint *HP_party_created_pre; +struct HPMHookPoint *HP_party_created_post; +struct HPMHookPoint *HP_party_request_info_pre; +struct HPMHookPoint *HP_party_request_info_post; +struct HPMHookPoint *HP_party_invite_pre; +struct HPMHookPoint *HP_party_invite_post; +struct HPMHookPoint *HP_party_member_joined_pre; +struct HPMHookPoint *HP_party_member_joined_post; +struct HPMHookPoint *HP_party_member_added_pre; +struct HPMHookPoint *HP_party_member_added_post; +struct HPMHookPoint *HP_party_leave_pre; +struct HPMHookPoint *HP_party_leave_post; +struct HPMHookPoint *HP_party_removemember_pre; +struct HPMHookPoint *HP_party_removemember_post; +struct HPMHookPoint *HP_party_member_withdraw_pre; +struct HPMHookPoint *HP_party_member_withdraw_post; +struct HPMHookPoint *HP_party_reply_invite_pre; +struct HPMHookPoint *HP_party_reply_invite_post; +struct HPMHookPoint *HP_party_recv_noinfo_pre; +struct HPMHookPoint *HP_party_recv_noinfo_post; +struct HPMHookPoint *HP_party_recv_info_pre; +struct HPMHookPoint *HP_party_recv_info_post; +struct HPMHookPoint *HP_party_recv_movemap_pre; +struct HPMHookPoint *HP_party_recv_movemap_post; +struct HPMHookPoint *HP_party_broken_pre; +struct HPMHookPoint *HP_party_broken_post; +struct HPMHookPoint *HP_party_optionchanged_pre; +struct HPMHookPoint *HP_party_optionchanged_post; +struct HPMHookPoint *HP_party_changeoption_pre; +struct HPMHookPoint *HP_party_changeoption_post; +struct HPMHookPoint *HP_party_changeleader_pre; +struct HPMHookPoint *HP_party_changeleader_post; +struct HPMHookPoint *HP_party_send_movemap_pre; +struct HPMHookPoint *HP_party_send_movemap_post; +struct HPMHookPoint *HP_party_send_levelup_pre; +struct HPMHookPoint *HP_party_send_levelup_post; +struct HPMHookPoint *HP_party_send_logout_pre; +struct HPMHookPoint *HP_party_send_logout_post; +struct HPMHookPoint *HP_party_send_message_pre; +struct HPMHookPoint *HP_party_send_message_post; +struct HPMHookPoint *HP_party_recv_message_pre; +struct HPMHookPoint *HP_party_recv_message_post; +struct HPMHookPoint *HP_party_skill_check_pre; +struct HPMHookPoint *HP_party_skill_check_post; +struct HPMHookPoint *HP_party_send_xy_clear_pre; +struct HPMHookPoint *HP_party_send_xy_clear_post; +struct HPMHookPoint *HP_party_exp_share_pre; +struct HPMHookPoint *HP_party_exp_share_post; +struct HPMHookPoint *HP_party_share_loot_pre; +struct HPMHookPoint *HP_party_share_loot_post; +struct HPMHookPoint *HP_party_send_dot_remove_pre; +struct HPMHookPoint *HP_party_send_dot_remove_post; +struct HPMHookPoint *HP_party_sub_count_pre; +struct HPMHookPoint *HP_party_sub_count_post; +struct HPMHookPoint *HP_party_booking_register_pre; +struct HPMHookPoint *HP_party_booking_register_post; +struct HPMHookPoint *HP_party_booking_update_pre; +struct HPMHookPoint *HP_party_booking_update_post; +struct HPMHookPoint *HP_party_booking_search_pre; +struct HPMHookPoint *HP_party_booking_search_post; +struct HPMHookPoint *HP_party_booking_delete_pre; +struct HPMHookPoint *HP_party_booking_delete_post; +struct HPMHookPoint *HP_party_vforeachsamemap_pre; +struct HPMHookPoint *HP_party_vforeachsamemap_post; +struct HPMHookPoint *HP_party_send_xy_timer_pre; +struct HPMHookPoint *HP_party_send_xy_timer_post; +struct HPMHookPoint *HP_party_fill_member_pre; +struct HPMHookPoint *HP_party_fill_member_post; +struct HPMHookPoint *HP_party_sd_check_pre; +struct HPMHookPoint *HP_party_sd_check_post; +struct HPMHookPoint *HP_party_check_state_pre; +struct HPMHookPoint *HP_party_check_state_post; +struct HPMHookPoint *HP_party_create_booking_data_pre; +struct HPMHookPoint *HP_party_create_booking_data_post; +struct HPMHookPoint *HP_party_db_final_pre; +struct HPMHookPoint *HP_party_db_final_post; +struct HPMHookPoint *HP_path_blownpos_pre; +struct HPMHookPoint *HP_path_blownpos_post; +struct HPMHookPoint *HP_path_search_pre; +struct HPMHookPoint *HP_path_search_post; +struct HPMHookPoint *HP_path_search_long_pre; +struct HPMHookPoint *HP_path_search_long_post; +struct HPMHookPoint *HP_path_check_distance_pre; +struct HPMHookPoint *HP_path_check_distance_post; +struct HPMHookPoint *HP_path_distance_pre; +struct HPMHookPoint *HP_path_distance_post; +struct HPMHookPoint *HP_pc_init_pre; +struct HPMHookPoint *HP_pc_init_post; +struct HPMHookPoint *HP_pc_final_pre; +struct HPMHookPoint *HP_pc_final_post; +struct HPMHookPoint *HP_pc_get_dummy_sd_pre; +struct HPMHookPoint *HP_pc_get_dummy_sd_post; +struct HPMHookPoint *HP_pc_class2idx_pre; +struct HPMHookPoint *HP_pc_class2idx_post; +struct HPMHookPoint *HP_pc_get_group_level_pre; +struct HPMHookPoint *HP_pc_get_group_level_post; +struct HPMHookPoint *HP_pc_can_give_items_pre; +struct HPMHookPoint *HP_pc_can_give_items_post; +struct HPMHookPoint *HP_pc_can_use_command_pre; +struct HPMHookPoint *HP_pc_can_use_command_post; +struct HPMHookPoint *HP_pc_has_permission_pre; +struct HPMHookPoint *HP_pc_has_permission_post; +struct HPMHookPoint *HP_pc_set_group_pre; +struct HPMHookPoint *HP_pc_set_group_post; +struct HPMHookPoint *HP_pc_should_log_commands_pre; +struct HPMHookPoint *HP_pc_should_log_commands_post; +struct HPMHookPoint *HP_pc_setrestartvalue_pre; +struct HPMHookPoint *HP_pc_setrestartvalue_post; +struct HPMHookPoint *HP_pc_makesavestatus_pre; +struct HPMHookPoint *HP_pc_makesavestatus_post; +struct HPMHookPoint *HP_pc_respawn_pre; +struct HPMHookPoint *HP_pc_respawn_post; +struct HPMHookPoint *HP_pc_setnewpc_pre; +struct HPMHookPoint *HP_pc_setnewpc_post; +struct HPMHookPoint *HP_pc_authok_pre; +struct HPMHookPoint *HP_pc_authok_post; +struct HPMHookPoint *HP_pc_authfail_pre; +struct HPMHookPoint *HP_pc_authfail_post; +struct HPMHookPoint *HP_pc_reg_received_pre; +struct HPMHookPoint *HP_pc_reg_received_post; +struct HPMHookPoint *HP_pc_isequip_pre; +struct HPMHookPoint *HP_pc_isequip_post; +struct HPMHookPoint *HP_pc_equippoint_pre; +struct HPMHookPoint *HP_pc_equippoint_post; +struct HPMHookPoint *HP_pc_setinventorydata_pre; +struct HPMHookPoint *HP_pc_setinventorydata_post; +struct HPMHookPoint *HP_pc_checkskill_pre; +struct HPMHookPoint *HP_pc_checkskill_post; +struct HPMHookPoint *HP_pc_checkskill2_pre; +struct HPMHookPoint *HP_pc_checkskill2_post; +struct HPMHookPoint *HP_pc_checkallowskill_pre; +struct HPMHookPoint *HP_pc_checkallowskill_post; +struct HPMHookPoint *HP_pc_checkequip_pre; +struct HPMHookPoint *HP_pc_checkequip_post; +struct HPMHookPoint *HP_pc_calc_skilltree_pre; +struct HPMHookPoint *HP_pc_calc_skilltree_post; +struct HPMHookPoint *HP_pc_calc_skilltree_normalize_job_pre; +struct HPMHookPoint *HP_pc_calc_skilltree_normalize_job_post; +struct HPMHookPoint *HP_pc_clean_skilltree_pre; +struct HPMHookPoint *HP_pc_clean_skilltree_post; +struct HPMHookPoint *HP_pc_setpos_pre; +struct HPMHookPoint *HP_pc_setpos_post; +struct HPMHookPoint *HP_pc_setsavepoint_pre; +struct HPMHookPoint *HP_pc_setsavepoint_post; +struct HPMHookPoint *HP_pc_randomwarp_pre; +struct HPMHookPoint *HP_pc_randomwarp_post; +struct HPMHookPoint *HP_pc_memo_pre; +struct HPMHookPoint *HP_pc_memo_post; +struct HPMHookPoint *HP_pc_checkadditem_pre; +struct HPMHookPoint *HP_pc_checkadditem_post; +struct HPMHookPoint *HP_pc_inventoryblank_pre; +struct HPMHookPoint *HP_pc_inventoryblank_post; +struct HPMHookPoint *HP_pc_search_inventory_pre; +struct HPMHookPoint *HP_pc_search_inventory_post; +struct HPMHookPoint *HP_pc_payzeny_pre; +struct HPMHookPoint *HP_pc_payzeny_post; +struct HPMHookPoint *HP_pc_additem_pre; +struct HPMHookPoint *HP_pc_additem_post; +struct HPMHookPoint *HP_pc_getzeny_pre; +struct HPMHookPoint *HP_pc_getzeny_post; +struct HPMHookPoint *HP_pc_delitem_pre; +struct HPMHookPoint *HP_pc_delitem_post; +struct HPMHookPoint *HP_pc_paycash_pre; +struct HPMHookPoint *HP_pc_paycash_post; +struct HPMHookPoint *HP_pc_getcash_pre; +struct HPMHookPoint *HP_pc_getcash_post; +struct HPMHookPoint *HP_pc_cart_additem_pre; +struct HPMHookPoint *HP_pc_cart_additem_post; +struct HPMHookPoint *HP_pc_cart_delitem_pre; +struct HPMHookPoint *HP_pc_cart_delitem_post; +struct HPMHookPoint *HP_pc_putitemtocart_pre; +struct HPMHookPoint *HP_pc_putitemtocart_post; +struct HPMHookPoint *HP_pc_getitemfromcart_pre; +struct HPMHookPoint *HP_pc_getitemfromcart_post; +struct HPMHookPoint *HP_pc_cartitem_amount_pre; +struct HPMHookPoint *HP_pc_cartitem_amount_post; +struct HPMHookPoint *HP_pc_takeitem_pre; +struct HPMHookPoint *HP_pc_takeitem_post; +struct HPMHookPoint *HP_pc_dropitem_pre; +struct HPMHookPoint *HP_pc_dropitem_post; +struct HPMHookPoint *HP_pc_isequipped_pre; +struct HPMHookPoint *HP_pc_isequipped_post; +struct HPMHookPoint *HP_pc_can_Adopt_pre; +struct HPMHookPoint *HP_pc_can_Adopt_post; +struct HPMHookPoint *HP_pc_adoption_pre; +struct HPMHookPoint *HP_pc_adoption_post; +struct HPMHookPoint *HP_pc_updateweightstatus_pre; +struct HPMHookPoint *HP_pc_updateweightstatus_post; +struct HPMHookPoint *HP_pc_addautobonus_pre; +struct HPMHookPoint *HP_pc_addautobonus_post; +struct HPMHookPoint *HP_pc_exeautobonus_pre; +struct HPMHookPoint *HP_pc_exeautobonus_post; +struct HPMHookPoint *HP_pc_endautobonus_pre; +struct HPMHookPoint *HP_pc_endautobonus_post; +struct HPMHookPoint *HP_pc_delautobonus_pre; +struct HPMHookPoint *HP_pc_delautobonus_post; +struct HPMHookPoint *HP_pc_bonus_pre; +struct HPMHookPoint *HP_pc_bonus_post; +struct HPMHookPoint *HP_pc_bonus2_pre; +struct HPMHookPoint *HP_pc_bonus2_post; +struct HPMHookPoint *HP_pc_bonus3_pre; +struct HPMHookPoint *HP_pc_bonus3_post; +struct HPMHookPoint *HP_pc_bonus4_pre; +struct HPMHookPoint *HP_pc_bonus4_post; +struct HPMHookPoint *HP_pc_bonus5_pre; +struct HPMHookPoint *HP_pc_bonus5_post; +struct HPMHookPoint *HP_pc_skill_pre; +struct HPMHookPoint *HP_pc_skill_post; +struct HPMHookPoint *HP_pc_insert_card_pre; +struct HPMHookPoint *HP_pc_insert_card_post; +struct HPMHookPoint *HP_pc_steal_item_pre; +struct HPMHookPoint *HP_pc_steal_item_post; +struct HPMHookPoint *HP_pc_steal_coin_pre; +struct HPMHookPoint *HP_pc_steal_coin_post; +struct HPMHookPoint *HP_pc_modifybuyvalue_pre; +struct HPMHookPoint *HP_pc_modifybuyvalue_post; +struct HPMHookPoint *HP_pc_modifysellvalue_pre; +struct HPMHookPoint *HP_pc_modifysellvalue_post; +struct HPMHookPoint *HP_pc_follow_pre; +struct HPMHookPoint *HP_pc_follow_post; +struct HPMHookPoint *HP_pc_stop_following_pre; +struct HPMHookPoint *HP_pc_stop_following_post; +struct HPMHookPoint *HP_pc_maxbaselv_pre; +struct HPMHookPoint *HP_pc_maxbaselv_post; +struct HPMHookPoint *HP_pc_maxjoblv_pre; +struct HPMHookPoint *HP_pc_maxjoblv_post; +struct HPMHookPoint *HP_pc_checkbaselevelup_pre; +struct HPMHookPoint *HP_pc_checkbaselevelup_post; +struct HPMHookPoint *HP_pc_checkjoblevelup_pre; +struct HPMHookPoint *HP_pc_checkjoblevelup_post; +struct HPMHookPoint *HP_pc_gainexp_pre; +struct HPMHookPoint *HP_pc_gainexp_post; +struct HPMHookPoint *HP_pc_nextbaseexp_pre; +struct HPMHookPoint *HP_pc_nextbaseexp_post; +struct HPMHookPoint *HP_pc_thisbaseexp_pre; +struct HPMHookPoint *HP_pc_thisbaseexp_post; +struct HPMHookPoint *HP_pc_nextjobexp_pre; +struct HPMHookPoint *HP_pc_nextjobexp_post; +struct HPMHookPoint *HP_pc_thisjobexp_pre; +struct HPMHookPoint *HP_pc_thisjobexp_post; +struct HPMHookPoint *HP_pc_gets_status_point_pre; +struct HPMHookPoint *HP_pc_gets_status_point_post; +struct HPMHookPoint *HP_pc_need_status_point_pre; +struct HPMHookPoint *HP_pc_need_status_point_post; +struct HPMHookPoint *HP_pc_statusup_pre; +struct HPMHookPoint *HP_pc_statusup_post; +struct HPMHookPoint *HP_pc_statusup2_pre; +struct HPMHookPoint *HP_pc_statusup2_post; +struct HPMHookPoint *HP_pc_skillup_pre; +struct HPMHookPoint *HP_pc_skillup_post; +struct HPMHookPoint *HP_pc_allskillup_pre; +struct HPMHookPoint *HP_pc_allskillup_post; +struct HPMHookPoint *HP_pc_resetlvl_pre; +struct HPMHookPoint *HP_pc_resetlvl_post; +struct HPMHookPoint *HP_pc_resetstate_pre; +struct HPMHookPoint *HP_pc_resetstate_post; +struct HPMHookPoint *HP_pc_resetskill_pre; +struct HPMHookPoint *HP_pc_resetskill_post; +struct HPMHookPoint *HP_pc_resetfeel_pre; +struct HPMHookPoint *HP_pc_resetfeel_post; +struct HPMHookPoint *HP_pc_resethate_pre; +struct HPMHookPoint *HP_pc_resethate_post; +struct HPMHookPoint *HP_pc_equipitem_pre; +struct HPMHookPoint *HP_pc_equipitem_post; +struct HPMHookPoint *HP_pc_unequipitem_pre; +struct HPMHookPoint *HP_pc_unequipitem_post; +struct HPMHookPoint *HP_pc_checkitem_pre; +struct HPMHookPoint *HP_pc_checkitem_post; +struct HPMHookPoint *HP_pc_useitem_pre; +struct HPMHookPoint *HP_pc_useitem_post; +struct HPMHookPoint *HP_pc_skillatk_bonus_pre; +struct HPMHookPoint *HP_pc_skillatk_bonus_post; +struct HPMHookPoint *HP_pc_skillheal_bonus_pre; +struct HPMHookPoint *HP_pc_skillheal_bonus_post; +struct HPMHookPoint *HP_pc_skillheal2_bonus_pre; +struct HPMHookPoint *HP_pc_skillheal2_bonus_post; +struct HPMHookPoint *HP_pc_damage_pre; +struct HPMHookPoint *HP_pc_damage_post; +struct HPMHookPoint *HP_pc_dead_pre; +struct HPMHookPoint *HP_pc_dead_post; +struct HPMHookPoint *HP_pc_revive_pre; +struct HPMHookPoint *HP_pc_revive_post; +struct HPMHookPoint *HP_pc_heal_pre; +struct HPMHookPoint *HP_pc_heal_post; +struct HPMHookPoint *HP_pc_itemheal_pre; +struct HPMHookPoint *HP_pc_itemheal_post; +struct HPMHookPoint *HP_pc_percentheal_pre; +struct HPMHookPoint *HP_pc_percentheal_post; +struct HPMHookPoint *HP_pc_jobchange_pre; +struct HPMHookPoint *HP_pc_jobchange_post; +struct HPMHookPoint *HP_pc_setoption_pre; +struct HPMHookPoint *HP_pc_setoption_post; +struct HPMHookPoint *HP_pc_setcart_pre; +struct HPMHookPoint *HP_pc_setcart_post; +struct HPMHookPoint *HP_pc_setfalcon_pre; +struct HPMHookPoint *HP_pc_setfalcon_post; +struct HPMHookPoint *HP_pc_setriding_pre; +struct HPMHookPoint *HP_pc_setriding_post; +struct HPMHookPoint *HP_pc_setmadogear_pre; +struct HPMHookPoint *HP_pc_setmadogear_post; +struct HPMHookPoint *HP_pc_changelook_pre; +struct HPMHookPoint *HP_pc_changelook_post; +struct HPMHookPoint *HP_pc_equiplookall_pre; +struct HPMHookPoint *HP_pc_equiplookall_post; +struct HPMHookPoint *HP_pc_readparam_pre; +struct HPMHookPoint *HP_pc_readparam_post; +struct HPMHookPoint *HP_pc_setparam_pre; +struct HPMHookPoint *HP_pc_setparam_post; +struct HPMHookPoint *HP_pc_readreg_pre; +struct HPMHookPoint *HP_pc_readreg_post; +struct HPMHookPoint *HP_pc_setreg_pre; +struct HPMHookPoint *HP_pc_setreg_post; +struct HPMHookPoint *HP_pc_readregstr_pre; +struct HPMHookPoint *HP_pc_readregstr_post; +struct HPMHookPoint *HP_pc_setregstr_pre; +struct HPMHookPoint *HP_pc_setregstr_post; +struct HPMHookPoint *HP_pc_readregistry_pre; +struct HPMHookPoint *HP_pc_readregistry_post; +struct HPMHookPoint *HP_pc_setregistry_pre; +struct HPMHookPoint *HP_pc_setregistry_post; +struct HPMHookPoint *HP_pc_readregistry_str_pre; +struct HPMHookPoint *HP_pc_readregistry_str_post; +struct HPMHookPoint *HP_pc_setregistry_str_pre; +struct HPMHookPoint *HP_pc_setregistry_str_post; +struct HPMHookPoint *HP_pc_addeventtimer_pre; +struct HPMHookPoint *HP_pc_addeventtimer_post; +struct HPMHookPoint *HP_pc_deleventtimer_pre; +struct HPMHookPoint *HP_pc_deleventtimer_post; +struct HPMHookPoint *HP_pc_cleareventtimer_pre; +struct HPMHookPoint *HP_pc_cleareventtimer_post; +struct HPMHookPoint *HP_pc_addeventtimercount_pre; +struct HPMHookPoint *HP_pc_addeventtimercount_post; +struct HPMHookPoint *HP_pc_calc_pvprank_pre; +struct HPMHookPoint *HP_pc_calc_pvprank_post; +struct HPMHookPoint *HP_pc_calc_pvprank_timer_pre; +struct HPMHookPoint *HP_pc_calc_pvprank_timer_post; +struct HPMHookPoint *HP_pc_ismarried_pre; +struct HPMHookPoint *HP_pc_ismarried_post; +struct HPMHookPoint *HP_pc_marriage_pre; +struct HPMHookPoint *HP_pc_marriage_post; +struct HPMHookPoint *HP_pc_divorce_pre; +struct HPMHookPoint *HP_pc_divorce_post; +struct HPMHookPoint *HP_pc_get_partner_pre; +struct HPMHookPoint *HP_pc_get_partner_post; +struct HPMHookPoint *HP_pc_get_father_pre; +struct HPMHookPoint *HP_pc_get_father_post; +struct HPMHookPoint *HP_pc_get_mother_pre; +struct HPMHookPoint *HP_pc_get_mother_post; +struct HPMHookPoint *HP_pc_get_child_pre; +struct HPMHookPoint *HP_pc_get_child_post; +struct HPMHookPoint *HP_pc_bleeding_pre; +struct HPMHookPoint *HP_pc_bleeding_post; +struct HPMHookPoint *HP_pc_regen_pre; +struct HPMHookPoint *HP_pc_regen_post; +struct HPMHookPoint *HP_pc_setstand_pre; +struct HPMHookPoint *HP_pc_setstand_post; +struct HPMHookPoint *HP_pc_candrop_pre; +struct HPMHookPoint *HP_pc_candrop_post; +struct HPMHookPoint *HP_pc_jobid2mapid_pre; +struct HPMHookPoint *HP_pc_jobid2mapid_post; +struct HPMHookPoint *HP_pc_mapid2jobid_pre; +struct HPMHookPoint *HP_pc_mapid2jobid_post; +struct HPMHookPoint *HP_pc_job_name_pre; +struct HPMHookPoint *HP_pc_job_name_post; +struct HPMHookPoint *HP_pc_setinvincibletimer_pre; +struct HPMHookPoint *HP_pc_setinvincibletimer_post; +struct HPMHookPoint *HP_pc_delinvincibletimer_pre; +struct HPMHookPoint *HP_pc_delinvincibletimer_post; +struct HPMHookPoint *HP_pc_addspiritball_pre; +struct HPMHookPoint *HP_pc_addspiritball_post; +struct HPMHookPoint *HP_pc_delspiritball_pre; +struct HPMHookPoint *HP_pc_delspiritball_post; +struct HPMHookPoint *HP_pc_addfame_pre; +struct HPMHookPoint *HP_pc_addfame_post; +struct HPMHookPoint *HP_pc_famerank_pre; +struct HPMHookPoint *HP_pc_famerank_post; +struct HPMHookPoint *HP_pc_set_hate_mob_pre; +struct HPMHookPoint *HP_pc_set_hate_mob_post; +struct HPMHookPoint *HP_pc_readdb_pre; +struct HPMHookPoint *HP_pc_readdb_post; +struct HPMHookPoint *HP_pc_map_day_timer_pre; +struct HPMHookPoint *HP_pc_map_day_timer_post; +struct HPMHookPoint *HP_pc_map_night_timer_pre; +struct HPMHookPoint *HP_pc_map_night_timer_post; +struct HPMHookPoint *HP_pc_inventory_rentals_pre; +struct HPMHookPoint *HP_pc_inventory_rentals_post; +struct HPMHookPoint *HP_pc_inventory_rental_clear_pre; +struct HPMHookPoint *HP_pc_inventory_rental_clear_post; +struct HPMHookPoint *HP_pc_inventory_rental_add_pre; +struct HPMHookPoint *HP_pc_inventory_rental_add_post; +struct HPMHookPoint *HP_pc_disguise_pre; +struct HPMHookPoint *HP_pc_disguise_post; +struct HPMHookPoint *HP_pc_isautolooting_pre; +struct HPMHookPoint *HP_pc_isautolooting_post; +struct HPMHookPoint *HP_pc_overheat_pre; +struct HPMHookPoint *HP_pc_overheat_post; +struct HPMHookPoint *HP_pc_banding_pre; +struct HPMHookPoint *HP_pc_banding_post; +struct HPMHookPoint *HP_pc_itemcd_do_pre; +struct HPMHookPoint *HP_pc_itemcd_do_post; +struct HPMHookPoint *HP_pc_load_combo_pre; +struct HPMHookPoint *HP_pc_load_combo_post; +struct HPMHookPoint *HP_pc_add_charm_pre; +struct HPMHookPoint *HP_pc_add_charm_post; +struct HPMHookPoint *HP_pc_del_charm_pre; +struct HPMHookPoint *HP_pc_del_charm_post; +struct HPMHookPoint *HP_pc_baselevelchanged_pre; +struct HPMHookPoint *HP_pc_baselevelchanged_post; +struct HPMHookPoint *HP_pc_level_penalty_mod_pre; +struct HPMHookPoint *HP_pc_level_penalty_mod_post; +struct HPMHookPoint *HP_pc_calc_skillpoint_pre; +struct HPMHookPoint *HP_pc_calc_skillpoint_post; +struct HPMHookPoint *HP_pc_invincible_timer_pre; +struct HPMHookPoint *HP_pc_invincible_timer_post; +struct HPMHookPoint *HP_pc_spiritball_timer_pre; +struct HPMHookPoint *HP_pc_spiritball_timer_post; +struct HPMHookPoint *HP_pc_check_banding_pre; +struct HPMHookPoint *HP_pc_check_banding_post; +struct HPMHookPoint *HP_pc_inventory_rental_end_pre; +struct HPMHookPoint *HP_pc_inventory_rental_end_post; +struct HPMHookPoint *HP_pc_check_skilltree_pre; +struct HPMHookPoint *HP_pc_check_skilltree_post; +struct HPMHookPoint *HP_pc_bonus_autospell_pre; +struct HPMHookPoint *HP_pc_bonus_autospell_post; +struct HPMHookPoint *HP_pc_bonus_autospell_onskill_pre; +struct HPMHookPoint *HP_pc_bonus_autospell_onskill_post; +struct HPMHookPoint *HP_pc_bonus_addeff_pre; +struct HPMHookPoint *HP_pc_bonus_addeff_post; +struct HPMHookPoint *HP_pc_bonus_addeff_onskill_pre; +struct HPMHookPoint *HP_pc_bonus_addeff_onskill_post; +struct HPMHookPoint *HP_pc_bonus_item_drop_pre; +struct HPMHookPoint *HP_pc_bonus_item_drop_post; +struct HPMHookPoint *HP_pc_calcexp_pre; +struct HPMHookPoint *HP_pc_calcexp_post; +struct HPMHookPoint *HP_pc_respawn_timer_pre; +struct HPMHookPoint *HP_pc_respawn_timer_post; +struct HPMHookPoint *HP_pc_jobchange_killclone_pre; +struct HPMHookPoint *HP_pc_jobchange_killclone_post; +struct HPMHookPoint *HP_pc_getstat_pre; +struct HPMHookPoint *HP_pc_getstat_post; +struct HPMHookPoint *HP_pc_setstat_pre; +struct HPMHookPoint *HP_pc_setstat_post; +struct HPMHookPoint *HP_pc_eventtimer_pre; +struct HPMHookPoint *HP_pc_eventtimer_post; +struct HPMHookPoint *HP_pc_daynight_timer_sub_pre; +struct HPMHookPoint *HP_pc_daynight_timer_sub_post; +struct HPMHookPoint *HP_pc_charm_timer_pre; +struct HPMHookPoint *HP_pc_charm_timer_post; +struct HPMHookPoint *HP_pc_readdb_levelpenalty_pre; +struct HPMHookPoint *HP_pc_readdb_levelpenalty_post; +struct HPMHookPoint *HP_pc_autosave_pre; +struct HPMHookPoint *HP_pc_autosave_post; +struct HPMHookPoint *HP_pc_follow_timer_pre; +struct HPMHookPoint *HP_pc_follow_timer_post; +struct HPMHookPoint *HP_pc_read_skill_tree_pre; +struct HPMHookPoint *HP_pc_read_skill_tree_post; +struct HPMHookPoint *HP_pc_isUseitem_pre; +struct HPMHookPoint *HP_pc_isUseitem_post; +struct HPMHookPoint *HP_pc_show_steal_pre; +struct HPMHookPoint *HP_pc_show_steal_post; +struct HPMHookPoint *HP_pc_checkcombo_pre; +struct HPMHookPoint *HP_pc_checkcombo_post; +struct HPMHookPoint *HP_pc_calcweapontype_pre; +struct HPMHookPoint *HP_pc_calcweapontype_post; +struct HPMHookPoint *HP_pc_removecombo_pre; +struct HPMHookPoint *HP_pc_removecombo_post; +struct HPMHookPoint *HP_pet_init_pre; +struct HPMHookPoint *HP_pet_init_post; +struct HPMHookPoint *HP_pet_final_pre; +struct HPMHookPoint *HP_pet_final_post; +struct HPMHookPoint *HP_pet_hungry_val_pre; +struct HPMHookPoint *HP_pet_hungry_val_post; +struct HPMHookPoint *HP_pet_set_intimate_pre; +struct HPMHookPoint *HP_pet_set_intimate_post; +struct HPMHookPoint *HP_pet_create_egg_pre; +struct HPMHookPoint *HP_pet_create_egg_post; +struct HPMHookPoint *HP_pet_unlocktarget_pre; +struct HPMHookPoint *HP_pet_unlocktarget_post; +struct HPMHookPoint *HP_pet_attackskill_pre; +struct HPMHookPoint *HP_pet_attackskill_post; +struct HPMHookPoint *HP_pet_target_check_pre; +struct HPMHookPoint *HP_pet_target_check_post; +struct HPMHookPoint *HP_pet_sc_check_pre; +struct HPMHookPoint *HP_pet_sc_check_post; +struct HPMHookPoint *HP_pet_hungry_pre; +struct HPMHookPoint *HP_pet_hungry_post; +struct HPMHookPoint *HP_pet_search_petDB_index_pre; +struct HPMHookPoint *HP_pet_search_petDB_index_post; +struct HPMHookPoint *HP_pet_hungry_timer_delete_pre; +struct HPMHookPoint *HP_pet_hungry_timer_delete_post; +struct HPMHookPoint *HP_pet_performance_pre; +struct HPMHookPoint *HP_pet_performance_post; +struct HPMHookPoint *HP_pet_return_egg_pre; +struct HPMHookPoint *HP_pet_return_egg_post; +struct HPMHookPoint *HP_pet_data_init_pre; +struct HPMHookPoint *HP_pet_data_init_post; +struct HPMHookPoint *HP_pet_birth_process_pre; +struct HPMHookPoint *HP_pet_birth_process_post; +struct HPMHookPoint *HP_pet_recv_petdata_pre; +struct HPMHookPoint *HP_pet_recv_petdata_post; +struct HPMHookPoint *HP_pet_select_egg_pre; +struct HPMHookPoint *HP_pet_select_egg_post; +struct HPMHookPoint *HP_pet_catch_process1_pre; +struct HPMHookPoint *HP_pet_catch_process1_post; +struct HPMHookPoint *HP_pet_catch_process2_pre; +struct HPMHookPoint *HP_pet_catch_process2_post; +struct HPMHookPoint *HP_pet_get_egg_pre; +struct HPMHookPoint *HP_pet_get_egg_post; +struct HPMHookPoint *HP_pet_unequipitem_pre; +struct HPMHookPoint *HP_pet_unequipitem_post; +struct HPMHookPoint *HP_pet_food_pre; +struct HPMHookPoint *HP_pet_food_post; +struct HPMHookPoint *HP_pet_ai_sub_hard_lootsearch_pre; +struct HPMHookPoint *HP_pet_ai_sub_hard_lootsearch_post; +struct HPMHookPoint *HP_pet_menu_pre; +struct HPMHookPoint *HP_pet_menu_post; +struct HPMHookPoint *HP_pet_change_name_pre; +struct HPMHookPoint *HP_pet_change_name_post; +struct HPMHookPoint *HP_pet_change_name_ack_pre; +struct HPMHookPoint *HP_pet_change_name_ack_post; +struct HPMHookPoint *HP_pet_equipitem_pre; +struct HPMHookPoint *HP_pet_equipitem_post; +struct HPMHookPoint *HP_pet_randomwalk_pre; +struct HPMHookPoint *HP_pet_randomwalk_post; +struct HPMHookPoint *HP_pet_ai_sub_hard_pre; +struct HPMHookPoint *HP_pet_ai_sub_hard_post; +struct HPMHookPoint *HP_pet_ai_sub_foreachclient_pre; +struct HPMHookPoint *HP_pet_ai_sub_foreachclient_post; +struct HPMHookPoint *HP_pet_ai_hard_pre; +struct HPMHookPoint *HP_pet_ai_hard_post; +struct HPMHookPoint *HP_pet_delay_item_drop_pre; +struct HPMHookPoint *HP_pet_delay_item_drop_post; +struct HPMHookPoint *HP_pet_lootitem_drop_pre; +struct HPMHookPoint *HP_pet_lootitem_drop_post; +struct HPMHookPoint *HP_pet_skill_bonus_timer_pre; +struct HPMHookPoint *HP_pet_skill_bonus_timer_post; +struct HPMHookPoint *HP_pet_recovery_timer_pre; +struct HPMHookPoint *HP_pet_recovery_timer_post; +struct HPMHookPoint *HP_pet_heal_timer_pre; +struct HPMHookPoint *HP_pet_heal_timer_post; +struct HPMHookPoint *HP_pet_skill_support_timer_pre; +struct HPMHookPoint *HP_pet_skill_support_timer_post; +struct HPMHookPoint *HP_pet_read_db_pre; +struct HPMHookPoint *HP_pet_read_db_post; +struct HPMHookPoint *HP_quest_init_pre; +struct HPMHookPoint *HP_quest_init_post; +struct HPMHookPoint *HP_quest_reload_pre; +struct HPMHookPoint *HP_quest_reload_post; +struct HPMHookPoint *HP_quest_search_db_pre; +struct HPMHookPoint *HP_quest_search_db_post; +struct HPMHookPoint *HP_quest_pc_login_pre; +struct HPMHookPoint *HP_quest_pc_login_post; +struct HPMHookPoint *HP_quest_add_pre; +struct HPMHookPoint *HP_quest_add_post; +struct HPMHookPoint *HP_quest_change_pre; +struct HPMHookPoint *HP_quest_change_post; +struct HPMHookPoint *HP_quest_delete_pre; +struct HPMHookPoint *HP_quest_delete_post; +struct HPMHookPoint *HP_quest_update_objective_sub_pre; +struct HPMHookPoint *HP_quest_update_objective_sub_post; +struct HPMHookPoint *HP_quest_update_objective_pre; +struct HPMHookPoint *HP_quest_update_objective_post; +struct HPMHookPoint *HP_quest_update_status_pre; +struct HPMHookPoint *HP_quest_update_status_post; +struct HPMHookPoint *HP_quest_check_pre; +struct HPMHookPoint *HP_quest_check_post; +struct HPMHookPoint *HP_quest_read_db_pre; +struct HPMHookPoint *HP_quest_read_db_post; +struct HPMHookPoint *HP_script_init_pre; +struct HPMHookPoint *HP_script_init_post; +struct HPMHookPoint *HP_script_final_pre; +struct HPMHookPoint *HP_script_final_post; +struct HPMHookPoint *HP_script_reload_pre; +struct HPMHookPoint *HP_script_reload_post; +struct HPMHookPoint *HP_script_parse_pre; +struct HPMHookPoint *HP_script_parse_post; +struct HPMHookPoint *HP_script_parse_builtin_pre; +struct HPMHookPoint *HP_script_parse_builtin_post; +struct HPMHookPoint *HP_script_parse_subexpr_pre; +struct HPMHookPoint *HP_script_parse_subexpr_post; +struct HPMHookPoint *HP_script_skip_space_pre; +struct HPMHookPoint *HP_script_skip_space_post; +struct HPMHookPoint *HP_script_error_pre; +struct HPMHookPoint *HP_script_error_post; +struct HPMHookPoint *HP_script_warning_pre; +struct HPMHookPoint *HP_script_warning_post; +struct HPMHookPoint *HP_script_addScript_pre; +struct HPMHookPoint *HP_script_addScript_post; +struct HPMHookPoint *HP_script_conv_num_pre; +struct HPMHookPoint *HP_script_conv_num_post; +struct HPMHookPoint *HP_script_conv_str_pre; +struct HPMHookPoint *HP_script_conv_str_post; +struct HPMHookPoint *HP_script_rid2sd_pre; +struct HPMHookPoint *HP_script_rid2sd_post; +struct HPMHookPoint *HP_script_detach_rid_pre; +struct HPMHookPoint *HP_script_detach_rid_post; +struct HPMHookPoint *HP_script_push_val_pre; +struct HPMHookPoint *HP_script_push_val_post; +struct HPMHookPoint *HP_script_get_val_pre; +struct HPMHookPoint *HP_script_get_val_post; +struct HPMHookPoint *HP_script_get_val2_pre; +struct HPMHookPoint *HP_script_get_val2_post; +struct HPMHookPoint *HP_script_push_str_pre; +struct HPMHookPoint *HP_script_push_str_post; +struct HPMHookPoint *HP_script_push_copy_pre; +struct HPMHookPoint *HP_script_push_copy_post; +struct HPMHookPoint *HP_script_pop_stack_pre; +struct HPMHookPoint *HP_script_pop_stack_post; +struct HPMHookPoint *HP_script_set_constant_pre; +struct HPMHookPoint *HP_script_set_constant_post; +struct HPMHookPoint *HP_script_set_constant2_pre; +struct HPMHookPoint *HP_script_set_constant2_post; +struct HPMHookPoint *HP_script_set_constant_force_pre; +struct HPMHookPoint *HP_script_set_constant_force_post; +struct HPMHookPoint *HP_script_get_constant_pre; +struct HPMHookPoint *HP_script_get_constant_post; +struct HPMHookPoint *HP_script_label_add_pre; +struct HPMHookPoint *HP_script_label_add_post; +struct HPMHookPoint *HP_script_run_pre; +struct HPMHookPoint *HP_script_run_post; +struct HPMHookPoint *HP_script_run_main_pre; +struct HPMHookPoint *HP_script_run_main_post; +struct HPMHookPoint *HP_script_run_timer_pre; +struct HPMHookPoint *HP_script_run_timer_post; +struct HPMHookPoint *HP_script_set_var_pre; +struct HPMHookPoint *HP_script_set_var_post; +struct HPMHookPoint *HP_script_stop_instances_pre; +struct HPMHookPoint *HP_script_stop_instances_post; +struct HPMHookPoint *HP_script_free_code_pre; +struct HPMHookPoint *HP_script_free_code_post; +struct HPMHookPoint *HP_script_free_vars_pre; +struct HPMHookPoint *HP_script_free_vars_post; +struct HPMHookPoint *HP_script_alloc_state_pre; +struct HPMHookPoint *HP_script_alloc_state_post; +struct HPMHookPoint *HP_script_free_state_pre; +struct HPMHookPoint *HP_script_free_state_post; +struct HPMHookPoint *HP_script_run_autobonus_pre; +struct HPMHookPoint *HP_script_run_autobonus_post; +struct HPMHookPoint *HP_script_cleararray_pc_pre; +struct HPMHookPoint *HP_script_cleararray_pc_post; +struct HPMHookPoint *HP_script_setarray_pc_pre; +struct HPMHookPoint *HP_script_setarray_pc_post; +struct HPMHookPoint *HP_script_config_read_pre; +struct HPMHookPoint *HP_script_config_read_post; +struct HPMHookPoint *HP_script_add_str_pre; +struct HPMHookPoint *HP_script_add_str_post; +struct HPMHookPoint *HP_script_get_str_pre; +struct HPMHookPoint *HP_script_get_str_post; +struct HPMHookPoint *HP_script_search_str_pre; +struct HPMHookPoint *HP_script_search_str_post; +struct HPMHookPoint *HP_script_setd_sub_pre; +struct HPMHookPoint *HP_script_setd_sub_post; +struct HPMHookPoint *HP_script_attach_state_pre; +struct HPMHookPoint *HP_script_attach_state_post; +struct HPMHookPoint *HP_script_queue_pre; +struct HPMHookPoint *HP_script_queue_post; +struct HPMHookPoint *HP_script_queue_add_pre; +struct HPMHookPoint *HP_script_queue_add_post; +struct HPMHookPoint *HP_script_queue_del_pre; +struct HPMHookPoint *HP_script_queue_del_post; +struct HPMHookPoint *HP_script_queue_remove_pre; +struct HPMHookPoint *HP_script_queue_remove_post; +struct HPMHookPoint *HP_script_queue_create_pre; +struct HPMHookPoint *HP_script_queue_create_post; +struct HPMHookPoint *HP_script_queue_clear_pre; +struct HPMHookPoint *HP_script_queue_clear_post; +struct HPMHookPoint *HP_script_parse_curly_close_pre; +struct HPMHookPoint *HP_script_parse_curly_close_post; +struct HPMHookPoint *HP_script_parse_syntax_close_pre; +struct HPMHookPoint *HP_script_parse_syntax_close_post; +struct HPMHookPoint *HP_script_parse_syntax_close_sub_pre; +struct HPMHookPoint *HP_script_parse_syntax_close_sub_post; +struct HPMHookPoint *HP_script_parse_syntax_pre; +struct HPMHookPoint *HP_script_parse_syntax_post; +struct HPMHookPoint *HP_script_get_com_pre; +struct HPMHookPoint *HP_script_get_com_post; +struct HPMHookPoint *HP_script_get_num_pre; +struct HPMHookPoint *HP_script_get_num_post; +struct HPMHookPoint *HP_script_op2name_pre; +struct HPMHookPoint *HP_script_op2name_post; +struct HPMHookPoint *HP_script_reportsrc_pre; +struct HPMHookPoint *HP_script_reportsrc_post; +struct HPMHookPoint *HP_script_reportdata_pre; +struct HPMHookPoint *HP_script_reportdata_post; +struct HPMHookPoint *HP_script_reportfunc_pre; +struct HPMHookPoint *HP_script_reportfunc_post; +struct HPMHookPoint *HP_script_disp_error_message2_pre; +struct HPMHookPoint *HP_script_disp_error_message2_post; +struct HPMHookPoint *HP_script_disp_warning_message_pre; +struct HPMHookPoint *HP_script_disp_warning_message_post; +struct HPMHookPoint *HP_script_check_event_pre; +struct HPMHookPoint *HP_script_check_event_post; +struct HPMHookPoint *HP_script_calc_hash_pre; +struct HPMHookPoint *HP_script_calc_hash_post; +struct HPMHookPoint *HP_script_addb_pre; +struct HPMHookPoint *HP_script_addb_post; +struct HPMHookPoint *HP_script_addc_pre; +struct HPMHookPoint *HP_script_addc_post; +struct HPMHookPoint *HP_script_addi_pre; +struct HPMHookPoint *HP_script_addi_post; +struct HPMHookPoint *HP_script_addl_pre; +struct HPMHookPoint *HP_script_addl_post; +struct HPMHookPoint *HP_script_set_label_pre; +struct HPMHookPoint *HP_script_set_label_post; +struct HPMHookPoint *HP_script_skip_word_pre; +struct HPMHookPoint *HP_script_skip_word_post; +struct HPMHookPoint *HP_script_add_word_pre; +struct HPMHookPoint *HP_script_add_word_post; +struct HPMHookPoint *HP_script_parse_callfunc_pre; +struct HPMHookPoint *HP_script_parse_callfunc_post; +struct HPMHookPoint *HP_script_parse_nextline_pre; +struct HPMHookPoint *HP_script_parse_nextline_post; +struct HPMHookPoint *HP_script_parse_variable_pre; +struct HPMHookPoint *HP_script_parse_variable_post; +struct HPMHookPoint *HP_script_parse_simpleexpr_pre; +struct HPMHookPoint *HP_script_parse_simpleexpr_post; +struct HPMHookPoint *HP_script_parse_expr_pre; +struct HPMHookPoint *HP_script_parse_expr_post; +struct HPMHookPoint *HP_script_parse_line_pre; +struct HPMHookPoint *HP_script_parse_line_post; +struct HPMHookPoint *HP_script_read_constdb_pre; +struct HPMHookPoint *HP_script_read_constdb_post; +struct HPMHookPoint *HP_script_print_line_pre; +struct HPMHookPoint *HP_script_print_line_post; +struct HPMHookPoint *HP_script_errorwarning_sub_pre; +struct HPMHookPoint *HP_script_errorwarning_sub_post; +struct HPMHookPoint *HP_script_set_reg_pre; +struct HPMHookPoint *HP_script_set_reg_post; +struct HPMHookPoint *HP_script_stack_expand_pre; +struct HPMHookPoint *HP_script_stack_expand_post; +struct HPMHookPoint *HP_script_push_retinfo_pre; +struct HPMHookPoint *HP_script_push_retinfo_post; +struct HPMHookPoint *HP_script_pop_val_pre; +struct HPMHookPoint *HP_script_pop_val_post; +struct HPMHookPoint *HP_script_op_3_pre; +struct HPMHookPoint *HP_script_op_3_post; +struct HPMHookPoint *HP_script_op_2str_pre; +struct HPMHookPoint *HP_script_op_2str_post; +struct HPMHookPoint *HP_script_op_2num_pre; +struct HPMHookPoint *HP_script_op_2num_post; +struct HPMHookPoint *HP_script_op_2_pre; +struct HPMHookPoint *HP_script_op_2_post; +struct HPMHookPoint *HP_script_op_1_pre; +struct HPMHookPoint *HP_script_op_1_post; +struct HPMHookPoint *HP_script_check_buildin_argtype_pre; +struct HPMHookPoint *HP_script_check_buildin_argtype_post; +struct HPMHookPoint *HP_script_detach_state_pre; +struct HPMHookPoint *HP_script_detach_state_post; +struct HPMHookPoint *HP_script_db_free_code_sub_pre; +struct HPMHookPoint *HP_script_db_free_code_sub_post; +struct HPMHookPoint *HP_script_add_autobonus_pre; +struct HPMHookPoint *HP_script_add_autobonus_post; +struct HPMHookPoint *HP_script_menu_countoptions_pre; +struct HPMHookPoint *HP_script_menu_countoptions_post; +struct HPMHookPoint *HP_script_buildin_areawarp_sub_pre; +struct HPMHookPoint *HP_script_buildin_areawarp_sub_post; +struct HPMHookPoint *HP_script_buildin_areapercentheal_sub_pre; +struct HPMHookPoint *HP_script_buildin_areapercentheal_sub_post; +struct HPMHookPoint *HP_script_getarraysize_pre; +struct HPMHookPoint *HP_script_getarraysize_post; +struct HPMHookPoint *HP_script_buildin_delitem_delete_pre; +struct HPMHookPoint *HP_script_buildin_delitem_delete_post; +struct HPMHookPoint *HP_script_buildin_delitem_search_pre; +struct HPMHookPoint *HP_script_buildin_delitem_search_post; +struct HPMHookPoint *HP_script_buildin_killmonster_sub_strip_pre; +struct HPMHookPoint *HP_script_buildin_killmonster_sub_strip_post; +struct HPMHookPoint *HP_script_buildin_killmonster_sub_pre; +struct HPMHookPoint *HP_script_buildin_killmonster_sub_post; +struct HPMHookPoint *HP_script_buildin_killmonsterall_sub_strip_pre; +struct HPMHookPoint *HP_script_buildin_killmonsterall_sub_strip_post; +struct HPMHookPoint *HP_script_buildin_killmonsterall_sub_pre; +struct HPMHookPoint *HP_script_buildin_killmonsterall_sub_post; +struct HPMHookPoint *HP_script_buildin_announce_sub_pre; +struct HPMHookPoint *HP_script_buildin_announce_sub_post; +struct HPMHookPoint *HP_script_buildin_getareausers_sub_pre; +struct HPMHookPoint *HP_script_buildin_getareausers_sub_post; +struct HPMHookPoint *HP_script_buildin_getareadropitem_sub_pre; +struct HPMHookPoint *HP_script_buildin_getareadropitem_sub_post; +struct HPMHookPoint *HP_script_mapflag_pvp_sub_pre; +struct HPMHookPoint *HP_script_mapflag_pvp_sub_post; +struct HPMHookPoint *HP_script_buildin_pvpoff_sub_pre; +struct HPMHookPoint *HP_script_buildin_pvpoff_sub_post; +struct HPMHookPoint *HP_script_buildin_maprespawnguildid_sub_pc_pre; +struct HPMHookPoint *HP_script_buildin_maprespawnguildid_sub_pc_post; +struct HPMHookPoint *HP_script_buildin_maprespawnguildid_sub_mob_pre; +struct HPMHookPoint *HP_script_buildin_maprespawnguildid_sub_mob_post; +struct HPMHookPoint *HP_script_buildin_mobcount_sub_pre; +struct HPMHookPoint *HP_script_buildin_mobcount_sub_post; +struct HPMHookPoint *HP_script_playBGM_sub_pre; +struct HPMHookPoint *HP_script_playBGM_sub_post; +struct HPMHookPoint *HP_script_playBGM_foreachpc_sub_pre; +struct HPMHookPoint *HP_script_playBGM_foreachpc_sub_post; +struct HPMHookPoint *HP_script_soundeffect_sub_pre; +struct HPMHookPoint *HP_script_soundeffect_sub_post; +struct HPMHookPoint *HP_script_buildin_query_sql_sub_pre; +struct HPMHookPoint *HP_script_buildin_query_sql_sub_post; +struct HPMHookPoint *HP_script_axtoi_pre; +struct HPMHookPoint *HP_script_axtoi_post; +struct HPMHookPoint *HP_script_buildin_instance_warpall_sub_pre; +struct HPMHookPoint *HP_script_buildin_instance_warpall_sub_post; +struct HPMHookPoint *HP_script_buildin_mobuseskill_sub_pre; +struct HPMHookPoint *HP_script_buildin_mobuseskill_sub_post; +struct HPMHookPoint *HP_script_cleanfloor_sub_pre; +struct HPMHookPoint *HP_script_cleanfloor_sub_post; +struct HPMHookPoint *HP_script_run_func_pre; +struct HPMHookPoint *HP_script_run_func_post; +struct HPMHookPoint *HP_searchstore_open_pre; +struct HPMHookPoint *HP_searchstore_open_post; +struct HPMHookPoint *HP_searchstore_query_pre; +struct HPMHookPoint *HP_searchstore_query_post; +struct HPMHookPoint *HP_searchstore_querynext_pre; +struct HPMHookPoint *HP_searchstore_querynext_post; +struct HPMHookPoint *HP_searchstore_next_pre; +struct HPMHookPoint *HP_searchstore_next_post; +struct HPMHookPoint *HP_searchstore_clear_pre; +struct HPMHookPoint *HP_searchstore_clear_post; +struct HPMHookPoint *HP_searchstore_close_pre; +struct HPMHookPoint *HP_searchstore_close_post; +struct HPMHookPoint *HP_searchstore_click_pre; +struct HPMHookPoint *HP_searchstore_click_post; +struct HPMHookPoint *HP_searchstore_queryremote_pre; +struct HPMHookPoint *HP_searchstore_queryremote_post; +struct HPMHookPoint *HP_searchstore_clearremote_pre; +struct HPMHookPoint *HP_searchstore_clearremote_post; +struct HPMHookPoint *HP_searchstore_result_pre; +struct HPMHookPoint *HP_searchstore_result_post; +struct HPMHookPoint *HP_skill_init_pre; +struct HPMHookPoint *HP_skill_init_post; +struct HPMHookPoint *HP_skill_final_pre; +struct HPMHookPoint *HP_skill_final_post; +struct HPMHookPoint *HP_skill_reload_pre; +struct HPMHookPoint *HP_skill_reload_post; +struct HPMHookPoint *HP_skill_read_db_pre; +struct HPMHookPoint *HP_skill_read_db_post; +struct HPMHookPoint *HP_skill_get_index_pre; +struct HPMHookPoint *HP_skill_get_index_post; +struct HPMHookPoint *HP_skill_get_type_pre; +struct HPMHookPoint *HP_skill_get_type_post; +struct HPMHookPoint *HP_skill_get_hit_pre; +struct HPMHookPoint *HP_skill_get_hit_post; +struct HPMHookPoint *HP_skill_get_inf_pre; +struct HPMHookPoint *HP_skill_get_inf_post; +struct HPMHookPoint *HP_skill_get_ele_pre; +struct HPMHookPoint *HP_skill_get_ele_post; +struct HPMHookPoint *HP_skill_get_nk_pre; +struct HPMHookPoint *HP_skill_get_nk_post; +struct HPMHookPoint *HP_skill_get_max_pre; +struct HPMHookPoint *HP_skill_get_max_post; +struct HPMHookPoint *HP_skill_get_range_pre; +struct HPMHookPoint *HP_skill_get_range_post; +struct HPMHookPoint *HP_skill_get_range2_pre; +struct HPMHookPoint *HP_skill_get_range2_post; +struct HPMHookPoint *HP_skill_get_splash_pre; +struct HPMHookPoint *HP_skill_get_splash_post; +struct HPMHookPoint *HP_skill_get_hp_pre; +struct HPMHookPoint *HP_skill_get_hp_post; +struct HPMHookPoint *HP_skill_get_mhp_pre; +struct HPMHookPoint *HP_skill_get_mhp_post; +struct HPMHookPoint *HP_skill_get_sp_pre; +struct HPMHookPoint *HP_skill_get_sp_post; +struct HPMHookPoint *HP_skill_get_state_pre; +struct HPMHookPoint *HP_skill_get_state_post; +struct HPMHookPoint *HP_skill_get_spiritball_pre; +struct HPMHookPoint *HP_skill_get_spiritball_post; +struct HPMHookPoint *HP_skill_get_zeny_pre; +struct HPMHookPoint *HP_skill_get_zeny_post; +struct HPMHookPoint *HP_skill_get_num_pre; +struct HPMHookPoint *HP_skill_get_num_post; +struct HPMHookPoint *HP_skill_get_cast_pre; +struct HPMHookPoint *HP_skill_get_cast_post; +struct HPMHookPoint *HP_skill_get_delay_pre; +struct HPMHookPoint *HP_skill_get_delay_post; +struct HPMHookPoint *HP_skill_get_walkdelay_pre; +struct HPMHookPoint *HP_skill_get_walkdelay_post; +struct HPMHookPoint *HP_skill_get_time_pre; +struct HPMHookPoint *HP_skill_get_time_post; +struct HPMHookPoint *HP_skill_get_time2_pre; +struct HPMHookPoint *HP_skill_get_time2_post; +struct HPMHookPoint *HP_skill_get_castnodex_pre; +struct HPMHookPoint *HP_skill_get_castnodex_post; +struct HPMHookPoint *HP_skill_get_delaynodex_pre; +struct HPMHookPoint *HP_skill_get_delaynodex_post; +struct HPMHookPoint *HP_skill_get_castdef_pre; +struct HPMHookPoint *HP_skill_get_castdef_post; +struct HPMHookPoint *HP_skill_get_weapontype_pre; +struct HPMHookPoint *HP_skill_get_weapontype_post; +struct HPMHookPoint *HP_skill_get_ammotype_pre; +struct HPMHookPoint *HP_skill_get_ammotype_post; +struct HPMHookPoint *HP_skill_get_ammo_qty_pre; +struct HPMHookPoint *HP_skill_get_ammo_qty_post; +struct HPMHookPoint *HP_skill_get_unit_id_pre; +struct HPMHookPoint *HP_skill_get_unit_id_post; +struct HPMHookPoint *HP_skill_get_inf2_pre; +struct HPMHookPoint *HP_skill_get_inf2_post; +struct HPMHookPoint *HP_skill_get_castcancel_pre; +struct HPMHookPoint *HP_skill_get_castcancel_post; +struct HPMHookPoint *HP_skill_get_maxcount_pre; +struct HPMHookPoint *HP_skill_get_maxcount_post; +struct HPMHookPoint *HP_skill_get_blewcount_pre; +struct HPMHookPoint *HP_skill_get_blewcount_post; +struct HPMHookPoint *HP_skill_get_unit_flag_pre; +struct HPMHookPoint *HP_skill_get_unit_flag_post; +struct HPMHookPoint *HP_skill_get_unit_target_pre; +struct HPMHookPoint *HP_skill_get_unit_target_post; +struct HPMHookPoint *HP_skill_get_unit_interval_pre; +struct HPMHookPoint *HP_skill_get_unit_interval_post; +struct HPMHookPoint *HP_skill_get_unit_bl_target_pre; +struct HPMHookPoint *HP_skill_get_unit_bl_target_post; +struct HPMHookPoint *HP_skill_get_unit_layout_type_pre; +struct HPMHookPoint *HP_skill_get_unit_layout_type_post; +struct HPMHookPoint *HP_skill_get_unit_range_pre; +struct HPMHookPoint *HP_skill_get_unit_range_post; +struct HPMHookPoint *HP_skill_get_cooldown_pre; +struct HPMHookPoint *HP_skill_get_cooldown_post; +struct HPMHookPoint *HP_skill_tree_get_max_pre; +struct HPMHookPoint *HP_skill_tree_get_max_post; +struct HPMHookPoint *HP_skill_get_name_pre; +struct HPMHookPoint *HP_skill_get_name_post; +struct HPMHookPoint *HP_skill_get_desc_pre; +struct HPMHookPoint *HP_skill_get_desc_post; +struct HPMHookPoint *HP_skill_chk_pre; +struct HPMHookPoint *HP_skill_chk_post; +struct HPMHookPoint *HP_skill_get_casttype_pre; +struct HPMHookPoint *HP_skill_get_casttype_post; +struct HPMHookPoint *HP_skill_get_casttype2_pre; +struct HPMHookPoint *HP_skill_get_casttype2_post; +struct HPMHookPoint *HP_skill_name2id_pre; +struct HPMHookPoint *HP_skill_name2id_post; +struct HPMHookPoint *HP_skill_isammotype_pre; +struct HPMHookPoint *HP_skill_isammotype_post; +struct HPMHookPoint *HP_skill_castend_id_pre; +struct HPMHookPoint *HP_skill_castend_id_post; +struct HPMHookPoint *HP_skill_castend_pos_pre; +struct HPMHookPoint *HP_skill_castend_pos_post; +struct HPMHookPoint *HP_skill_castend_map_pre; +struct HPMHookPoint *HP_skill_castend_map_post; +struct HPMHookPoint *HP_skill_cleartimerskill_pre; +struct HPMHookPoint *HP_skill_cleartimerskill_post; +struct HPMHookPoint *HP_skill_addtimerskill_pre; +struct HPMHookPoint *HP_skill_addtimerskill_post; +struct HPMHookPoint *HP_skill_additional_effect_pre; +struct HPMHookPoint *HP_skill_additional_effect_post; +struct HPMHookPoint *HP_skill_counter_additional_effect_pre; +struct HPMHookPoint *HP_skill_counter_additional_effect_post; +struct HPMHookPoint *HP_skill_blown_pre; +struct HPMHookPoint *HP_skill_blown_post; +struct HPMHookPoint *HP_skill_break_equip_pre; +struct HPMHookPoint *HP_skill_break_equip_post; +struct HPMHookPoint *HP_skill_strip_equip_pre; +struct HPMHookPoint *HP_skill_strip_equip_post; +struct HPMHookPoint *HP_skill_id2group_pre; +struct HPMHookPoint *HP_skill_id2group_post; +struct HPMHookPoint *HP_skill_unitsetting_pre; +struct HPMHookPoint *HP_skill_unitsetting_post; +struct HPMHookPoint *HP_skill_initunit_pre; +struct HPMHookPoint *HP_skill_initunit_post; +struct HPMHookPoint *HP_skill_delunit_pre; +struct HPMHookPoint *HP_skill_delunit_post; +struct HPMHookPoint *HP_skill_init_unitgroup_pre; +struct HPMHookPoint *HP_skill_init_unitgroup_post; +struct HPMHookPoint *HP_skill_del_unitgroup_pre; +struct HPMHookPoint *HP_skill_del_unitgroup_post; +struct HPMHookPoint *HP_skill_clear_unitgroup_pre; +struct HPMHookPoint *HP_skill_clear_unitgroup_post; +struct HPMHookPoint *HP_skill_clear_group_pre; +struct HPMHookPoint *HP_skill_clear_group_post; +struct HPMHookPoint *HP_skill_unit_onplace_pre; +struct HPMHookPoint *HP_skill_unit_onplace_post; +struct HPMHookPoint *HP_skill_unit_ondamaged_pre; +struct HPMHookPoint *HP_skill_unit_ondamaged_post; +struct HPMHookPoint *HP_skill_cast_fix_pre; +struct HPMHookPoint *HP_skill_cast_fix_post; +struct HPMHookPoint *HP_skill_cast_fix_sc_pre; +struct HPMHookPoint *HP_skill_cast_fix_sc_post; +struct HPMHookPoint *HP_skill_vf_cast_fix_pre; +struct HPMHookPoint *HP_skill_vf_cast_fix_post; +struct HPMHookPoint *HP_skill_delay_fix_pre; +struct HPMHookPoint *HP_skill_delay_fix_post; +struct HPMHookPoint *HP_skill_check_condition_castbegin_pre; +struct HPMHookPoint *HP_skill_check_condition_castbegin_post; +struct HPMHookPoint *HP_skill_check_condition_castend_pre; +struct HPMHookPoint *HP_skill_check_condition_castend_post; +struct HPMHookPoint *HP_skill_consume_requirement_pre; +struct HPMHookPoint *HP_skill_consume_requirement_post; +struct HPMHookPoint *HP_skill_get_requirement_pre; +struct HPMHookPoint *HP_skill_get_requirement_post; +struct HPMHookPoint *HP_skill_check_pc_partner_pre; +struct HPMHookPoint *HP_skill_check_pc_partner_post; +struct HPMHookPoint *HP_skill_unit_move_pre; +struct HPMHookPoint *HP_skill_unit_move_post; +struct HPMHookPoint *HP_skill_unit_onleft_pre; +struct HPMHookPoint *HP_skill_unit_onleft_post; +struct HPMHookPoint *HP_skill_unit_onout_pre; +struct HPMHookPoint *HP_skill_unit_onout_post; +struct HPMHookPoint *HP_skill_unit_move_unit_group_pre; +struct HPMHookPoint *HP_skill_unit_move_unit_group_post; +struct HPMHookPoint *HP_skill_sit_pre; +struct HPMHookPoint *HP_skill_sit_post; +struct HPMHookPoint *HP_skill_brandishspear_pre; +struct HPMHookPoint *HP_skill_brandishspear_post; +struct HPMHookPoint *HP_skill_repairweapon_pre; +struct HPMHookPoint *HP_skill_repairweapon_post; +struct HPMHookPoint *HP_skill_identify_pre; +struct HPMHookPoint *HP_skill_identify_post; +struct HPMHookPoint *HP_skill_weaponrefine_pre; +struct HPMHookPoint *HP_skill_weaponrefine_post; +struct HPMHookPoint *HP_skill_autospell_pre; +struct HPMHookPoint *HP_skill_autospell_post; +struct HPMHookPoint *HP_skill_calc_heal_pre; +struct HPMHookPoint *HP_skill_calc_heal_post; +struct HPMHookPoint *HP_skill_check_cloaking_pre; +struct HPMHookPoint *HP_skill_check_cloaking_post; +struct HPMHookPoint *HP_skill_enchant_elemental_end_pre; +struct HPMHookPoint *HP_skill_enchant_elemental_end_post; +struct HPMHookPoint *HP_skill_not_ok_pre; +struct HPMHookPoint *HP_skill_not_ok_post; +struct HPMHookPoint *HP_skill_not_ok_hom_pre; +struct HPMHookPoint *HP_skill_not_ok_hom_post; +struct HPMHookPoint *HP_skill_not_ok_mercenary_pre; +struct HPMHookPoint *HP_skill_not_ok_mercenary_post; +struct HPMHookPoint *HP_skill_chastle_mob_changetarget_pre; +struct HPMHookPoint *HP_skill_chastle_mob_changetarget_post; +struct HPMHookPoint *HP_skill_can_produce_mix_pre; +struct HPMHookPoint *HP_skill_can_produce_mix_post; +struct HPMHookPoint *HP_skill_produce_mix_pre; +struct HPMHookPoint *HP_skill_produce_mix_post; +struct HPMHookPoint *HP_skill_arrow_create_pre; +struct HPMHookPoint *HP_skill_arrow_create_post; +struct HPMHookPoint *HP_skill_castend_nodamage_id_pre; +struct HPMHookPoint *HP_skill_castend_nodamage_id_post; +struct HPMHookPoint *HP_skill_castend_damage_id_pre; +struct HPMHookPoint *HP_skill_castend_damage_id_post; +struct HPMHookPoint *HP_skill_castend_pos2_pre; +struct HPMHookPoint *HP_skill_castend_pos2_post; +struct HPMHookPoint *HP_skill_blockpc_start_pre; +struct HPMHookPoint *HP_skill_blockpc_start_post; +struct HPMHookPoint *HP_skill_blockhomun_start_pre; +struct HPMHookPoint *HP_skill_blockhomun_start_post; +struct HPMHookPoint *HP_skill_blockmerc_start_pre; +struct HPMHookPoint *HP_skill_blockmerc_start_post; +struct HPMHookPoint *HP_skill_attack_pre; +struct HPMHookPoint *HP_skill_attack_post; +struct HPMHookPoint *HP_skill_attack_area_pre; +struct HPMHookPoint *HP_skill_attack_area_post; +struct HPMHookPoint *HP_skill_area_sub_pre; +struct HPMHookPoint *HP_skill_area_sub_post; +struct HPMHookPoint *HP_skill_area_sub_count_pre; +struct HPMHookPoint *HP_skill_area_sub_count_post; +struct HPMHookPoint *HP_skill_check_unit_range_pre; +struct HPMHookPoint *HP_skill_check_unit_range_post; +struct HPMHookPoint *HP_skill_check_unit_range_sub_pre; +struct HPMHookPoint *HP_skill_check_unit_range_sub_post; +struct HPMHookPoint *HP_skill_check_unit_range2_pre; +struct HPMHookPoint *HP_skill_check_unit_range2_post; +struct HPMHookPoint *HP_skill_check_unit_range2_sub_pre; +struct HPMHookPoint *HP_skill_check_unit_range2_sub_post; +struct HPMHookPoint *HP_skill_toggle_magicpower_pre; +struct HPMHookPoint *HP_skill_toggle_magicpower_post; +struct HPMHookPoint *HP_skill_magic_reflect_pre; +struct HPMHookPoint *HP_skill_magic_reflect_post; +struct HPMHookPoint *HP_skill_onskillusage_pre; +struct HPMHookPoint *HP_skill_onskillusage_post; +struct HPMHookPoint *HP_skill_cell_overlap_pre; +struct HPMHookPoint *HP_skill_cell_overlap_post; +struct HPMHookPoint *HP_skill_timerskill_pre; +struct HPMHookPoint *HP_skill_timerskill_post; +struct HPMHookPoint *HP_skill_trap_splash_pre; +struct HPMHookPoint *HP_skill_trap_splash_post; +struct HPMHookPoint *HP_skill_check_condition_mercenary_pre; +struct HPMHookPoint *HP_skill_check_condition_mercenary_post; +struct HPMHookPoint *HP_skill_locate_element_field_pre; +struct HPMHookPoint *HP_skill_locate_element_field_post; +struct HPMHookPoint *HP_skill_graffitiremover_pre; +struct HPMHookPoint *HP_skill_graffitiremover_post; +struct HPMHookPoint *HP_skill_activate_reverberation_pre; +struct HPMHookPoint *HP_skill_activate_reverberation_post; +struct HPMHookPoint *HP_skill_dance_overlap_sub_pre; +struct HPMHookPoint *HP_skill_dance_overlap_sub_post; +struct HPMHookPoint *HP_skill_dance_overlap_pre; +struct HPMHookPoint *HP_skill_dance_overlap_post; +struct HPMHookPoint *HP_skill_get_unit_layout_pre; +struct HPMHookPoint *HP_skill_get_unit_layout_post; +struct HPMHookPoint *HP_skill_frostjoke_scream_pre; +struct HPMHookPoint *HP_skill_frostjoke_scream_post; +struct HPMHookPoint *HP_skill_greed_pre; +struct HPMHookPoint *HP_skill_greed_post; +struct HPMHookPoint *HP_skill_destroy_trap_pre; +struct HPMHookPoint *HP_skill_destroy_trap_post; +struct HPMHookPoint *HP_skill_icewall_block_pre; +struct HPMHookPoint *HP_skill_icewall_block_post; +struct HPMHookPoint *HP_skill_unitgrouptickset_search_pre; +struct HPMHookPoint *HP_skill_unitgrouptickset_search_post; +struct HPMHookPoint *HP_skill_dance_switch_pre; +struct HPMHookPoint *HP_skill_dance_switch_post; +struct HPMHookPoint *HP_skill_check_condition_char_sub_pre; +struct HPMHookPoint *HP_skill_check_condition_char_sub_post; +struct HPMHookPoint *HP_skill_check_condition_mob_master_sub_pre; +struct HPMHookPoint *HP_skill_check_condition_mob_master_sub_post; +struct HPMHookPoint *HP_skill_brandishspear_first_pre; +struct HPMHookPoint *HP_skill_brandishspear_first_post; +struct HPMHookPoint *HP_skill_brandishspear_dir_pre; +struct HPMHookPoint *HP_skill_brandishspear_dir_post; +struct HPMHookPoint *HP_skill_get_fixed_cast_pre; +struct HPMHookPoint *HP_skill_get_fixed_cast_post; +struct HPMHookPoint *HP_skill_sit_count_pre; +struct HPMHookPoint *HP_skill_sit_count_post; +struct HPMHookPoint *HP_skill_sit_in_pre; +struct HPMHookPoint *HP_skill_sit_in_post; +struct HPMHookPoint *HP_skill_sit_out_pre; +struct HPMHookPoint *HP_skill_sit_out_post; +struct HPMHookPoint *HP_skill_unitsetmapcell_pre; +struct HPMHookPoint *HP_skill_unitsetmapcell_post; +struct HPMHookPoint *HP_skill_unit_onplace_timer_pre; +struct HPMHookPoint *HP_skill_unit_onplace_timer_post; +struct HPMHookPoint *HP_skill_unit_effect_pre; +struct HPMHookPoint *HP_skill_unit_effect_post; +struct HPMHookPoint *HP_skill_unit_timer_sub_onplace_pre; +struct HPMHookPoint *HP_skill_unit_timer_sub_onplace_post; +struct HPMHookPoint *HP_skill_unit_move_sub_pre; +struct HPMHookPoint *HP_skill_unit_move_sub_post; +struct HPMHookPoint *HP_skill_blockpc_end_pre; +struct HPMHookPoint *HP_skill_blockpc_end_post; +struct HPMHookPoint *HP_skill_blockhomun_end_pre; +struct HPMHookPoint *HP_skill_blockhomun_end_post; +struct HPMHookPoint *HP_skill_blockmerc_end_pre; +struct HPMHookPoint *HP_skill_blockmerc_end_post; +struct HPMHookPoint *HP_skill_split_atoi_pre; +struct HPMHookPoint *HP_skill_split_atoi_post; +struct HPMHookPoint *HP_skill_unit_timer_pre; +struct HPMHookPoint *HP_skill_unit_timer_post; +struct HPMHookPoint *HP_skill_unit_timer_sub_pre; +struct HPMHookPoint *HP_skill_unit_timer_sub_post; +struct HPMHookPoint *HP_skill_init_unit_layout_pre; +struct HPMHookPoint *HP_skill_init_unit_layout_post; +struct HPMHookPoint *HP_skill_parse_row_skilldb_pre; +struct HPMHookPoint *HP_skill_parse_row_skilldb_post; +struct HPMHookPoint *HP_skill_parse_row_requiredb_pre; +struct HPMHookPoint *HP_skill_parse_row_requiredb_post; +struct HPMHookPoint *HP_skill_parse_row_castdb_pre; +struct HPMHookPoint *HP_skill_parse_row_castdb_post; +struct HPMHookPoint *HP_skill_parse_row_castnodexdb_pre; +struct HPMHookPoint *HP_skill_parse_row_castnodexdb_post; +struct HPMHookPoint *HP_skill_parse_row_unitdb_pre; +struct HPMHookPoint *HP_skill_parse_row_unitdb_post; +struct HPMHookPoint *HP_skill_parse_row_producedb_pre; +struct HPMHookPoint *HP_skill_parse_row_producedb_post; +struct HPMHookPoint *HP_skill_parse_row_createarrowdb_pre; +struct HPMHookPoint *HP_skill_parse_row_createarrowdb_post; +struct HPMHookPoint *HP_skill_parse_row_abradb_pre; +struct HPMHookPoint *HP_skill_parse_row_abradb_post; +struct HPMHookPoint *HP_skill_parse_row_spellbookdb_pre; +struct HPMHookPoint *HP_skill_parse_row_spellbookdb_post; +struct HPMHookPoint *HP_skill_parse_row_magicmushroomdb_pre; +struct HPMHookPoint *HP_skill_parse_row_magicmushroomdb_post; +struct HPMHookPoint *HP_skill_parse_row_reproducedb_pre; +struct HPMHookPoint *HP_skill_parse_row_reproducedb_post; +struct HPMHookPoint *HP_skill_parse_row_improvisedb_pre; +struct HPMHookPoint *HP_skill_parse_row_improvisedb_post; +struct HPMHookPoint *HP_skill_parse_row_changematerialdb_pre; +struct HPMHookPoint *HP_skill_parse_row_changematerialdb_post; +struct HPMHookPoint *HP_skill_usave_add_pre; +struct HPMHookPoint *HP_skill_usave_add_post; +struct HPMHookPoint *HP_skill_usave_trigger_pre; +struct HPMHookPoint *HP_skill_usave_trigger_post; +struct HPMHookPoint *HP_skill_cooldown_load_pre; +struct HPMHookPoint *HP_skill_cooldown_load_post; +struct HPMHookPoint *HP_skill_spellbook_pre; +struct HPMHookPoint *HP_skill_spellbook_post; +struct HPMHookPoint *HP_skill_block_check_pre; +struct HPMHookPoint *HP_skill_block_check_post; +struct HPMHookPoint *HP_skill_detonator_pre; +struct HPMHookPoint *HP_skill_detonator_post; +struct HPMHookPoint *HP_skill_check_camouflage_pre; +struct HPMHookPoint *HP_skill_check_camouflage_post; +struct HPMHookPoint *HP_skill_magicdecoy_pre; +struct HPMHookPoint *HP_skill_magicdecoy_post; +struct HPMHookPoint *HP_skill_poisoningweapon_pre; +struct HPMHookPoint *HP_skill_poisoningweapon_post; +struct HPMHookPoint *HP_skill_select_menu_pre; +struct HPMHookPoint *HP_skill_select_menu_post; +struct HPMHookPoint *HP_skill_elementalanalysis_pre; +struct HPMHookPoint *HP_skill_elementalanalysis_post; +struct HPMHookPoint *HP_skill_changematerial_pre; +struct HPMHookPoint *HP_skill_changematerial_post; +struct HPMHookPoint *HP_skill_get_elemental_type_pre; +struct HPMHookPoint *HP_skill_get_elemental_type_post; +struct HPMHookPoint *HP_skill_cooldown_save_pre; +struct HPMHookPoint *HP_skill_cooldown_save_post; +struct HPMHookPoint *HP_skill_maelstrom_suction_pre; +struct HPMHookPoint *HP_skill_maelstrom_suction_post; +struct HPMHookPoint *HP_skill_get_new_group_id_pre; +struct HPMHookPoint *HP_skill_get_new_group_id_post; +struct HPMHookPoint *HP_status_init_pre; +struct HPMHookPoint *HP_status_init_post; +struct HPMHookPoint *HP_status_final_pre; +struct HPMHookPoint *HP_status_final_post; +struct HPMHookPoint *HP_status_get_refine_chance_pre; +struct HPMHookPoint *HP_status_get_refine_chance_post; +struct HPMHookPoint *HP_status_skill2sc_pre; +struct HPMHookPoint *HP_status_skill2sc_post; +struct HPMHookPoint *HP_status_sc2skill_pre; +struct HPMHookPoint *HP_status_sc2skill_post; +struct HPMHookPoint *HP_status_sc2scb_flag_pre; +struct HPMHookPoint *HP_status_sc2scb_flag_post; +struct HPMHookPoint *HP_status_type2relevant_bl_types_pre; +struct HPMHookPoint *HP_status_type2relevant_bl_types_post; +struct HPMHookPoint *HP_status_get_sc_type_pre; +struct HPMHookPoint *HP_status_get_sc_type_post; +struct HPMHookPoint *HP_status_damage_pre; +struct HPMHookPoint *HP_status_damage_post; +struct HPMHookPoint *HP_status_charge_pre; +struct HPMHookPoint *HP_status_charge_post; +struct HPMHookPoint *HP_status_percent_change_pre; +struct HPMHookPoint *HP_status_percent_change_post; +struct HPMHookPoint *HP_status_set_hp_pre; +struct HPMHookPoint *HP_status_set_hp_post; +struct HPMHookPoint *HP_status_set_sp_pre; +struct HPMHookPoint *HP_status_set_sp_post; +struct HPMHookPoint *HP_status_heal_pre; +struct HPMHookPoint *HP_status_heal_post; +struct HPMHookPoint *HP_status_revive_pre; +struct HPMHookPoint *HP_status_revive_post; +struct HPMHookPoint *HP_status_get_regen_data_pre; +struct HPMHookPoint *HP_status_get_regen_data_post; +struct HPMHookPoint *HP_status_get_status_data_pre; +struct HPMHookPoint *HP_status_get_status_data_post; +struct HPMHookPoint *HP_status_get_base_status_pre; +struct HPMHookPoint *HP_status_get_base_status_post; +struct HPMHookPoint *HP_status_get_name_pre; +struct HPMHookPoint *HP_status_get_name_post; +struct HPMHookPoint *HP_status_get_class_pre; +struct HPMHookPoint *HP_status_get_class_post; +struct HPMHookPoint *HP_status_get_lv_pre; +struct HPMHookPoint *HP_status_get_lv_post; +struct HPMHookPoint *HP_status_get_def_pre; +struct HPMHookPoint *HP_status_get_def_post; +struct HPMHookPoint *HP_status_get_speed_pre; +struct HPMHookPoint *HP_status_get_speed_post; +struct HPMHookPoint *HP_status_calc_attack_element_pre; +struct HPMHookPoint *HP_status_calc_attack_element_post; +struct HPMHookPoint *HP_status_get_party_id_pre; +struct HPMHookPoint *HP_status_get_party_id_post; +struct HPMHookPoint *HP_status_get_guild_id_pre; +struct HPMHookPoint *HP_status_get_guild_id_post; +struct HPMHookPoint *HP_status_get_emblem_id_pre; +struct HPMHookPoint *HP_status_get_emblem_id_post; +struct HPMHookPoint *HP_status_get_mexp_pre; +struct HPMHookPoint *HP_status_get_mexp_post; +struct HPMHookPoint *HP_status_get_race2_pre; +struct HPMHookPoint *HP_status_get_race2_post; +struct HPMHookPoint *HP_status_get_viewdata_pre; +struct HPMHookPoint *HP_status_get_viewdata_post; +struct HPMHookPoint *HP_status_set_viewdata_pre; +struct HPMHookPoint *HP_status_set_viewdata_post; +struct HPMHookPoint *HP_status_change_init_pre; +struct HPMHookPoint *HP_status_change_init_post; +struct HPMHookPoint *HP_status_get_sc_pre; +struct HPMHookPoint *HP_status_get_sc_post; +struct HPMHookPoint *HP_status_isdead_pre; +struct HPMHookPoint *HP_status_isdead_post; +struct HPMHookPoint *HP_status_isimmune_pre; +struct HPMHookPoint *HP_status_isimmune_post; +struct HPMHookPoint *HP_status_get_sc_def_pre; +struct HPMHookPoint *HP_status_get_sc_def_post; +struct HPMHookPoint *HP_status_change_start_pre; +struct HPMHookPoint *HP_status_change_start_post; +struct HPMHookPoint *HP_status_change_end__pre; +struct HPMHookPoint *HP_status_change_end__post; +struct HPMHookPoint *HP_status_kaahi_heal_timer_pre; +struct HPMHookPoint *HP_status_kaahi_heal_timer_post; +struct HPMHookPoint *HP_status_change_timer_pre; +struct HPMHookPoint *HP_status_change_timer_post; +struct HPMHookPoint *HP_status_change_timer_sub_pre; +struct HPMHookPoint *HP_status_change_timer_sub_post; +struct HPMHookPoint *HP_status_change_clear_pre; +struct HPMHookPoint *HP_status_change_clear_post; +struct HPMHookPoint *HP_status_change_clear_buffs_pre; +struct HPMHookPoint *HP_status_change_clear_buffs_post; +struct HPMHookPoint *HP_status_calc_bl__pre; +struct HPMHookPoint *HP_status_calc_bl__post; +struct HPMHookPoint *HP_status_calc_mob__pre; +struct HPMHookPoint *HP_status_calc_mob__post; +struct HPMHookPoint *HP_status_calc_pet__pre; +struct HPMHookPoint *HP_status_calc_pet__post; +struct HPMHookPoint *HP_status_calc_pc__pre; +struct HPMHookPoint *HP_status_calc_pc__post; +struct HPMHookPoint *HP_status_calc_homunculus__pre; +struct HPMHookPoint *HP_status_calc_homunculus__post; +struct HPMHookPoint *HP_status_calc_mercenary__pre; +struct HPMHookPoint *HP_status_calc_mercenary__post; +struct HPMHookPoint *HP_status_calc_elemental__pre; +struct HPMHookPoint *HP_status_calc_elemental__post; +struct HPMHookPoint *HP_status_calc_misc_pre; +struct HPMHookPoint *HP_status_calc_misc_post; +struct HPMHookPoint *HP_status_calc_regen_pre; +struct HPMHookPoint *HP_status_calc_regen_post; +struct HPMHookPoint *HP_status_calc_regen_rate_pre; +struct HPMHookPoint *HP_status_calc_regen_rate_post; +struct HPMHookPoint *HP_status_check_skilluse_pre; +struct HPMHookPoint *HP_status_check_skilluse_post; +struct HPMHookPoint *HP_status_check_visibility_pre; +struct HPMHookPoint *HP_status_check_visibility_post; +struct HPMHookPoint *HP_status_change_spread_pre; +struct HPMHookPoint *HP_status_change_spread_post; +struct HPMHookPoint *HP_status_calc_def_pre; +struct HPMHookPoint *HP_status_calc_def_post; +struct HPMHookPoint *HP_status_calc_def2_pre; +struct HPMHookPoint *HP_status_calc_def2_post; +struct HPMHookPoint *HP_status_calc_mdef_pre; +struct HPMHookPoint *HP_status_calc_mdef_post; +struct HPMHookPoint *HP_status_calc_mdef2_pre; +struct HPMHookPoint *HP_status_calc_mdef2_post; +struct HPMHookPoint *HP_status_calc_batk_pre; +struct HPMHookPoint *HP_status_calc_batk_post; +struct HPMHookPoint *HP_status_get_total_mdef_pre; +struct HPMHookPoint *HP_status_get_total_mdef_post; +struct HPMHookPoint *HP_status_get_total_def_pre; +struct HPMHookPoint *HP_status_get_total_def_post; +struct HPMHookPoint *HP_status_get_matk_pre; +struct HPMHookPoint *HP_status_get_matk_post; +struct HPMHookPoint *HP_status_readdb_pre; +struct HPMHookPoint *HP_status_readdb_post; +struct HPMHookPoint *HP_status_initChangeTables_pre; +struct HPMHookPoint *HP_status_initChangeTables_post; +struct HPMHookPoint *HP_status_initDummyData_pre; +struct HPMHookPoint *HP_status_initDummyData_post; +struct HPMHookPoint *HP_status_base_amotion_pc_pre; +struct HPMHookPoint *HP_status_base_amotion_pc_post; +struct HPMHookPoint *HP_status_base_atk_pre; +struct HPMHookPoint *HP_status_base_atk_post; +struct HPMHookPoint *HP_status_calc_sigma_pre; +struct HPMHookPoint *HP_status_calc_sigma_post; +struct HPMHookPoint *HP_status_base_pc_maxhp_pre; +struct HPMHookPoint *HP_status_base_pc_maxhp_post; +struct HPMHookPoint *HP_status_base_pc_maxsp_pre; +struct HPMHookPoint *HP_status_base_pc_maxsp_post; +struct HPMHookPoint *HP_status_calc_npc__pre; +struct HPMHookPoint *HP_status_calc_npc__post; +struct HPMHookPoint *HP_status_calc_str_pre; +struct HPMHookPoint *HP_status_calc_str_post; +struct HPMHookPoint *HP_status_calc_agi_pre; +struct HPMHookPoint *HP_status_calc_agi_post; +struct HPMHookPoint *HP_status_calc_vit_pre; +struct HPMHookPoint *HP_status_calc_vit_post; +struct HPMHookPoint *HP_status_calc_int_pre; +struct HPMHookPoint *HP_status_calc_int_post; +struct HPMHookPoint *HP_status_calc_dex_pre; +struct HPMHookPoint *HP_status_calc_dex_post; +struct HPMHookPoint *HP_status_calc_luk_pre; +struct HPMHookPoint *HP_status_calc_luk_post; +struct HPMHookPoint *HP_status_calc_watk_pre; +struct HPMHookPoint *HP_status_calc_watk_post; +struct HPMHookPoint *HP_status_calc_matk_pre; +struct HPMHookPoint *HP_status_calc_matk_post; +struct HPMHookPoint *HP_status_calc_hit_pre; +struct HPMHookPoint *HP_status_calc_hit_post; +struct HPMHookPoint *HP_status_calc_critical_pre; +struct HPMHookPoint *HP_status_calc_critical_post; +struct HPMHookPoint *HP_status_calc_flee_pre; +struct HPMHookPoint *HP_status_calc_flee_post; +struct HPMHookPoint *HP_status_calc_flee2_pre; +struct HPMHookPoint *HP_status_calc_flee2_post; +struct HPMHookPoint *HP_status_calc_speed_pre; +struct HPMHookPoint *HP_status_calc_speed_post; +struct HPMHookPoint *HP_status_calc_aspd_rate_pre; +struct HPMHookPoint *HP_status_calc_aspd_rate_post; +struct HPMHookPoint *HP_status_calc_dmotion_pre; +struct HPMHookPoint *HP_status_calc_dmotion_post; +struct HPMHookPoint *HP_status_calc_fix_aspd_pre; +struct HPMHookPoint *HP_status_calc_fix_aspd_post; +struct HPMHookPoint *HP_status_calc_maxhp_pre; +struct HPMHookPoint *HP_status_calc_maxhp_post; +struct HPMHookPoint *HP_status_calc_maxsp_pre; +struct HPMHookPoint *HP_status_calc_maxsp_post; +struct HPMHookPoint *HP_status_calc_element_pre; +struct HPMHookPoint *HP_status_calc_element_post; +struct HPMHookPoint *HP_status_calc_element_lv_pre; +struct HPMHookPoint *HP_status_calc_element_lv_post; +struct HPMHookPoint *HP_status_calc_mode_pre; +struct HPMHookPoint *HP_status_calc_mode_post; +struct HPMHookPoint *HP_status_calc_bl_main_pre; +struct HPMHookPoint *HP_status_calc_bl_main_post; +struct HPMHookPoint *HP_status_display_add_pre; +struct HPMHookPoint *HP_status_display_add_post; +struct HPMHookPoint *HP_status_display_remove_pre; +struct HPMHookPoint *HP_status_display_remove_post; +struct HPMHookPoint *HP_status_natural_heal_pre; +struct HPMHookPoint *HP_status_natural_heal_post; +struct HPMHookPoint *HP_status_natural_heal_timer_pre; +struct HPMHookPoint *HP_status_natural_heal_timer_post; +struct HPMHookPoint *HP_status_readdb_job1_pre; +struct HPMHookPoint *HP_status_readdb_job1_post; +struct HPMHookPoint *HP_status_readdb_job2_pre; +struct HPMHookPoint *HP_status_readdb_job2_post; +struct HPMHookPoint *HP_status_readdb_sizefix_pre; +struct HPMHookPoint *HP_status_readdb_sizefix_post; +struct HPMHookPoint *HP_status_readdb_refine_pre; +struct HPMHookPoint *HP_status_readdb_refine_post; +struct HPMHookPoint *HP_status_readdb_scconfig_pre; +struct HPMHookPoint *HP_status_readdb_scconfig_post; +struct HPMHookPoint *HP_storage_reconnect_pre; +struct HPMHookPoint *HP_storage_reconnect_post; +struct HPMHookPoint *HP_storage_delitem_pre; +struct HPMHookPoint *HP_storage_delitem_post; +struct HPMHookPoint *HP_storage_open_pre; +struct HPMHookPoint *HP_storage_open_post; +struct HPMHookPoint *HP_storage_add_pre; +struct HPMHookPoint *HP_storage_add_post; +struct HPMHookPoint *HP_storage_get_pre; +struct HPMHookPoint *HP_storage_get_post; +struct HPMHookPoint *HP_storage_additem_pre; +struct HPMHookPoint *HP_storage_additem_post; +struct HPMHookPoint *HP_storage_addfromcart_pre; +struct HPMHookPoint *HP_storage_addfromcart_post; +struct HPMHookPoint *HP_storage_gettocart_pre; +struct HPMHookPoint *HP_storage_gettocart_post; +struct HPMHookPoint *HP_storage_close_pre; +struct HPMHookPoint *HP_storage_close_post; +struct HPMHookPoint *HP_storage_pc_quit_pre; +struct HPMHookPoint *HP_storage_pc_quit_post; +struct HPMHookPoint *HP_storage_comp_item_pre; +struct HPMHookPoint *HP_storage_comp_item_post; +struct HPMHookPoint *HP_storage_sortitem_pre; +struct HPMHookPoint *HP_storage_sortitem_post; +struct HPMHookPoint *HP_storage_reconnect_sub_pre; +struct HPMHookPoint *HP_storage_reconnect_sub_post; +struct HPMHookPoint *HP_trade_request_pre; +struct HPMHookPoint *HP_trade_request_post; +struct HPMHookPoint *HP_trade_ack_pre; +struct HPMHookPoint *HP_trade_ack_post; +struct HPMHookPoint *HP_trade_check_impossible_pre; +struct HPMHookPoint *HP_trade_check_impossible_post; +struct HPMHookPoint *HP_trade_check_pre; +struct HPMHookPoint *HP_trade_check_post; +struct HPMHookPoint *HP_trade_additem_pre; +struct HPMHookPoint *HP_trade_additem_post; +struct HPMHookPoint *HP_trade_addzeny_pre; +struct HPMHookPoint *HP_trade_addzeny_post; +struct HPMHookPoint *HP_trade_ok_pre; +struct HPMHookPoint *HP_trade_ok_post; +struct HPMHookPoint *HP_trade_cancel_pre; +struct HPMHookPoint *HP_trade_cancel_post; +struct HPMHookPoint *HP_trade_commit_pre; +struct HPMHookPoint *HP_trade_commit_post; +struct HPMHookPoint *HP_unit_init_pre; +struct HPMHookPoint *HP_unit_init_post; +struct HPMHookPoint *HP_unit_final_pre; +struct HPMHookPoint *HP_unit_final_post; +struct HPMHookPoint *HP_unit_bl2ud_pre; +struct HPMHookPoint *HP_unit_bl2ud_post; +struct HPMHookPoint *HP_unit_bl2ud2_pre; +struct HPMHookPoint *HP_unit_bl2ud2_post; +struct HPMHookPoint *HP_unit_attack_timer_pre; +struct HPMHookPoint *HP_unit_attack_timer_post; +struct HPMHookPoint *HP_unit_walktoxy_timer_pre; +struct HPMHookPoint *HP_unit_walktoxy_timer_post; +struct HPMHookPoint *HP_unit_walktoxy_sub_pre; +struct HPMHookPoint *HP_unit_walktoxy_sub_post; +struct HPMHookPoint *HP_unit_delay_walktoxy_timer_pre; +struct HPMHookPoint *HP_unit_delay_walktoxy_timer_post; +struct HPMHookPoint *HP_unit_walktoxy_pre; +struct HPMHookPoint *HP_unit_walktoxy_post; +struct HPMHookPoint *HP_unit_walktobl_sub_pre; +struct HPMHookPoint *HP_unit_walktobl_sub_post; +struct HPMHookPoint *HP_unit_walktobl_pre; +struct HPMHookPoint *HP_unit_walktobl_post; +struct HPMHookPoint *HP_unit_run_pre; +struct HPMHookPoint *HP_unit_run_post; +struct HPMHookPoint *HP_unit_wugdash_pre; +struct HPMHookPoint *HP_unit_wugdash_post; +struct HPMHookPoint *HP_unit_escape_pre; +struct HPMHookPoint *HP_unit_escape_post; +struct HPMHookPoint *HP_unit_movepos_pre; +struct HPMHookPoint *HP_unit_movepos_post; +struct HPMHookPoint *HP_unit_setdir_pre; +struct HPMHookPoint *HP_unit_setdir_post; +struct HPMHookPoint *HP_unit_getdir_pre; +struct HPMHookPoint *HP_unit_getdir_post; +struct HPMHookPoint *HP_unit_blown_pre; +struct HPMHookPoint *HP_unit_blown_post; +struct HPMHookPoint *HP_unit_warp_pre; +struct HPMHookPoint *HP_unit_warp_post; +struct HPMHookPoint *HP_unit_stop_walking_pre; +struct HPMHookPoint *HP_unit_stop_walking_post; +struct HPMHookPoint *HP_unit_skilluse_id_pre; +struct HPMHookPoint *HP_unit_skilluse_id_post; +struct HPMHookPoint *HP_unit_is_walking_pre; +struct HPMHookPoint *HP_unit_is_walking_post; +struct HPMHookPoint *HP_unit_can_move_pre; +struct HPMHookPoint *HP_unit_can_move_post; +struct HPMHookPoint *HP_unit_resume_running_pre; +struct HPMHookPoint *HP_unit_resume_running_post; +struct HPMHookPoint *HP_unit_set_walkdelay_pre; +struct HPMHookPoint *HP_unit_set_walkdelay_post; +struct HPMHookPoint *HP_unit_skilluse_id2_pre; +struct HPMHookPoint *HP_unit_skilluse_id2_post; +struct HPMHookPoint *HP_unit_skilluse_pos_pre; +struct HPMHookPoint *HP_unit_skilluse_pos_post; +struct HPMHookPoint *HP_unit_skilluse_pos2_pre; +struct HPMHookPoint *HP_unit_skilluse_pos2_post; +struct HPMHookPoint *HP_unit_set_target_pre; +struct HPMHookPoint *HP_unit_set_target_post; +struct HPMHookPoint *HP_unit_stop_attack_pre; +struct HPMHookPoint *HP_unit_stop_attack_post; +struct HPMHookPoint *HP_unit_unattackable_pre; +struct HPMHookPoint *HP_unit_unattackable_post; +struct HPMHookPoint *HP_unit_attack_pre; +struct HPMHookPoint *HP_unit_attack_post; +struct HPMHookPoint *HP_unit_cancel_combo_pre; +struct HPMHookPoint *HP_unit_cancel_combo_post; +struct HPMHookPoint *HP_unit_can_reach_pos_pre; +struct HPMHookPoint *HP_unit_can_reach_pos_post; +struct HPMHookPoint *HP_unit_can_reach_bl_pre; +struct HPMHookPoint *HP_unit_can_reach_bl_post; +struct HPMHookPoint *HP_unit_calc_pos_pre; +struct HPMHookPoint *HP_unit_calc_pos_post; +struct HPMHookPoint *HP_unit_attack_timer_sub_pre; +struct HPMHookPoint *HP_unit_attack_timer_sub_post; +struct HPMHookPoint *HP_unit_skillcastcancel_pre; +struct HPMHookPoint *HP_unit_skillcastcancel_post; +struct HPMHookPoint *HP_unit_dataset_pre; +struct HPMHookPoint *HP_unit_dataset_post; +struct HPMHookPoint *HP_unit_counttargeted_pre; +struct HPMHookPoint *HP_unit_counttargeted_post; +struct HPMHookPoint *HP_unit_fixdamage_pre; +struct HPMHookPoint *HP_unit_fixdamage_post; +struct HPMHookPoint *HP_unit_changeviewsize_pre; +struct HPMHookPoint *HP_unit_changeviewsize_post; +struct HPMHookPoint *HP_unit_remove_map_pre; +struct HPMHookPoint *HP_unit_remove_map_post; +struct HPMHookPoint *HP_unit_remove_map_pc_pre; +struct HPMHookPoint *HP_unit_remove_map_pc_post; +struct HPMHookPoint *HP_unit_free_pc_pre; +struct HPMHookPoint *HP_unit_free_pc_post; +struct HPMHookPoint *HP_unit_free_pre; +struct HPMHookPoint *HP_unit_free_post; +struct HPMHookPoint *HP_vending_init_pre; +struct HPMHookPoint *HP_vending_init_post; +struct HPMHookPoint *HP_vending_final_pre; +struct HPMHookPoint *HP_vending_final_post; +struct HPMHookPoint *HP_vending_close_pre; +struct HPMHookPoint *HP_vending_close_post; +struct HPMHookPoint *HP_vending_open_pre; +struct HPMHookPoint *HP_vending_open_post; +struct HPMHookPoint *HP_vending_list_pre; +struct HPMHookPoint *HP_vending_list_post; +struct HPMHookPoint *HP_vending_purchase_pre; +struct HPMHookPoint *HP_vending_purchase_post; +struct HPMHookPoint *HP_vending_search_pre; +struct HPMHookPoint *HP_vending_search_post; +struct HPMHookPoint *HP_vending_searchall_pre; +struct HPMHookPoint *HP_vending_searchall_post; +} list; +struct { +int HP_atcommand_init_pre; +int HP_atcommand_init_post; +int HP_atcommand_final_pre; +int HP_atcommand_final_post; +int HP_atcommand_parse_pre; +int HP_atcommand_parse_post; +int HP_atcommand_create_pre; +int HP_atcommand_create_post; +int HP_atcommand_can_use_pre; +int HP_atcommand_can_use_post; +int HP_atcommand_can_use2_pre; +int HP_atcommand_can_use2_post; +int HP_atcommand_load_groups_pre; +int HP_atcommand_load_groups_post; +int HP_atcommand_exists_pre; +int HP_atcommand_exists_post; +int HP_atcommand_msg_read_pre; +int HP_atcommand_msg_read_post; +int HP_atcommand_final_msg_pre; +int HP_atcommand_final_msg_post; +int HP_atcommand_get_bind_byname_pre; +int HP_atcommand_get_bind_byname_post; +int HP_atcommand_get_info_byname_pre; +int HP_atcommand_get_info_byname_post; +int HP_atcommand_check_alias_pre; +int HP_atcommand_check_alias_post; +int HP_atcommand_get_suggestions_pre; +int HP_atcommand_get_suggestions_post; +int HP_atcommand_config_read_pre; +int HP_atcommand_config_read_post; +int HP_atcommand_stopattack_pre; +int HP_atcommand_stopattack_post; +int HP_atcommand_pvpoff_sub_pre; +int HP_atcommand_pvpoff_sub_post; +int HP_atcommand_pvpon_sub_pre; +int HP_atcommand_pvpon_sub_post; +int HP_atcommand_atkillmonster_sub_pre; +int HP_atcommand_atkillmonster_sub_post; +int HP_atcommand_raise_sub_pre; +int HP_atcommand_raise_sub_post; +int HP_atcommand_get_jail_time_pre; +int HP_atcommand_get_jail_time_post; +int HP_atcommand_cleanfloor_sub_pre; +int HP_atcommand_cleanfloor_sub_post; +int HP_atcommand_mutearea_sub_pre; +int HP_atcommand_mutearea_sub_post; +int HP_atcommand_commands_sub_pre; +int HP_atcommand_commands_sub_post; +int HP_atcommand_cmd_db_clear_pre; +int HP_atcommand_cmd_db_clear_post; +int HP_atcommand_cmd_db_clear_sub_pre; +int HP_atcommand_cmd_db_clear_sub_post; +int HP_atcommand_doload_pre; +int HP_atcommand_doload_post; +int HP_atcommand_base_commands_pre; +int HP_atcommand_base_commands_post; +int HP_battle_init_pre; +int HP_battle_init_post; +int HP_battle_final_pre; +int HP_battle_final_post; +int HP_battle_calc_attack_pre; +int HP_battle_calc_attack_post; +int HP_battle_calc_damage_pre; +int HP_battle_calc_damage_post; +int HP_battle_calc_gvg_damage_pre; +int HP_battle_calc_gvg_damage_post; +int HP_battle_calc_bg_damage_pre; +int HP_battle_calc_bg_damage_post; +int HP_battle_weapon_attack_pre; +int HP_battle_weapon_attack_post; +int HP_battle_calc_weapon_attack_pre; +int HP_battle_calc_weapon_attack_post; +int HP_battle_delay_damage_pre; +int HP_battle_delay_damage_post; +int HP_battle_drain_pre; +int HP_battle_drain_post; +int HP_battle_calc_return_damage_pre; +int HP_battle_calc_return_damage_post; +int HP_battle_attr_ratio_pre; +int HP_battle_attr_ratio_post; +int HP_battle_attr_fix_pre; +int HP_battle_attr_fix_post; +int HP_battle_calc_cardfix_pre; +int HP_battle_calc_cardfix_post; +int HP_battle_calc_elefix_pre; +int HP_battle_calc_elefix_post; +int HP_battle_calc_masteryfix_pre; +int HP_battle_calc_masteryfix_post; +int HP_battle_calc_skillratio_pre; +int HP_battle_calc_skillratio_post; +int HP_battle_calc_sizefix_pre; +int HP_battle_calc_sizefix_post; +int HP_battle_calc_weapon_damage_pre; +int HP_battle_calc_weapon_damage_post; +int HP_battle_calc_defense_pre; +int HP_battle_calc_defense_post; +int HP_battle_get_master_pre; +int HP_battle_get_master_post; +int HP_battle_get_targeted_pre; +int HP_battle_get_targeted_post; +int HP_battle_get_enemy_pre; +int HP_battle_get_enemy_post; +int HP_battle_get_target_pre; +int HP_battle_get_target_post; +int HP_battle_get_current_skill_pre; +int HP_battle_get_current_skill_post; +int HP_battle_check_undead_pre; +int HP_battle_check_undead_post; +int HP_battle_check_target_pre; +int HP_battle_check_target_post; +int HP_battle_check_range_pre; +int HP_battle_check_range_post; +int HP_battle_consume_ammo_pre; +int HP_battle_consume_ammo_post; +int HP_battle_get_targeted_sub_pre; +int HP_battle_get_targeted_sub_post; +int HP_battle_get_enemy_sub_pre; +int HP_battle_get_enemy_sub_post; +int HP_battle_get_enemy_area_sub_pre; +int HP_battle_get_enemy_area_sub_post; +int HP_battle_delay_damage_sub_pre; +int HP_battle_delay_damage_sub_post; +int HP_battle_blewcount_bonus_pre; +int HP_battle_blewcount_bonus_post; +int HP_battle_range_type_pre; +int HP_battle_range_type_post; +int HP_battle_calc_base_damage_pre; +int HP_battle_calc_base_damage_post; +int HP_battle_calc_base_damage2_pre; +int HP_battle_calc_base_damage2_post; +int HP_battle_calc_misc_attack_pre; +int HP_battle_calc_misc_attack_post; +int HP_battle_calc_magic_attack_pre; +int HP_battle_calc_magic_attack_post; +int HP_battle_adjust_skill_damage_pre; +int HP_battle_adjust_skill_damage_post; +int HP_battle_add_mastery_pre; +int HP_battle_add_mastery_post; +int HP_battle_calc_drain_pre; +int HP_battle_calc_drain_post; +int HP_battle_config_read_pre; +int HP_battle_config_read_post; +int HP_battle_config_set_defaults_pre; +int HP_battle_config_set_defaults_post; +int HP_battle_config_set_value_pre; +int HP_battle_config_set_value_post; +int HP_battle_config_get_value_pre; +int HP_battle_config_get_value_post; +int HP_battle_config_adjust_pre; +int HP_battle_config_adjust_post; +int HP_battle_get_enemy_area_pre; +int HP_battle_get_enemy_area_post; +int HP_battle_damage_area_pre; +int HP_battle_damage_area_post; +int HP_bg_init_pre; +int HP_bg_init_post; +int HP_bg_final_pre; +int HP_bg_final_post; +int HP_bg_name2arena_pre; +int HP_bg_name2arena_post; +int HP_bg_queue_add_pre; +int HP_bg_queue_add_post; +int HP_bg_can_queue_pre; +int HP_bg_can_queue_post; +int HP_bg_id2pos_pre; +int HP_bg_id2pos_post; +int HP_bg_queue_pc_cleanup_pre; +int HP_bg_queue_pc_cleanup_post; +int HP_bg_begin_pre; +int HP_bg_begin_post; +int HP_bg_begin_timer_pre; +int HP_bg_begin_timer_post; +int HP_bg_queue_pregame_pre; +int HP_bg_queue_pregame_post; +int HP_bg_fillup_timer_pre; +int HP_bg_fillup_timer_post; +int HP_bg_queue_ready_ack_pre; +int HP_bg_queue_ready_ack_post; +int HP_bg_match_over_pre; +int HP_bg_match_over_post; +int HP_bg_queue_check_pre; +int HP_bg_queue_check_post; +int HP_bg_team_search_pre; +int HP_bg_team_search_post; +int HP_bg_getavailablesd_pre; +int HP_bg_getavailablesd_post; +int HP_bg_team_delete_pre; +int HP_bg_team_delete_post; +int HP_bg_team_warp_pre; +int HP_bg_team_warp_post; +int HP_bg_send_dot_remove_pre; +int HP_bg_send_dot_remove_post; +int HP_bg_team_join_pre; +int HP_bg_team_join_post; +int HP_bg_team_leave_pre; +int HP_bg_team_leave_post; +int HP_bg_member_respawn_pre; +int HP_bg_member_respawn_post; +int HP_bg_create_pre; +int HP_bg_create_post; +int HP_bg_team_get_id_pre; +int HP_bg_team_get_id_post; +int HP_bg_send_message_pre; +int HP_bg_send_message_post; +int HP_bg_send_xy_timer_sub_pre; +int HP_bg_send_xy_timer_sub_post; +int HP_bg_send_xy_timer_pre; +int HP_bg_send_xy_timer_post; +int HP_bg_config_read_pre; +int HP_bg_config_read_post; +int HP_buyingstore_setup_pre; +int HP_buyingstore_setup_post; +int HP_buyingstore_create_pre; +int HP_buyingstore_create_post; +int HP_buyingstore_close_pre; +int HP_buyingstore_close_post; +int HP_buyingstore_open_pre; +int HP_buyingstore_open_post; +int HP_buyingstore_trade_pre; +int HP_buyingstore_trade_post; +int HP_buyingstore_search_pre; +int HP_buyingstore_search_post; +int HP_buyingstore_searchall_pre; +int HP_buyingstore_searchall_post; +int HP_buyingstore_getuid_pre; +int HP_buyingstore_getuid_post; +int HP_chat_create_pc_chat_pre; +int HP_chat_create_pc_chat_post; +int HP_chat_join_pre; +int HP_chat_join_post; +int HP_chat_leave_pre; +int HP_chat_leave_post; +int HP_chat_change_owner_pre; +int HP_chat_change_owner_post; +int HP_chat_change_status_pre; +int HP_chat_change_status_post; +int HP_chat_kick_pre; +int HP_chat_kick_post; +int HP_chat_create_npc_chat_pre; +int HP_chat_create_npc_chat_post; +int HP_chat_delete_npc_chat_pre; +int HP_chat_delete_npc_chat_post; +int HP_chat_enable_event_pre; +int HP_chat_enable_event_post; +int HP_chat_disable_event_pre; +int HP_chat_disable_event_post; +int HP_chat_npc_kick_all_pre; +int HP_chat_npc_kick_all_post; +int HP_chat_trigger_event_pre; +int HP_chat_trigger_event_post; +int HP_chat_create_pre; +int HP_chat_create_post; +int HP_chrif_final_pre; +int HP_chrif_final_post; +int HP_chrif_init_pre; +int HP_chrif_init_post; +int HP_chrif_setuserid_pre; +int HP_chrif_setuserid_post; +int HP_chrif_setpasswd_pre; +int HP_chrif_setpasswd_post; +int HP_chrif_checkdefaultlogin_pre; +int HP_chrif_checkdefaultlogin_post; +int HP_chrif_setip_pre; +int HP_chrif_setip_post; +int HP_chrif_setport_pre; +int HP_chrif_setport_post; +int HP_chrif_isconnected_pre; +int HP_chrif_isconnected_post; +int HP_chrif_check_shutdown_pre; +int HP_chrif_check_shutdown_post; +int HP_chrif_search_pre; +int HP_chrif_search_post; +int HP_chrif_auth_check_pre; +int HP_chrif_auth_check_post; +int HP_chrif_auth_delete_pre; +int HP_chrif_auth_delete_post; +int HP_chrif_auth_finished_pre; +int HP_chrif_auth_finished_post; +int HP_chrif_authreq_pre; +int HP_chrif_authreq_post; +int HP_chrif_authok_pre; +int HP_chrif_authok_post; +int HP_chrif_scdata_request_pre; +int HP_chrif_scdata_request_post; +int HP_chrif_save_pre; +int HP_chrif_save_post; +int HP_chrif_charselectreq_pre; +int HP_chrif_charselectreq_post; +int HP_chrif_changemapserver_pre; +int HP_chrif_changemapserver_post; +int HP_chrif_searchcharid_pre; +int HP_chrif_searchcharid_post; +int HP_chrif_changeemail_pre; +int HP_chrif_changeemail_post; +int HP_chrif_char_ask_name_pre; +int HP_chrif_char_ask_name_post; +int HP_chrif_updatefamelist_pre; +int HP_chrif_updatefamelist_post; +int HP_chrif_buildfamelist_pre; +int HP_chrif_buildfamelist_post; +int HP_chrif_save_scdata_pre; +int HP_chrif_save_scdata_post; +int HP_chrif_ragsrvinfo_pre; +int HP_chrif_ragsrvinfo_post; +int HP_chrif_char_offline_pre; +int HP_chrif_char_offline_post; +int HP_chrif_char_offline_nsd_pre; +int HP_chrif_char_offline_nsd_post; +int HP_chrif_char_reset_offline_pre; +int HP_chrif_char_reset_offline_post; +int HP_chrif_send_users_tochar_pre; +int HP_chrif_send_users_tochar_post; +int HP_chrif_char_online_pre; +int HP_chrif_char_online_post; +int HP_chrif_changesex_pre; +int HP_chrif_changesex_post; +int HP_chrif_divorce_pre; +int HP_chrif_divorce_post; +int HP_chrif_removefriend_pre; +int HP_chrif_removefriend_post; +int HP_chrif_send_report_pre; +int HP_chrif_send_report_post; +int HP_chrif_flush_fifo_pre; +int HP_chrif_flush_fifo_post; +int HP_chrif_skillid2idx_pre; +int HP_chrif_skillid2idx_post; +int HP_chrif_sd_to_auth_pre; +int HP_chrif_sd_to_auth_post; +int HP_chrif_check_connect_char_server_pre; +int HP_chrif_check_connect_char_server_post; +int HP_chrif_auth_logout_pre; +int HP_chrif_auth_logout_post; +int HP_chrif_save_ack_pre; +int HP_chrif_save_ack_post; +int HP_chrif_reconnect_pre; +int HP_chrif_reconnect_post; +int HP_chrif_auth_db_cleanup_sub_pre; +int HP_chrif_auth_db_cleanup_sub_post; +int HP_chrif_char_ask_name_answer_pre; +int HP_chrif_char_ask_name_answer_post; +int HP_chrif_auth_db_final_pre; +int HP_chrif_auth_db_final_post; +int HP_chrif_send_usercount_tochar_pre; +int HP_chrif_send_usercount_tochar_post; +int HP_chrif_auth_db_cleanup_pre; +int HP_chrif_auth_db_cleanup_post; +int HP_chrif_connect_pre; +int HP_chrif_connect_post; +int HP_chrif_connectack_pre; +int HP_chrif_connectack_post; +int HP_chrif_sendmap_pre; +int HP_chrif_sendmap_post; +int HP_chrif_sendmapack_pre; +int HP_chrif_sendmapack_post; +int HP_chrif_recvmap_pre; +int HP_chrif_recvmap_post; +int HP_chrif_changemapserverack_pre; +int HP_chrif_changemapserverack_post; +int HP_chrif_changedsex_pre; +int HP_chrif_changedsex_post; +int HP_chrif_divorceack_pre; +int HP_chrif_divorceack_post; +int HP_chrif_accountban_pre; +int HP_chrif_accountban_post; +int HP_chrif_recvfamelist_pre; +int HP_chrif_recvfamelist_post; +int HP_chrif_load_scdata_pre; +int HP_chrif_load_scdata_post; +int HP_chrif_update_ip_pre; +int HP_chrif_update_ip_post; +int HP_chrif_disconnectplayer_pre; +int HP_chrif_disconnectplayer_post; +int HP_chrif_removemap_pre; +int HP_chrif_removemap_post; +int HP_chrif_updatefamelist_ack_pre; +int HP_chrif_updatefamelist_ack_post; +int HP_chrif_keepalive_pre; +int HP_chrif_keepalive_post; +int HP_chrif_keepalive_ack_pre; +int HP_chrif_keepalive_ack_post; +int HP_chrif_deadopt_pre; +int HP_chrif_deadopt_post; +int HP_chrif_authfail_pre; +int HP_chrif_authfail_post; +int HP_chrif_on_ready_pre; +int HP_chrif_on_ready_post; +int HP_chrif_on_disconnect_pre; +int HP_chrif_on_disconnect_post; +int HP_chrif_parse_pre; +int HP_chrif_parse_post; +int HP_clif_init_pre; +int HP_clif_init_post; +int HP_clif_final_pre; +int HP_clif_final_post; +int HP_clif_setip_pre; +int HP_clif_setip_post; +int HP_clif_setbindip_pre; +int HP_clif_setbindip_post; +int HP_clif_setport_pre; +int HP_clif_setport_post; +int HP_clif_refresh_ip_pre; +int HP_clif_refresh_ip_post; +int HP_clif_send_pre; +int HP_clif_send_post; +int HP_clif_send_sub_pre; +int HP_clif_send_sub_post; +int HP_clif_parse_pre; +int HP_clif_parse_post; +int HP_clif_parse_cmd_pre; +int HP_clif_parse_cmd_post; +int HP_clif_decrypt_cmd_pre; +int HP_clif_decrypt_cmd_post; +int HP_clif_authok_pre; +int HP_clif_authok_post; +int HP_clif_authrefuse_pre; +int HP_clif_authrefuse_post; +int HP_clif_authfail_fd_pre; +int HP_clif_authfail_fd_post; +int HP_clif_charselectok_pre; +int HP_clif_charselectok_post; +int HP_clif_dropflooritem_pre; +int HP_clif_dropflooritem_post; +int HP_clif_clearflooritem_pre; +int HP_clif_clearflooritem_post; +int HP_clif_additem_pre; +int HP_clif_additem_post; +int HP_clif_dropitem_pre; +int HP_clif_dropitem_post; +int HP_clif_delitem_pre; +int HP_clif_delitem_post; +int HP_clif_takeitem_pre; +int HP_clif_takeitem_post; +int HP_clif_arrowequip_pre; +int HP_clif_arrowequip_post; +int HP_clif_arrow_fail_pre; +int HP_clif_arrow_fail_post; +int HP_clif_use_card_pre; +int HP_clif_use_card_post; +int HP_clif_cart_additem_pre; +int HP_clif_cart_additem_post; +int HP_clif_cart_delitem_pre; +int HP_clif_cart_delitem_post; +int HP_clif_equipitemack_pre; +int HP_clif_equipitemack_post; +int HP_clif_unequipitemack_pre; +int HP_clif_unequipitemack_post; +int HP_clif_useitemack_pre; +int HP_clif_useitemack_post; +int HP_clif_addcards_pre; +int HP_clif_addcards_post; +int HP_clif_addcards2_pre; +int HP_clif_addcards2_post; +int HP_clif_item_sub_pre; +int HP_clif_item_sub_post; +int HP_clif_getareachar_item_pre; +int HP_clif_getareachar_item_post; +int HP_clif_cart_additem_ack_pre; +int HP_clif_cart_additem_ack_post; +int HP_clif_cashshop_load_pre; +int HP_clif_cashshop_load_post; +int HP_clif_package_announce_pre; +int HP_clif_package_announce_post; +int HP_clif_clearunit_single_pre; +int HP_clif_clearunit_single_post; +int HP_clif_clearunit_area_pre; +int HP_clif_clearunit_area_post; +int HP_clif_clearunit_delayed_pre; +int HP_clif_clearunit_delayed_post; +int HP_clif_walkok_pre; +int HP_clif_walkok_post; +int HP_clif_move_pre; +int HP_clif_move_post; +int HP_clif_move2_pre; +int HP_clif_move2_post; +int HP_clif_blown_pre; +int HP_clif_blown_post; +int HP_clif_slide_pre; +int HP_clif_slide_post; +int HP_clif_fixpos_pre; +int HP_clif_fixpos_post; +int HP_clif_changelook_pre; +int HP_clif_changelook_post; +int HP_clif_changetraplook_pre; +int HP_clif_changetraplook_post; +int HP_clif_refreshlook_pre; +int HP_clif_refreshlook_post; +int HP_clif_class_change_pre; +int HP_clif_class_change_post; +int HP_clif_skill_setunit_pre; +int HP_clif_skill_setunit_post; +int HP_clif_skill_delunit_pre; +int HP_clif_skill_delunit_post; +int HP_clif_skillunit_update_pre; +int HP_clif_skillunit_update_post; +int HP_clif_clearunit_delayed_sub_pre; +int HP_clif_clearunit_delayed_sub_post; +int HP_clif_set_unit_idle_pre; +int HP_clif_set_unit_idle_post; +int HP_clif_spawn_unit_pre; +int HP_clif_spawn_unit_post; +int HP_clif_set_unit_walking_pre; +int HP_clif_set_unit_walking_post; +int HP_clif_calc_walkdelay_pre; +int HP_clif_calc_walkdelay_post; +int HP_clif_getareachar_skillunit_pre; +int HP_clif_getareachar_skillunit_post; +int HP_clif_getareachar_unit_pre; +int HP_clif_getareachar_unit_post; +int HP_clif_clearchar_skillunit_pre; +int HP_clif_clearchar_skillunit_post; +int HP_clif_getareachar_pre; +int HP_clif_getareachar_post; +int HP_clif_spawn_pre; +int HP_clif_spawn_post; +int HP_clif_changemap_pre; +int HP_clif_changemap_post; +int HP_clif_changemapcell_pre; +int HP_clif_changemapcell_post; +int HP_clif_map_property_pre; +int HP_clif_map_property_post; +int HP_clif_pvpset_pre; +int HP_clif_pvpset_post; +int HP_clif_map_property_mapall_pre; +int HP_clif_map_property_mapall_post; +int HP_clif_bossmapinfo_pre; +int HP_clif_bossmapinfo_post; +int HP_clif_map_type_pre; +int HP_clif_map_type_post; +int HP_clif_maptypeproperty2_pre; +int HP_clif_maptypeproperty2_post; +int HP_clif_changemapserver_pre; +int HP_clif_changemapserver_post; +int HP_clif_npcbuysell_pre; +int HP_clif_npcbuysell_post; +int HP_clif_buylist_pre; +int HP_clif_buylist_post; +int HP_clif_selllist_pre; +int HP_clif_selllist_post; +int HP_clif_cashshop_show_pre; +int HP_clif_cashshop_show_post; +int HP_clif_npc_buy_result_pre; +int HP_clif_npc_buy_result_post; +int HP_clif_npc_sell_result_pre; +int HP_clif_npc_sell_result_post; +int HP_clif_cashshop_ack_pre; +int HP_clif_cashshop_ack_post; +int HP_clif_scriptmes_pre; +int HP_clif_scriptmes_post; +int HP_clif_scriptnext_pre; +int HP_clif_scriptnext_post; +int HP_clif_scriptclose_pre; +int HP_clif_scriptclose_post; +int HP_clif_scriptmenu_pre; +int HP_clif_scriptmenu_post; +int HP_clif_scriptinput_pre; +int HP_clif_scriptinput_post; +int HP_clif_scriptinputstr_pre; +int HP_clif_scriptinputstr_post; +int HP_clif_cutin_pre; +int HP_clif_cutin_post; +int HP_clif_sendfakenpc_pre; +int HP_clif_sendfakenpc_post; +int HP_clif_scriptclear_pre; +int HP_clif_scriptclear_post; +int HP_clif_viewpoint_pre; +int HP_clif_viewpoint_post; +int HP_clif_damage_pre; +int HP_clif_damage_post; +int HP_clif_sitting_pre; +int HP_clif_sitting_post; +int HP_clif_standing_pre; +int HP_clif_standing_post; +int HP_clif_arrow_create_list_pre; +int HP_clif_arrow_create_list_post; +int HP_clif_refresh_pre; +int HP_clif_refresh_post; +int HP_clif_fame_blacksmith_pre; +int HP_clif_fame_blacksmith_post; +int HP_clif_fame_alchemist_pre; +int HP_clif_fame_alchemist_post; +int HP_clif_fame_taekwon_pre; +int HP_clif_fame_taekwon_post; +int HP_clif_ranklist_pre; +int HP_clif_ranklist_post; +int HP_clif_update_rankingpoint_pre; +int HP_clif_update_rankingpoint_post; +int HP_clif_pRanklist_pre; +int HP_clif_pRanklist_post; +int HP_clif_hotkeys_pre; +int HP_clif_hotkeys_post; +int HP_clif_insight_pre; +int HP_clif_insight_post; +int HP_clif_outsight_pre; +int HP_clif_outsight_post; +int HP_clif_skillcastcancel_pre; +int HP_clif_skillcastcancel_post; +int HP_clif_skill_fail_pre; +int HP_clif_skill_fail_post; +int HP_clif_skill_cooldown_pre; +int HP_clif_skill_cooldown_post; +int HP_clif_skill_memomessage_pre; +int HP_clif_skill_memomessage_post; +int HP_clif_skill_mapinfomessage_pre; +int HP_clif_skill_mapinfomessage_post; +int HP_clif_skill_produce_mix_list_pre; +int HP_clif_skill_produce_mix_list_post; +int HP_clif_cooking_list_pre; +int HP_clif_cooking_list_post; +int HP_clif_autospell_pre; +int HP_clif_autospell_post; +int HP_clif_combo_delay_pre; +int HP_clif_combo_delay_post; +int HP_clif_status_change_pre; +int HP_clif_status_change_post; +int HP_clif_insert_card_pre; +int HP_clif_insert_card_post; +int HP_clif_inventorylist_pre; +int HP_clif_inventorylist_post; +int HP_clif_equiplist_pre; +int HP_clif_equiplist_post; +int HP_clif_cartlist_pre; +int HP_clif_cartlist_post; +int HP_clif_favorite_item_pre; +int HP_clif_favorite_item_post; +int HP_clif_clearcart_pre; +int HP_clif_clearcart_post; +int HP_clif_item_identify_list_pre; +int HP_clif_item_identify_list_post; +int HP_clif_item_identified_pre; +int HP_clif_item_identified_post; +int HP_clif_item_repair_list_pre; +int HP_clif_item_repair_list_post; +int HP_clif_item_repaireffect_pre; +int HP_clif_item_repaireffect_post; +int HP_clif_item_damaged_pre; +int HP_clif_item_damaged_post; +int HP_clif_item_refine_list_pre; +int HP_clif_item_refine_list_post; +int HP_clif_item_skill_pre; +int HP_clif_item_skill_post; +int HP_clif_mvp_item_pre; +int HP_clif_mvp_item_post; +int HP_clif_mvp_exp_pre; +int HP_clif_mvp_exp_post; +int HP_clif_mvp_noitem_pre; +int HP_clif_mvp_noitem_post; +int HP_clif_changed_dir_pre; +int HP_clif_changed_dir_post; +int HP_clif_charnameack_pre; +int HP_clif_charnameack_post; +int HP_clif_monster_hp_bar_pre; +int HP_clif_monster_hp_bar_post; +int HP_clif_hpmeter_pre; +int HP_clif_hpmeter_post; +int HP_clif_hpmeter_single_pre; +int HP_clif_hpmeter_single_post; +int HP_clif_hpmeter_sub_pre; +int HP_clif_hpmeter_sub_post; +int HP_clif_upgrademessage_pre; +int HP_clif_upgrademessage_post; +int HP_clif_get_weapon_view_pre; +int HP_clif_get_weapon_view_post; +int HP_clif_gospel_info_pre; +int HP_clif_gospel_info_post; +int HP_clif_feel_req_pre; +int HP_clif_feel_req_post; +int HP_clif_starskill_pre; +int HP_clif_starskill_post; +int HP_clif_feel_info_pre; +int HP_clif_feel_info_post; +int HP_clif_hate_info_pre; +int HP_clif_hate_info_post; +int HP_clif_mission_info_pre; +int HP_clif_mission_info_post; +int HP_clif_feel_hate_reset_pre; +int HP_clif_feel_hate_reset_post; +int HP_clif_partytickack_pre; +int HP_clif_partytickack_post; +int HP_clif_equiptickack_pre; +int HP_clif_equiptickack_post; +int HP_clif_viewequip_ack_pre; +int HP_clif_viewequip_ack_post; +int HP_clif_viewequip_fail_pre; +int HP_clif_viewequip_fail_post; +int HP_clif_equpcheckbox_pre; +int HP_clif_equpcheckbox_post; +int HP_clif_displayexp_pre; +int HP_clif_displayexp_post; +int HP_clif_font_pre; +int HP_clif_font_post; +int HP_clif_progressbar_pre; +int HP_clif_progressbar_post; +int HP_clif_progressbar_abort_pre; +int HP_clif_progressbar_abort_post; +int HP_clif_showdigit_pre; +int HP_clif_showdigit_post; +int HP_clif_elementalconverter_list_pre; +int HP_clif_elementalconverter_list_post; +int HP_clif_spellbook_list_pre; +int HP_clif_spellbook_list_post; +int HP_clif_magicdecoy_list_pre; +int HP_clif_magicdecoy_list_post; +int HP_clif_poison_list_pre; +int HP_clif_poison_list_post; +int HP_clif_autoshadowspell_list_pre; +int HP_clif_autoshadowspell_list_post; +int HP_clif_skill_itemlistwindow_pre; +int HP_clif_skill_itemlistwindow_post; +int HP_clif_sc_load_pre; +int HP_clif_sc_load_post; +int HP_clif_sc_end_pre; +int HP_clif_sc_end_post; +int HP_clif_initialstatus_pre; +int HP_clif_initialstatus_post; +int HP_clif_cooldown_list_pre; +int HP_clif_cooldown_list_post; +int HP_clif_updatestatus_pre; +int HP_clif_updatestatus_post; +int HP_clif_changestatus_pre; +int HP_clif_changestatus_post; +int HP_clif_statusupack_pre; +int HP_clif_statusupack_post; +int HP_clif_movetoattack_pre; +int HP_clif_movetoattack_post; +int HP_clif_solved_charname_pre; +int HP_clif_solved_charname_post; +int HP_clif_charnameupdate_pre; +int HP_clif_charnameupdate_post; +int HP_clif_delayquit_pre; +int HP_clif_delayquit_post; +int HP_clif_getareachar_pc_pre; +int HP_clif_getareachar_pc_post; +int HP_clif_disconnect_ack_pre; +int HP_clif_disconnect_ack_post; +int HP_clif_PVPInfo_pre; +int HP_clif_PVPInfo_post; +int HP_clif_blacksmith_pre; +int HP_clif_blacksmith_post; +int HP_clif_alchemist_pre; +int HP_clif_alchemist_post; +int HP_clif_taekwon_pre; +int HP_clif_taekwon_post; +int HP_clif_ranking_pk_pre; +int HP_clif_ranking_pk_post; +int HP_clif_quitsave_pre; +int HP_clif_quitsave_post; +int HP_clif_misceffect_pre; +int HP_clif_misceffect_post; +int HP_clif_changeoption_pre; +int HP_clif_changeoption_post; +int HP_clif_changeoption2_pre; +int HP_clif_changeoption2_post; +int HP_clif_emotion_pre; +int HP_clif_emotion_post; +int HP_clif_talkiebox_pre; +int HP_clif_talkiebox_post; +int HP_clif_wedding_effect_pre; +int HP_clif_wedding_effect_post; +int HP_clif_divorced_pre; +int HP_clif_divorced_post; +int HP_clif_callpartner_pre; +int HP_clif_callpartner_post; +int HP_clif_skill_damage_pre; +int HP_clif_skill_damage_post; +int HP_clif_skill_nodamage_pre; +int HP_clif_skill_nodamage_post; +int HP_clif_skill_poseffect_pre; +int HP_clif_skill_poseffect_post; +int HP_clif_skill_estimation_pre; +int HP_clif_skill_estimation_post; +int HP_clif_skill_warppoint_pre; +int HP_clif_skill_warppoint_post; +int HP_clif_skillcasting_pre; +int HP_clif_skillcasting_post; +int HP_clif_produce_effect_pre; +int HP_clif_produce_effect_post; +int HP_clif_devotion_pre; +int HP_clif_devotion_post; +int HP_clif_spiritball_pre; +int HP_clif_spiritball_post; +int HP_clif_spiritball_single_pre; +int HP_clif_spiritball_single_post; +int HP_clif_bladestop_pre; +int HP_clif_bladestop_post; +int HP_clif_mvp_effect_pre; +int HP_clif_mvp_effect_post; +int HP_clif_heal_pre; +int HP_clif_heal_post; +int HP_clif_resurrection_pre; +int HP_clif_resurrection_post; +int HP_clif_refine_pre; +int HP_clif_refine_post; +int HP_clif_weather_pre; +int HP_clif_weather_post; +int HP_clif_specialeffect_pre; +int HP_clif_specialeffect_post; +int HP_clif_specialeffect_single_pre; +int HP_clif_specialeffect_single_post; +int HP_clif_specialeffect_value_pre; +int HP_clif_specialeffect_value_post; +int HP_clif_millenniumshield_pre; +int HP_clif_millenniumshield_post; +int HP_clif_charm_pre; +int HP_clif_charm_post; +int HP_clif_charm_single_pre; +int HP_clif_charm_single_post; +int HP_clif_snap_pre; +int HP_clif_snap_post; +int HP_clif_weather_check_pre; +int HP_clif_weather_check_post; +int HP_clif_playBGM_pre; +int HP_clif_playBGM_post; +int HP_clif_soundeffect_pre; +int HP_clif_soundeffect_post; +int HP_clif_soundeffectall_pre; +int HP_clif_soundeffectall_post; +int HP_clif_GlobalMessage_pre; +int HP_clif_GlobalMessage_post; +int HP_clif_createchat_pre; +int HP_clif_createchat_post; +int HP_clif_dispchat_pre; +int HP_clif_dispchat_post; +int HP_clif_joinchatfail_pre; +int HP_clif_joinchatfail_post; +int HP_clif_joinchatok_pre; +int HP_clif_joinchatok_post; +int HP_clif_addchat_pre; +int HP_clif_addchat_post; +int HP_clif_changechatowner_pre; +int HP_clif_changechatowner_post; +int HP_clif_clearchat_pre; +int HP_clif_clearchat_post; +int HP_clif_leavechat_pre; +int HP_clif_leavechat_post; +int HP_clif_changechatstatus_pre; +int HP_clif_changechatstatus_post; +int HP_clif_wis_message_pre; +int HP_clif_wis_message_post; +int HP_clif_wis_end_pre; +int HP_clif_wis_end_post; +int HP_clif_disp_onlyself_pre; +int HP_clif_disp_onlyself_post; +int HP_clif_disp_message_pre; +int HP_clif_disp_message_post; +int HP_clif_broadcast_pre; +int HP_clif_broadcast_post; +int HP_clif_broadcast2_pre; +int HP_clif_broadcast2_post; +int HP_clif_messagecolor_pre; +int HP_clif_messagecolor_post; +int HP_clif_disp_overhead_pre; +int HP_clif_disp_overhead_post; +int HP_clif_msg_pre; +int HP_clif_msg_post; +int HP_clif_msg_value_pre; +int HP_clif_msg_value_post; +int HP_clif_msg_skill_pre; +int HP_clif_msg_skill_post; +int HP_clif_msgtable_pre; +int HP_clif_msgtable_post; +int HP_clif_msgtable_num_pre; +int HP_clif_msgtable_num_post; +int HP_clif_message_pre; +int HP_clif_message_post; +int HP_clif_messageln_pre; +int HP_clif_messageln_post; +int HP_clif_colormes_pre; +int HP_clif_colormes_post; +int HP_clif_process_message_pre; +int HP_clif_process_message_post; +int HP_clif_wisexin_pre; +int HP_clif_wisexin_post; +int HP_clif_wisall_pre; +int HP_clif_wisall_post; +int HP_clif_PMIgnoreList_pre; +int HP_clif_PMIgnoreList_post; +int HP_clif_traderequest_pre; +int HP_clif_traderequest_post; +int HP_clif_tradestart_pre; +int HP_clif_tradestart_post; +int HP_clif_tradeadditem_pre; +int HP_clif_tradeadditem_post; +int HP_clif_tradeitemok_pre; +int HP_clif_tradeitemok_post; +int HP_clif_tradedeal_lock_pre; +int HP_clif_tradedeal_lock_post; +int HP_clif_tradecancelled_pre; +int HP_clif_tradecancelled_post; +int HP_clif_tradecompleted_pre; +int HP_clif_tradecompleted_post; +int HP_clif_tradeundo_pre; +int HP_clif_tradeundo_post; +int HP_clif_openvendingreq_pre; +int HP_clif_openvendingreq_post; +int HP_clif_showvendingboard_pre; +int HP_clif_showvendingboard_post; +int HP_clif_closevendingboard_pre; +int HP_clif_closevendingboard_post; +int HP_clif_vendinglist_pre; +int HP_clif_vendinglist_post; +int HP_clif_buyvending_pre; +int HP_clif_buyvending_post; +int HP_clif_openvending_pre; +int HP_clif_openvending_post; +int HP_clif_vendingreport_pre; +int HP_clif_vendingreport_post; +int HP_clif_storagelist_pre; +int HP_clif_storagelist_post; +int HP_clif_updatestorageamount_pre; +int HP_clif_updatestorageamount_post; +int HP_clif_storageitemadded_pre; +int HP_clif_storageitemadded_post; +int HP_clif_storageitemremoved_pre; +int HP_clif_storageitemremoved_post; +int HP_clif_storageclose_pre; +int HP_clif_storageclose_post; +int HP_clif_skillinfoblock_pre; +int HP_clif_skillinfoblock_post; +int HP_clif_skillup_pre; +int HP_clif_skillup_post; +int HP_clif_skillinfo_pre; +int HP_clif_skillinfo_post; +int HP_clif_addskill_pre; +int HP_clif_addskill_post; +int HP_clif_deleteskill_pre; +int HP_clif_deleteskill_post; +int HP_clif_party_created_pre; +int HP_clif_party_created_post; +int HP_clif_party_member_info_pre; +int HP_clif_party_member_info_post; +int HP_clif_party_info_pre; +int HP_clif_party_info_post; +int HP_clif_party_invite_pre; +int HP_clif_party_invite_post; +int HP_clif_party_inviteack_pre; +int HP_clif_party_inviteack_post; +int HP_clif_party_option_pre; +int HP_clif_party_option_post; +int HP_clif_party_withdraw_pre; +int HP_clif_party_withdraw_post; +int HP_clif_party_message_pre; +int HP_clif_party_message_post; +int HP_clif_party_xy_pre; +int HP_clif_party_xy_post; +int HP_clif_party_xy_single_pre; +int HP_clif_party_xy_single_post; +int HP_clif_party_hp_pre; +int HP_clif_party_hp_post; +int HP_clif_party_xy_remove_pre; +int HP_clif_party_xy_remove_post; +int HP_clif_party_show_picker_pre; +int HP_clif_party_show_picker_post; +int HP_clif_partyinvitationstate_pre; +int HP_clif_partyinvitationstate_post; +int HP_clif_guild_created_pre; +int HP_clif_guild_created_post; +int HP_clif_guild_belonginfo_pre; +int HP_clif_guild_belonginfo_post; +int HP_clif_guild_masterormember_pre; +int HP_clif_guild_masterormember_post; +int HP_clif_guild_basicinfo_pre; +int HP_clif_guild_basicinfo_post; +int HP_clif_guild_allianceinfo_pre; +int HP_clif_guild_allianceinfo_post; +int HP_clif_guild_memberlist_pre; +int HP_clif_guild_memberlist_post; +int HP_clif_guild_skillinfo_pre; +int HP_clif_guild_skillinfo_post; +int HP_clif_guild_send_onlineinfo_pre; +int HP_clif_guild_send_onlineinfo_post; +int HP_clif_guild_memberlogin_notice_pre; +int HP_clif_guild_memberlogin_notice_post; +int HP_clif_guild_invite_pre; +int HP_clif_guild_invite_post; +int HP_clif_guild_inviteack_pre; +int HP_clif_guild_inviteack_post; +int HP_clif_guild_leave_pre; +int HP_clif_guild_leave_post; +int HP_clif_guild_expulsion_pre; +int HP_clif_guild_expulsion_post; +int HP_clif_guild_positionchanged_pre; +int HP_clif_guild_positionchanged_post; +int HP_clif_guild_memberpositionchanged_pre; +int HP_clif_guild_memberpositionchanged_post; +int HP_clif_guild_emblem_pre; +int HP_clif_guild_emblem_post; +int HP_clif_guild_emblem_area_pre; +int HP_clif_guild_emblem_area_post; +int HP_clif_guild_notice_pre; +int HP_clif_guild_notice_post; +int HP_clif_guild_message_pre; +int HP_clif_guild_message_post; +int HP_clif_guild_skillup_pre; +int HP_clif_guild_skillup_post; +int HP_clif_guild_reqalliance_pre; +int HP_clif_guild_reqalliance_post; +int HP_clif_guild_allianceack_pre; +int HP_clif_guild_allianceack_post; +int HP_clif_guild_delalliance_pre; +int HP_clif_guild_delalliance_post; +int HP_clif_guild_oppositionack_pre; +int HP_clif_guild_oppositionack_post; +int HP_clif_guild_broken_pre; +int HP_clif_guild_broken_post; +int HP_clif_guild_xy_pre; +int HP_clif_guild_xy_post; +int HP_clif_guild_xy_single_pre; +int HP_clif_guild_xy_single_post; +int HP_clif_guild_xy_remove_pre; +int HP_clif_guild_xy_remove_post; +int HP_clif_guild_positionnamelist_pre; +int HP_clif_guild_positionnamelist_post; +int HP_clif_guild_positioninfolist_pre; +int HP_clif_guild_positioninfolist_post; +int HP_clif_guild_expulsionlist_pre; +int HP_clif_guild_expulsionlist_post; +int HP_clif_validate_emblem_pre; +int HP_clif_validate_emblem_post; +int HP_clif_bg_hp_pre; +int HP_clif_bg_hp_post; +int HP_clif_bg_xy_pre; +int HP_clif_bg_xy_post; +int HP_clif_bg_xy_remove_pre; +int HP_clif_bg_xy_remove_post; +int HP_clif_bg_message_pre; +int HP_clif_bg_message_post; +int HP_clif_bg_updatescore_pre; +int HP_clif_bg_updatescore_post; +int HP_clif_bg_updatescore_single_pre; +int HP_clif_bg_updatescore_single_post; +int HP_clif_sendbgemblem_area_pre; +int HP_clif_sendbgemblem_area_post; +int HP_clif_sendbgemblem_single_pre; +int HP_clif_sendbgemblem_single_post; +int HP_clif_instance_pre; +int HP_clif_instance_post; +int HP_clif_instance_join_pre; +int HP_clif_instance_join_post; +int HP_clif_instance_leave_pre; +int HP_clif_instance_leave_post; +int HP_clif_catch_process_pre; +int HP_clif_catch_process_post; +int HP_clif_pet_roulette_pre; +int HP_clif_pet_roulette_post; +int HP_clif_sendegg_pre; +int HP_clif_sendegg_post; +int HP_clif_send_petstatus_pre; +int HP_clif_send_petstatus_post; +int HP_clif_send_petdata_pre; +int HP_clif_send_petdata_post; +int HP_clif_pet_emotion_pre; +int HP_clif_pet_emotion_post; +int HP_clif_pet_food_pre; +int HP_clif_pet_food_post; +int HP_clif_friendslist_toggle_sub_pre; +int HP_clif_friendslist_toggle_sub_post; +int HP_clif_friendslist_send_pre; +int HP_clif_friendslist_send_post; +int HP_clif_friendslist_reqack_pre; +int HP_clif_friendslist_reqack_post; +int HP_clif_friendslist_toggle_pre; +int HP_clif_friendslist_toggle_post; +int HP_clif_friendlist_req_pre; +int HP_clif_friendlist_req_post; +int HP_clif_GM_kickack_pre; +int HP_clif_GM_kickack_post; +int HP_clif_GM_kick_pre; +int HP_clif_GM_kick_post; +int HP_clif_manner_message_pre; +int HP_clif_manner_message_post; +int HP_clif_GM_silence_pre; +int HP_clif_GM_silence_post; +int HP_clif_account_name_pre; +int HP_clif_account_name_post; +int HP_clif_check_pre; +int HP_clif_check_post; +int HP_clif_hominfo_pre; +int HP_clif_hominfo_post; +int HP_clif_homskillinfoblock_pre; +int HP_clif_homskillinfoblock_post; +int HP_clif_homskillup_pre; +int HP_clif_homskillup_post; +int HP_clif_hom_food_pre; +int HP_clif_hom_food_post; +int HP_clif_send_homdata_pre; +int HP_clif_send_homdata_post; +int HP_clif_quest_send_list_pre; +int HP_clif_quest_send_list_post; +int HP_clif_quest_send_mission_pre; +int HP_clif_quest_send_mission_post; +int HP_clif_quest_add_pre; +int HP_clif_quest_add_post; +int HP_clif_quest_delete_pre; +int HP_clif_quest_delete_post; +int HP_clif_quest_update_status_pre; +int HP_clif_quest_update_status_post; +int HP_clif_quest_update_objective_pre; +int HP_clif_quest_update_objective_post; +int HP_clif_quest_show_event_pre; +int HP_clif_quest_show_event_post; +int HP_clif_mail_window_pre; +int HP_clif_mail_window_post; +int HP_clif_mail_read_pre; +int HP_clif_mail_read_post; +int HP_clif_mail_delete_pre; +int HP_clif_mail_delete_post; +int HP_clif_mail_return_pre; +int HP_clif_mail_return_post; +int HP_clif_mail_send_pre; +int HP_clif_mail_send_post; +int HP_clif_mail_new_pre; +int HP_clif_mail_new_post; +int HP_clif_mail_refreshinbox_pre; +int HP_clif_mail_refreshinbox_post; +int HP_clif_mail_getattachment_pre; +int HP_clif_mail_getattachment_post; +int HP_clif_mail_setattachment_pre; +int HP_clif_mail_setattachment_post; +int HP_clif_auction_openwindow_pre; +int HP_clif_auction_openwindow_post; +int HP_clif_auction_results_pre; +int HP_clif_auction_results_post; +int HP_clif_auction_message_pre; +int HP_clif_auction_message_post; +int HP_clif_auction_close_pre; +int HP_clif_auction_close_post; +int HP_clif_auction_setitem_pre; +int HP_clif_auction_setitem_post; +int HP_clif_mercenary_info_pre; +int HP_clif_mercenary_info_post; +int HP_clif_mercenary_skillblock_pre; +int HP_clif_mercenary_skillblock_post; +int HP_clif_mercenary_message_pre; +int HP_clif_mercenary_message_post; +int HP_clif_mercenary_updatestatus_pre; +int HP_clif_mercenary_updatestatus_post; +int HP_clif_rental_time_pre; +int HP_clif_rental_time_post; +int HP_clif_rental_expired_pre; +int HP_clif_rental_expired_post; +int HP_clif_PartyBookingRegisterAck_pre; +int HP_clif_PartyBookingRegisterAck_post; +int HP_clif_PartyBookingDeleteAck_pre; +int HP_clif_PartyBookingDeleteAck_post; +int HP_clif_PartyBookingSearchAck_pre; +int HP_clif_PartyBookingSearchAck_post; +int HP_clif_PartyBookingUpdateNotify_pre; +int HP_clif_PartyBookingUpdateNotify_post; +int HP_clif_PartyBookingDeleteNotify_pre; +int HP_clif_PartyBookingDeleteNotify_post; +int HP_clif_PartyBookingInsertNotify_pre; +int HP_clif_PartyBookingInsertNotify_post; +int HP_clif_PartyBookingVolunteerInfo_pre; +int HP_clif_PartyBookingVolunteerInfo_post; +int HP_clif_PartyBookingRefuseVolunteer_pre; +int HP_clif_PartyBookingRefuseVolunteer_post; +int HP_clif_PartyBookingCancelVolunteer_pre; +int HP_clif_PartyBookingCancelVolunteer_post; +int HP_clif_PartyBookingAddFilteringList_pre; +int HP_clif_PartyBookingAddFilteringList_post; +int HP_clif_PartyBookingSubFilteringList_pre; +int HP_clif_PartyBookingSubFilteringList_post; +int HP_clif_buyingstore_open_pre; +int HP_clif_buyingstore_open_post; +int HP_clif_buyingstore_open_failed_pre; +int HP_clif_buyingstore_open_failed_post; +int HP_clif_buyingstore_myitemlist_pre; +int HP_clif_buyingstore_myitemlist_post; +int HP_clif_buyingstore_entry_pre; +int HP_clif_buyingstore_entry_post; +int HP_clif_buyingstore_entry_single_pre; +int HP_clif_buyingstore_entry_single_post; +int HP_clif_buyingstore_disappear_entry_pre; +int HP_clif_buyingstore_disappear_entry_post; +int HP_clif_buyingstore_disappear_entry_single_pre; +int HP_clif_buyingstore_disappear_entry_single_post; +int HP_clif_buyingstore_itemlist_pre; +int HP_clif_buyingstore_itemlist_post; +int HP_clif_buyingstore_trade_failed_buyer_pre; +int HP_clif_buyingstore_trade_failed_buyer_post; +int HP_clif_buyingstore_update_item_pre; +int HP_clif_buyingstore_update_item_post; +int HP_clif_buyingstore_delete_item_pre; +int HP_clif_buyingstore_delete_item_post; +int HP_clif_buyingstore_trade_failed_seller_pre; +int HP_clif_buyingstore_trade_failed_seller_post; +int HP_clif_search_store_info_ack_pre; +int HP_clif_search_store_info_ack_post; +int HP_clif_search_store_info_failed_pre; +int HP_clif_search_store_info_failed_post; +int HP_clif_open_search_store_info_pre; +int HP_clif_open_search_store_info_post; +int HP_clif_search_store_info_click_ack_pre; +int HP_clif_search_store_info_click_ack_post; +int HP_clif_elemental_info_pre; +int HP_clif_elemental_info_post; +int HP_clif_elemental_updatestatus_pre; +int HP_clif_elemental_updatestatus_post; +int HP_clif_bgqueue_ack_pre; +int HP_clif_bgqueue_ack_post; +int HP_clif_bgqueue_notice_delete_pre; +int HP_clif_bgqueue_notice_delete_post; +int HP_clif_bgqueue_update_info_pre; +int HP_clif_bgqueue_update_info_post; +int HP_clif_bgqueue_joined_pre; +int HP_clif_bgqueue_joined_post; +int HP_clif_bgqueue_pcleft_pre; +int HP_clif_bgqueue_pcleft_post; +int HP_clif_bgqueue_battlebegins_pre; +int HP_clif_bgqueue_battlebegins_post; +int HP_clif_adopt_reply_pre; +int HP_clif_adopt_reply_post; +int HP_clif_adopt_request_pre; +int HP_clif_adopt_request_post; +int HP_clif_readbook_pre; +int HP_clif_readbook_post; +int HP_clif_notify_time_pre; +int HP_clif_notify_time_post; +int HP_clif_user_count_pre; +int HP_clif_user_count_post; +int HP_clif_noask_sub_pre; +int HP_clif_noask_sub_post; +int HP_clif_bc_ready_pre; +int HP_clif_bc_ready_post; +int HP_clif_undisguise_timer_pre; +int HP_clif_undisguise_timer_post; +int HP_clif_chsys_create_pre; +int HP_clif_chsys_create_post; +int HP_clif_chsys_msg_pre; +int HP_clif_chsys_msg_post; +int HP_clif_chsys_msg2_pre; +int HP_clif_chsys_msg2_post; +int HP_clif_chsys_send_pre; +int HP_clif_chsys_send_post; +int HP_clif_chsys_join_pre; +int HP_clif_chsys_join_post; +int HP_clif_chsys_left_pre; +int HP_clif_chsys_left_post; +int HP_clif_chsys_delete_pre; +int HP_clif_chsys_delete_post; +int HP_clif_chsys_mjoin_pre; +int HP_clif_chsys_mjoin_post; +int HP_clif_chsys_quit_pre; +int HP_clif_chsys_quit_post; +int HP_clif_chsys_quitg_pre; +int HP_clif_chsys_quitg_post; +int HP_clif_chsys_gjoin_pre; +int HP_clif_chsys_gjoin_post; +int HP_clif_chsys_gleave_pre; +int HP_clif_chsys_gleave_post; +int HP_clif_pWantToConnection_pre; +int HP_clif_pWantToConnection_post; +int HP_clif_pLoadEndAck_pre; +int HP_clif_pLoadEndAck_post; +int HP_clif_pTickSend_pre; +int HP_clif_pTickSend_post; +int HP_clif_pHotkey_pre; +int HP_clif_pHotkey_post; +int HP_clif_pProgressbar_pre; +int HP_clif_pProgressbar_post; +int HP_clif_pWalkToXY_pre; +int HP_clif_pWalkToXY_post; +int HP_clif_pQuitGame_pre; +int HP_clif_pQuitGame_post; +int HP_clif_pGetCharNameRequest_pre; +int HP_clif_pGetCharNameRequest_post; +int HP_clif_pGlobalMessage_pre; +int HP_clif_pGlobalMessage_post; +int HP_clif_pMapMove_pre; +int HP_clif_pMapMove_post; +int HP_clif_pChangeDir_pre; +int HP_clif_pChangeDir_post; +int HP_clif_pEmotion_pre; +int HP_clif_pEmotion_post; +int HP_clif_pHowManyConnections_pre; +int HP_clif_pHowManyConnections_post; +int HP_clif_pActionRequest_pre; +int HP_clif_pActionRequest_post; +int HP_clif_pActionRequest_sub_pre; +int HP_clif_pActionRequest_sub_post; +int HP_clif_pRestart_pre; +int HP_clif_pRestart_post; +int HP_clif_pWisMessage_pre; +int HP_clif_pWisMessage_post; +int HP_clif_pBroadcast_pre; +int HP_clif_pBroadcast_post; +int HP_clif_pTakeItem_pre; +int HP_clif_pTakeItem_post; +int HP_clif_pDropItem_pre; +int HP_clif_pDropItem_post; +int HP_clif_pUseItem_pre; +int HP_clif_pUseItem_post; +int HP_clif_pEquipItem_pre; +int HP_clif_pEquipItem_post; +int HP_clif_pUnequipItem_pre; +int HP_clif_pUnequipItem_post; +int HP_clif_pNpcClicked_pre; +int HP_clif_pNpcClicked_post; +int HP_clif_pNpcBuySellSelected_pre; +int HP_clif_pNpcBuySellSelected_post; +int HP_clif_pNpcBuyListSend_pre; +int HP_clif_pNpcBuyListSend_post; +int HP_clif_pNpcSellListSend_pre; +int HP_clif_pNpcSellListSend_post; +int HP_clif_pCreateChatRoom_pre; +int HP_clif_pCreateChatRoom_post; +int HP_clif_pChatAddMember_pre; +int HP_clif_pChatAddMember_post; +int HP_clif_pChatRoomStatusChange_pre; +int HP_clif_pChatRoomStatusChange_post; +int HP_clif_pChangeChatOwner_pre; +int HP_clif_pChangeChatOwner_post; +int HP_clif_pKickFromChat_pre; +int HP_clif_pKickFromChat_post; +int HP_clif_pChatLeave_pre; +int HP_clif_pChatLeave_post; +int HP_clif_pTradeRequest_pre; +int HP_clif_pTradeRequest_post; +int HP_clif_chann_config_read_pre; +int HP_clif_chann_config_read_post; +int HP_clif_pTradeAck_pre; +int HP_clif_pTradeAck_post; +int HP_clif_pTradeAddItem_pre; +int HP_clif_pTradeAddItem_post; +int HP_clif_pTradeOk_pre; +int HP_clif_pTradeOk_post; +int HP_clif_pTradeCancel_pre; +int HP_clif_pTradeCancel_post; +int HP_clif_pTradeCommit_pre; +int HP_clif_pTradeCommit_post; +int HP_clif_pStopAttack_pre; +int HP_clif_pStopAttack_post; +int HP_clif_pPutItemToCart_pre; +int HP_clif_pPutItemToCart_post; +int HP_clif_pGetItemFromCart_pre; +int HP_clif_pGetItemFromCart_post; +int HP_clif_pRemoveOption_pre; +int HP_clif_pRemoveOption_post; +int HP_clif_pChangeCart_pre; +int HP_clif_pChangeCart_post; +int HP_clif_pStatusUp_pre; +int HP_clif_pStatusUp_post; +int HP_clif_pSkillUp_pre; +int HP_clif_pSkillUp_post; +int HP_clif_pUseSkillToId_pre; +int HP_clif_pUseSkillToId_post; +int HP_clif_pUseSkillToId_homun_pre; +int HP_clif_pUseSkillToId_homun_post; +int HP_clif_pUseSkillToId_mercenary_pre; +int HP_clif_pUseSkillToId_mercenary_post; +int HP_clif_pUseSkillToPos_pre; +int HP_clif_pUseSkillToPos_post; +int HP_clif_pUseSkillToPosSub_pre; +int HP_clif_pUseSkillToPosSub_post; +int HP_clif_pUseSkillToPos_homun_pre; +int HP_clif_pUseSkillToPos_homun_post; +int HP_clif_pUseSkillToPos_mercenary_pre; +int HP_clif_pUseSkillToPos_mercenary_post; +int HP_clif_pUseSkillToPosMoreInfo_pre; +int HP_clif_pUseSkillToPosMoreInfo_post; +int HP_clif_pUseSkillMap_pre; +int HP_clif_pUseSkillMap_post; +int HP_clif_pRequestMemo_pre; +int HP_clif_pRequestMemo_post; +int HP_clif_pProduceMix_pre; +int HP_clif_pProduceMix_post; +int HP_clif_pCooking_pre; +int HP_clif_pCooking_post; +int HP_clif_pRepairItem_pre; +int HP_clif_pRepairItem_post; +int HP_clif_pWeaponRefine_pre; +int HP_clif_pWeaponRefine_post; +int HP_clif_pNpcSelectMenu_pre; +int HP_clif_pNpcSelectMenu_post; +int HP_clif_pNpcNextClicked_pre; +int HP_clif_pNpcNextClicked_post; +int HP_clif_pNpcAmountInput_pre; +int HP_clif_pNpcAmountInput_post; +int HP_clif_pNpcStringInput_pre; +int HP_clif_pNpcStringInput_post; +int HP_clif_pNpcCloseClicked_pre; +int HP_clif_pNpcCloseClicked_post; +int HP_clif_pItemIdentify_pre; +int HP_clif_pItemIdentify_post; +int HP_clif_pSelectArrow_pre; +int HP_clif_pSelectArrow_post; +int HP_clif_pAutoSpell_pre; +int HP_clif_pAutoSpell_post; +int HP_clif_pUseCard_pre; +int HP_clif_pUseCard_post; +int HP_clif_pInsertCard_pre; +int HP_clif_pInsertCard_post; +int HP_clif_pSolveCharName_pre; +int HP_clif_pSolveCharName_post; +int HP_clif_pResetChar_pre; +int HP_clif_pResetChar_post; +int HP_clif_pLocalBroadcast_pre; +int HP_clif_pLocalBroadcast_post; +int HP_clif_pMoveToKafra_pre; +int HP_clif_pMoveToKafra_post; +int HP_clif_pMoveFromKafra_pre; +int HP_clif_pMoveFromKafra_post; +int HP_clif_pMoveToKafraFromCart_pre; +int HP_clif_pMoveToKafraFromCart_post; +int HP_clif_pMoveFromKafraToCart_pre; +int HP_clif_pMoveFromKafraToCart_post; +int HP_clif_pCloseKafra_pre; +int HP_clif_pCloseKafra_post; +int HP_clif_pStoragePassword_pre; +int HP_clif_pStoragePassword_post; +int HP_clif_pCreateParty_pre; +int HP_clif_pCreateParty_post; +int HP_clif_pCreateParty2_pre; +int HP_clif_pCreateParty2_post; +int HP_clif_pPartyInvite_pre; +int HP_clif_pPartyInvite_post; +int HP_clif_pPartyInvite2_pre; +int HP_clif_pPartyInvite2_post; +int HP_clif_pReplyPartyInvite_pre; +int HP_clif_pReplyPartyInvite_post; +int HP_clif_pReplyPartyInvite2_pre; +int HP_clif_pReplyPartyInvite2_post; +int HP_clif_pLeaveParty_pre; +int HP_clif_pLeaveParty_post; +int HP_clif_pRemovePartyMember_pre; +int HP_clif_pRemovePartyMember_post; +int HP_clif_pPartyChangeOption_pre; +int HP_clif_pPartyChangeOption_post; +int HP_clif_pPartyMessage_pre; +int HP_clif_pPartyMessage_post; +int HP_clif_pPartyChangeLeader_pre; +int HP_clif_pPartyChangeLeader_post; +int HP_clif_pPartyBookingRegisterReq_pre; +int HP_clif_pPartyBookingRegisterReq_post; +int HP_clif_pPartyBookingSearchReq_pre; +int HP_clif_pPartyBookingSearchReq_post; +int HP_clif_pPartyBookingDeleteReq_pre; +int HP_clif_pPartyBookingDeleteReq_post; +int HP_clif_pPartyBookingUpdateReq_pre; +int HP_clif_pPartyBookingUpdateReq_post; +int HP_clif_pCloseVending_pre; +int HP_clif_pCloseVending_post; +int HP_clif_pVendingListReq_pre; +int HP_clif_pVendingListReq_post; +int HP_clif_pPurchaseReq_pre; +int HP_clif_pPurchaseReq_post; +int HP_clif_pPurchaseReq2_pre; +int HP_clif_pPurchaseReq2_post; +int HP_clif_pOpenVending_pre; +int HP_clif_pOpenVending_post; +int HP_clif_pCreateGuild_pre; +int HP_clif_pCreateGuild_post; +int HP_clif_pGuildCheckMaster_pre; +int HP_clif_pGuildCheckMaster_post; +int HP_clif_pGuildRequestInfo_pre; +int HP_clif_pGuildRequestInfo_post; +int HP_clif_pGuildChangePositionInfo_pre; +int HP_clif_pGuildChangePositionInfo_post; +int HP_clif_pGuildChangeMemberPosition_pre; +int HP_clif_pGuildChangeMemberPosition_post; +int HP_clif_pGuildRequestEmblem_pre; +int HP_clif_pGuildRequestEmblem_post; +int HP_clif_pGuildChangeEmblem_pre; +int HP_clif_pGuildChangeEmblem_post; +int HP_clif_pGuildChangeNotice_pre; +int HP_clif_pGuildChangeNotice_post; +int HP_clif_pGuildInvite_pre; +int HP_clif_pGuildInvite_post; +int HP_clif_pGuildReplyInvite_pre; +int HP_clif_pGuildReplyInvite_post; +int HP_clif_pGuildLeave_pre; +int HP_clif_pGuildLeave_post; +int HP_clif_pGuildExpulsion_pre; +int HP_clif_pGuildExpulsion_post; +int HP_clif_pGuildMessage_pre; +int HP_clif_pGuildMessage_post; +int HP_clif_pGuildRequestAlliance_pre; +int HP_clif_pGuildRequestAlliance_post; +int HP_clif_pGuildReplyAlliance_pre; +int HP_clif_pGuildReplyAlliance_post; +int HP_clif_pGuildDelAlliance_pre; +int HP_clif_pGuildDelAlliance_post; +int HP_clif_pGuildOpposition_pre; +int HP_clif_pGuildOpposition_post; +int HP_clif_pGuildBreak_pre; +int HP_clif_pGuildBreak_post; +int HP_clif_pPetMenu_pre; +int HP_clif_pPetMenu_post; +int HP_clif_pCatchPet_pre; +int HP_clif_pCatchPet_post; +int HP_clif_pSelectEgg_pre; +int HP_clif_pSelectEgg_post; +int HP_clif_pSendEmotion_pre; +int HP_clif_pSendEmotion_post; +int HP_clif_pChangePetName_pre; +int HP_clif_pChangePetName_post; +int HP_clif_pGMKick_pre; +int HP_clif_pGMKick_post; +int HP_clif_pGMKickAll_pre; +int HP_clif_pGMKickAll_post; +int HP_clif_pGMShift_pre; +int HP_clif_pGMShift_post; +int HP_clif_pGMRemove2_pre; +int HP_clif_pGMRemove2_post; +int HP_clif_pGMRecall_pre; +int HP_clif_pGMRecall_post; +int HP_clif_pGMRecall2_pre; +int HP_clif_pGMRecall2_post; +int HP_clif_pGM_Monster_Item_pre; +int HP_clif_pGM_Monster_Item_post; +int HP_clif_pGMHide_pre; +int HP_clif_pGMHide_post; +int HP_clif_pGMReqNoChat_pre; +int HP_clif_pGMReqNoChat_post; +int HP_clif_pGMRc_pre; +int HP_clif_pGMRc_post; +int HP_clif_pGMReqAccountName_pre; +int HP_clif_pGMReqAccountName_post; +int HP_clif_pGMChangeMapType_pre; +int HP_clif_pGMChangeMapType_post; +int HP_clif_pPMIgnore_pre; +int HP_clif_pPMIgnore_post; +int HP_clif_pPMIgnoreAll_pre; +int HP_clif_pPMIgnoreAll_post; +int HP_clif_pPMIgnoreList_pre; +int HP_clif_pPMIgnoreList_post; +int HP_clif_pNoviceDoriDori_pre; +int HP_clif_pNoviceDoriDori_post; +int HP_clif_pNoviceExplosionSpirits_pre; +int HP_clif_pNoviceExplosionSpirits_post; +int HP_clif_pFriendsListAdd_pre; +int HP_clif_pFriendsListAdd_post; +int HP_clif_pFriendsListReply_pre; +int HP_clif_pFriendsListReply_post; +int HP_clif_pFriendsListRemove_pre; +int HP_clif_pFriendsListRemove_post; +int HP_clif_pPVPInfo_pre; +int HP_clif_pPVPInfo_post; +int HP_clif_pBlacksmith_pre; +int HP_clif_pBlacksmith_post; +int HP_clif_pAlchemist_pre; +int HP_clif_pAlchemist_post; +int HP_clif_pTaekwon_pre; +int HP_clif_pTaekwon_post; +int HP_clif_pRankingPk_pre; +int HP_clif_pRankingPk_post; +int HP_clif_pFeelSaveOk_pre; +int HP_clif_pFeelSaveOk_post; +int HP_clif_pChangeHomunculusName_pre; +int HP_clif_pChangeHomunculusName_post; +int HP_clif_pHomMoveToMaster_pre; +int HP_clif_pHomMoveToMaster_post; +int HP_clif_pHomMoveTo_pre; +int HP_clif_pHomMoveTo_post; +int HP_clif_pHomAttack_pre; +int HP_clif_pHomAttack_post; +int HP_clif_pHomMenu_pre; +int HP_clif_pHomMenu_post; +int HP_clif_pAutoRevive_pre; +int HP_clif_pAutoRevive_post; +int HP_clif_pCheck_pre; +int HP_clif_pCheck_post; +int HP_clif_pMail_refreshinbox_pre; +int HP_clif_pMail_refreshinbox_post; +int HP_clif_pMail_read_pre; +int HP_clif_pMail_read_post; +int HP_clif_pMail_getattach_pre; +int HP_clif_pMail_getattach_post; +int HP_clif_pMail_delete_pre; +int HP_clif_pMail_delete_post; +int HP_clif_pMail_return_pre; +int HP_clif_pMail_return_post; +int HP_clif_pMail_setattach_pre; +int HP_clif_pMail_setattach_post; +int HP_clif_pMail_winopen_pre; +int HP_clif_pMail_winopen_post; +int HP_clif_pMail_send_pre; +int HP_clif_pMail_send_post; +int HP_clif_pAuction_cancelreg_pre; +int HP_clif_pAuction_cancelreg_post; +int HP_clif_pAuction_setitem_pre; +int HP_clif_pAuction_setitem_post; +int HP_clif_pAuction_register_pre; +int HP_clif_pAuction_register_post; +int HP_clif_pAuction_cancel_pre; +int HP_clif_pAuction_cancel_post; +int HP_clif_pAuction_close_pre; +int HP_clif_pAuction_close_post; +int HP_clif_pAuction_bid_pre; +int HP_clif_pAuction_bid_post; +int HP_clif_pAuction_search_pre; +int HP_clif_pAuction_search_post; +int HP_clif_pAuction_buysell_pre; +int HP_clif_pAuction_buysell_post; +int HP_clif_pcashshop_buy_pre; +int HP_clif_pcashshop_buy_post; +int HP_clif_pAdopt_request_pre; +int HP_clif_pAdopt_request_post; +int HP_clif_pAdopt_reply_pre; +int HP_clif_pAdopt_reply_post; +int HP_clif_pViewPlayerEquip_pre; +int HP_clif_pViewPlayerEquip_post; +int HP_clif_pEquipTick_pre; +int HP_clif_pEquipTick_post; +int HP_clif_pquestStateAck_pre; +int HP_clif_pquestStateAck_post; +int HP_clif_pmercenary_action_pre; +int HP_clif_pmercenary_action_post; +int HP_clif_pBattleChat_pre; +int HP_clif_pBattleChat_post; +int HP_clif_pLessEffect_pre; +int HP_clif_pLessEffect_post; +int HP_clif_pItemListWindowSelected_pre; +int HP_clif_pItemListWindowSelected_post; +int HP_clif_pReqOpenBuyingStore_pre; +int HP_clif_pReqOpenBuyingStore_post; +int HP_clif_pReqCloseBuyingStore_pre; +int HP_clif_pReqCloseBuyingStore_post; +int HP_clif_pReqClickBuyingStore_pre; +int HP_clif_pReqClickBuyingStore_post; +int HP_clif_pReqTradeBuyingStore_pre; +int HP_clif_pReqTradeBuyingStore_post; +int HP_clif_pSearchStoreInfo_pre; +int HP_clif_pSearchStoreInfo_post; +int HP_clif_pSearchStoreInfoNextPage_pre; +int HP_clif_pSearchStoreInfoNextPage_post; +int HP_clif_pCloseSearchStoreInfo_pre; +int HP_clif_pCloseSearchStoreInfo_post; +int HP_clif_pSearchStoreInfoListItemClick_pre; +int HP_clif_pSearchStoreInfoListItemClick_post; +int HP_clif_pDebug_pre; +int HP_clif_pDebug_post; +int HP_clif_pSkillSelectMenu_pre; +int HP_clif_pSkillSelectMenu_post; +int HP_clif_pMoveItem_pre; +int HP_clif_pMoveItem_post; +int HP_clif_pDull_pre; +int HP_clif_pDull_post; +int HP_clif_pBGQueueRegister_pre; +int HP_clif_pBGQueueRegister_post; +int HP_clif_pBGQueueCheckState_pre; +int HP_clif_pBGQueueCheckState_post; +int HP_clif_pBGQueueRevokeReq_pre; +int HP_clif_pBGQueueRevokeReq_post; +int HP_clif_pBGQueueBattleBeginAck_pre; +int HP_clif_pBGQueueBattleBeginAck_post; +int HP_clif_pCashShopOpen_pre; +int HP_clif_pCashShopOpen_post; +int HP_clif_pCashShopClose_pre; +int HP_clif_pCashShopClose_post; +int HP_clif_pCashShopReqTab_pre; +int HP_clif_pCashShopReqTab_post; +int HP_clif_pCashShopSchedule_pre; +int HP_clif_pCashShopSchedule_post; +int HP_clif_pCashShopBuy_pre; +int HP_clif_pCashShopBuy_post; +int HP_clif_pPartyTick_pre; +int HP_clif_pPartyTick_post; +int HP_clif_pGuildInvite2_pre; +int HP_clif_pGuildInvite2_post; +int HP_clif_pPartyBookingAddFilter_pre; +int HP_clif_pPartyBookingAddFilter_post; +int HP_clif_pPartyBookingSubFilter_pre; +int HP_clif_pPartyBookingSubFilter_post; +int HP_clif_pPartyBookingReqVolunteer_pre; +int HP_clif_pPartyBookingReqVolunteer_post; +int HP_clif_pPartyBookingRefuseVolunteer_pre; +int HP_clif_pPartyBookingRefuseVolunteer_post; +int HP_clif_pPartyBookingCancelVolunteer_pre; +int HP_clif_pPartyBookingCancelVolunteer_post; +int HP_duel_create_pre; +int HP_duel_create_post; +int HP_duel_invite_pre; +int HP_duel_invite_post; +int HP_duel_accept_pre; +int HP_duel_accept_post; +int HP_duel_reject_pre; +int HP_duel_reject_post; +int HP_duel_leave_pre; +int HP_duel_leave_post; +int HP_duel_showinfo_pre; +int HP_duel_showinfo_post; +int HP_duel_checktime_pre; +int HP_duel_checktime_post; +int HP_duel_init_pre; +int HP_duel_init_post; +int HP_duel_final_pre; +int HP_duel_final_post; +int HP_elemental_init_pre; +int HP_elemental_init_post; +int HP_elemental_final_pre; +int HP_elemental_final_post; +int HP_elemental_class_pre; +int HP_elemental_class_post; +int HP_elemental_get_viewdata_pre; +int HP_elemental_get_viewdata_post; +int HP_elemental_create_pre; +int HP_elemental_create_post; +int HP_elemental_data_received_pre; +int HP_elemental_data_received_post; +int HP_elemental_save_pre; +int HP_elemental_save_post; +int HP_elemental_change_mode_ack_pre; +int HP_elemental_change_mode_ack_post; +int HP_elemental_change_mode_pre; +int HP_elemental_change_mode_post; +int HP_elemental_heal_pre; +int HP_elemental_heal_post; +int HP_elemental_dead_pre; +int HP_elemental_dead_post; +int HP_elemental_delete_pre; +int HP_elemental_delete_post; +int HP_elemental_summon_stop_pre; +int HP_elemental_summon_stop_post; +int HP_elemental_get_lifetime_pre; +int HP_elemental_get_lifetime_post; +int HP_elemental_unlocktarget_pre; +int HP_elemental_unlocktarget_post; +int HP_elemental_skillnotok_pre; +int HP_elemental_skillnotok_post; +int HP_elemental_set_target_pre; +int HP_elemental_set_target_post; +int HP_elemental_clean_single_effect_pre; +int HP_elemental_clean_single_effect_post; +int HP_elemental_clean_effect_pre; +int HP_elemental_clean_effect_post; +int HP_elemental_action_pre; +int HP_elemental_action_post; +int HP_elemental_skill_get_requirements_pre; +int HP_elemental_skill_get_requirements_post; +int HP_elemental_read_skilldb_pre; +int HP_elemental_read_skilldb_post; +int HP_elemental_reload_db_pre; +int HP_elemental_reload_db_post; +int HP_elemental_reload_skilldb_pre; +int HP_elemental_reload_skilldb_post; +int HP_elemental_search_index_pre; +int HP_elemental_search_index_post; +int HP_elemental_summon_init_pre; +int HP_elemental_summon_init_post; +int HP_elemental_summon_end_timer_pre; +int HP_elemental_summon_end_timer_post; +int HP_elemental_ai_sub_timer_activesearch_pre; +int HP_elemental_ai_sub_timer_activesearch_post; +int HP_elemental_ai_sub_timer_pre; +int HP_elemental_ai_sub_timer_post; +int HP_elemental_ai_sub_foreachclient_pre; +int HP_elemental_ai_sub_foreachclient_post; +int HP_elemental_ai_timer_pre; +int HP_elemental_ai_timer_post; +int HP_elemental_read_db_pre; +int HP_elemental_read_db_post; +int HP_guild_init_pre; +int HP_guild_init_post; +int HP_guild_final_pre; +int HP_guild_final_post; +int HP_guild_skill_get_max_pre; +int HP_guild_skill_get_max_post; +int HP_guild_checkskill_pre; +int HP_guild_checkskill_post; +int HP_guild_check_skill_require_pre; +int HP_guild_check_skill_require_post; +int HP_guild_checkcastles_pre; +int HP_guild_checkcastles_post; +int HP_guild_isallied_pre; +int HP_guild_isallied_post; +int HP_guild_search_pre; +int HP_guild_search_post; +int HP_guild_searchname_pre; +int HP_guild_searchname_post; +int HP_guild_castle_search_pre; +int HP_guild_castle_search_post; +int HP_guild_mapname2gc_pre; +int HP_guild_mapname2gc_post; +int HP_guild_mapindex2gc_pre; +int HP_guild_mapindex2gc_post; +int HP_guild_getavailablesd_pre; +int HP_guild_getavailablesd_post; +int HP_guild_getindex_pre; +int HP_guild_getindex_post; +int HP_guild_getposition_pre; +int HP_guild_getposition_post; +int HP_guild_payexp_pre; +int HP_guild_payexp_post; +int HP_guild_getexp_pre; +int HP_guild_getexp_post; +int HP_guild_create_pre; +int HP_guild_create_post; +int HP_guild_created_pre; +int HP_guild_created_post; +int HP_guild_request_info_pre; +int HP_guild_request_info_post; +int HP_guild_recv_noinfo_pre; +int HP_guild_recv_noinfo_post; +int HP_guild_recv_info_pre; +int HP_guild_recv_info_post; +int HP_guild_npc_request_info_pre; +int HP_guild_npc_request_info_post; +int HP_guild_invite_pre; +int HP_guild_invite_post; +int HP_guild_reply_invite_pre; +int HP_guild_reply_invite_post; +int HP_guild_member_joined_pre; +int HP_guild_member_joined_post; +int HP_guild_member_added_pre; +int HP_guild_member_added_post; +int HP_guild_leave_pre; +int HP_guild_leave_post; +int HP_guild_member_withdraw_pre; +int HP_guild_member_withdraw_post; +int HP_guild_expulsion_pre; +int HP_guild_expulsion_post; +int HP_guild_skillup_pre; +int HP_guild_skillup_post; +int HP_guild_block_skill_pre; +int HP_guild_block_skill_post; +int HP_guild_reqalliance_pre; +int HP_guild_reqalliance_post; +int HP_guild_reply_reqalliance_pre; +int HP_guild_reply_reqalliance_post; +int HP_guild_allianceack_pre; +int HP_guild_allianceack_post; +int HP_guild_delalliance_pre; +int HP_guild_delalliance_post; +int HP_guild_opposition_pre; +int HP_guild_opposition_post; +int HP_guild_check_alliance_pre; +int HP_guild_check_alliance_post; +int HP_guild_send_memberinfoshort_pre; +int HP_guild_send_memberinfoshort_post; +int HP_guild_recv_memberinfoshort_pre; +int HP_guild_recv_memberinfoshort_post; +int HP_guild_change_memberposition_pre; +int HP_guild_change_memberposition_post; +int HP_guild_memberposition_changed_pre; +int HP_guild_memberposition_changed_post; +int HP_guild_change_position_pre; +int HP_guild_change_position_post; +int HP_guild_position_changed_pre; +int HP_guild_position_changed_post; +int HP_guild_change_notice_pre; +int HP_guild_change_notice_post; +int HP_guild_notice_changed_pre; +int HP_guild_notice_changed_post; +int HP_guild_change_emblem_pre; +int HP_guild_change_emblem_post; +int HP_guild_emblem_changed_pre; +int HP_guild_emblem_changed_post; +int HP_guild_send_message_pre; +int HP_guild_send_message_post; +int HP_guild_recv_message_pre; +int HP_guild_recv_message_post; +int HP_guild_send_dot_remove_pre; +int HP_guild_send_dot_remove_post; +int HP_guild_skillupack_pre; +int HP_guild_skillupack_post; +int HP_guild_dobreak_pre; +int HP_guild_dobreak_post; +int HP_guild_broken_pre; +int HP_guild_broken_post; +int HP_guild_gm_change_pre; +int HP_guild_gm_change_post; +int HP_guild_gm_changed_pre; +int HP_guild_gm_changed_post; +int HP_guild_castle_map_init_pre; +int HP_guild_castle_map_init_post; +int HP_guild_castledatasave_pre; +int HP_guild_castledatasave_post; +int HP_guild_castledataloadack_pre; +int HP_guild_castledataloadack_post; +int HP_guild_castle_reconnect_pre; +int HP_guild_castle_reconnect_post; +int HP_guild_agit_start_pre; +int HP_guild_agit_start_post; +int HP_guild_agit_end_pre; +int HP_guild_agit_end_post; +int HP_guild_agit2_start_pre; +int HP_guild_agit2_start_post; +int HP_guild_agit2_end_pre; +int HP_guild_agit2_end_post; +int HP_guild_flag_add_pre; +int HP_guild_flag_add_post; +int HP_guild_flag_remove_pre; +int HP_guild_flag_remove_post; +int HP_guild_flags_clear_pre; +int HP_guild_flags_clear_post; +int HP_guild_aura_refresh_pre; +int HP_guild_aura_refresh_post; +int HP_guild_payexp_timer_pre; +int HP_guild_payexp_timer_post; +int HP_guild_sd_check_pre; +int HP_guild_sd_check_post; +int HP_guild_read_guildskill_tree_db_pre; +int HP_guild_read_guildskill_tree_db_post; +int HP_guild_read_castledb_pre; +int HP_guild_read_castledb_post; +int HP_guild_payexp_timer_sub_pre; +int HP_guild_payexp_timer_sub_post; +int HP_guild_send_xy_timer_sub_pre; +int HP_guild_send_xy_timer_sub_post; +int HP_guild_send_xy_timer_pre; +int HP_guild_send_xy_timer_post; +int HP_guild_create_expcache_pre; +int HP_guild_create_expcache_post; +int HP_guild_eventlist_db_final_pre; +int HP_guild_eventlist_db_final_post; +int HP_guild_expcache_db_final_pre; +int HP_guild_expcache_db_final_post; +int HP_guild_castle_db_final_pre; +int HP_guild_castle_db_final_post; +int HP_guild_broken_sub_pre; +int HP_guild_broken_sub_post; +int HP_guild_castle_broken_sub_pre; +int HP_guild_castle_broken_sub_post; +int HP_guild_makemember_pre; +int HP_guild_makemember_post; +int HP_guild_check_member_pre; +int HP_guild_check_member_post; +int HP_guild_get_alliance_count_pre; +int HP_guild_get_alliance_count_post; +int HP_guild_castle_reconnect_sub_pre; +int HP_guild_castle_reconnect_sub_post; +int HP_gstorage_id2storage_pre; +int HP_gstorage_id2storage_post; +int HP_gstorage_id2storage2_pre; +int HP_gstorage_id2storage2_post; +int HP_gstorage_init_pre; +int HP_gstorage_init_post; +int HP_gstorage_final_pre; +int HP_gstorage_final_post; +int HP_gstorage_delete_pre; +int HP_gstorage_delete_post; +int HP_gstorage_open_pre; +int HP_gstorage_open_post; +int HP_gstorage_additem_pre; +int HP_gstorage_additem_post; +int HP_gstorage_delitem_pre; +int HP_gstorage_delitem_post; +int HP_gstorage_add_pre; +int HP_gstorage_add_post; +int HP_gstorage_get_pre; +int HP_gstorage_get_post; +int HP_gstorage_addfromcart_pre; +int HP_gstorage_addfromcart_post; +int HP_gstorage_gettocart_pre; +int HP_gstorage_gettocart_post; +int HP_gstorage_close_pre; +int HP_gstorage_close_post; +int HP_gstorage_pc_quit_pre; +int HP_gstorage_pc_quit_post; +int HP_gstorage_save_pre; +int HP_gstorage_save_post; +int HP_gstorage_saved_pre; +int HP_gstorage_saved_post; +int HP_gstorage_create_pre; +int HP_gstorage_create_post; +int HP_homun_init_pre; +int HP_homun_init_post; +int HP_homun_final_pre; +int HP_homun_final_post; +int HP_homun_reload_pre; +int HP_homun_reload_post; +int HP_homun_reload_skill_pre; +int HP_homun_reload_skill_post; +int HP_homun_get_viewdata_pre; +int HP_homun_get_viewdata_post; +int HP_homun_class2type_pre; +int HP_homun_class2type_post; +int HP_homun_damaged_pre; +int HP_homun_damaged_post; +int HP_homun_dead_pre; +int HP_homun_dead_post; +int HP_homun_vaporize_pre; +int HP_homun_vaporize_post; +int HP_homun_delete_pre; +int HP_homun_delete_post; +int HP_homun_checkskill_pre; +int HP_homun_checkskill_post; +int HP_homun_calc_skilltree_pre; +int HP_homun_calc_skilltree_post; +int HP_homun_skill_tree_get_max_pre; +int HP_homun_skill_tree_get_max_post; +int HP_homun_skillup_pre; +int HP_homun_skillup_post; +int HP_homun_levelup_pre; +int HP_homun_levelup_post; +int HP_homun_change_class_pre; +int HP_homun_change_class_post; +int HP_homun_evolve_pre; +int HP_homun_evolve_post; +int HP_homun_mutate_pre; +int HP_homun_mutate_post; +int HP_homun_gainexp_pre; +int HP_homun_gainexp_post; +int HP_homun_add_intimacy_pre; +int HP_homun_add_intimacy_post; +int HP_homun_consume_intimacy_pre; +int HP_homun_consume_intimacy_post; +int HP_homun_healed_pre; +int HP_homun_healed_post; +int HP_homun_save_pre; +int HP_homun_save_post; +int HP_homun_menu_pre; +int HP_homun_menu_post; +int HP_homun_feed_pre; +int HP_homun_feed_post; +int HP_homun_hunger_timer_pre; +int HP_homun_hunger_timer_post; +int HP_homun_hunger_timer_delete_pre; +int HP_homun_hunger_timer_delete_post; +int HP_homun_change_name_pre; +int HP_homun_change_name_post; +int HP_homun_change_name_ack_pre; +int HP_homun_change_name_ack_post; +int HP_homun_db_search_pre; +int HP_homun_db_search_post; +int HP_homun_create_pre; +int HP_homun_create_post; +int HP_homun_init_timers_pre; +int HP_homun_init_timers_post; +int HP_homun_call_pre; +int HP_homun_call_post; +int HP_homun_recv_data_pre; +int HP_homun_recv_data_post; +int HP_homun_creation_request_pre; +int HP_homun_creation_request_post; +int HP_homun_ressurect_pre; +int HP_homun_ressurect_post; +int HP_homun_revive_pre; +int HP_homun_revive_post; +int HP_homun_stat_reset_pre; +int HP_homun_stat_reset_post; +int HP_homun_shuffle_pre; +int HP_homun_shuffle_post; +int HP_homun_read_db_sub_pre; +int HP_homun_read_db_sub_post; +int HP_homun_read_db_pre; +int HP_homun_read_db_post; +int HP_homun_read_skill_db_sub_pre; +int HP_homun_read_skill_db_sub_post; +int HP_homun_skill_db_read_pre; +int HP_homun_skill_db_read_post; +int HP_homun_exp_db_read_pre; +int HP_homun_exp_db_read_post; +int HP_homun_addspiritball_pre; +int HP_homun_addspiritball_post; +int HP_homun_delspiritball_pre; +int HP_homun_delspiritball_post; +int HP_instance_init_pre; +int HP_instance_init_post; +int HP_instance_final_pre; +int HP_instance_final_post; +int HP_instance_create_pre; +int HP_instance_create_post; +int HP_instance_add_map_pre; +int HP_instance_add_map_post; +int HP_instance_del_map_pre; +int HP_instance_del_map_post; +int HP_instance_map2imap_pre; +int HP_instance_map2imap_post; +int HP_instance_mapid2imapid_pre; +int HP_instance_mapid2imapid_post; +int HP_instance_destroy_pre; +int HP_instance_destroy_post; +int HP_instance_start_pre; +int HP_instance_start_post; +int HP_instance_check_idle_pre; +int HP_instance_check_idle_post; +int HP_instance_check_kick_pre; +int HP_instance_check_kick_post; +int HP_instance_set_timeout_pre; +int HP_instance_set_timeout_post; +int HP_instance_valid_pre; +int HP_instance_valid_post; +int HP_instance_destroy_timer_pre; +int HP_instance_destroy_timer_post; +int HP_intif_parse_pre; +int HP_intif_parse_post; +int HP_intif_create_pet_pre; +int HP_intif_create_pet_post; +int HP_intif_broadcast_pre; +int HP_intif_broadcast_post; +int HP_intif_broadcast2_pre; +int HP_intif_broadcast2_post; +int HP_intif_main_message_pre; +int HP_intif_main_message_post; +int HP_intif_wis_message_pre; +int HP_intif_wis_message_post; +int HP_intif_wis_message_to_gm_pre; +int HP_intif_wis_message_to_gm_post; +int HP_intif_saveregistry_pre; +int HP_intif_saveregistry_post; +int HP_intif_request_registry_pre; +int HP_intif_request_registry_post; +int HP_intif_request_guild_storage_pre; +int HP_intif_request_guild_storage_post; +int HP_intif_send_guild_storage_pre; +int HP_intif_send_guild_storage_post; +int HP_intif_create_party_pre; +int HP_intif_create_party_post; +int HP_intif_request_partyinfo_pre; +int HP_intif_request_partyinfo_post; +int HP_intif_party_addmember_pre; +int HP_intif_party_addmember_post; +int HP_intif_party_changeoption_pre; +int HP_intif_party_changeoption_post; +int HP_intif_party_leave_pre; +int HP_intif_party_leave_post; +int HP_intif_party_changemap_pre; +int HP_intif_party_changemap_post; +int HP_intif_break_party_pre; +int HP_intif_break_party_post; +int HP_intif_party_message_pre; +int HP_intif_party_message_post; +int HP_intif_party_leaderchange_pre; +int HP_intif_party_leaderchange_post; +int HP_intif_guild_create_pre; +int HP_intif_guild_create_post; +int HP_intif_guild_request_info_pre; +int HP_intif_guild_request_info_post; +int HP_intif_guild_addmember_pre; +int HP_intif_guild_addmember_post; +int HP_intif_guild_leave_pre; +int HP_intif_guild_leave_post; +int HP_intif_guild_memberinfoshort_pre; +int HP_intif_guild_memberinfoshort_post; +int HP_intif_guild_break_pre; +int HP_intif_guild_break_post; +int HP_intif_guild_message_pre; +int HP_intif_guild_message_post; +int HP_intif_guild_change_gm_pre; +int HP_intif_guild_change_gm_post; +int HP_intif_guild_change_basicinfo_pre; +int HP_intif_guild_change_basicinfo_post; +int HP_intif_guild_change_memberinfo_pre; +int HP_intif_guild_change_memberinfo_post; +int HP_intif_guild_position_pre; +int HP_intif_guild_position_post; +int HP_intif_guild_skillup_pre; +int HP_intif_guild_skillup_post; +int HP_intif_guild_alliance_pre; +int HP_intif_guild_alliance_post; +int HP_intif_guild_notice_pre; +int HP_intif_guild_notice_post; +int HP_intif_guild_emblem_pre; +int HP_intif_guild_emblem_post; +int HP_intif_guild_castle_dataload_pre; +int HP_intif_guild_castle_dataload_post; +int HP_intif_guild_castle_datasave_pre; +int HP_intif_guild_castle_datasave_post; +int HP_intif_request_petdata_pre; +int HP_intif_request_petdata_post; +int HP_intif_save_petdata_pre; +int HP_intif_save_petdata_post; +int HP_intif_delete_petdata_pre; +int HP_intif_delete_petdata_post; +int HP_intif_rename_pre; +int HP_intif_rename_post; +int HP_intif_homunculus_create_pre; +int HP_intif_homunculus_create_post; +int HP_intif_homunculus_requestload_pre; +int HP_intif_homunculus_requestload_post; +int HP_intif_homunculus_requestsave_pre; +int HP_intif_homunculus_requestsave_post; +int HP_intif_homunculus_requestdelete_pre; +int HP_intif_homunculus_requestdelete_post; +int HP_intif_request_questlog_pre; +int HP_intif_request_questlog_post; +int HP_intif_quest_save_pre; +int HP_intif_quest_save_post; +int HP_intif_mercenary_create_pre; +int HP_intif_mercenary_create_post; +int HP_intif_mercenary_request_pre; +int HP_intif_mercenary_request_post; +int HP_intif_mercenary_delete_pre; +int HP_intif_mercenary_delete_post; +int HP_intif_mercenary_save_pre; +int HP_intif_mercenary_save_post; +int HP_intif_Mail_requestinbox_pre; +int HP_intif_Mail_requestinbox_post; +int HP_intif_Mail_read_pre; +int HP_intif_Mail_read_post; +int HP_intif_Mail_getattach_pre; +int HP_intif_Mail_getattach_post; +int HP_intif_Mail_delete_pre; +int HP_intif_Mail_delete_post; +int HP_intif_Mail_return_pre; +int HP_intif_Mail_return_post; +int HP_intif_Mail_send_pre; +int HP_intif_Mail_send_post; +int HP_intif_Auction_requestlist_pre; +int HP_intif_Auction_requestlist_post; +int HP_intif_Auction_register_pre; +int HP_intif_Auction_register_post; +int HP_intif_Auction_cancel_pre; +int HP_intif_Auction_cancel_post; +int HP_intif_Auction_close_pre; +int HP_intif_Auction_close_post; +int HP_intif_Auction_bid_pre; +int HP_intif_Auction_bid_post; +int HP_intif_elemental_create_pre; +int HP_intif_elemental_create_post; +int HP_intif_elemental_request_pre; +int HP_intif_elemental_request_post; +int HP_intif_elemental_delete_pre; +int HP_intif_elemental_delete_post; +int HP_intif_elemental_save_pre; +int HP_intif_elemental_save_post; +int HP_intif_request_accinfo_pre; +int HP_intif_request_accinfo_post; +int HP_intif_CheckForCharServer_pre; +int HP_intif_CheckForCharServer_post; +int HP_intif_pWisMessage_pre; +int HP_intif_pWisMessage_post; +int HP_intif_pWisEnd_pre; +int HP_intif_pWisEnd_post; +int HP_intif_pWisToGM_sub_pre; +int HP_intif_pWisToGM_sub_post; +int HP_intif_pWisToGM_pre; +int HP_intif_pWisToGM_post; +int HP_intif_pRegisters_pre; +int HP_intif_pRegisters_post; +int HP_intif_pChangeNameOk_pre; +int HP_intif_pChangeNameOk_post; +int HP_intif_pMessageToFD_pre; +int HP_intif_pMessageToFD_post; +int HP_intif_pLoadGuildStorage_pre; +int HP_intif_pLoadGuildStorage_post; +int HP_intif_pSaveGuildStorage_pre; +int HP_intif_pSaveGuildStorage_post; +int HP_intif_pPartyCreated_pre; +int HP_intif_pPartyCreated_post; +int HP_intif_pPartyInfo_pre; +int HP_intif_pPartyInfo_post; +int HP_intif_pPartyMemberAdded_pre; +int HP_intif_pPartyMemberAdded_post; +int HP_intif_pPartyOptionChanged_pre; +int HP_intif_pPartyOptionChanged_post; +int HP_intif_pPartyMemberWithdraw_pre; +int HP_intif_pPartyMemberWithdraw_post; +int HP_intif_pPartyMove_pre; +int HP_intif_pPartyMove_post; +int HP_intif_pPartyBroken_pre; +int HP_intif_pPartyBroken_post; +int HP_intif_pPartyMessage_pre; +int HP_intif_pPartyMessage_post; +int HP_intif_pGuildCreated_pre; +int HP_intif_pGuildCreated_post; +int HP_intif_pGuildInfo_pre; +int HP_intif_pGuildInfo_post; +int HP_intif_pGuildMemberAdded_pre; +int HP_intif_pGuildMemberAdded_post; +int HP_intif_pGuildMemberWithdraw_pre; +int HP_intif_pGuildMemberWithdraw_post; +int HP_intif_pGuildMemberInfoShort_pre; +int HP_intif_pGuildMemberInfoShort_post; +int HP_intif_pGuildBroken_pre; +int HP_intif_pGuildBroken_post; +int HP_intif_pGuildMessage_pre; +int HP_intif_pGuildMessage_post; +int HP_intif_pGuildBasicInfoChanged_pre; +int HP_intif_pGuildBasicInfoChanged_post; +int HP_intif_pGuildMemberInfoChanged_pre; +int HP_intif_pGuildMemberInfoChanged_post; +int HP_intif_pGuildPosition_pre; +int HP_intif_pGuildPosition_post; +int HP_intif_pGuildSkillUp_pre; +int HP_intif_pGuildSkillUp_post; +int HP_intif_pGuildAlliance_pre; +int HP_intif_pGuildAlliance_post; +int HP_intif_pGuildNotice_pre; +int HP_intif_pGuildNotice_post; +int HP_intif_pGuildEmblem_pre; +int HP_intif_pGuildEmblem_post; +int HP_intif_pGuildCastleDataLoad_pre; +int HP_intif_pGuildCastleDataLoad_post; +int HP_intif_pGuildMasterChanged_pre; +int HP_intif_pGuildMasterChanged_post; +int HP_intif_pQuestLog_pre; +int HP_intif_pQuestLog_post; +int HP_intif_pQuestSave_pre; +int HP_intif_pQuestSave_post; +int HP_intif_pMailInboxReceived_pre; +int HP_intif_pMailInboxReceived_post; +int HP_intif_pMailNew_pre; +int HP_intif_pMailNew_post; +int HP_intif_pMailGetAttach_pre; +int HP_intif_pMailGetAttach_post; +int HP_intif_pMailDelete_pre; +int HP_intif_pMailDelete_post; +int HP_intif_pMailReturn_pre; +int HP_intif_pMailReturn_post; +int HP_intif_pMailSend_pre; +int HP_intif_pMailSend_post; +int HP_intif_pAuctionResults_pre; +int HP_intif_pAuctionResults_post; +int HP_intif_pAuctionRegister_pre; +int HP_intif_pAuctionRegister_post; +int HP_intif_pAuctionCancel_pre; +int HP_intif_pAuctionCancel_post; +int HP_intif_pAuctionClose_pre; +int HP_intif_pAuctionClose_post; +int HP_intif_pAuctionMessage_pre; +int HP_intif_pAuctionMessage_post; +int HP_intif_pAuctionBid_pre; +int HP_intif_pAuctionBid_post; +int HP_intif_pMercenaryReceived_pre; +int HP_intif_pMercenaryReceived_post; +int HP_intif_pMercenaryDeleted_pre; +int HP_intif_pMercenaryDeleted_post; +int HP_intif_pMercenarySaved_pre; +int HP_intif_pMercenarySaved_post; +int HP_intif_pElementalReceived_pre; +int HP_intif_pElementalReceived_post; +int HP_intif_pElementalDeleted_pre; +int HP_intif_pElementalDeleted_post; +int HP_intif_pElementalSaved_pre; +int HP_intif_pElementalSaved_post; +int HP_intif_pCreatePet_pre; +int HP_intif_pCreatePet_post; +int HP_intif_pRecvPetData_pre; +int HP_intif_pRecvPetData_post; +int HP_intif_pSavePetOk_pre; +int HP_intif_pSavePetOk_post; +int HP_intif_pDeletePetOk_pre; +int HP_intif_pDeletePetOk_post; +int HP_intif_pCreateHomunculus_pre; +int HP_intif_pCreateHomunculus_post; +int HP_intif_pRecvHomunculusData_pre; +int HP_intif_pRecvHomunculusData_post; +int HP_intif_pSaveHomunculusOk_pre; +int HP_intif_pSaveHomunculusOk_post; +int HP_intif_pDeleteHomunculusOk_pre; +int HP_intif_pDeleteHomunculusOk_post; +int HP_ircbot_init_pre; +int HP_ircbot_init_post; +int HP_ircbot_final_pre; +int HP_ircbot_final_post; +int HP_ircbot_parse_pre; +int HP_ircbot_parse_post; +int HP_ircbot_parse_sub_pre; +int HP_ircbot_parse_sub_post; +int HP_ircbot_parse_source_pre; +int HP_ircbot_parse_source_post; +int HP_ircbot_func_search_pre; +int HP_ircbot_func_search_post; +int HP_ircbot_connect_timer_pre; +int HP_ircbot_connect_timer_post; +int HP_ircbot_identify_timer_pre; +int HP_ircbot_identify_timer_post; +int HP_ircbot_join_timer_pre; +int HP_ircbot_join_timer_post; +int HP_ircbot_send_pre; +int HP_ircbot_send_post; +int HP_ircbot_relay_pre; +int HP_ircbot_relay_post; +int HP_ircbot_pong_pre; +int HP_ircbot_pong_post; +int HP_ircbot_privmsg_pre; +int HP_ircbot_privmsg_post; +int HP_ircbot_userjoin_pre; +int HP_ircbot_userjoin_post; +int HP_ircbot_userleave_pre; +int HP_ircbot_userleave_post; +int HP_ircbot_usernick_pre; +int HP_ircbot_usernick_post; +int HP_itemdb_init_pre; +int HP_itemdb_init_post; +int HP_itemdb_final_pre; +int HP_itemdb_final_post; +int HP_itemdb_reload_pre; +int HP_itemdb_reload_post; +int HP_itemdb_name_constants_pre; +int HP_itemdb_name_constants_post; +int HP_itemdb_force_name_constants_pre; +int HP_itemdb_force_name_constants_post; +int HP_itemdb_read_groups_pre; +int HP_itemdb_read_groups_post; +int HP_itemdb_read_chains_pre; +int HP_itemdb_read_chains_post; +int HP_itemdb_read_packages_pre; +int HP_itemdb_read_packages_post; +int HP_itemdb_write_cached_packages_pre; +int HP_itemdb_write_cached_packages_post; +int HP_itemdb_read_cached_packages_pre; +int HP_itemdb_read_cached_packages_post; +int HP_itemdb_name2id_pre; +int HP_itemdb_name2id_post; +int HP_itemdb_search_name_pre; +int HP_itemdb_search_name_post; +int HP_itemdb_search_name_array_pre; +int HP_itemdb_search_name_array_post; +int HP_itemdb_load_pre; +int HP_itemdb_load_post; +int HP_itemdb_search_pre; +int HP_itemdb_search_post; +int HP_itemdb_parse_dbrow_pre; +int HP_itemdb_parse_dbrow_post; +int HP_itemdb_exists_pre; +int HP_itemdb_exists_post; +int HP_itemdb_in_group_pre; +int HP_itemdb_in_group_post; +int HP_itemdb_group_item_pre; +int HP_itemdb_group_item_post; +int HP_itemdb_chain_item_pre; +int HP_itemdb_chain_item_post; +int HP_itemdb_package_item_pre; +int HP_itemdb_package_item_post; +int HP_itemdb_searchname_sub_pre; +int HP_itemdb_searchname_sub_post; +int HP_itemdb_searchname_array_sub_pre; +int HP_itemdb_searchname_array_sub_post; +int HP_itemdb_searchrandomid_pre; +int HP_itemdb_searchrandomid_post; +int HP_itemdb_typename_pre; +int HP_itemdb_typename_post; +int HP_itemdb_jobid2mapid_pre; +int HP_itemdb_jobid2mapid_post; +int HP_itemdb_create_dummy_data_pre; +int HP_itemdb_create_dummy_data_post; +int HP_itemdb_create_item_data_pre; +int HP_itemdb_create_item_data_post; +int HP_itemdb_isequip_pre; +int HP_itemdb_isequip_post; +int HP_itemdb_isequip2_pre; +int HP_itemdb_isequip2_post; +int HP_itemdb_isstackable_pre; +int HP_itemdb_isstackable_post; +int HP_itemdb_isstackable2_pre; +int HP_itemdb_isstackable2_post; +int HP_itemdb_isdropable_sub_pre; +int HP_itemdb_isdropable_sub_post; +int HP_itemdb_cantrade_sub_pre; +int HP_itemdb_cantrade_sub_post; +int HP_itemdb_canpartnertrade_sub_pre; +int HP_itemdb_canpartnertrade_sub_post; +int HP_itemdb_cansell_sub_pre; +int HP_itemdb_cansell_sub_post; +int HP_itemdb_cancartstore_sub_pre; +int HP_itemdb_cancartstore_sub_post; +int HP_itemdb_canstore_sub_pre; +int HP_itemdb_canstore_sub_post; +int HP_itemdb_canguildstore_sub_pre; +int HP_itemdb_canguildstore_sub_post; +int HP_itemdb_canmail_sub_pre; +int HP_itemdb_canmail_sub_post; +int HP_itemdb_canauction_sub_pre; +int HP_itemdb_canauction_sub_post; +int HP_itemdb_isrestricted_pre; +int HP_itemdb_isrestricted_post; +int HP_itemdb_isidentified_pre; +int HP_itemdb_isidentified_post; +int HP_itemdb_isidentified2_pre; +int HP_itemdb_isidentified2_post; +int HP_itemdb_read_itemavail_pre; +int HP_itemdb_read_itemavail_post; +int HP_itemdb_read_itemtrade_pre; +int HP_itemdb_read_itemtrade_post; +int HP_itemdb_read_itemdelay_pre; +int HP_itemdb_read_itemdelay_post; +int HP_itemdb_read_stack_pre; +int HP_itemdb_read_stack_post; +int HP_itemdb_read_buyingstore_pre; +int HP_itemdb_read_buyingstore_post; +int HP_itemdb_read_nouse_pre; +int HP_itemdb_read_nouse_post; +int HP_itemdb_combo_split_atoi_pre; +int HP_itemdb_combo_split_atoi_post; +int HP_itemdb_read_combos_pre; +int HP_itemdb_read_combos_post; +int HP_itemdb_gendercheck_pre; +int HP_itemdb_gendercheck_post; +int HP_itemdb_re_split_atoi_pre; +int HP_itemdb_re_split_atoi_post; +int HP_itemdb_readdb_pre; +int HP_itemdb_readdb_post; +int HP_itemdb_read_sqldb_pre; +int HP_itemdb_read_sqldb_post; +int HP_itemdb_unique_id_pre; +int HP_itemdb_unique_id_post; +int HP_itemdb_uid_load_pre; +int HP_itemdb_uid_load_post; +int HP_itemdb_read_pre; +int HP_itemdb_read_post; +int HP_itemdb_destroy_item_data_pre; +int HP_itemdb_destroy_item_data_post; +int HP_itemdb_final_sub_pre; +int HP_itemdb_final_sub_post; +int HP_logs_pick_pc_pre; +int HP_logs_pick_pc_post; +int HP_logs_pick_mob_pre; +int HP_logs_pick_mob_post; +int HP_logs_zeny_pre; +int HP_logs_zeny_post; +int HP_logs_npc_pre; +int HP_logs_npc_post; +int HP_logs_chat_pre; +int HP_logs_chat_post; +int HP_logs_atcommand_pre; +int HP_logs_atcommand_post; +int HP_logs_branch_pre; +int HP_logs_branch_post; +int HP_logs_mvpdrop_pre; +int HP_logs_mvpdrop_post; +int HP_logs_pick_sub_pre; +int HP_logs_pick_sub_post; +int HP_logs_zeny_sub_pre; +int HP_logs_zeny_sub_post; +int HP_logs_npc_sub_pre; +int HP_logs_npc_sub_post; +int HP_logs_chat_sub_pre; +int HP_logs_chat_sub_post; +int HP_logs_atcommand_sub_pre; +int HP_logs_atcommand_sub_post; +int HP_logs_branch_sub_pre; +int HP_logs_branch_sub_post; +int HP_logs_mvpdrop_sub_pre; +int HP_logs_mvpdrop_sub_post; +int HP_logs_config_read_pre; +int HP_logs_config_read_post; +int HP_logs_config_done_pre; +int HP_logs_config_done_post; +int HP_logs_sql_init_pre; +int HP_logs_sql_init_post; +int HP_logs_sql_final_pre; +int HP_logs_sql_final_post; +int HP_logs_picktype2char_pre; +int HP_logs_picktype2char_post; +int HP_logs_chattype2char_pre; +int HP_logs_chattype2char_post; +int HP_logs_should_log_item_pre; +int HP_logs_should_log_item_post; +int HP_mail_clear_pre; +int HP_mail_clear_post; +int HP_mail_removeitem_pre; +int HP_mail_removeitem_post; +int HP_mail_removezeny_pre; +int HP_mail_removezeny_post; +int HP_mail_setitem_pre; +int HP_mail_setitem_post; +int HP_mail_setattachment_pre; +int HP_mail_setattachment_post; +int HP_mail_getattachment_pre; +int HP_mail_getattachment_post; +int HP_mail_openmail_pre; +int HP_mail_openmail_post; +int HP_mail_deliveryfail_pre; +int HP_mail_deliveryfail_post; +int HP_mail_invalid_operation_pre; +int HP_mail_invalid_operation_post; +int HP_map_zone_init_pre; +int HP_map_zone_init_post; +int HP_map_zone_remove_pre; +int HP_map_zone_remove_post; +int HP_map_zone_apply_pre; +int HP_map_zone_apply_post; +int HP_map_zone_change_pre; +int HP_map_zone_change_post; +int HP_map_zone_change2_pre; +int HP_map_zone_change2_post; +int HP_map_getcell_pre; +int HP_map_getcell_post; +int HP_map_setgatcell_pre; +int HP_map_setgatcell_post; +int HP_map_cellfromcache_pre; +int HP_map_cellfromcache_post; +int HP_map_setusers_pre; +int HP_map_setusers_post; +int HP_map_getusers_pre; +int HP_map_getusers_post; +int HP_map_usercount_pre; +int HP_map_usercount_post; +int HP_map_freeblock_pre; +int HP_map_freeblock_post; +int HP_map_freeblock_lock_pre; +int HP_map_freeblock_lock_post; +int HP_map_freeblock_unlock_pre; +int HP_map_freeblock_unlock_post; +int HP_map_addblock_pre; +int HP_map_addblock_post; +int HP_map_delblock_pre; +int HP_map_delblock_post; +int HP_map_moveblock_pre; +int HP_map_moveblock_post; +int HP_map_count_oncell_pre; +int HP_map_count_oncell_post; +int HP_map_find_skill_unit_oncell_pre; +int HP_map_find_skill_unit_oncell_post; +int HP_map_get_new_object_id_pre; +int HP_map_get_new_object_id_post; +int HP_map_search_freecell_pre; +int HP_map_search_freecell_post; +int HP_map_quit_pre; +int HP_map_quit_post; +int HP_map_addnpc_pre; +int HP_map_addnpc_post; +int HP_map_clearflooritem_timer_pre; +int HP_map_clearflooritem_timer_post; +int HP_map_removemobs_timer_pre; +int HP_map_removemobs_timer_post; +int HP_map_clearflooritem_pre; +int HP_map_clearflooritem_post; +int HP_map_addflooritem_pre; +int HP_map_addflooritem_post; +int HP_map_addnickdb_pre; +int HP_map_addnickdb_post; +int HP_map_delnickdb_pre; +int HP_map_delnickdb_post; +int HP_map_reqnickdb_pre; +int HP_map_reqnickdb_post; +int HP_map_charid2nick_pre; +int HP_map_charid2nick_post; +int HP_map_charid2sd_pre; +int HP_map_charid2sd_post; +int HP_map_vforeachpc_pre; +int HP_map_vforeachpc_post; +int HP_map_vforeachmob_pre; +int HP_map_vforeachmob_post; +int HP_map_vforeachnpc_pre; +int HP_map_vforeachnpc_post; +int HP_map_vforeachregen_pre; +int HP_map_vforeachregen_post; +int HP_map_vforeachiddb_pre; +int HP_map_vforeachiddb_post; +int HP_map_vforeachinrange_pre; +int HP_map_vforeachinrange_post; +int HP_map_vforeachinshootrange_pre; +int HP_map_vforeachinshootrange_post; +int HP_map_vforeachinarea_pre; +int HP_map_vforeachinarea_post; +int HP_map_vforcountinrange_pre; +int HP_map_vforcountinrange_post; +int HP_map_vforcountinarea_pre; +int HP_map_vforcountinarea_post; +int HP_map_vforeachinmovearea_pre; +int HP_map_vforeachinmovearea_post; +int HP_map_vforeachincell_pre; +int HP_map_vforeachincell_post; +int HP_map_vforeachinpath_pre; +int HP_map_vforeachinpath_post; +int HP_map_vforeachinmap_pre; +int HP_map_vforeachinmap_post; +int HP_map_vforeachininstance_pre; +int HP_map_vforeachininstance_post; +int HP_map_id2sd_pre; +int HP_map_id2sd_post; +int HP_map_id2md_pre; +int HP_map_id2md_post; +int HP_map_id2nd_pre; +int HP_map_id2nd_post; +int HP_map_id2hd_pre; +int HP_map_id2hd_post; +int HP_map_id2mc_pre; +int HP_map_id2mc_post; +int HP_map_id2cd_pre; +int HP_map_id2cd_post; +int HP_map_id2bl_pre; +int HP_map_id2bl_post; +int HP_map_blid_exists_pre; +int HP_map_blid_exists_post; +int HP_map_mapindex2mapid_pre; +int HP_map_mapindex2mapid_post; +int HP_map_mapname2mapid_pre; +int HP_map_mapname2mapid_post; +int HP_map_mapname2ipport_pre; +int HP_map_mapname2ipport_post; +int HP_map_setipport_pre; +int HP_map_setipport_post; +int HP_map_eraseipport_pre; +int HP_map_eraseipport_post; +int HP_map_eraseallipport_pre; +int HP_map_eraseallipport_post; +int HP_map_addiddb_pre; +int HP_map_addiddb_post; +int HP_map_deliddb_pre; +int HP_map_deliddb_post; +int HP_map_nick2sd_pre; +int HP_map_nick2sd_post; +int HP_map_getmob_boss_pre; +int HP_map_getmob_boss_post; +int HP_map_id2boss_pre; +int HP_map_id2boss_post; +int HP_map_reloadnpc_pre; +int HP_map_reloadnpc_post; +int HP_map_check_dir_pre; +int HP_map_check_dir_post; +int HP_map_calc_dir_pre; +int HP_map_calc_dir_post; +int HP_map_random_dir_pre; +int HP_map_random_dir_post; +int HP_map_cleanup_sub_pre; +int HP_map_cleanup_sub_post; +int HP_map_delmap_pre; +int HP_map_delmap_post; +int HP_map_flags_init_pre; +int HP_map_flags_init_post; +int HP_map_iwall_set_pre; +int HP_map_iwall_set_post; +int HP_map_iwall_get_pre; +int HP_map_iwall_get_post; +int HP_map_iwall_remove_pre; +int HP_map_iwall_remove_post; +int HP_map_addmobtolist_pre; +int HP_map_addmobtolist_post; +int HP_map_spawnmobs_pre; +int HP_map_spawnmobs_post; +int HP_map_removemobs_pre; +int HP_map_removemobs_post; +int HP_map_addmap2db_pre; +int HP_map_addmap2db_post; +int HP_map_removemapdb_pre; +int HP_map_removemapdb_post; +int HP_map_clean_pre; +int HP_map_clean_post; +int HP_map_do_shutdown_pre; +int HP_map_do_shutdown_post; +int HP_map_freeblock_timer_pre; +int HP_map_freeblock_timer_post; +int HP_map_searchrandfreecell_pre; +int HP_map_searchrandfreecell_post; +int HP_map_count_sub_pre; +int HP_map_count_sub_post; +int HP_map_create_charid2nick_pre; +int HP_map_create_charid2nick_post; +int HP_map_removemobs_sub_pre; +int HP_map_removemobs_sub_post; +int HP_map_gat2cell_pre; +int HP_map_gat2cell_post; +int HP_map_cell2gat_pre; +int HP_map_cell2gat_post; +int HP_map_getcellp_pre; +int HP_map_getcellp_post; +int HP_map_setcell_pre; +int HP_map_setcell_post; +int HP_map_sub_getcellp_pre; +int HP_map_sub_getcellp_post; +int HP_map_sub_setcell_pre; +int HP_map_sub_setcell_post; +int HP_map_iwall_nextxy_pre; +int HP_map_iwall_nextxy_post; +int HP_map_create_map_data_other_server_pre; +int HP_map_create_map_data_other_server_post; +int HP_map_eraseallipport_sub_pre; +int HP_map_eraseallipport_sub_post; +int HP_map_init_mapcache_pre; +int HP_map_init_mapcache_post; +int HP_map_readfromcache_pre; +int HP_map_readfromcache_post; +int HP_map_addmap_pre; +int HP_map_addmap_post; +int HP_map_delmapid_pre; +int HP_map_delmapid_post; +int HP_map_zone_db_clear_pre; +int HP_map_zone_db_clear_post; +int HP_map_list_final_pre; +int HP_map_list_final_post; +int HP_map_waterheight_pre; +int HP_map_waterheight_post; +int HP_map_readgat_pre; +int HP_map_readgat_post; +int HP_map_readallmaps_pre; +int HP_map_readallmaps_post; +int HP_map_config_read_pre; +int HP_map_config_read_post; +int HP_map_config_read_sub_pre; +int HP_map_config_read_sub_post; +int HP_map_reloadnpc_sub_pre; +int HP_map_reloadnpc_sub_post; +int HP_map_inter_config_read_pre; +int HP_map_inter_config_read_post; +int HP_map_sql_init_pre; +int HP_map_sql_init_post; +int HP_map_sql_close_pre; +int HP_map_sql_close_post; +int HP_map_zone_mf_cache_pre; +int HP_map_zone_mf_cache_post; +int HP_map_zone_str2itemid_pre; +int HP_map_zone_str2itemid_post; +int HP_map_zone_str2skillid_pre; +int HP_map_zone_str2skillid_post; +int HP_map_zone_bl_type_pre; +int HP_map_zone_bl_type_post; +int HP_map_read_zone_db_pre; +int HP_map_read_zone_db_post; +int HP_map_db_final_pre; +int HP_map_db_final_post; +int HP_map_nick_db_final_pre; +int HP_map_nick_db_final_post; +int HP_map_cleanup_db_sub_pre; +int HP_map_cleanup_db_sub_post; +int HP_map_abort_sub_pre; +int HP_map_abort_sub_post; +int HP_map_helpscreen_pre; +int HP_map_helpscreen_post; +int HP_map_versionscreen_pre; +int HP_map_versionscreen_post; +int HP_map_arg_next_value_pre; +int HP_map_arg_next_value_post; +int HP_mapit_alloc_pre; +int HP_mapit_alloc_post; +int HP_mapit_free_pre; +int HP_mapit_free_post; +int HP_mapit_first_pre; +int HP_mapit_first_post; +int HP_mapit_last_pre; +int HP_mapit_last_post; +int HP_mapit_next_pre; +int HP_mapit_next_post; +int HP_mapit_prev_pre; +int HP_mapit_prev_post; +int HP_mapit_exists_pre; +int HP_mapit_exists_post; +int HP_mapreg_init_pre; +int HP_mapreg_init_post; +int HP_mapreg_final_pre; +int HP_mapreg_final_post; +int HP_mapreg_readreg_pre; +int HP_mapreg_readreg_post; +int HP_mapreg_readregstr_pre; +int HP_mapreg_readregstr_post; +int HP_mapreg_setreg_pre; +int HP_mapreg_setreg_post; +int HP_mapreg_setregstr_pre; +int HP_mapreg_setregstr_post; +int HP_mapreg_load_pre; +int HP_mapreg_load_post; +int HP_mapreg_save_pre; +int HP_mapreg_save_post; +int HP_mapreg_save_timer_pre; +int HP_mapreg_save_timer_post; +int HP_mapreg_reload_pre; +int HP_mapreg_reload_post; +int HP_mapreg_config_read_pre; +int HP_mapreg_config_read_post; +int HP_mercenary_init_pre; +int HP_mercenary_init_post; +int HP_mercenary_class_pre; +int HP_mercenary_class_post; +int HP_mercenary_get_viewdata_pre; +int HP_mercenary_get_viewdata_post; +int HP_mercenary_create_pre; +int HP_mercenary_create_post; +int HP_mercenary_data_received_pre; +int HP_mercenary_data_received_post; +int HP_mercenary_save_pre; +int HP_mercenary_save_post; +int HP_mercenary_heal_pre; +int HP_mercenary_heal_post; +int HP_mercenary_dead_pre; +int HP_mercenary_dead_post; +int HP_mercenary_delete_pre; +int HP_mercenary_delete_post; +int HP_mercenary_contract_stop_pre; +int HP_mercenary_contract_stop_post; +int HP_mercenary_get_lifetime_pre; +int HP_mercenary_get_lifetime_post; +int HP_mercenary_get_guild_pre; +int HP_mercenary_get_guild_post; +int HP_mercenary_get_faith_pre; +int HP_mercenary_get_faith_post; +int HP_mercenary_set_faith_pre; +int HP_mercenary_set_faith_post; +int HP_mercenary_get_calls_pre; +int HP_mercenary_get_calls_post; +int HP_mercenary_set_calls_pre; +int HP_mercenary_set_calls_post; +int HP_mercenary_kills_pre; +int HP_mercenary_kills_post; +int HP_mercenary_checkskill_pre; +int HP_mercenary_checkskill_post; +int HP_mercenary_read_db_pre; +int HP_mercenary_read_db_post; +int HP_mercenary_read_skilldb_pre; +int HP_mercenary_read_skilldb_post; +int HP_mercenary_killbonus_pre; +int HP_mercenary_killbonus_post; +int HP_mercenary_search_index_pre; +int HP_mercenary_search_index_post; +int HP_mercenary_contract_end_timer_pre; +int HP_mercenary_contract_end_timer_post; +int HP_mercenary_read_db_sub_pre; +int HP_mercenary_read_db_sub_post; +int HP_mercenary_read_skill_db_sub_pre; +int HP_mercenary_read_skill_db_sub_post; +int HP_mob_init_pre; +int HP_mob_init_post; +int HP_mob_final_pre; +int HP_mob_final_post; +int HP_mob_reload_pre; +int HP_mob_reload_post; +int HP_mob_db_pre; +int HP_mob_db_post; +int HP_mob_chat_pre; +int HP_mob_chat_post; +int HP_mob_makedummymobdb_pre; +int HP_mob_makedummymobdb_post; +int HP_mob_spawn_guardian_sub_pre; +int HP_mob_spawn_guardian_sub_post; +int HP_mob_skill_id2skill_idx_pre; +int HP_mob_skill_id2skill_idx_post; +int HP_mob_db_searchname_pre; +int HP_mob_db_searchname_post; +int HP_mob_db_searchname_array_sub_pre; +int HP_mob_db_searchname_array_sub_post; +int HP_mob_mvptomb_create_pre; +int HP_mob_mvptomb_create_post; +int HP_mob_mvptomb_destroy_pre; +int HP_mob_mvptomb_destroy_post; +int HP_mob_db_searchname_array_pre; +int HP_mob_db_searchname_array_post; +int HP_mob_db_checkid_pre; +int HP_mob_db_checkid_post; +int HP_mob_get_viewdata_pre; +int HP_mob_get_viewdata_post; +int HP_mob_parse_dataset_pre; +int HP_mob_parse_dataset_post; +int HP_mob_spawn_dataset_pre; +int HP_mob_spawn_dataset_post; +int HP_mob_get_random_id_pre; +int HP_mob_get_random_id_post; +int HP_mob_ksprotected_pre; +int HP_mob_ksprotected_post; +int HP_mob_once_spawn_sub_pre; +int HP_mob_once_spawn_sub_post; +int HP_mob_once_spawn_pre; +int HP_mob_once_spawn_post; +int HP_mob_once_spawn_area_pre; +int HP_mob_once_spawn_area_post; +int HP_mob_spawn_guardian_pre; +int HP_mob_spawn_guardian_post; +int HP_mob_spawn_bg_pre; +int HP_mob_spawn_bg_post; +int HP_mob_can_reach_pre; +int HP_mob_can_reach_post; +int HP_mob_linksearch_pre; +int HP_mob_linksearch_post; +int HP_mob_delayspawn_pre; +int HP_mob_delayspawn_post; +int HP_mob_setdelayspawn_pre; +int HP_mob_setdelayspawn_post; +int HP_mob_count_sub_pre; +int HP_mob_count_sub_post; +int HP_mob_spawn_pre; +int HP_mob_spawn_post; +int HP_mob_can_changetarget_pre; +int HP_mob_can_changetarget_post; +int HP_mob_target_pre; +int HP_mob_target_post; +int HP_mob_ai_sub_hard_activesearch_pre; +int HP_mob_ai_sub_hard_activesearch_post; +int HP_mob_ai_sub_hard_changechase_pre; +int HP_mob_ai_sub_hard_changechase_post; +int HP_mob_ai_sub_hard_bg_ally_pre; +int HP_mob_ai_sub_hard_bg_ally_post; +int HP_mob_ai_sub_hard_lootsearch_pre; +int HP_mob_ai_sub_hard_lootsearch_post; +int HP_mob_warpchase_sub_pre; +int HP_mob_warpchase_sub_post; +int HP_mob_ai_sub_hard_slavemob_pre; +int HP_mob_ai_sub_hard_slavemob_post; +int HP_mob_unlocktarget_pre; +int HP_mob_unlocktarget_post; +int HP_mob_randomwalk_pre; +int HP_mob_randomwalk_post; +int HP_mob_warpchase_pre; +int HP_mob_warpchase_post; +int HP_mob_ai_sub_hard_pre; +int HP_mob_ai_sub_hard_post; +int HP_mob_ai_sub_hard_timer_pre; +int HP_mob_ai_sub_hard_timer_post; +int HP_mob_ai_sub_foreachclient_pre; +int HP_mob_ai_sub_foreachclient_post; +int HP_mob_ai_sub_lazy_pre; +int HP_mob_ai_sub_lazy_post; +int HP_mob_ai_lazy_pre; +int HP_mob_ai_lazy_post; +int HP_mob_ai_hard_pre; +int HP_mob_ai_hard_post; +int HP_mob_setdropitem_pre; +int HP_mob_setdropitem_post; +int HP_mob_setlootitem_pre; +int HP_mob_setlootitem_post; +int HP_mob_delay_item_drop_pre; +int HP_mob_delay_item_drop_post; +int HP_mob_item_drop_pre; +int HP_mob_item_drop_post; +int HP_mob_timer_delete_pre; +int HP_mob_timer_delete_post; +int HP_mob_deleteslave_sub_pre; +int HP_mob_deleteslave_sub_post; +int HP_mob_deleteslave_pre; +int HP_mob_deleteslave_post; +int HP_mob_respawn_pre; +int HP_mob_respawn_post; +int HP_mob_log_damage_pre; +int HP_mob_log_damage_post; +int HP_mob_damage_pre; +int HP_mob_damage_post; +int HP_mob_dead_pre; +int HP_mob_dead_post; +int HP_mob_revive_pre; +int HP_mob_revive_post; +int HP_mob_guardian_guildchange_pre; +int HP_mob_guardian_guildchange_post; +int HP_mob_random_class_pre; +int HP_mob_random_class_post; +int HP_mob_class_change_pre; +int HP_mob_class_change_post; +int HP_mob_heal_pre; +int HP_mob_heal_post; +int HP_mob_warpslave_sub_pre; +int HP_mob_warpslave_sub_post; +int HP_mob_warpslave_pre; +int HP_mob_warpslave_post; +int HP_mob_countslave_sub_pre; +int HP_mob_countslave_sub_post; +int HP_mob_countslave_pre; +int HP_mob_countslave_post; +int HP_mob_summonslave_pre; +int HP_mob_summonslave_post; +int HP_mob_getfriendhprate_sub_pre; +int HP_mob_getfriendhprate_sub_post; +int HP_mob_getfriendhprate_pre; +int HP_mob_getfriendhprate_post; +int HP_mob_getmasterhpltmaxrate_pre; +int HP_mob_getmasterhpltmaxrate_post; +int HP_mob_getfriendstatus_sub_pre; +int HP_mob_getfriendstatus_sub_post; +int HP_mob_getfriendstatus_pre; +int HP_mob_getfriendstatus_post; +int HP_mob_skill_use_pre; +int HP_mob_skill_use_post; +int HP_mob_skill_event_pre; +int HP_mob_skill_event_post; +int HP_mob_is_clone_pre; +int HP_mob_is_clone_post; +int HP_mob_clone_spawn_pre; +int HP_mob_clone_spawn_post; +int HP_mob_clone_delete_pre; +int HP_mob_clone_delete_post; +int HP_mob_drop_adjust_pre; +int HP_mob_drop_adjust_post; +int HP_mob_item_dropratio_adjust_pre; +int HP_mob_item_dropratio_adjust_post; +int HP_mob_parse_dbrow_pre; +int HP_mob_parse_dbrow_post; +int HP_mob_readdb_sub_pre; +int HP_mob_readdb_sub_post; +int HP_mob_readdb_pre; +int HP_mob_readdb_post; +int HP_mob_read_sqldb_pre; +int HP_mob_read_sqldb_post; +int HP_mob_readdb_mobavail_pre; +int HP_mob_readdb_mobavail_post; +int HP_mob_read_randommonster_pre; +int HP_mob_read_randommonster_post; +int HP_mob_parse_row_chatdb_pre; +int HP_mob_parse_row_chatdb_post; +int HP_mob_readchatdb_pre; +int HP_mob_readchatdb_post; +int HP_mob_parse_row_mobskilldb_pre; +int HP_mob_parse_row_mobskilldb_post; +int HP_mob_readskilldb_pre; +int HP_mob_readskilldb_post; +int HP_mob_read_sqlskilldb_pre; +int HP_mob_read_sqlskilldb_post; +int HP_mob_readdb_race2_pre; +int HP_mob_readdb_race2_post; +int HP_mob_readdb_itemratio_pre; +int HP_mob_readdb_itemratio_post; +int HP_mob_load_pre; +int HP_mob_load_post; +int HP_mob_clear_spawninfo_pre; +int HP_mob_clear_spawninfo_post; +int HP_npc_init_pre; +int HP_npc_init_post; +int HP_npc_final_pre; +int HP_npc_final_post; +int HP_npc_get_new_npc_id_pre; +int HP_npc_get_new_npc_id_post; +int HP_npc_get_viewdata_pre; +int HP_npc_get_viewdata_post; +int HP_npc_isnear_sub_pre; +int HP_npc_isnear_sub_post; +int HP_npc_isnear_pre; +int HP_npc_isnear_post; +int HP_npc_ontouch_event_pre; +int HP_npc_ontouch_event_post; +int HP_npc_ontouch2_event_pre; +int HP_npc_ontouch2_event_post; +int HP_npc_enable_sub_pre; +int HP_npc_enable_sub_post; +int HP_npc_enable_pre; +int HP_npc_enable_post; +int HP_npc_name2id_pre; +int HP_npc_name2id_post; +int HP_npc_event_dequeue_pre; +int HP_npc_event_dequeue_post; +int HP_npc_event_export_create_pre; +int HP_npc_event_export_create_post; +int HP_npc_event_export_pre; +int HP_npc_event_export_post; +int HP_npc_event_sub_pre; +int HP_npc_event_sub_post; +int HP_npc_event_doall_sub_pre; +int HP_npc_event_doall_sub_post; +int HP_npc_event_do_pre; +int HP_npc_event_do_post; +int HP_npc_event_doall_id_pre; +int HP_npc_event_doall_id_post; +int HP_npc_event_doall_pre; +int HP_npc_event_doall_post; +int HP_npc_event_do_clock_pre; +int HP_npc_event_do_clock_post; +int HP_npc_event_do_oninit_pre; +int HP_npc_event_do_oninit_post; +int HP_npc_timerevent_export_pre; +int HP_npc_timerevent_export_post; +int HP_npc_timerevent_pre; +int HP_npc_timerevent_post; +int HP_npc_timerevent_start_pre; +int HP_npc_timerevent_start_post; +int HP_npc_timerevent_stop_pre; +int HP_npc_timerevent_stop_post; +int HP_npc_timerevent_quit_pre; +int HP_npc_timerevent_quit_post; +int HP_npc_gettimerevent_tick_pre; +int HP_npc_gettimerevent_tick_post; +int HP_npc_settimerevent_tick_pre; +int HP_npc_settimerevent_tick_post; +int HP_npc_event_pre; +int HP_npc_event_post; +int HP_npc_touch_areanpc_sub_pre; +int HP_npc_touch_areanpc_sub_post; +int HP_npc_touchnext_areanpc_pre; +int HP_npc_touchnext_areanpc_post; +int HP_npc_touch_areanpc_pre; +int HP_npc_touch_areanpc_post; +int HP_npc_touch_areanpc2_pre; +int HP_npc_touch_areanpc2_post; +int HP_npc_check_areanpc_pre; +int HP_npc_check_areanpc_post; +int HP_npc_checknear_pre; +int HP_npc_checknear_post; +int HP_npc_globalmessage_pre; +int HP_npc_globalmessage_post; +int HP_npc_run_tomb_pre; +int HP_npc_run_tomb_post; +int HP_npc_click_pre; +int HP_npc_click_post; +int HP_npc_scriptcont_pre; +int HP_npc_scriptcont_post; +int HP_npc_buysellsel_pre; +int HP_npc_buysellsel_post; +int HP_npc_cashshop_buylist_pre; +int HP_npc_cashshop_buylist_post; +int HP_npc_buylist_sub_pre; +int HP_npc_buylist_sub_post; +int HP_npc_cashshop_buy_pre; +int HP_npc_cashshop_buy_post; +int HP_npc_buylist_pre; +int HP_npc_buylist_post; +int HP_npc_selllist_sub_pre; +int HP_npc_selllist_sub_post; +int HP_npc_selllist_pre; +int HP_npc_selllist_post; +int HP_npc_remove_map_pre; +int HP_npc_remove_map_post; +int HP_npc_unload_ev_pre; +int HP_npc_unload_ev_post; +int HP_npc_unload_ev_label_pre; +int HP_npc_unload_ev_label_post; +int HP_npc_unload_dup_sub_pre; +int HP_npc_unload_dup_sub_post; +int HP_npc_unload_duplicates_pre; +int HP_npc_unload_duplicates_post; +int HP_npc_unload_pre; +int HP_npc_unload_post; +int HP_npc_clearsrcfile_pre; +int HP_npc_clearsrcfile_post; +int HP_npc_addsrcfile_pre; +int HP_npc_addsrcfile_post; +int HP_npc_delsrcfile_pre; +int HP_npc_delsrcfile_post; +int HP_npc_parsename_pre; +int HP_npc_parsename_post; +int HP_npc_add_warp_pre; +int HP_npc_add_warp_post; +int HP_npc_parse_warp_pre; +int HP_npc_parse_warp_post; +int HP_npc_parse_shop_pre; +int HP_npc_parse_shop_post; +int HP_npc_convertlabel_db_pre; +int HP_npc_convertlabel_db_post; +int HP_npc_skip_script_pre; +int HP_npc_skip_script_post; +int HP_npc_parse_script_pre; +int HP_npc_parse_script_post; +int HP_npc_parse_duplicate_pre; +int HP_npc_parse_duplicate_post; +int HP_npc_duplicate4instance_pre; +int HP_npc_duplicate4instance_post; +int HP_npc_setcells_pre; +int HP_npc_setcells_post; +int HP_npc_unsetcells_sub_pre; +int HP_npc_unsetcells_sub_post; +int HP_npc_unsetcells_pre; +int HP_npc_unsetcells_post; +int HP_npc_movenpc_pre; +int HP_npc_movenpc_post; +int HP_npc_setdisplayname_pre; +int HP_npc_setdisplayname_post; +int HP_npc_setclass_pre; +int HP_npc_setclass_post; +int HP_npc_do_atcmd_event_pre; +int HP_npc_do_atcmd_event_post; +int HP_npc_parse_function_pre; +int HP_npc_parse_function_post; +int HP_npc_parse_mob2_pre; +int HP_npc_parse_mob2_post; +int HP_npc_parse_mob_pre; +int HP_npc_parse_mob_post; +int HP_npc_parse_mapflag_pre; +int HP_npc_parse_mapflag_post; +int HP_npc_parsesrcfile_pre; +int HP_npc_parsesrcfile_post; +int HP_npc_script_event_pre; +int HP_npc_script_event_post; +int HP_npc_read_event_script_pre; +int HP_npc_read_event_script_post; +int HP_npc_path_db_clear_sub_pre; +int HP_npc_path_db_clear_sub_post; +int HP_npc_ev_label_db_clear_sub_pre; +int HP_npc_ev_label_db_clear_sub_post; +int HP_npc_reload_pre; +int HP_npc_reload_post; +int HP_npc_unloadfile_pre; +int HP_npc_unloadfile_post; +int HP_npc_do_clear_npc_pre; +int HP_npc_do_clear_npc_post; +int HP_npc_debug_warps_sub_pre; +int HP_npc_debug_warps_sub_post; +int HP_npc_debug_warps_pre; +int HP_npc_debug_warps_post; +int HP_party_init_pre; +int HP_party_init_post; +int HP_party_final_pre; +int HP_party_final_post; +int HP_party_search_pre; +int HP_party_search_post; +int HP_party_searchname_pre; +int HP_party_searchname_post; +int HP_party_getmemberid_pre; +int HP_party_getmemberid_post; +int HP_party_getavailablesd_pre; +int HP_party_getavailablesd_post; +int HP_party_create_pre; +int HP_party_create_post; +int HP_party_created_pre; +int HP_party_created_post; +int HP_party_request_info_pre; +int HP_party_request_info_post; +int HP_party_invite_pre; +int HP_party_invite_post; +int HP_party_member_joined_pre; +int HP_party_member_joined_post; +int HP_party_member_added_pre; +int HP_party_member_added_post; +int HP_party_leave_pre; +int HP_party_leave_post; +int HP_party_removemember_pre; +int HP_party_removemember_post; +int HP_party_member_withdraw_pre; +int HP_party_member_withdraw_post; +int HP_party_reply_invite_pre; +int HP_party_reply_invite_post; +int HP_party_recv_noinfo_pre; +int HP_party_recv_noinfo_post; +int HP_party_recv_info_pre; +int HP_party_recv_info_post; +int HP_party_recv_movemap_pre; +int HP_party_recv_movemap_post; +int HP_party_broken_pre; +int HP_party_broken_post; +int HP_party_optionchanged_pre; +int HP_party_optionchanged_post; +int HP_party_changeoption_pre; +int HP_party_changeoption_post; +int HP_party_changeleader_pre; +int HP_party_changeleader_post; +int HP_party_send_movemap_pre; +int HP_party_send_movemap_post; +int HP_party_send_levelup_pre; +int HP_party_send_levelup_post; +int HP_party_send_logout_pre; +int HP_party_send_logout_post; +int HP_party_send_message_pre; +int HP_party_send_message_post; +int HP_party_recv_message_pre; +int HP_party_recv_message_post; +int HP_party_skill_check_pre; +int HP_party_skill_check_post; +int HP_party_send_xy_clear_pre; +int HP_party_send_xy_clear_post; +int HP_party_exp_share_pre; +int HP_party_exp_share_post; +int HP_party_share_loot_pre; +int HP_party_share_loot_post; +int HP_party_send_dot_remove_pre; +int HP_party_send_dot_remove_post; +int HP_party_sub_count_pre; +int HP_party_sub_count_post; +int HP_party_booking_register_pre; +int HP_party_booking_register_post; +int HP_party_booking_update_pre; +int HP_party_booking_update_post; +int HP_party_booking_search_pre; +int HP_party_booking_search_post; +int HP_party_booking_delete_pre; +int HP_party_booking_delete_post; +int HP_party_vforeachsamemap_pre; +int HP_party_vforeachsamemap_post; +int HP_party_send_xy_timer_pre; +int HP_party_send_xy_timer_post; +int HP_party_fill_member_pre; +int HP_party_fill_member_post; +int HP_party_sd_check_pre; +int HP_party_sd_check_post; +int HP_party_check_state_pre; +int HP_party_check_state_post; +int HP_party_create_booking_data_pre; +int HP_party_create_booking_data_post; +int HP_party_db_final_pre; +int HP_party_db_final_post; +int HP_path_blownpos_pre; +int HP_path_blownpos_post; +int HP_path_search_pre; +int HP_path_search_post; +int HP_path_search_long_pre; +int HP_path_search_long_post; +int HP_path_check_distance_pre; +int HP_path_check_distance_post; +int HP_path_distance_pre; +int HP_path_distance_post; +int HP_pc_init_pre; +int HP_pc_init_post; +int HP_pc_final_pre; +int HP_pc_final_post; +int HP_pc_get_dummy_sd_pre; +int HP_pc_get_dummy_sd_post; +int HP_pc_class2idx_pre; +int HP_pc_class2idx_post; +int HP_pc_get_group_level_pre; +int HP_pc_get_group_level_post; +int HP_pc_can_give_items_pre; +int HP_pc_can_give_items_post; +int HP_pc_can_use_command_pre; +int HP_pc_can_use_command_post; +int HP_pc_has_permission_pre; +int HP_pc_has_permission_post; +int HP_pc_set_group_pre; +int HP_pc_set_group_post; +int HP_pc_should_log_commands_pre; +int HP_pc_should_log_commands_post; +int HP_pc_setrestartvalue_pre; +int HP_pc_setrestartvalue_post; +int HP_pc_makesavestatus_pre; +int HP_pc_makesavestatus_post; +int HP_pc_respawn_pre; +int HP_pc_respawn_post; +int HP_pc_setnewpc_pre; +int HP_pc_setnewpc_post; +int HP_pc_authok_pre; +int HP_pc_authok_post; +int HP_pc_authfail_pre; +int HP_pc_authfail_post; +int HP_pc_reg_received_pre; +int HP_pc_reg_received_post; +int HP_pc_isequip_pre; +int HP_pc_isequip_post; +int HP_pc_equippoint_pre; +int HP_pc_equippoint_post; +int HP_pc_setinventorydata_pre; +int HP_pc_setinventorydata_post; +int HP_pc_checkskill_pre; +int HP_pc_checkskill_post; +int HP_pc_checkskill2_pre; +int HP_pc_checkskill2_post; +int HP_pc_checkallowskill_pre; +int HP_pc_checkallowskill_post; +int HP_pc_checkequip_pre; +int HP_pc_checkequip_post; +int HP_pc_calc_skilltree_pre; +int HP_pc_calc_skilltree_post; +int HP_pc_calc_skilltree_normalize_job_pre; +int HP_pc_calc_skilltree_normalize_job_post; +int HP_pc_clean_skilltree_pre; +int HP_pc_clean_skilltree_post; +int HP_pc_setpos_pre; +int HP_pc_setpos_post; +int HP_pc_setsavepoint_pre; +int HP_pc_setsavepoint_post; +int HP_pc_randomwarp_pre; +int HP_pc_randomwarp_post; +int HP_pc_memo_pre; +int HP_pc_memo_post; +int HP_pc_checkadditem_pre; +int HP_pc_checkadditem_post; +int HP_pc_inventoryblank_pre; +int HP_pc_inventoryblank_post; +int HP_pc_search_inventory_pre; +int HP_pc_search_inventory_post; +int HP_pc_payzeny_pre; +int HP_pc_payzeny_post; +int HP_pc_additem_pre; +int HP_pc_additem_post; +int HP_pc_getzeny_pre; +int HP_pc_getzeny_post; +int HP_pc_delitem_pre; +int HP_pc_delitem_post; +int HP_pc_paycash_pre; +int HP_pc_paycash_post; +int HP_pc_getcash_pre; +int HP_pc_getcash_post; +int HP_pc_cart_additem_pre; +int HP_pc_cart_additem_post; +int HP_pc_cart_delitem_pre; +int HP_pc_cart_delitem_post; +int HP_pc_putitemtocart_pre; +int HP_pc_putitemtocart_post; +int HP_pc_getitemfromcart_pre; +int HP_pc_getitemfromcart_post; +int HP_pc_cartitem_amount_pre; +int HP_pc_cartitem_amount_post; +int HP_pc_takeitem_pre; +int HP_pc_takeitem_post; +int HP_pc_dropitem_pre; +int HP_pc_dropitem_post; +int HP_pc_isequipped_pre; +int HP_pc_isequipped_post; +int HP_pc_can_Adopt_pre; +int HP_pc_can_Adopt_post; +int HP_pc_adoption_pre; +int HP_pc_adoption_post; +int HP_pc_updateweightstatus_pre; +int HP_pc_updateweightstatus_post; +int HP_pc_addautobonus_pre; +int HP_pc_addautobonus_post; +int HP_pc_exeautobonus_pre; +int HP_pc_exeautobonus_post; +int HP_pc_endautobonus_pre; +int HP_pc_endautobonus_post; +int HP_pc_delautobonus_pre; +int HP_pc_delautobonus_post; +int HP_pc_bonus_pre; +int HP_pc_bonus_post; +int HP_pc_bonus2_pre; +int HP_pc_bonus2_post; +int HP_pc_bonus3_pre; +int HP_pc_bonus3_post; +int HP_pc_bonus4_pre; +int HP_pc_bonus4_post; +int HP_pc_bonus5_pre; +int HP_pc_bonus5_post; +int HP_pc_skill_pre; +int HP_pc_skill_post; +int HP_pc_insert_card_pre; +int HP_pc_insert_card_post; +int HP_pc_steal_item_pre; +int HP_pc_steal_item_post; +int HP_pc_steal_coin_pre; +int HP_pc_steal_coin_post; +int HP_pc_modifybuyvalue_pre; +int HP_pc_modifybuyvalue_post; +int HP_pc_modifysellvalue_pre; +int HP_pc_modifysellvalue_post; +int HP_pc_follow_pre; +int HP_pc_follow_post; +int HP_pc_stop_following_pre; +int HP_pc_stop_following_post; +int HP_pc_maxbaselv_pre; +int HP_pc_maxbaselv_post; +int HP_pc_maxjoblv_pre; +int HP_pc_maxjoblv_post; +int HP_pc_checkbaselevelup_pre; +int HP_pc_checkbaselevelup_post; +int HP_pc_checkjoblevelup_pre; +int HP_pc_checkjoblevelup_post; +int HP_pc_gainexp_pre; +int HP_pc_gainexp_post; +int HP_pc_nextbaseexp_pre; +int HP_pc_nextbaseexp_post; +int HP_pc_thisbaseexp_pre; +int HP_pc_thisbaseexp_post; +int HP_pc_nextjobexp_pre; +int HP_pc_nextjobexp_post; +int HP_pc_thisjobexp_pre; +int HP_pc_thisjobexp_post; +int HP_pc_gets_status_point_pre; +int HP_pc_gets_status_point_post; +int HP_pc_need_status_point_pre; +int HP_pc_need_status_point_post; +int HP_pc_statusup_pre; +int HP_pc_statusup_post; +int HP_pc_statusup2_pre; +int HP_pc_statusup2_post; +int HP_pc_skillup_pre; +int HP_pc_skillup_post; +int HP_pc_allskillup_pre; +int HP_pc_allskillup_post; +int HP_pc_resetlvl_pre; +int HP_pc_resetlvl_post; +int HP_pc_resetstate_pre; +int HP_pc_resetstate_post; +int HP_pc_resetskill_pre; +int HP_pc_resetskill_post; +int HP_pc_resetfeel_pre; +int HP_pc_resetfeel_post; +int HP_pc_resethate_pre; +int HP_pc_resethate_post; +int HP_pc_equipitem_pre; +int HP_pc_equipitem_post; +int HP_pc_unequipitem_pre; +int HP_pc_unequipitem_post; +int HP_pc_checkitem_pre; +int HP_pc_checkitem_post; +int HP_pc_useitem_pre; +int HP_pc_useitem_post; +int HP_pc_skillatk_bonus_pre; +int HP_pc_skillatk_bonus_post; +int HP_pc_skillheal_bonus_pre; +int HP_pc_skillheal_bonus_post; +int HP_pc_skillheal2_bonus_pre; +int HP_pc_skillheal2_bonus_post; +int HP_pc_damage_pre; +int HP_pc_damage_post; +int HP_pc_dead_pre; +int HP_pc_dead_post; +int HP_pc_revive_pre; +int HP_pc_revive_post; +int HP_pc_heal_pre; +int HP_pc_heal_post; +int HP_pc_itemheal_pre; +int HP_pc_itemheal_post; +int HP_pc_percentheal_pre; +int HP_pc_percentheal_post; +int HP_pc_jobchange_pre; +int HP_pc_jobchange_post; +int HP_pc_setoption_pre; +int HP_pc_setoption_post; +int HP_pc_setcart_pre; +int HP_pc_setcart_post; +int HP_pc_setfalcon_pre; +int HP_pc_setfalcon_post; +int HP_pc_setriding_pre; +int HP_pc_setriding_post; +int HP_pc_setmadogear_pre; +int HP_pc_setmadogear_post; +int HP_pc_changelook_pre; +int HP_pc_changelook_post; +int HP_pc_equiplookall_pre; +int HP_pc_equiplookall_post; +int HP_pc_readparam_pre; +int HP_pc_readparam_post; +int HP_pc_setparam_pre; +int HP_pc_setparam_post; +int HP_pc_readreg_pre; +int HP_pc_readreg_post; +int HP_pc_setreg_pre; +int HP_pc_setreg_post; +int HP_pc_readregstr_pre; +int HP_pc_readregstr_post; +int HP_pc_setregstr_pre; +int HP_pc_setregstr_post; +int HP_pc_readregistry_pre; +int HP_pc_readregistry_post; +int HP_pc_setregistry_pre; +int HP_pc_setregistry_post; +int HP_pc_readregistry_str_pre; +int HP_pc_readregistry_str_post; +int HP_pc_setregistry_str_pre; +int HP_pc_setregistry_str_post; +int HP_pc_addeventtimer_pre; +int HP_pc_addeventtimer_post; +int HP_pc_deleventtimer_pre; +int HP_pc_deleventtimer_post; +int HP_pc_cleareventtimer_pre; +int HP_pc_cleareventtimer_post; +int HP_pc_addeventtimercount_pre; +int HP_pc_addeventtimercount_post; +int HP_pc_calc_pvprank_pre; +int HP_pc_calc_pvprank_post; +int HP_pc_calc_pvprank_timer_pre; +int HP_pc_calc_pvprank_timer_post; +int HP_pc_ismarried_pre; +int HP_pc_ismarried_post; +int HP_pc_marriage_pre; +int HP_pc_marriage_post; +int HP_pc_divorce_pre; +int HP_pc_divorce_post; +int HP_pc_get_partner_pre; +int HP_pc_get_partner_post; +int HP_pc_get_father_pre; +int HP_pc_get_father_post; +int HP_pc_get_mother_pre; +int HP_pc_get_mother_post; +int HP_pc_get_child_pre; +int HP_pc_get_child_post; +int HP_pc_bleeding_pre; +int HP_pc_bleeding_post; +int HP_pc_regen_pre; +int HP_pc_regen_post; +int HP_pc_setstand_pre; +int HP_pc_setstand_post; +int HP_pc_candrop_pre; +int HP_pc_candrop_post; +int HP_pc_jobid2mapid_pre; +int HP_pc_jobid2mapid_post; +int HP_pc_mapid2jobid_pre; +int HP_pc_mapid2jobid_post; +int HP_pc_job_name_pre; +int HP_pc_job_name_post; +int HP_pc_setinvincibletimer_pre; +int HP_pc_setinvincibletimer_post; +int HP_pc_delinvincibletimer_pre; +int HP_pc_delinvincibletimer_post; +int HP_pc_addspiritball_pre; +int HP_pc_addspiritball_post; +int HP_pc_delspiritball_pre; +int HP_pc_delspiritball_post; +int HP_pc_addfame_pre; +int HP_pc_addfame_post; +int HP_pc_famerank_pre; +int HP_pc_famerank_post; +int HP_pc_set_hate_mob_pre; +int HP_pc_set_hate_mob_post; +int HP_pc_readdb_pre; +int HP_pc_readdb_post; +int HP_pc_map_day_timer_pre; +int HP_pc_map_day_timer_post; +int HP_pc_map_night_timer_pre; +int HP_pc_map_night_timer_post; +int HP_pc_inventory_rentals_pre; +int HP_pc_inventory_rentals_post; +int HP_pc_inventory_rental_clear_pre; +int HP_pc_inventory_rental_clear_post; +int HP_pc_inventory_rental_add_pre; +int HP_pc_inventory_rental_add_post; +int HP_pc_disguise_pre; +int HP_pc_disguise_post; +int HP_pc_isautolooting_pre; +int HP_pc_isautolooting_post; +int HP_pc_overheat_pre; +int HP_pc_overheat_post; +int HP_pc_banding_pre; +int HP_pc_banding_post; +int HP_pc_itemcd_do_pre; +int HP_pc_itemcd_do_post; +int HP_pc_load_combo_pre; +int HP_pc_load_combo_post; +int HP_pc_add_charm_pre; +int HP_pc_add_charm_post; +int HP_pc_del_charm_pre; +int HP_pc_del_charm_post; +int HP_pc_baselevelchanged_pre; +int HP_pc_baselevelchanged_post; +int HP_pc_level_penalty_mod_pre; +int HP_pc_level_penalty_mod_post; +int HP_pc_calc_skillpoint_pre; +int HP_pc_calc_skillpoint_post; +int HP_pc_invincible_timer_pre; +int HP_pc_invincible_timer_post; +int HP_pc_spiritball_timer_pre; +int HP_pc_spiritball_timer_post; +int HP_pc_check_banding_pre; +int HP_pc_check_banding_post; +int HP_pc_inventory_rental_end_pre; +int HP_pc_inventory_rental_end_post; +int HP_pc_check_skilltree_pre; +int HP_pc_check_skilltree_post; +int HP_pc_bonus_autospell_pre; +int HP_pc_bonus_autospell_post; +int HP_pc_bonus_autospell_onskill_pre; +int HP_pc_bonus_autospell_onskill_post; +int HP_pc_bonus_addeff_pre; +int HP_pc_bonus_addeff_post; +int HP_pc_bonus_addeff_onskill_pre; +int HP_pc_bonus_addeff_onskill_post; +int HP_pc_bonus_item_drop_pre; +int HP_pc_bonus_item_drop_post; +int HP_pc_calcexp_pre; +int HP_pc_calcexp_post; +int HP_pc_respawn_timer_pre; +int HP_pc_respawn_timer_post; +int HP_pc_jobchange_killclone_pre; +int HP_pc_jobchange_killclone_post; +int HP_pc_getstat_pre; +int HP_pc_getstat_post; +int HP_pc_setstat_pre; +int HP_pc_setstat_post; +int HP_pc_eventtimer_pre; +int HP_pc_eventtimer_post; +int HP_pc_daynight_timer_sub_pre; +int HP_pc_daynight_timer_sub_post; +int HP_pc_charm_timer_pre; +int HP_pc_charm_timer_post; +int HP_pc_readdb_levelpenalty_pre; +int HP_pc_readdb_levelpenalty_post; +int HP_pc_autosave_pre; +int HP_pc_autosave_post; +int HP_pc_follow_timer_pre; +int HP_pc_follow_timer_post; +int HP_pc_read_skill_tree_pre; +int HP_pc_read_skill_tree_post; +int HP_pc_isUseitem_pre; +int HP_pc_isUseitem_post; +int HP_pc_show_steal_pre; +int HP_pc_show_steal_post; +int HP_pc_checkcombo_pre; +int HP_pc_checkcombo_post; +int HP_pc_calcweapontype_pre; +int HP_pc_calcweapontype_post; +int HP_pc_removecombo_pre; +int HP_pc_removecombo_post; +int HP_pet_init_pre; +int HP_pet_init_post; +int HP_pet_final_pre; +int HP_pet_final_post; +int HP_pet_hungry_val_pre; +int HP_pet_hungry_val_post; +int HP_pet_set_intimate_pre; +int HP_pet_set_intimate_post; +int HP_pet_create_egg_pre; +int HP_pet_create_egg_post; +int HP_pet_unlocktarget_pre; +int HP_pet_unlocktarget_post; +int HP_pet_attackskill_pre; +int HP_pet_attackskill_post; +int HP_pet_target_check_pre; +int HP_pet_target_check_post; +int HP_pet_sc_check_pre; +int HP_pet_sc_check_post; +int HP_pet_hungry_pre; +int HP_pet_hungry_post; +int HP_pet_search_petDB_index_pre; +int HP_pet_search_petDB_index_post; +int HP_pet_hungry_timer_delete_pre; +int HP_pet_hungry_timer_delete_post; +int HP_pet_performance_pre; +int HP_pet_performance_post; +int HP_pet_return_egg_pre; +int HP_pet_return_egg_post; +int HP_pet_data_init_pre; +int HP_pet_data_init_post; +int HP_pet_birth_process_pre; +int HP_pet_birth_process_post; +int HP_pet_recv_petdata_pre; +int HP_pet_recv_petdata_post; +int HP_pet_select_egg_pre; +int HP_pet_select_egg_post; +int HP_pet_catch_process1_pre; +int HP_pet_catch_process1_post; +int HP_pet_catch_process2_pre; +int HP_pet_catch_process2_post; +int HP_pet_get_egg_pre; +int HP_pet_get_egg_post; +int HP_pet_unequipitem_pre; +int HP_pet_unequipitem_post; +int HP_pet_food_pre; +int HP_pet_food_post; +int HP_pet_ai_sub_hard_lootsearch_pre; +int HP_pet_ai_sub_hard_lootsearch_post; +int HP_pet_menu_pre; +int HP_pet_menu_post; +int HP_pet_change_name_pre; +int HP_pet_change_name_post; +int HP_pet_change_name_ack_pre; +int HP_pet_change_name_ack_post; +int HP_pet_equipitem_pre; +int HP_pet_equipitem_post; +int HP_pet_randomwalk_pre; +int HP_pet_randomwalk_post; +int HP_pet_ai_sub_hard_pre; +int HP_pet_ai_sub_hard_post; +int HP_pet_ai_sub_foreachclient_pre; +int HP_pet_ai_sub_foreachclient_post; +int HP_pet_ai_hard_pre; +int HP_pet_ai_hard_post; +int HP_pet_delay_item_drop_pre; +int HP_pet_delay_item_drop_post; +int HP_pet_lootitem_drop_pre; +int HP_pet_lootitem_drop_post; +int HP_pet_skill_bonus_timer_pre; +int HP_pet_skill_bonus_timer_post; +int HP_pet_recovery_timer_pre; +int HP_pet_recovery_timer_post; +int HP_pet_heal_timer_pre; +int HP_pet_heal_timer_post; +int HP_pet_skill_support_timer_pre; +int HP_pet_skill_support_timer_post; +int HP_pet_read_db_pre; +int HP_pet_read_db_post; +int HP_quest_init_pre; +int HP_quest_init_post; +int HP_quest_reload_pre; +int HP_quest_reload_post; +int HP_quest_search_db_pre; +int HP_quest_search_db_post; +int HP_quest_pc_login_pre; +int HP_quest_pc_login_post; +int HP_quest_add_pre; +int HP_quest_add_post; +int HP_quest_change_pre; +int HP_quest_change_post; +int HP_quest_delete_pre; +int HP_quest_delete_post; +int HP_quest_update_objective_sub_pre; +int HP_quest_update_objective_sub_post; +int HP_quest_update_objective_pre; +int HP_quest_update_objective_post; +int HP_quest_update_status_pre; +int HP_quest_update_status_post; +int HP_quest_check_pre; +int HP_quest_check_post; +int HP_quest_read_db_pre; +int HP_quest_read_db_post; +int HP_script_init_pre; +int HP_script_init_post; +int HP_script_final_pre; +int HP_script_final_post; +int HP_script_reload_pre; +int HP_script_reload_post; +int HP_script_parse_pre; +int HP_script_parse_post; +int HP_script_parse_builtin_pre; +int HP_script_parse_builtin_post; +int HP_script_parse_subexpr_pre; +int HP_script_parse_subexpr_post; +int HP_script_skip_space_pre; +int HP_script_skip_space_post; +int HP_script_error_pre; +int HP_script_error_post; +int HP_script_warning_pre; +int HP_script_warning_post; +int HP_script_addScript_pre; +int HP_script_addScript_post; +int HP_script_conv_num_pre; +int HP_script_conv_num_post; +int HP_script_conv_str_pre; +int HP_script_conv_str_post; +int HP_script_rid2sd_pre; +int HP_script_rid2sd_post; +int HP_script_detach_rid_pre; +int HP_script_detach_rid_post; +int HP_script_push_val_pre; +int HP_script_push_val_post; +int HP_script_get_val_pre; +int HP_script_get_val_post; +int HP_script_get_val2_pre; +int HP_script_get_val2_post; +int HP_script_push_str_pre; +int HP_script_push_str_post; +int HP_script_push_copy_pre; +int HP_script_push_copy_post; +int HP_script_pop_stack_pre; +int HP_script_pop_stack_post; +int HP_script_set_constant_pre; +int HP_script_set_constant_post; +int HP_script_set_constant2_pre; +int HP_script_set_constant2_post; +int HP_script_set_constant_force_pre; +int HP_script_set_constant_force_post; +int HP_script_get_constant_pre; +int HP_script_get_constant_post; +int HP_script_label_add_pre; +int HP_script_label_add_post; +int HP_script_run_pre; +int HP_script_run_post; +int HP_script_run_main_pre; +int HP_script_run_main_post; +int HP_script_run_timer_pre; +int HP_script_run_timer_post; +int HP_script_set_var_pre; +int HP_script_set_var_post; +int HP_script_stop_instances_pre; +int HP_script_stop_instances_post; +int HP_script_free_code_pre; +int HP_script_free_code_post; +int HP_script_free_vars_pre; +int HP_script_free_vars_post; +int HP_script_alloc_state_pre; +int HP_script_alloc_state_post; +int HP_script_free_state_pre; +int HP_script_free_state_post; +int HP_script_run_autobonus_pre; +int HP_script_run_autobonus_post; +int HP_script_cleararray_pc_pre; +int HP_script_cleararray_pc_post; +int HP_script_setarray_pc_pre; +int HP_script_setarray_pc_post; +int HP_script_config_read_pre; +int HP_script_config_read_post; +int HP_script_add_str_pre; +int HP_script_add_str_post; +int HP_script_get_str_pre; +int HP_script_get_str_post; +int HP_script_search_str_pre; +int HP_script_search_str_post; +int HP_script_setd_sub_pre; +int HP_script_setd_sub_post; +int HP_script_attach_state_pre; +int HP_script_attach_state_post; +int HP_script_queue_pre; +int HP_script_queue_post; +int HP_script_queue_add_pre; +int HP_script_queue_add_post; +int HP_script_queue_del_pre; +int HP_script_queue_del_post; +int HP_script_queue_remove_pre; +int HP_script_queue_remove_post; +int HP_script_queue_create_pre; +int HP_script_queue_create_post; +int HP_script_queue_clear_pre; +int HP_script_queue_clear_post; +int HP_script_parse_curly_close_pre; +int HP_script_parse_curly_close_post; +int HP_script_parse_syntax_close_pre; +int HP_script_parse_syntax_close_post; +int HP_script_parse_syntax_close_sub_pre; +int HP_script_parse_syntax_close_sub_post; +int HP_script_parse_syntax_pre; +int HP_script_parse_syntax_post; +int HP_script_get_com_pre; +int HP_script_get_com_post; +int HP_script_get_num_pre; +int HP_script_get_num_post; +int HP_script_op2name_pre; +int HP_script_op2name_post; +int HP_script_reportsrc_pre; +int HP_script_reportsrc_post; +int HP_script_reportdata_pre; +int HP_script_reportdata_post; +int HP_script_reportfunc_pre; +int HP_script_reportfunc_post; +int HP_script_disp_error_message2_pre; +int HP_script_disp_error_message2_post; +int HP_script_disp_warning_message_pre; +int HP_script_disp_warning_message_post; +int HP_script_check_event_pre; +int HP_script_check_event_post; +int HP_script_calc_hash_pre; +int HP_script_calc_hash_post; +int HP_script_addb_pre; +int HP_script_addb_post; +int HP_script_addc_pre; +int HP_script_addc_post; +int HP_script_addi_pre; +int HP_script_addi_post; +int HP_script_addl_pre; +int HP_script_addl_post; +int HP_script_set_label_pre; +int HP_script_set_label_post; +int HP_script_skip_word_pre; +int HP_script_skip_word_post; +int HP_script_add_word_pre; +int HP_script_add_word_post; +int HP_script_parse_callfunc_pre; +int HP_script_parse_callfunc_post; +int HP_script_parse_nextline_pre; +int HP_script_parse_nextline_post; +int HP_script_parse_variable_pre; +int HP_script_parse_variable_post; +int HP_script_parse_simpleexpr_pre; +int HP_script_parse_simpleexpr_post; +int HP_script_parse_expr_pre; +int HP_script_parse_expr_post; +int HP_script_parse_line_pre; +int HP_script_parse_line_post; +int HP_script_read_constdb_pre; +int HP_script_read_constdb_post; +int HP_script_print_line_pre; +int HP_script_print_line_post; +int HP_script_errorwarning_sub_pre; +int HP_script_errorwarning_sub_post; +int HP_script_set_reg_pre; +int HP_script_set_reg_post; +int HP_script_stack_expand_pre; +int HP_script_stack_expand_post; +int HP_script_push_retinfo_pre; +int HP_script_push_retinfo_post; +int HP_script_pop_val_pre; +int HP_script_pop_val_post; +int HP_script_op_3_pre; +int HP_script_op_3_post; +int HP_script_op_2str_pre; +int HP_script_op_2str_post; +int HP_script_op_2num_pre; +int HP_script_op_2num_post; +int HP_script_op_2_pre; +int HP_script_op_2_post; +int HP_script_op_1_pre; +int HP_script_op_1_post; +int HP_script_check_buildin_argtype_pre; +int HP_script_check_buildin_argtype_post; +int HP_script_detach_state_pre; +int HP_script_detach_state_post; +int HP_script_db_free_code_sub_pre; +int HP_script_db_free_code_sub_post; +int HP_script_add_autobonus_pre; +int HP_script_add_autobonus_post; +int HP_script_menu_countoptions_pre; +int HP_script_menu_countoptions_post; +int HP_script_buildin_areawarp_sub_pre; +int HP_script_buildin_areawarp_sub_post; +int HP_script_buildin_areapercentheal_sub_pre; +int HP_script_buildin_areapercentheal_sub_post; +int HP_script_getarraysize_pre; +int HP_script_getarraysize_post; +int HP_script_buildin_delitem_delete_pre; +int HP_script_buildin_delitem_delete_post; +int HP_script_buildin_delitem_search_pre; +int HP_script_buildin_delitem_search_post; +int HP_script_buildin_killmonster_sub_strip_pre; +int HP_script_buildin_killmonster_sub_strip_post; +int HP_script_buildin_killmonster_sub_pre; +int HP_script_buildin_killmonster_sub_post; +int HP_script_buildin_killmonsterall_sub_strip_pre; +int HP_script_buildin_killmonsterall_sub_strip_post; +int HP_script_buildin_killmonsterall_sub_pre; +int HP_script_buildin_killmonsterall_sub_post; +int HP_script_buildin_announce_sub_pre; +int HP_script_buildin_announce_sub_post; +int HP_script_buildin_getareausers_sub_pre; +int HP_script_buildin_getareausers_sub_post; +int HP_script_buildin_getareadropitem_sub_pre; +int HP_script_buildin_getareadropitem_sub_post; +int HP_script_mapflag_pvp_sub_pre; +int HP_script_mapflag_pvp_sub_post; +int HP_script_buildin_pvpoff_sub_pre; +int HP_script_buildin_pvpoff_sub_post; +int HP_script_buildin_maprespawnguildid_sub_pc_pre; +int HP_script_buildin_maprespawnguildid_sub_pc_post; +int HP_script_buildin_maprespawnguildid_sub_mob_pre; +int HP_script_buildin_maprespawnguildid_sub_mob_post; +int HP_script_buildin_mobcount_sub_pre; +int HP_script_buildin_mobcount_sub_post; +int HP_script_playBGM_sub_pre; +int HP_script_playBGM_sub_post; +int HP_script_playBGM_foreachpc_sub_pre; +int HP_script_playBGM_foreachpc_sub_post; +int HP_script_soundeffect_sub_pre; +int HP_script_soundeffect_sub_post; +int HP_script_buildin_query_sql_sub_pre; +int HP_script_buildin_query_sql_sub_post; +int HP_script_axtoi_pre; +int HP_script_axtoi_post; +int HP_script_buildin_instance_warpall_sub_pre; +int HP_script_buildin_instance_warpall_sub_post; +int HP_script_buildin_mobuseskill_sub_pre; +int HP_script_buildin_mobuseskill_sub_post; +int HP_script_cleanfloor_sub_pre; +int HP_script_cleanfloor_sub_post; +int HP_script_run_func_pre; +int HP_script_run_func_post; +int HP_searchstore_open_pre; +int HP_searchstore_open_post; +int HP_searchstore_query_pre; +int HP_searchstore_query_post; +int HP_searchstore_querynext_pre; +int HP_searchstore_querynext_post; +int HP_searchstore_next_pre; +int HP_searchstore_next_post; +int HP_searchstore_clear_pre; +int HP_searchstore_clear_post; +int HP_searchstore_close_pre; +int HP_searchstore_close_post; +int HP_searchstore_click_pre; +int HP_searchstore_click_post; +int HP_searchstore_queryremote_pre; +int HP_searchstore_queryremote_post; +int HP_searchstore_clearremote_pre; +int HP_searchstore_clearremote_post; +int HP_searchstore_result_pre; +int HP_searchstore_result_post; +int HP_skill_init_pre; +int HP_skill_init_post; +int HP_skill_final_pre; +int HP_skill_final_post; +int HP_skill_reload_pre; +int HP_skill_reload_post; +int HP_skill_read_db_pre; +int HP_skill_read_db_post; +int HP_skill_get_index_pre; +int HP_skill_get_index_post; +int HP_skill_get_type_pre; +int HP_skill_get_type_post; +int HP_skill_get_hit_pre; +int HP_skill_get_hit_post; +int HP_skill_get_inf_pre; +int HP_skill_get_inf_post; +int HP_skill_get_ele_pre; +int HP_skill_get_ele_post; +int HP_skill_get_nk_pre; +int HP_skill_get_nk_post; +int HP_skill_get_max_pre; +int HP_skill_get_max_post; +int HP_skill_get_range_pre; +int HP_skill_get_range_post; +int HP_skill_get_range2_pre; +int HP_skill_get_range2_post; +int HP_skill_get_splash_pre; +int HP_skill_get_splash_post; +int HP_skill_get_hp_pre; +int HP_skill_get_hp_post; +int HP_skill_get_mhp_pre; +int HP_skill_get_mhp_post; +int HP_skill_get_sp_pre; +int HP_skill_get_sp_post; +int HP_skill_get_state_pre; +int HP_skill_get_state_post; +int HP_skill_get_spiritball_pre; +int HP_skill_get_spiritball_post; +int HP_skill_get_zeny_pre; +int HP_skill_get_zeny_post; +int HP_skill_get_num_pre; +int HP_skill_get_num_post; +int HP_skill_get_cast_pre; +int HP_skill_get_cast_post; +int HP_skill_get_delay_pre; +int HP_skill_get_delay_post; +int HP_skill_get_walkdelay_pre; +int HP_skill_get_walkdelay_post; +int HP_skill_get_time_pre; +int HP_skill_get_time_post; +int HP_skill_get_time2_pre; +int HP_skill_get_time2_post; +int HP_skill_get_castnodex_pre; +int HP_skill_get_castnodex_post; +int HP_skill_get_delaynodex_pre; +int HP_skill_get_delaynodex_post; +int HP_skill_get_castdef_pre; +int HP_skill_get_castdef_post; +int HP_skill_get_weapontype_pre; +int HP_skill_get_weapontype_post; +int HP_skill_get_ammotype_pre; +int HP_skill_get_ammotype_post; +int HP_skill_get_ammo_qty_pre; +int HP_skill_get_ammo_qty_post; +int HP_skill_get_unit_id_pre; +int HP_skill_get_unit_id_post; +int HP_skill_get_inf2_pre; +int HP_skill_get_inf2_post; +int HP_skill_get_castcancel_pre; +int HP_skill_get_castcancel_post; +int HP_skill_get_maxcount_pre; +int HP_skill_get_maxcount_post; +int HP_skill_get_blewcount_pre; +int HP_skill_get_blewcount_post; +int HP_skill_get_unit_flag_pre; +int HP_skill_get_unit_flag_post; +int HP_skill_get_unit_target_pre; +int HP_skill_get_unit_target_post; +int HP_skill_get_unit_interval_pre; +int HP_skill_get_unit_interval_post; +int HP_skill_get_unit_bl_target_pre; +int HP_skill_get_unit_bl_target_post; +int HP_skill_get_unit_layout_type_pre; +int HP_skill_get_unit_layout_type_post; +int HP_skill_get_unit_range_pre; +int HP_skill_get_unit_range_post; +int HP_skill_get_cooldown_pre; +int HP_skill_get_cooldown_post; +int HP_skill_tree_get_max_pre; +int HP_skill_tree_get_max_post; +int HP_skill_get_name_pre; +int HP_skill_get_name_post; +int HP_skill_get_desc_pre; +int HP_skill_get_desc_post; +int HP_skill_chk_pre; +int HP_skill_chk_post; +int HP_skill_get_casttype_pre; +int HP_skill_get_casttype_post; +int HP_skill_get_casttype2_pre; +int HP_skill_get_casttype2_post; +int HP_skill_name2id_pre; +int HP_skill_name2id_post; +int HP_skill_isammotype_pre; +int HP_skill_isammotype_post; +int HP_skill_castend_id_pre; +int HP_skill_castend_id_post; +int HP_skill_castend_pos_pre; +int HP_skill_castend_pos_post; +int HP_skill_castend_map_pre; +int HP_skill_castend_map_post; +int HP_skill_cleartimerskill_pre; +int HP_skill_cleartimerskill_post; +int HP_skill_addtimerskill_pre; +int HP_skill_addtimerskill_post; +int HP_skill_additional_effect_pre; +int HP_skill_additional_effect_post; +int HP_skill_counter_additional_effect_pre; +int HP_skill_counter_additional_effect_post; +int HP_skill_blown_pre; +int HP_skill_blown_post; +int HP_skill_break_equip_pre; +int HP_skill_break_equip_post; +int HP_skill_strip_equip_pre; +int HP_skill_strip_equip_post; +int HP_skill_id2group_pre; +int HP_skill_id2group_post; +int HP_skill_unitsetting_pre; +int HP_skill_unitsetting_post; +int HP_skill_initunit_pre; +int HP_skill_initunit_post; +int HP_skill_delunit_pre; +int HP_skill_delunit_post; +int HP_skill_init_unitgroup_pre; +int HP_skill_init_unitgroup_post; +int HP_skill_del_unitgroup_pre; +int HP_skill_del_unitgroup_post; +int HP_skill_clear_unitgroup_pre; +int HP_skill_clear_unitgroup_post; +int HP_skill_clear_group_pre; +int HP_skill_clear_group_post; +int HP_skill_unit_onplace_pre; +int HP_skill_unit_onplace_post; +int HP_skill_unit_ondamaged_pre; +int HP_skill_unit_ondamaged_post; +int HP_skill_cast_fix_pre; +int HP_skill_cast_fix_post; +int HP_skill_cast_fix_sc_pre; +int HP_skill_cast_fix_sc_post; +int HP_skill_vf_cast_fix_pre; +int HP_skill_vf_cast_fix_post; +int HP_skill_delay_fix_pre; +int HP_skill_delay_fix_post; +int HP_skill_check_condition_castbegin_pre; +int HP_skill_check_condition_castbegin_post; +int HP_skill_check_condition_castend_pre; +int HP_skill_check_condition_castend_post; +int HP_skill_consume_requirement_pre; +int HP_skill_consume_requirement_post; +int HP_skill_get_requirement_pre; +int HP_skill_get_requirement_post; +int HP_skill_check_pc_partner_pre; +int HP_skill_check_pc_partner_post; +int HP_skill_unit_move_pre; +int HP_skill_unit_move_post; +int HP_skill_unit_onleft_pre; +int HP_skill_unit_onleft_post; +int HP_skill_unit_onout_pre; +int HP_skill_unit_onout_post; +int HP_skill_unit_move_unit_group_pre; +int HP_skill_unit_move_unit_group_post; +int HP_skill_sit_pre; +int HP_skill_sit_post; +int HP_skill_brandishspear_pre; +int HP_skill_brandishspear_post; +int HP_skill_repairweapon_pre; +int HP_skill_repairweapon_post; +int HP_skill_identify_pre; +int HP_skill_identify_post; +int HP_skill_weaponrefine_pre; +int HP_skill_weaponrefine_post; +int HP_skill_autospell_pre; +int HP_skill_autospell_post; +int HP_skill_calc_heal_pre; +int HP_skill_calc_heal_post; +int HP_skill_check_cloaking_pre; +int HP_skill_check_cloaking_post; +int HP_skill_enchant_elemental_end_pre; +int HP_skill_enchant_elemental_end_post; +int HP_skill_not_ok_pre; +int HP_skill_not_ok_post; +int HP_skill_not_ok_hom_pre; +int HP_skill_not_ok_hom_post; +int HP_skill_not_ok_mercenary_pre; +int HP_skill_not_ok_mercenary_post; +int HP_skill_chastle_mob_changetarget_pre; +int HP_skill_chastle_mob_changetarget_post; +int HP_skill_can_produce_mix_pre; +int HP_skill_can_produce_mix_post; +int HP_skill_produce_mix_pre; +int HP_skill_produce_mix_post; +int HP_skill_arrow_create_pre; +int HP_skill_arrow_create_post; +int HP_skill_castend_nodamage_id_pre; +int HP_skill_castend_nodamage_id_post; +int HP_skill_castend_damage_id_pre; +int HP_skill_castend_damage_id_post; +int HP_skill_castend_pos2_pre; +int HP_skill_castend_pos2_post; +int HP_skill_blockpc_start_pre; +int HP_skill_blockpc_start_post; +int HP_skill_blockhomun_start_pre; +int HP_skill_blockhomun_start_post; +int HP_skill_blockmerc_start_pre; +int HP_skill_blockmerc_start_post; +int HP_skill_attack_pre; +int HP_skill_attack_post; +int HP_skill_attack_area_pre; +int HP_skill_attack_area_post; +int HP_skill_area_sub_pre; +int HP_skill_area_sub_post; +int HP_skill_area_sub_count_pre; +int HP_skill_area_sub_count_post; +int HP_skill_check_unit_range_pre; +int HP_skill_check_unit_range_post; +int HP_skill_check_unit_range_sub_pre; +int HP_skill_check_unit_range_sub_post; +int HP_skill_check_unit_range2_pre; +int HP_skill_check_unit_range2_post; +int HP_skill_check_unit_range2_sub_pre; +int HP_skill_check_unit_range2_sub_post; +int HP_skill_toggle_magicpower_pre; +int HP_skill_toggle_magicpower_post; +int HP_skill_magic_reflect_pre; +int HP_skill_magic_reflect_post; +int HP_skill_onskillusage_pre; +int HP_skill_onskillusage_post; +int HP_skill_cell_overlap_pre; +int HP_skill_cell_overlap_post; +int HP_skill_timerskill_pre; +int HP_skill_timerskill_post; +int HP_skill_trap_splash_pre; +int HP_skill_trap_splash_post; +int HP_skill_check_condition_mercenary_pre; +int HP_skill_check_condition_mercenary_post; +int HP_skill_locate_element_field_pre; +int HP_skill_locate_element_field_post; +int HP_skill_graffitiremover_pre; +int HP_skill_graffitiremover_post; +int HP_skill_activate_reverberation_pre; +int HP_skill_activate_reverberation_post; +int HP_skill_dance_overlap_sub_pre; +int HP_skill_dance_overlap_sub_post; +int HP_skill_dance_overlap_pre; +int HP_skill_dance_overlap_post; +int HP_skill_get_unit_layout_pre; +int HP_skill_get_unit_layout_post; +int HP_skill_frostjoke_scream_pre; +int HP_skill_frostjoke_scream_post; +int HP_skill_greed_pre; +int HP_skill_greed_post; +int HP_skill_destroy_trap_pre; +int HP_skill_destroy_trap_post; +int HP_skill_icewall_block_pre; +int HP_skill_icewall_block_post; +int HP_skill_unitgrouptickset_search_pre; +int HP_skill_unitgrouptickset_search_post; +int HP_skill_dance_switch_pre; +int HP_skill_dance_switch_post; +int HP_skill_check_condition_char_sub_pre; +int HP_skill_check_condition_char_sub_post; +int HP_skill_check_condition_mob_master_sub_pre; +int HP_skill_check_condition_mob_master_sub_post; +int HP_skill_brandishspear_first_pre; +int HP_skill_brandishspear_first_post; +int HP_skill_brandishspear_dir_pre; +int HP_skill_brandishspear_dir_post; +int HP_skill_get_fixed_cast_pre; +int HP_skill_get_fixed_cast_post; +int HP_skill_sit_count_pre; +int HP_skill_sit_count_post; +int HP_skill_sit_in_pre; +int HP_skill_sit_in_post; +int HP_skill_sit_out_pre; +int HP_skill_sit_out_post; +int HP_skill_unitsetmapcell_pre; +int HP_skill_unitsetmapcell_post; +int HP_skill_unit_onplace_timer_pre; +int HP_skill_unit_onplace_timer_post; +int HP_skill_unit_effect_pre; +int HP_skill_unit_effect_post; +int HP_skill_unit_timer_sub_onplace_pre; +int HP_skill_unit_timer_sub_onplace_post; +int HP_skill_unit_move_sub_pre; +int HP_skill_unit_move_sub_post; +int HP_skill_blockpc_end_pre; +int HP_skill_blockpc_end_post; +int HP_skill_blockhomun_end_pre; +int HP_skill_blockhomun_end_post; +int HP_skill_blockmerc_end_pre; +int HP_skill_blockmerc_end_post; +int HP_skill_split_atoi_pre; +int HP_skill_split_atoi_post; +int HP_skill_unit_timer_pre; +int HP_skill_unit_timer_post; +int HP_skill_unit_timer_sub_pre; +int HP_skill_unit_timer_sub_post; +int HP_skill_init_unit_layout_pre; +int HP_skill_init_unit_layout_post; +int HP_skill_parse_row_skilldb_pre; +int HP_skill_parse_row_skilldb_post; +int HP_skill_parse_row_requiredb_pre; +int HP_skill_parse_row_requiredb_post; +int HP_skill_parse_row_castdb_pre; +int HP_skill_parse_row_castdb_post; +int HP_skill_parse_row_castnodexdb_pre; +int HP_skill_parse_row_castnodexdb_post; +int HP_skill_parse_row_unitdb_pre; +int HP_skill_parse_row_unitdb_post; +int HP_skill_parse_row_producedb_pre; +int HP_skill_parse_row_producedb_post; +int HP_skill_parse_row_createarrowdb_pre; +int HP_skill_parse_row_createarrowdb_post; +int HP_skill_parse_row_abradb_pre; +int HP_skill_parse_row_abradb_post; +int HP_skill_parse_row_spellbookdb_pre; +int HP_skill_parse_row_spellbookdb_post; +int HP_skill_parse_row_magicmushroomdb_pre; +int HP_skill_parse_row_magicmushroomdb_post; +int HP_skill_parse_row_reproducedb_pre; +int HP_skill_parse_row_reproducedb_post; +int HP_skill_parse_row_improvisedb_pre; +int HP_skill_parse_row_improvisedb_post; +int HP_skill_parse_row_changematerialdb_pre; +int HP_skill_parse_row_changematerialdb_post; +int HP_skill_usave_add_pre; +int HP_skill_usave_add_post; +int HP_skill_usave_trigger_pre; +int HP_skill_usave_trigger_post; +int HP_skill_cooldown_load_pre; +int HP_skill_cooldown_load_post; +int HP_skill_spellbook_pre; +int HP_skill_spellbook_post; +int HP_skill_block_check_pre; +int HP_skill_block_check_post; +int HP_skill_detonator_pre; +int HP_skill_detonator_post; +int HP_skill_check_camouflage_pre; +int HP_skill_check_camouflage_post; +int HP_skill_magicdecoy_pre; +int HP_skill_magicdecoy_post; +int HP_skill_poisoningweapon_pre; +int HP_skill_poisoningweapon_post; +int HP_skill_select_menu_pre; +int HP_skill_select_menu_post; +int HP_skill_elementalanalysis_pre; +int HP_skill_elementalanalysis_post; +int HP_skill_changematerial_pre; +int HP_skill_changematerial_post; +int HP_skill_get_elemental_type_pre; +int HP_skill_get_elemental_type_post; +int HP_skill_cooldown_save_pre; +int HP_skill_cooldown_save_post; +int HP_skill_maelstrom_suction_pre; +int HP_skill_maelstrom_suction_post; +int HP_skill_get_new_group_id_pre; +int HP_skill_get_new_group_id_post; +int HP_status_init_pre; +int HP_status_init_post; +int HP_status_final_pre; +int HP_status_final_post; +int HP_status_get_refine_chance_pre; +int HP_status_get_refine_chance_post; +int HP_status_skill2sc_pre; +int HP_status_skill2sc_post; +int HP_status_sc2skill_pre; +int HP_status_sc2skill_post; +int HP_status_sc2scb_flag_pre; +int HP_status_sc2scb_flag_post; +int HP_status_type2relevant_bl_types_pre; +int HP_status_type2relevant_bl_types_post; +int HP_status_get_sc_type_pre; +int HP_status_get_sc_type_post; +int HP_status_damage_pre; +int HP_status_damage_post; +int HP_status_charge_pre; +int HP_status_charge_post; +int HP_status_percent_change_pre; +int HP_status_percent_change_post; +int HP_status_set_hp_pre; +int HP_status_set_hp_post; +int HP_status_set_sp_pre; +int HP_status_set_sp_post; +int HP_status_heal_pre; +int HP_status_heal_post; +int HP_status_revive_pre; +int HP_status_revive_post; +int HP_status_get_regen_data_pre; +int HP_status_get_regen_data_post; +int HP_status_get_status_data_pre; +int HP_status_get_status_data_post; +int HP_status_get_base_status_pre; +int HP_status_get_base_status_post; +int HP_status_get_name_pre; +int HP_status_get_name_post; +int HP_status_get_class_pre; +int HP_status_get_class_post; +int HP_status_get_lv_pre; +int HP_status_get_lv_post; +int HP_status_get_def_pre; +int HP_status_get_def_post; +int HP_status_get_speed_pre; +int HP_status_get_speed_post; +int HP_status_calc_attack_element_pre; +int HP_status_calc_attack_element_post; +int HP_status_get_party_id_pre; +int HP_status_get_party_id_post; +int HP_status_get_guild_id_pre; +int HP_status_get_guild_id_post; +int HP_status_get_emblem_id_pre; +int HP_status_get_emblem_id_post; +int HP_status_get_mexp_pre; +int HP_status_get_mexp_post; +int HP_status_get_race2_pre; +int HP_status_get_race2_post; +int HP_status_get_viewdata_pre; +int HP_status_get_viewdata_post; +int HP_status_set_viewdata_pre; +int HP_status_set_viewdata_post; +int HP_status_change_init_pre; +int HP_status_change_init_post; +int HP_status_get_sc_pre; +int HP_status_get_sc_post; +int HP_status_isdead_pre; +int HP_status_isdead_post; +int HP_status_isimmune_pre; +int HP_status_isimmune_post; +int HP_status_get_sc_def_pre; +int HP_status_get_sc_def_post; +int HP_status_change_start_pre; +int HP_status_change_start_post; +int HP_status_change_end__pre; +int HP_status_change_end__post; +int HP_status_kaahi_heal_timer_pre; +int HP_status_kaahi_heal_timer_post; +int HP_status_change_timer_pre; +int HP_status_change_timer_post; +int HP_status_change_timer_sub_pre; +int HP_status_change_timer_sub_post; +int HP_status_change_clear_pre; +int HP_status_change_clear_post; +int HP_status_change_clear_buffs_pre; +int HP_status_change_clear_buffs_post; +int HP_status_calc_bl__pre; +int HP_status_calc_bl__post; +int HP_status_calc_mob__pre; +int HP_status_calc_mob__post; +int HP_status_calc_pet__pre; +int HP_status_calc_pet__post; +int HP_status_calc_pc__pre; +int HP_status_calc_pc__post; +int HP_status_calc_homunculus__pre; +int HP_status_calc_homunculus__post; +int HP_status_calc_mercenary__pre; +int HP_status_calc_mercenary__post; +int HP_status_calc_elemental__pre; +int HP_status_calc_elemental__post; +int HP_status_calc_misc_pre; +int HP_status_calc_misc_post; +int HP_status_calc_regen_pre; +int HP_status_calc_regen_post; +int HP_status_calc_regen_rate_pre; +int HP_status_calc_regen_rate_post; +int HP_status_check_skilluse_pre; +int HP_status_check_skilluse_post; +int HP_status_check_visibility_pre; +int HP_status_check_visibility_post; +int HP_status_change_spread_pre; +int HP_status_change_spread_post; +int HP_status_calc_def_pre; +int HP_status_calc_def_post; +int HP_status_calc_def2_pre; +int HP_status_calc_def2_post; +int HP_status_calc_mdef_pre; +int HP_status_calc_mdef_post; +int HP_status_calc_mdef2_pre; +int HP_status_calc_mdef2_post; +int HP_status_calc_batk_pre; +int HP_status_calc_batk_post; +int HP_status_get_total_mdef_pre; +int HP_status_get_total_mdef_post; +int HP_status_get_total_def_pre; +int HP_status_get_total_def_post; +int HP_status_get_matk_pre; +int HP_status_get_matk_post; +int HP_status_readdb_pre; +int HP_status_readdb_post; +int HP_status_initChangeTables_pre; +int HP_status_initChangeTables_post; +int HP_status_initDummyData_pre; +int HP_status_initDummyData_post; +int HP_status_base_amotion_pc_pre; +int HP_status_base_amotion_pc_post; +int HP_status_base_atk_pre; +int HP_status_base_atk_post; +int HP_status_calc_sigma_pre; +int HP_status_calc_sigma_post; +int HP_status_base_pc_maxhp_pre; +int HP_status_base_pc_maxhp_post; +int HP_status_base_pc_maxsp_pre; +int HP_status_base_pc_maxsp_post; +int HP_status_calc_npc__pre; +int HP_status_calc_npc__post; +int HP_status_calc_str_pre; +int HP_status_calc_str_post; +int HP_status_calc_agi_pre; +int HP_status_calc_agi_post; +int HP_status_calc_vit_pre; +int HP_status_calc_vit_post; +int HP_status_calc_int_pre; +int HP_status_calc_int_post; +int HP_status_calc_dex_pre; +int HP_status_calc_dex_post; +int HP_status_calc_luk_pre; +int HP_status_calc_luk_post; +int HP_status_calc_watk_pre; +int HP_status_calc_watk_post; +int HP_status_calc_matk_pre; +int HP_status_calc_matk_post; +int HP_status_calc_hit_pre; +int HP_status_calc_hit_post; +int HP_status_calc_critical_pre; +int HP_status_calc_critical_post; +int HP_status_calc_flee_pre; +int HP_status_calc_flee_post; +int HP_status_calc_flee2_pre; +int HP_status_calc_flee2_post; +int HP_status_calc_speed_pre; +int HP_status_calc_speed_post; +int HP_status_calc_aspd_rate_pre; +int HP_status_calc_aspd_rate_post; +int HP_status_calc_dmotion_pre; +int HP_status_calc_dmotion_post; +int HP_status_calc_fix_aspd_pre; +int HP_status_calc_fix_aspd_post; +int HP_status_calc_maxhp_pre; +int HP_status_calc_maxhp_post; +int HP_status_calc_maxsp_pre; +int HP_status_calc_maxsp_post; +int HP_status_calc_element_pre; +int HP_status_calc_element_post; +int HP_status_calc_element_lv_pre; +int HP_status_calc_element_lv_post; +int HP_status_calc_mode_pre; +int HP_status_calc_mode_post; +int HP_status_calc_bl_main_pre; +int HP_status_calc_bl_main_post; +int HP_status_display_add_pre; +int HP_status_display_add_post; +int HP_status_display_remove_pre; +int HP_status_display_remove_post; +int HP_status_natural_heal_pre; +int HP_status_natural_heal_post; +int HP_status_natural_heal_timer_pre; +int HP_status_natural_heal_timer_post; +int HP_status_readdb_job1_pre; +int HP_status_readdb_job1_post; +int HP_status_readdb_job2_pre; +int HP_status_readdb_job2_post; +int HP_status_readdb_sizefix_pre; +int HP_status_readdb_sizefix_post; +int HP_status_readdb_refine_pre; +int HP_status_readdb_refine_post; +int HP_status_readdb_scconfig_pre; +int HP_status_readdb_scconfig_post; +int HP_storage_reconnect_pre; +int HP_storage_reconnect_post; +int HP_storage_delitem_pre; +int HP_storage_delitem_post; +int HP_storage_open_pre; +int HP_storage_open_post; +int HP_storage_add_pre; +int HP_storage_add_post; +int HP_storage_get_pre; +int HP_storage_get_post; +int HP_storage_additem_pre; +int HP_storage_additem_post; +int HP_storage_addfromcart_pre; +int HP_storage_addfromcart_post; +int HP_storage_gettocart_pre; +int HP_storage_gettocart_post; +int HP_storage_close_pre; +int HP_storage_close_post; +int HP_storage_pc_quit_pre; +int HP_storage_pc_quit_post; +int HP_storage_comp_item_pre; +int HP_storage_comp_item_post; +int HP_storage_sortitem_pre; +int HP_storage_sortitem_post; +int HP_storage_reconnect_sub_pre; +int HP_storage_reconnect_sub_post; +int HP_trade_request_pre; +int HP_trade_request_post; +int HP_trade_ack_pre; +int HP_trade_ack_post; +int HP_trade_check_impossible_pre; +int HP_trade_check_impossible_post; +int HP_trade_check_pre; +int HP_trade_check_post; +int HP_trade_additem_pre; +int HP_trade_additem_post; +int HP_trade_addzeny_pre; +int HP_trade_addzeny_post; +int HP_trade_ok_pre; +int HP_trade_ok_post; +int HP_trade_cancel_pre; +int HP_trade_cancel_post; +int HP_trade_commit_pre; +int HP_trade_commit_post; +int HP_unit_init_pre; +int HP_unit_init_post; +int HP_unit_final_pre; +int HP_unit_final_post; +int HP_unit_bl2ud_pre; +int HP_unit_bl2ud_post; +int HP_unit_bl2ud2_pre; +int HP_unit_bl2ud2_post; +int HP_unit_attack_timer_pre; +int HP_unit_attack_timer_post; +int HP_unit_walktoxy_timer_pre; +int HP_unit_walktoxy_timer_post; +int HP_unit_walktoxy_sub_pre; +int HP_unit_walktoxy_sub_post; +int HP_unit_delay_walktoxy_timer_pre; +int HP_unit_delay_walktoxy_timer_post; +int HP_unit_walktoxy_pre; +int HP_unit_walktoxy_post; +int HP_unit_walktobl_sub_pre; +int HP_unit_walktobl_sub_post; +int HP_unit_walktobl_pre; +int HP_unit_walktobl_post; +int HP_unit_run_pre; +int HP_unit_run_post; +int HP_unit_wugdash_pre; +int HP_unit_wugdash_post; +int HP_unit_escape_pre; +int HP_unit_escape_post; +int HP_unit_movepos_pre; +int HP_unit_movepos_post; +int HP_unit_setdir_pre; +int HP_unit_setdir_post; +int HP_unit_getdir_pre; +int HP_unit_getdir_post; +int HP_unit_blown_pre; +int HP_unit_blown_post; +int HP_unit_warp_pre; +int HP_unit_warp_post; +int HP_unit_stop_walking_pre; +int HP_unit_stop_walking_post; +int HP_unit_skilluse_id_pre; +int HP_unit_skilluse_id_post; +int HP_unit_is_walking_pre; +int HP_unit_is_walking_post; +int HP_unit_can_move_pre; +int HP_unit_can_move_post; +int HP_unit_resume_running_pre; +int HP_unit_resume_running_post; +int HP_unit_set_walkdelay_pre; +int HP_unit_set_walkdelay_post; +int HP_unit_skilluse_id2_pre; +int HP_unit_skilluse_id2_post; +int HP_unit_skilluse_pos_pre; +int HP_unit_skilluse_pos_post; +int HP_unit_skilluse_pos2_pre; +int HP_unit_skilluse_pos2_post; +int HP_unit_set_target_pre; +int HP_unit_set_target_post; +int HP_unit_stop_attack_pre; +int HP_unit_stop_attack_post; +int HP_unit_unattackable_pre; +int HP_unit_unattackable_post; +int HP_unit_attack_pre; +int HP_unit_attack_post; +int HP_unit_cancel_combo_pre; +int HP_unit_cancel_combo_post; +int HP_unit_can_reach_pos_pre; +int HP_unit_can_reach_pos_post; +int HP_unit_can_reach_bl_pre; +int HP_unit_can_reach_bl_post; +int HP_unit_calc_pos_pre; +int HP_unit_calc_pos_post; +int HP_unit_attack_timer_sub_pre; +int HP_unit_attack_timer_sub_post; +int HP_unit_skillcastcancel_pre; +int HP_unit_skillcastcancel_post; +int HP_unit_dataset_pre; +int HP_unit_dataset_post; +int HP_unit_counttargeted_pre; +int HP_unit_counttargeted_post; +int HP_unit_fixdamage_pre; +int HP_unit_fixdamage_post; +int HP_unit_changeviewsize_pre; +int HP_unit_changeviewsize_post; +int HP_unit_remove_map_pre; +int HP_unit_remove_map_post; +int HP_unit_remove_map_pc_pre; +int HP_unit_remove_map_pc_post; +int HP_unit_free_pc_pre; +int HP_unit_free_pc_post; +int HP_unit_free_pre; +int HP_unit_free_post; +int HP_vending_init_pre; +int HP_vending_init_post; +int HP_vending_final_pre; +int HP_vending_final_post; +int HP_vending_close_pre; +int HP_vending_close_post; +int HP_vending_open_pre; +int HP_vending_open_post; +int HP_vending_list_pre; +int HP_vending_list_post; +int HP_vending_purchase_pre; +int HP_vending_purchase_post; +int HP_vending_search_pre; +int HP_vending_search_post; +int HP_vending_searchall_pre; +int HP_vending_searchall_post; +} count; +struct { +struct atcommand_interface atcommand; +struct battle_interface battle; +struct battleground_interface bg; +struct buyingstore_interface buyingstore; +struct chat_interface chat; +struct chrif_interface chrif; +struct clif_interface clif; +struct duel_interface duel; +struct elemental_interface elemental; +struct guild_interface guild; +struct guild_storage_interface gstorage; +struct homunculus_interface homun; +struct instance_interface instance; +struct intif_interface intif; +struct irc_bot_interface ircbot; +struct itemdb_interface itemdb; +struct log_interface logs; +struct mail_interface mail; +struct map_interface map; +struct mapit_interface mapit; +struct mapreg_interface mapreg; +struct mercenary_interface mercenary; +struct mob_interface mob; +struct npc_interface npc; +struct party_interface party; +struct path_interface path; +struct pc_interface pc; +struct pet_interface pet; +struct quest_interface quest; +struct script_interface script; +struct searchstore_interface searchstore; +struct skill_interface skill; +struct status_interface status; +struct storage_interface storage; +struct trade_interface trade; +struct unit_interface unit; +struct vending_interface vending; +} source; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc new file mode 100644 index 000000000..69f6e287a --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -0,0 +1,2445 @@ +struct HookingPointData HookingPoints[] = { +/* atcommand */ +{ HP_POP(atcommand->init), HP_POP2(HP_atcommand_init), 0 }, +{ HP_POP(atcommand->final), HP_POP2(HP_atcommand_final), 2 }, +{ HP_POP(atcommand->parse), HP_POP2(HP_atcommand_parse), 4 }, +{ HP_POP(atcommand->create), HP_POP2(HP_atcommand_create), 6 }, +{ HP_POP(atcommand->can_use), HP_POP2(HP_atcommand_can_use), 8 }, +{ HP_POP(atcommand->can_use2), HP_POP2(HP_atcommand_can_use2), 10 }, +{ HP_POP(atcommand->load_groups), HP_POP2(HP_atcommand_load_groups), 12 }, +{ HP_POP(atcommand->exists), HP_POP2(HP_atcommand_exists), 14 }, +{ HP_POP(atcommand->msg_read), HP_POP2(HP_atcommand_msg_read), 16 }, +{ HP_POP(atcommand->final_msg), HP_POP2(HP_atcommand_final_msg), 18 }, +{ HP_POP(atcommand->get_bind_byname), HP_POP2(HP_atcommand_get_bind_byname), 20 }, +{ HP_POP(atcommand->get_info_byname), HP_POP2(HP_atcommand_get_info_byname), 22 }, +{ HP_POP(atcommand->check_alias), HP_POP2(HP_atcommand_check_alias), 24 }, +{ HP_POP(atcommand->get_suggestions), HP_POP2(HP_atcommand_get_suggestions), 26 }, +{ HP_POP(atcommand->config_read), HP_POP2(HP_atcommand_config_read), 28 }, +{ HP_POP(atcommand->stopattack), HP_POP2(HP_atcommand_stopattack), 30 }, +{ HP_POP(atcommand->pvpoff_sub), HP_POP2(HP_atcommand_pvpoff_sub), 32 }, +{ HP_POP(atcommand->pvpon_sub), HP_POP2(HP_atcommand_pvpon_sub), 34 }, +{ HP_POP(atcommand->atkillmonster_sub), HP_POP2(HP_atcommand_atkillmonster_sub), 36 }, +{ HP_POP(atcommand->raise_sub), HP_POP2(HP_atcommand_raise_sub), 38 }, +{ HP_POP(atcommand->get_jail_time), HP_POP2(HP_atcommand_get_jail_time), 40 }, +{ HP_POP(atcommand->cleanfloor_sub), HP_POP2(HP_atcommand_cleanfloor_sub), 42 }, +{ HP_POP(atcommand->mutearea_sub), HP_POP2(HP_atcommand_mutearea_sub), 44 }, +{ HP_POP(atcommand->commands_sub), HP_POP2(HP_atcommand_commands_sub), 46 }, +{ HP_POP(atcommand->cmd_db_clear), HP_POP2(HP_atcommand_cmd_db_clear), 48 }, +{ HP_POP(atcommand->cmd_db_clear_sub), HP_POP2(HP_atcommand_cmd_db_clear_sub), 50 }, +{ HP_POP(atcommand->doload), HP_POP2(HP_atcommand_doload), 52 }, +{ HP_POP(atcommand->base_commands), HP_POP2(HP_atcommand_base_commands), 54 }, +/* battle */ +{ HP_POP(battle->init), HP_POP2(HP_battle_init), 56 }, +{ HP_POP(battle->final), HP_POP2(HP_battle_final), 58 }, +{ HP_POP(battle->calc_attack), HP_POP2(HP_battle_calc_attack), 60 }, +{ HP_POP(battle->calc_damage), HP_POP2(HP_battle_calc_damage), 62 }, +{ HP_POP(battle->calc_gvg_damage), HP_POP2(HP_battle_calc_gvg_damage), 64 }, +{ HP_POP(battle->calc_bg_damage), HP_POP2(HP_battle_calc_bg_damage), 66 }, +{ HP_POP(battle->weapon_attack), HP_POP2(HP_battle_weapon_attack), 68 }, +{ HP_POP(battle->calc_weapon_attack), HP_POP2(HP_battle_calc_weapon_attack), 70 }, +{ HP_POP(battle->delay_damage), HP_POP2(HP_battle_delay_damage), 72 }, +{ HP_POP(battle->drain), HP_POP2(HP_battle_drain), 74 }, +{ HP_POP(battle->calc_return_damage), HP_POP2(HP_battle_calc_return_damage), 76 }, +{ HP_POP(battle->attr_ratio), HP_POP2(HP_battle_attr_ratio), 78 }, +{ HP_POP(battle->attr_fix), HP_POP2(HP_battle_attr_fix), 80 }, +{ HP_POP(battle->calc_cardfix), HP_POP2(HP_battle_calc_cardfix), 82 }, +{ HP_POP(battle->calc_elefix), HP_POP2(HP_battle_calc_elefix), 84 }, +{ HP_POP(battle->calc_masteryfix), HP_POP2(HP_battle_calc_masteryfix), 86 }, +{ HP_POP(battle->calc_skillratio), HP_POP2(HP_battle_calc_skillratio), 88 }, +{ HP_POP(battle->calc_sizefix), HP_POP2(HP_battle_calc_sizefix), 90 }, +{ HP_POP(battle->calc_weapon_damage), HP_POP2(HP_battle_calc_weapon_damage), 92 }, +{ HP_POP(battle->calc_defense), HP_POP2(HP_battle_calc_defense), 94 }, +{ HP_POP(battle->get_master), HP_POP2(HP_battle_get_master), 96 }, +{ HP_POP(battle->get_targeted), HP_POP2(HP_battle_get_targeted), 98 }, +{ HP_POP(battle->get_enemy), HP_POP2(HP_battle_get_enemy), 100 }, +{ HP_POP(battle->get_target), HP_POP2(HP_battle_get_target), 102 }, +{ HP_POP(battle->get_current_skill), HP_POP2(HP_battle_get_current_skill), 104 }, +{ HP_POP(battle->check_undead), HP_POP2(HP_battle_check_undead), 106 }, +{ HP_POP(battle->check_target), HP_POP2(HP_battle_check_target), 108 }, +{ HP_POP(battle->check_range), HP_POP2(HP_battle_check_range), 110 }, +{ HP_POP(battle->consume_ammo), HP_POP2(HP_battle_consume_ammo), 112 }, +{ HP_POP(battle->get_targeted_sub), HP_POP2(HP_battle_get_targeted_sub), 114 }, +{ HP_POP(battle->get_enemy_sub), HP_POP2(HP_battle_get_enemy_sub), 116 }, +{ HP_POP(battle->get_enemy_area_sub), HP_POP2(HP_battle_get_enemy_area_sub), 118 }, +{ HP_POP(battle->delay_damage_sub), HP_POP2(HP_battle_delay_damage_sub), 120 }, +{ HP_POP(battle->blewcount_bonus), HP_POP2(HP_battle_blewcount_bonus), 122 }, +{ HP_POP(battle->range_type), HP_POP2(HP_battle_range_type), 124 }, +{ HP_POP(battle->calc_base_damage), HP_POP2(HP_battle_calc_base_damage), 126 }, +{ HP_POP(battle->calc_base_damage2), HP_POP2(HP_battle_calc_base_damage2), 128 }, +{ HP_POP(battle->calc_misc_attack), HP_POP2(HP_battle_calc_misc_attack), 130 }, +{ HP_POP(battle->calc_magic_attack), HP_POP2(HP_battle_calc_magic_attack), 132 }, +{ HP_POP(battle->adjust_skill_damage), HP_POP2(HP_battle_adjust_skill_damage), 134 }, +{ HP_POP(battle->add_mastery), HP_POP2(HP_battle_add_mastery), 136 }, +{ HP_POP(battle->calc_drain), HP_POP2(HP_battle_calc_drain), 138 }, +{ HP_POP(battle->config_read), HP_POP2(HP_battle_config_read), 140 }, +{ HP_POP(battle->config_set_defaults), HP_POP2(HP_battle_config_set_defaults), 142 }, +{ HP_POP(battle->config_set_value), HP_POP2(HP_battle_config_set_value), 144 }, +{ HP_POP(battle->config_get_value), HP_POP2(HP_battle_config_get_value), 146 }, +{ HP_POP(battle->config_adjust), HP_POP2(HP_battle_config_adjust), 148 }, +{ HP_POP(battle->get_enemy_area), HP_POP2(HP_battle_get_enemy_area), 150 }, +{ HP_POP(battle->damage_area), HP_POP2(HP_battle_damage_area), 152 }, +/* bg */ +{ HP_POP(bg->init), HP_POP2(HP_bg_init), 154 }, +{ HP_POP(bg->final), HP_POP2(HP_bg_final), 156 }, +{ HP_POP(bg->name2arena), HP_POP2(HP_bg_name2arena), 158 }, +{ HP_POP(bg->queue_add), HP_POP2(HP_bg_queue_add), 160 }, +{ HP_POP(bg->can_queue), HP_POP2(HP_bg_can_queue), 162 }, +{ HP_POP(bg->id2pos), HP_POP2(HP_bg_id2pos), 164 }, +{ HP_POP(bg->queue_pc_cleanup), HP_POP2(HP_bg_queue_pc_cleanup), 166 }, +{ HP_POP(bg->begin), HP_POP2(HP_bg_begin), 168 }, +{ HP_POP(bg->begin_timer), HP_POP2(HP_bg_begin_timer), 170 }, +{ HP_POP(bg->queue_pregame), HP_POP2(HP_bg_queue_pregame), 172 }, +{ HP_POP(bg->fillup_timer), HP_POP2(HP_bg_fillup_timer), 174 }, +{ HP_POP(bg->queue_ready_ack), HP_POP2(HP_bg_queue_ready_ack), 176 }, +{ HP_POP(bg->match_over), HP_POP2(HP_bg_match_over), 178 }, +{ HP_POP(bg->queue_check), HP_POP2(HP_bg_queue_check), 180 }, +{ HP_POP(bg->team_search), HP_POP2(HP_bg_team_search), 182 }, +{ HP_POP(bg->getavailablesd), HP_POP2(HP_bg_getavailablesd), 184 }, +{ HP_POP(bg->team_delete), HP_POP2(HP_bg_team_delete), 186 }, +{ HP_POP(bg->team_warp), HP_POP2(HP_bg_team_warp), 188 }, +{ HP_POP(bg->send_dot_remove), HP_POP2(HP_bg_send_dot_remove), 190 }, +{ HP_POP(bg->team_join), HP_POP2(HP_bg_team_join), 192 }, +{ HP_POP(bg->team_leave), HP_POP2(HP_bg_team_leave), 194 }, +{ HP_POP(bg->member_respawn), HP_POP2(HP_bg_member_respawn), 196 }, +{ HP_POP(bg->create), HP_POP2(HP_bg_create), 198 }, +{ HP_POP(bg->team_get_id), HP_POP2(HP_bg_team_get_id), 200 }, +{ HP_POP(bg->send_message), HP_POP2(HP_bg_send_message), 202 }, +{ HP_POP(bg->send_xy_timer_sub), HP_POP2(HP_bg_send_xy_timer_sub), 204 }, +{ HP_POP(bg->send_xy_timer), HP_POP2(HP_bg_send_xy_timer), 206 }, +{ HP_POP(bg->config_read), HP_POP2(HP_bg_config_read), 208 }, +/* buyingstore */ +{ HP_POP(buyingstore->setup), HP_POP2(HP_buyingstore_setup), 210 }, +{ HP_POP(buyingstore->create), HP_POP2(HP_buyingstore_create), 212 }, +{ HP_POP(buyingstore->close), HP_POP2(HP_buyingstore_close), 214 }, +{ HP_POP(buyingstore->open), HP_POP2(HP_buyingstore_open), 216 }, +{ HP_POP(buyingstore->trade), HP_POP2(HP_buyingstore_trade), 218 }, +{ HP_POP(buyingstore->search), HP_POP2(HP_buyingstore_search), 220 }, +{ HP_POP(buyingstore->searchall), HP_POP2(HP_buyingstore_searchall), 222 }, +{ HP_POP(buyingstore->getuid), HP_POP2(HP_buyingstore_getuid), 224 }, +/* chat */ +{ HP_POP(chat->create_pc_chat), HP_POP2(HP_chat_create_pc_chat), 226 }, +{ HP_POP(chat->join), HP_POP2(HP_chat_join), 228 }, +{ HP_POP(chat->leave), HP_POP2(HP_chat_leave), 230 }, +{ HP_POP(chat->change_owner), HP_POP2(HP_chat_change_owner), 232 }, +{ HP_POP(chat->change_status), HP_POP2(HP_chat_change_status), 234 }, +{ HP_POP(chat->kick), HP_POP2(HP_chat_kick), 236 }, +{ HP_POP(chat->create_npc_chat), HP_POP2(HP_chat_create_npc_chat), 238 }, +{ HP_POP(chat->delete_npc_chat), HP_POP2(HP_chat_delete_npc_chat), 240 }, +{ HP_POP(chat->enable_event), HP_POP2(HP_chat_enable_event), 242 }, +{ HP_POP(chat->disable_event), HP_POP2(HP_chat_disable_event), 244 }, +{ HP_POP(chat->npc_kick_all), HP_POP2(HP_chat_npc_kick_all), 246 }, +{ HP_POP(chat->trigger_event), HP_POP2(HP_chat_trigger_event), 248 }, +{ HP_POP(chat->create), HP_POP2(HP_chat_create), 250 }, +/* chrif */ +{ HP_POP(chrif->final), HP_POP2(HP_chrif_final), 252 }, +{ HP_POP(chrif->init), HP_POP2(HP_chrif_init), 254 }, +{ HP_POP(chrif->setuserid), HP_POP2(HP_chrif_setuserid), 256 }, +{ HP_POP(chrif->setpasswd), HP_POP2(HP_chrif_setpasswd), 258 }, +{ HP_POP(chrif->checkdefaultlogin), HP_POP2(HP_chrif_checkdefaultlogin), 260 }, +{ HP_POP(chrif->setip), HP_POP2(HP_chrif_setip), 262 }, +{ HP_POP(chrif->setport), HP_POP2(HP_chrif_setport), 264 }, +{ HP_POP(chrif->isconnected), HP_POP2(HP_chrif_isconnected), 266 }, +{ HP_POP(chrif->check_shutdown), HP_POP2(HP_chrif_check_shutdown), 268 }, +{ HP_POP(chrif->search), HP_POP2(HP_chrif_search), 270 }, +{ HP_POP(chrif->auth_check), HP_POP2(HP_chrif_auth_check), 272 }, +{ HP_POP(chrif->auth_delete), HP_POP2(HP_chrif_auth_delete), 274 }, +{ HP_POP(chrif->auth_finished), HP_POP2(HP_chrif_auth_finished), 276 }, +{ HP_POP(chrif->authreq), HP_POP2(HP_chrif_authreq), 278 }, +{ HP_POP(chrif->authok), HP_POP2(HP_chrif_authok), 280 }, +{ HP_POP(chrif->scdata_request), HP_POP2(HP_chrif_scdata_request), 282 }, +{ HP_POP(chrif->save), HP_POP2(HP_chrif_save), 284 }, +{ HP_POP(chrif->charselectreq), HP_POP2(HP_chrif_charselectreq), 286 }, +{ HP_POP(chrif->changemapserver), HP_POP2(HP_chrif_changemapserver), 288 }, +{ HP_POP(chrif->searchcharid), HP_POP2(HP_chrif_searchcharid), 290 }, +{ HP_POP(chrif->changeemail), HP_POP2(HP_chrif_changeemail), 292 }, +{ HP_POP(chrif->char_ask_name), HP_POP2(HP_chrif_char_ask_name), 294 }, +{ HP_POP(chrif->updatefamelist), HP_POP2(HP_chrif_updatefamelist), 296 }, +{ HP_POP(chrif->buildfamelist), HP_POP2(HP_chrif_buildfamelist), 298 }, +{ HP_POP(chrif->save_scdata), HP_POP2(HP_chrif_save_scdata), 300 }, +{ HP_POP(chrif->ragsrvinfo), HP_POP2(HP_chrif_ragsrvinfo), 302 }, +{ HP_POP(chrif->char_offline), HP_POP2(HP_chrif_char_offline), 304 }, +{ HP_POP(chrif->char_offline_nsd), HP_POP2(HP_chrif_char_offline_nsd), 306 }, +{ HP_POP(chrif->char_reset_offline), HP_POP2(HP_chrif_char_reset_offline), 308 }, +{ HP_POP(chrif->send_users_tochar), HP_POP2(HP_chrif_send_users_tochar), 310 }, +{ HP_POP(chrif->char_online), HP_POP2(HP_chrif_char_online), 312 }, +{ HP_POP(chrif->changesex), HP_POP2(HP_chrif_changesex), 314 }, +{ HP_POP(chrif->divorce), HP_POP2(HP_chrif_divorce), 316 }, +{ HP_POP(chrif->removefriend), HP_POP2(HP_chrif_removefriend), 318 }, +{ HP_POP(chrif->send_report), HP_POP2(HP_chrif_send_report), 320 }, +{ HP_POP(chrif->flush_fifo), HP_POP2(HP_chrif_flush_fifo), 322 }, +{ HP_POP(chrif->skillid2idx), HP_POP2(HP_chrif_skillid2idx), 324 }, +{ HP_POP(chrif->sd_to_auth), HP_POP2(HP_chrif_sd_to_auth), 326 }, +{ HP_POP(chrif->check_connect_char_server), HP_POP2(HP_chrif_check_connect_char_server), 328 }, +{ HP_POP(chrif->auth_logout), HP_POP2(HP_chrif_auth_logout), 330 }, +{ HP_POP(chrif->save_ack), HP_POP2(HP_chrif_save_ack), 332 }, +{ HP_POP(chrif->reconnect), HP_POP2(HP_chrif_reconnect), 334 }, +{ HP_POP(chrif->auth_db_cleanup_sub), HP_POP2(HP_chrif_auth_db_cleanup_sub), 336 }, +{ HP_POP(chrif->char_ask_name_answer), HP_POP2(HP_chrif_char_ask_name_answer), 338 }, +{ HP_POP(chrif->auth_db_final), HP_POP2(HP_chrif_auth_db_final), 340 }, +{ HP_POP(chrif->send_usercount_tochar), HP_POP2(HP_chrif_send_usercount_tochar), 342 }, +{ HP_POP(chrif->auth_db_cleanup), HP_POP2(HP_chrif_auth_db_cleanup), 344 }, +{ HP_POP(chrif->connect), HP_POP2(HP_chrif_connect), 346 }, +{ HP_POP(chrif->connectack), HP_POP2(HP_chrif_connectack), 348 }, +{ HP_POP(chrif->sendmap), HP_POP2(HP_chrif_sendmap), 350 }, +{ HP_POP(chrif->sendmapack), HP_POP2(HP_chrif_sendmapack), 352 }, +{ HP_POP(chrif->recvmap), HP_POP2(HP_chrif_recvmap), 354 }, +{ HP_POP(chrif->changemapserverack), HP_POP2(HP_chrif_changemapserverack), 356 }, +{ HP_POP(chrif->changedsex), HP_POP2(HP_chrif_changedsex), 358 }, +{ HP_POP(chrif->divorceack), HP_POP2(HP_chrif_divorceack), 360 }, +{ HP_POP(chrif->accountban), HP_POP2(HP_chrif_accountban), 362 }, +{ HP_POP(chrif->recvfamelist), HP_POP2(HP_chrif_recvfamelist), 364 }, +{ HP_POP(chrif->load_scdata), HP_POP2(HP_chrif_load_scdata), 366 }, +{ HP_POP(chrif->update_ip), HP_POP2(HP_chrif_update_ip), 368 }, +{ HP_POP(chrif->disconnectplayer), HP_POP2(HP_chrif_disconnectplayer), 370 }, +{ HP_POP(chrif->removemap), HP_POP2(HP_chrif_removemap), 372 }, +{ HP_POP(chrif->updatefamelist_ack), HP_POP2(HP_chrif_updatefamelist_ack), 374 }, +{ HP_POP(chrif->keepalive), HP_POP2(HP_chrif_keepalive), 376 }, +{ HP_POP(chrif->keepalive_ack), HP_POP2(HP_chrif_keepalive_ack), 378 }, +{ HP_POP(chrif->deadopt), HP_POP2(HP_chrif_deadopt), 380 }, +{ HP_POP(chrif->authfail), HP_POP2(HP_chrif_authfail), 382 }, +{ HP_POP(chrif->on_ready), HP_POP2(HP_chrif_on_ready), 384 }, +{ HP_POP(chrif->on_disconnect), HP_POP2(HP_chrif_on_disconnect), 386 }, +{ HP_POP(chrif->parse), HP_POP2(HP_chrif_parse), 388 }, +/* clif */ +{ HP_POP(clif->init), HP_POP2(HP_clif_init), 390 }, +{ HP_POP(clif->final), HP_POP2(HP_clif_final), 392 }, +{ HP_POP(clif->setip), HP_POP2(HP_clif_setip), 394 }, +{ HP_POP(clif->setbindip), HP_POP2(HP_clif_setbindip), 396 }, +{ HP_POP(clif->setport), HP_POP2(HP_clif_setport), 398 }, +{ HP_POP(clif->refresh_ip), HP_POP2(HP_clif_refresh_ip), 400 }, +{ HP_POP(clif->send), HP_POP2(HP_clif_send), 402 }, +{ HP_POP(clif->send_sub), HP_POP2(HP_clif_send_sub), 404 }, +{ HP_POP(clif->parse), HP_POP2(HP_clif_parse), 406 }, +{ HP_POP(clif->parse_cmd), HP_POP2(HP_clif_parse_cmd), 408 }, +{ HP_POP(clif->decrypt_cmd), HP_POP2(HP_clif_decrypt_cmd), 410 }, +{ HP_POP(clif->authok), HP_POP2(HP_clif_authok), 412 }, +{ HP_POP(clif->authrefuse), HP_POP2(HP_clif_authrefuse), 414 }, +{ HP_POP(clif->authfail_fd), HP_POP2(HP_clif_authfail_fd), 416 }, +{ HP_POP(clif->charselectok), HP_POP2(HP_clif_charselectok), 418 }, +{ HP_POP(clif->dropflooritem), HP_POP2(HP_clif_dropflooritem), 420 }, +{ HP_POP(clif->clearflooritem), HP_POP2(HP_clif_clearflooritem), 422 }, +{ HP_POP(clif->additem), HP_POP2(HP_clif_additem), 424 }, +{ HP_POP(clif->dropitem), HP_POP2(HP_clif_dropitem), 426 }, +{ HP_POP(clif->delitem), HP_POP2(HP_clif_delitem), 428 }, +{ HP_POP(clif->takeitem), HP_POP2(HP_clif_takeitem), 430 }, +{ HP_POP(clif->arrowequip), HP_POP2(HP_clif_arrowequip), 432 }, +{ HP_POP(clif->arrow_fail), HP_POP2(HP_clif_arrow_fail), 434 }, +{ HP_POP(clif->use_card), HP_POP2(HP_clif_use_card), 436 }, +{ HP_POP(clif->cart_additem), HP_POP2(HP_clif_cart_additem), 438 }, +{ HP_POP(clif->cart_delitem), HP_POP2(HP_clif_cart_delitem), 440 }, +{ HP_POP(clif->equipitemack), HP_POP2(HP_clif_equipitemack), 442 }, +{ HP_POP(clif->unequipitemack), HP_POP2(HP_clif_unequipitemack), 444 }, +{ HP_POP(clif->useitemack), HP_POP2(HP_clif_useitemack), 446 }, +{ HP_POP(clif->addcards), HP_POP2(HP_clif_addcards), 448 }, +{ HP_POP(clif->addcards2), HP_POP2(HP_clif_addcards2), 450 }, +{ HP_POP(clif->item_sub), HP_POP2(HP_clif_item_sub), 452 }, +{ HP_POP(clif->getareachar_item), HP_POP2(HP_clif_getareachar_item), 454 }, +{ HP_POP(clif->cart_additem_ack), HP_POP2(HP_clif_cart_additem_ack), 456 }, +{ HP_POP(clif->cashshop_load), HP_POP2(HP_clif_cashshop_load), 458 }, +{ HP_POP(clif->package_announce), HP_POP2(HP_clif_package_announce), 460 }, +{ HP_POP(clif->clearunit_single), HP_POP2(HP_clif_clearunit_single), 462 }, +{ HP_POP(clif->clearunit_area), HP_POP2(HP_clif_clearunit_area), 464 }, +{ HP_POP(clif->clearunit_delayed), HP_POP2(HP_clif_clearunit_delayed), 466 }, +{ HP_POP(clif->walkok), HP_POP2(HP_clif_walkok), 468 }, +{ HP_POP(clif->move), HP_POP2(HP_clif_move), 470 }, +{ HP_POP(clif->move2), HP_POP2(HP_clif_move2), 472 }, +{ HP_POP(clif->blown), HP_POP2(HP_clif_blown), 474 }, +{ HP_POP(clif->slide), HP_POP2(HP_clif_slide), 476 }, +{ HP_POP(clif->fixpos), HP_POP2(HP_clif_fixpos), 478 }, +{ HP_POP(clif->changelook), HP_POP2(HP_clif_changelook), 480 }, +{ HP_POP(clif->changetraplook), HP_POP2(HP_clif_changetraplook), 482 }, +{ HP_POP(clif->refreshlook), HP_POP2(HP_clif_refreshlook), 484 }, +{ HP_POP(clif->class_change), HP_POP2(HP_clif_class_change), 486 }, +{ HP_POP(clif->skill_setunit), HP_POP2(HP_clif_skill_setunit), 488 }, +{ HP_POP(clif->skill_delunit), HP_POP2(HP_clif_skill_delunit), 490 }, +{ HP_POP(clif->skillunit_update), HP_POP2(HP_clif_skillunit_update), 492 }, +{ HP_POP(clif->clearunit_delayed_sub), HP_POP2(HP_clif_clearunit_delayed_sub), 494 }, +{ HP_POP(clif->set_unit_idle), HP_POP2(HP_clif_set_unit_idle), 496 }, +{ HP_POP(clif->spawn_unit), HP_POP2(HP_clif_spawn_unit), 498 }, +{ HP_POP(clif->set_unit_walking), HP_POP2(HP_clif_set_unit_walking), 500 }, +{ HP_POP(clif->calc_walkdelay), HP_POP2(HP_clif_calc_walkdelay), 502 }, +{ HP_POP(clif->getareachar_skillunit), HP_POP2(HP_clif_getareachar_skillunit), 504 }, +{ HP_POP(clif->getareachar_unit), HP_POP2(HP_clif_getareachar_unit), 506 }, +{ HP_POP(clif->clearchar_skillunit), HP_POP2(HP_clif_clearchar_skillunit), 508 }, +{ HP_POP(clif->getareachar), HP_POP2(HP_clif_getareachar), 510 }, +{ HP_POP(clif->spawn), HP_POP2(HP_clif_spawn), 512 }, +{ HP_POP(clif->changemap), HP_POP2(HP_clif_changemap), 514 }, +{ HP_POP(clif->changemapcell), HP_POP2(HP_clif_changemapcell), 516 }, +{ HP_POP(clif->map_property), HP_POP2(HP_clif_map_property), 518 }, +{ HP_POP(clif->pvpset), HP_POP2(HP_clif_pvpset), 520 }, +{ HP_POP(clif->map_property_mapall), HP_POP2(HP_clif_map_property_mapall), 522 }, +{ HP_POP(clif->bossmapinfo), HP_POP2(HP_clif_bossmapinfo), 524 }, +{ HP_POP(clif->map_type), HP_POP2(HP_clif_map_type), 526 }, +{ HP_POP(clif->maptypeproperty2), HP_POP2(HP_clif_maptypeproperty2), 528 }, +{ HP_POP(clif->changemapserver), HP_POP2(HP_clif_changemapserver), 530 }, +{ HP_POP(clif->npcbuysell), HP_POP2(HP_clif_npcbuysell), 532 }, +{ HP_POP(clif->buylist), HP_POP2(HP_clif_buylist), 534 }, +{ HP_POP(clif->selllist), HP_POP2(HP_clif_selllist), 536 }, +{ HP_POP(clif->cashshop_show), HP_POP2(HP_clif_cashshop_show), 538 }, +{ HP_POP(clif->npc_buy_result), HP_POP2(HP_clif_npc_buy_result), 540 }, +{ HP_POP(clif->npc_sell_result), HP_POP2(HP_clif_npc_sell_result), 542 }, +{ HP_POP(clif->cashshop_ack), HP_POP2(HP_clif_cashshop_ack), 544 }, +{ HP_POP(clif->scriptmes), HP_POP2(HP_clif_scriptmes), 546 }, +{ HP_POP(clif->scriptnext), HP_POP2(HP_clif_scriptnext), 548 }, +{ HP_POP(clif->scriptclose), HP_POP2(HP_clif_scriptclose), 550 }, +{ HP_POP(clif->scriptmenu), HP_POP2(HP_clif_scriptmenu), 552 }, +{ HP_POP(clif->scriptinput), HP_POP2(HP_clif_scriptinput), 554 }, +{ HP_POP(clif->scriptinputstr), HP_POP2(HP_clif_scriptinputstr), 556 }, +{ HP_POP(clif->cutin), HP_POP2(HP_clif_cutin), 558 }, +{ HP_POP(clif->sendfakenpc), HP_POP2(HP_clif_sendfakenpc), 560 }, +{ HP_POP(clif->scriptclear), HP_POP2(HP_clif_scriptclear), 562 }, +{ HP_POP(clif->viewpoint), HP_POP2(HP_clif_viewpoint), 564 }, +{ HP_POP(clif->damage), HP_POP2(HP_clif_damage), 566 }, +{ HP_POP(clif->sitting), HP_POP2(HP_clif_sitting), 568 }, +{ HP_POP(clif->standing), HP_POP2(HP_clif_standing), 570 }, +{ HP_POP(clif->arrow_create_list), HP_POP2(HP_clif_arrow_create_list), 572 }, +{ HP_POP(clif->refresh), HP_POP2(HP_clif_refresh), 574 }, +{ HP_POP(clif->fame_blacksmith), HP_POP2(HP_clif_fame_blacksmith), 576 }, +{ HP_POP(clif->fame_alchemist), HP_POP2(HP_clif_fame_alchemist), 578 }, +{ HP_POP(clif->fame_taekwon), HP_POP2(HP_clif_fame_taekwon), 580 }, +{ HP_POP(clif->ranklist), HP_POP2(HP_clif_ranklist), 582 }, +{ HP_POP(clif->update_rankingpoint), HP_POP2(HP_clif_update_rankingpoint), 584 }, +{ HP_POP(clif->pRanklist), HP_POP2(HP_clif_pRanklist), 586 }, +{ HP_POP(clif->hotkeys), HP_POP2(HP_clif_hotkeys), 588 }, +{ HP_POP(clif->insight), HP_POP2(HP_clif_insight), 590 }, +{ HP_POP(clif->outsight), HP_POP2(HP_clif_outsight), 592 }, +{ HP_POP(clif->skillcastcancel), HP_POP2(HP_clif_skillcastcancel), 594 }, +{ HP_POP(clif->skill_fail), HP_POP2(HP_clif_skill_fail), 596 }, +{ HP_POP(clif->skill_cooldown), HP_POP2(HP_clif_skill_cooldown), 598 }, +{ HP_POP(clif->skill_memomessage), HP_POP2(HP_clif_skill_memomessage), 600 }, +{ HP_POP(clif->skill_mapinfomessage), HP_POP2(HP_clif_skill_mapinfomessage), 602 }, +{ HP_POP(clif->skill_produce_mix_list), HP_POP2(HP_clif_skill_produce_mix_list), 604 }, +{ HP_POP(clif->cooking_list), HP_POP2(HP_clif_cooking_list), 606 }, +{ HP_POP(clif->autospell), HP_POP2(HP_clif_autospell), 608 }, +{ HP_POP(clif->combo_delay), HP_POP2(HP_clif_combo_delay), 610 }, +{ HP_POP(clif->status_change), HP_POP2(HP_clif_status_change), 612 }, +{ HP_POP(clif->insert_card), HP_POP2(HP_clif_insert_card), 614 }, +{ HP_POP(clif->inventorylist), HP_POP2(HP_clif_inventorylist), 616 }, +{ HP_POP(clif->equiplist), HP_POP2(HP_clif_equiplist), 618 }, +{ HP_POP(clif->cartlist), HP_POP2(HP_clif_cartlist), 620 }, +{ HP_POP(clif->favorite_item), HP_POP2(HP_clif_favorite_item), 622 }, +{ HP_POP(clif->clearcart), HP_POP2(HP_clif_clearcart), 624 }, +{ HP_POP(clif->item_identify_list), HP_POP2(HP_clif_item_identify_list), 626 }, +{ HP_POP(clif->item_identified), HP_POP2(HP_clif_item_identified), 628 }, +{ HP_POP(clif->item_repair_list), HP_POP2(HP_clif_item_repair_list), 630 }, +{ HP_POP(clif->item_repaireffect), HP_POP2(HP_clif_item_repaireffect), 632 }, +{ HP_POP(clif->item_damaged), HP_POP2(HP_clif_item_damaged), 634 }, +{ HP_POP(clif->item_refine_list), HP_POP2(HP_clif_item_refine_list), 636 }, +{ HP_POP(clif->item_skill), HP_POP2(HP_clif_item_skill), 638 }, +{ HP_POP(clif->mvp_item), HP_POP2(HP_clif_mvp_item), 640 }, +{ HP_POP(clif->mvp_exp), HP_POP2(HP_clif_mvp_exp), 642 }, +{ HP_POP(clif->mvp_noitem), HP_POP2(HP_clif_mvp_noitem), 644 }, +{ HP_POP(clif->changed_dir), HP_POP2(HP_clif_changed_dir), 646 }, +{ HP_POP(clif->charnameack), HP_POP2(HP_clif_charnameack), 648 }, +{ HP_POP(clif->monster_hp_bar), HP_POP2(HP_clif_monster_hp_bar), 650 }, +{ HP_POP(clif->hpmeter), HP_POP2(HP_clif_hpmeter), 652 }, +{ HP_POP(clif->hpmeter_single), HP_POP2(HP_clif_hpmeter_single), 654 }, +{ HP_POP(clif->hpmeter_sub), HP_POP2(HP_clif_hpmeter_sub), 656 }, +{ HP_POP(clif->upgrademessage), HP_POP2(HP_clif_upgrademessage), 658 }, +{ HP_POP(clif->get_weapon_view), HP_POP2(HP_clif_get_weapon_view), 660 }, +{ HP_POP(clif->gospel_info), HP_POP2(HP_clif_gospel_info), 662 }, +{ HP_POP(clif->feel_req), HP_POP2(HP_clif_feel_req), 664 }, +{ HP_POP(clif->starskill), HP_POP2(HP_clif_starskill), 666 }, +{ HP_POP(clif->feel_info), HP_POP2(HP_clif_feel_info), 668 }, +{ HP_POP(clif->hate_info), HP_POP2(HP_clif_hate_info), 670 }, +{ HP_POP(clif->mission_info), HP_POP2(HP_clif_mission_info), 672 }, +{ HP_POP(clif->feel_hate_reset), HP_POP2(HP_clif_feel_hate_reset), 674 }, +{ HP_POP(clif->partytickack), HP_POP2(HP_clif_partytickack), 676 }, +{ HP_POP(clif->equiptickack), HP_POP2(HP_clif_equiptickack), 678 }, +{ HP_POP(clif->viewequip_ack), HP_POP2(HP_clif_viewequip_ack), 680 }, +{ HP_POP(clif->viewequip_fail), HP_POP2(HP_clif_viewequip_fail), 682 }, +{ HP_POP(clif->equpcheckbox), HP_POP2(HP_clif_equpcheckbox), 684 }, +{ HP_POP(clif->displayexp), HP_POP2(HP_clif_displayexp), 686 }, +{ HP_POP(clif->font), HP_POP2(HP_clif_font), 688 }, +{ HP_POP(clif->progressbar), HP_POP2(HP_clif_progressbar), 690 }, +{ HP_POP(clif->progressbar_abort), HP_POP2(HP_clif_progressbar_abort), 692 }, +{ HP_POP(clif->showdigit), HP_POP2(HP_clif_showdigit), 694 }, +{ HP_POP(clif->elementalconverter_list), HP_POP2(HP_clif_elementalconverter_list), 696 }, +{ HP_POP(clif->spellbook_list), HP_POP2(HP_clif_spellbook_list), 698 }, +{ HP_POP(clif->magicdecoy_list), HP_POP2(HP_clif_magicdecoy_list), 700 }, +{ HP_POP(clif->poison_list), HP_POP2(HP_clif_poison_list), 702 }, +{ HP_POP(clif->autoshadowspell_list), HP_POP2(HP_clif_autoshadowspell_list), 704 }, +{ HP_POP(clif->skill_itemlistwindow), HP_POP2(HP_clif_skill_itemlistwindow), 706 }, +{ HP_POP(clif->sc_load), HP_POP2(HP_clif_sc_load), 708 }, +{ HP_POP(clif->sc_end), HP_POP2(HP_clif_sc_end), 710 }, +{ HP_POP(clif->initialstatus), HP_POP2(HP_clif_initialstatus), 712 }, +{ HP_POP(clif->cooldown_list), HP_POP2(HP_clif_cooldown_list), 714 }, +{ HP_POP(clif->updatestatus), HP_POP2(HP_clif_updatestatus), 716 }, +{ HP_POP(clif->changestatus), HP_POP2(HP_clif_changestatus), 718 }, +{ HP_POP(clif->statusupack), HP_POP2(HP_clif_statusupack), 720 }, +{ HP_POP(clif->movetoattack), HP_POP2(HP_clif_movetoattack), 722 }, +{ HP_POP(clif->solved_charname), HP_POP2(HP_clif_solved_charname), 724 }, +{ HP_POP(clif->charnameupdate), HP_POP2(HP_clif_charnameupdate), 726 }, +{ HP_POP(clif->delayquit), HP_POP2(HP_clif_delayquit), 728 }, +{ HP_POP(clif->getareachar_pc), HP_POP2(HP_clif_getareachar_pc), 730 }, +{ HP_POP(clif->disconnect_ack), HP_POP2(HP_clif_disconnect_ack), 732 }, +{ HP_POP(clif->PVPInfo), HP_POP2(HP_clif_PVPInfo), 734 }, +{ HP_POP(clif->blacksmith), HP_POP2(HP_clif_blacksmith), 736 }, +{ HP_POP(clif->alchemist), HP_POP2(HP_clif_alchemist), 738 }, +{ HP_POP(clif->taekwon), HP_POP2(HP_clif_taekwon), 740 }, +{ HP_POP(clif->ranking_pk), HP_POP2(HP_clif_ranking_pk), 742 }, +{ HP_POP(clif->quitsave), HP_POP2(HP_clif_quitsave), 744 }, +{ HP_POP(clif->misceffect), HP_POP2(HP_clif_misceffect), 746 }, +{ HP_POP(clif->changeoption), HP_POP2(HP_clif_changeoption), 748 }, +{ HP_POP(clif->changeoption2), HP_POP2(HP_clif_changeoption2), 750 }, +{ HP_POP(clif->emotion), HP_POP2(HP_clif_emotion), 752 }, +{ HP_POP(clif->talkiebox), HP_POP2(HP_clif_talkiebox), 754 }, +{ HP_POP(clif->wedding_effect), HP_POP2(HP_clif_wedding_effect), 756 }, +{ HP_POP(clif->divorced), HP_POP2(HP_clif_divorced), 758 }, +{ HP_POP(clif->callpartner), HP_POP2(HP_clif_callpartner), 760 }, +{ HP_POP(clif->skill_damage), HP_POP2(HP_clif_skill_damage), 762 }, +{ HP_POP(clif->skill_nodamage), HP_POP2(HP_clif_skill_nodamage), 764 }, +{ HP_POP(clif->skill_poseffect), HP_POP2(HP_clif_skill_poseffect), 766 }, +{ HP_POP(clif->skill_estimation), HP_POP2(HP_clif_skill_estimation), 768 }, +{ HP_POP(clif->skill_warppoint), HP_POP2(HP_clif_skill_warppoint), 770 }, +{ HP_POP(clif->skillcasting), HP_POP2(HP_clif_skillcasting), 772 }, +{ HP_POP(clif->produce_effect), HP_POP2(HP_clif_produce_effect), 774 }, +{ HP_POP(clif->devotion), HP_POP2(HP_clif_devotion), 776 }, +{ HP_POP(clif->spiritball), HP_POP2(HP_clif_spiritball), 778 }, +{ HP_POP(clif->spiritball_single), HP_POP2(HP_clif_spiritball_single), 780 }, +{ HP_POP(clif->bladestop), HP_POP2(HP_clif_bladestop), 782 }, +{ HP_POP(clif->mvp_effect), HP_POP2(HP_clif_mvp_effect), 784 }, +{ HP_POP(clif->heal), HP_POP2(HP_clif_heal), 786 }, +{ HP_POP(clif->resurrection), HP_POP2(HP_clif_resurrection), 788 }, +{ HP_POP(clif->refine), HP_POP2(HP_clif_refine), 790 }, +{ HP_POP(clif->weather), HP_POP2(HP_clif_weather), 792 }, +{ HP_POP(clif->specialeffect), HP_POP2(HP_clif_specialeffect), 794 }, +{ HP_POP(clif->specialeffect_single), HP_POP2(HP_clif_specialeffect_single), 796 }, +{ HP_POP(clif->specialeffect_value), HP_POP2(HP_clif_specialeffect_value), 798 }, +{ HP_POP(clif->millenniumshield), HP_POP2(HP_clif_millenniumshield), 800 }, +{ HP_POP(clif->charm), HP_POP2(HP_clif_charm), 802 }, +{ HP_POP(clif->charm_single), HP_POP2(HP_clif_charm_single), 804 }, +{ HP_POP(clif->snap), HP_POP2(HP_clif_snap), 806 }, +{ HP_POP(clif->weather_check), HP_POP2(HP_clif_weather_check), 808 }, +{ HP_POP(clif->playBGM), HP_POP2(HP_clif_playBGM), 810 }, +{ HP_POP(clif->soundeffect), HP_POP2(HP_clif_soundeffect), 812 }, +{ HP_POP(clif->soundeffectall), HP_POP2(HP_clif_soundeffectall), 814 }, +{ HP_POP(clif->GlobalMessage), HP_POP2(HP_clif_GlobalMessage), 816 }, +{ HP_POP(clif->createchat), HP_POP2(HP_clif_createchat), 818 }, +{ HP_POP(clif->dispchat), HP_POP2(HP_clif_dispchat), 820 }, +{ HP_POP(clif->joinchatfail), HP_POP2(HP_clif_joinchatfail), 822 }, +{ HP_POP(clif->joinchatok), HP_POP2(HP_clif_joinchatok), 824 }, +{ HP_POP(clif->addchat), HP_POP2(HP_clif_addchat), 826 }, +{ HP_POP(clif->changechatowner), HP_POP2(HP_clif_changechatowner), 828 }, +{ HP_POP(clif->clearchat), HP_POP2(HP_clif_clearchat), 830 }, +{ HP_POP(clif->leavechat), HP_POP2(HP_clif_leavechat), 832 }, +{ HP_POP(clif->changechatstatus), HP_POP2(HP_clif_changechatstatus), 834 }, +{ HP_POP(clif->wis_message), HP_POP2(HP_clif_wis_message), 836 }, +{ HP_POP(clif->wis_end), HP_POP2(HP_clif_wis_end), 838 }, +{ HP_POP(clif->disp_onlyself), HP_POP2(HP_clif_disp_onlyself), 840 }, +{ HP_POP(clif->disp_message), HP_POP2(HP_clif_disp_message), 842 }, +{ HP_POP(clif->broadcast), HP_POP2(HP_clif_broadcast), 844 }, +{ HP_POP(clif->broadcast2), HP_POP2(HP_clif_broadcast2), 846 }, +{ HP_POP(clif->messagecolor), HP_POP2(HP_clif_messagecolor), 848 }, +{ HP_POP(clif->disp_overhead), HP_POP2(HP_clif_disp_overhead), 850 }, +{ HP_POP(clif->msg), HP_POP2(HP_clif_msg), 852 }, +{ HP_POP(clif->msg_value), HP_POP2(HP_clif_msg_value), 854 }, +{ HP_POP(clif->msg_skill), HP_POP2(HP_clif_msg_skill), 856 }, +{ HP_POP(clif->msgtable), HP_POP2(HP_clif_msgtable), 858 }, +{ HP_POP(clif->msgtable_num), HP_POP2(HP_clif_msgtable_num), 860 }, +{ HP_POP(clif->message), HP_POP2(HP_clif_message), 862 }, +{ HP_POP(clif->messageln), HP_POP2(HP_clif_messageln), 864 }, +{ HP_POP(clif->colormes), HP_POP2(HP_clif_colormes), 866 }, +{ HP_POP(clif->process_message), HP_POP2(HP_clif_process_message), 868 }, +{ HP_POP(clif->wisexin), HP_POP2(HP_clif_wisexin), 870 }, +{ HP_POP(clif->wisall), HP_POP2(HP_clif_wisall), 872 }, +{ HP_POP(clif->PMIgnoreList), HP_POP2(HP_clif_PMIgnoreList), 874 }, +{ HP_POP(clif->traderequest), HP_POP2(HP_clif_traderequest), 876 }, +{ HP_POP(clif->tradestart), HP_POP2(HP_clif_tradestart), 878 }, +{ HP_POP(clif->tradeadditem), HP_POP2(HP_clif_tradeadditem), 880 }, +{ HP_POP(clif->tradeitemok), HP_POP2(HP_clif_tradeitemok), 882 }, +{ HP_POP(clif->tradedeal_lock), HP_POP2(HP_clif_tradedeal_lock), 884 }, +{ HP_POP(clif->tradecancelled), HP_POP2(HP_clif_tradecancelled), 886 }, +{ HP_POP(clif->tradecompleted), HP_POP2(HP_clif_tradecompleted), 888 }, +{ HP_POP(clif->tradeundo), HP_POP2(HP_clif_tradeundo), 890 }, +{ HP_POP(clif->openvendingreq), HP_POP2(HP_clif_openvendingreq), 892 }, +{ HP_POP(clif->showvendingboard), HP_POP2(HP_clif_showvendingboard), 894 }, +{ HP_POP(clif->closevendingboard), HP_POP2(HP_clif_closevendingboard), 896 }, +{ HP_POP(clif->vendinglist), HP_POP2(HP_clif_vendinglist), 898 }, +{ HP_POP(clif->buyvending), HP_POP2(HP_clif_buyvending), 900 }, +{ HP_POP(clif->openvending), HP_POP2(HP_clif_openvending), 902 }, +{ HP_POP(clif->vendingreport), HP_POP2(HP_clif_vendingreport), 904 }, +{ HP_POP(clif->storagelist), HP_POP2(HP_clif_storagelist), 906 }, +{ HP_POP(clif->updatestorageamount), HP_POP2(HP_clif_updatestorageamount), 908 }, +{ HP_POP(clif->storageitemadded), HP_POP2(HP_clif_storageitemadded), 910 }, +{ HP_POP(clif->storageitemremoved), HP_POP2(HP_clif_storageitemremoved), 912 }, +{ HP_POP(clif->storageclose), HP_POP2(HP_clif_storageclose), 914 }, +{ HP_POP(clif->skillinfoblock), HP_POP2(HP_clif_skillinfoblock), 916 }, +{ HP_POP(clif->skillup), HP_POP2(HP_clif_skillup), 918 }, +{ HP_POP(clif->skillinfo), HP_POP2(HP_clif_skillinfo), 920 }, +{ HP_POP(clif->addskill), HP_POP2(HP_clif_addskill), 922 }, +{ HP_POP(clif->deleteskill), HP_POP2(HP_clif_deleteskill), 924 }, +{ HP_POP(clif->party_created), HP_POP2(HP_clif_party_created), 926 }, +{ HP_POP(clif->party_member_info), HP_POP2(HP_clif_party_member_info), 928 }, +{ HP_POP(clif->party_info), HP_POP2(HP_clif_party_info), 930 }, +{ HP_POP(clif->party_invite), HP_POP2(HP_clif_party_invite), 932 }, +{ HP_POP(clif->party_inviteack), HP_POP2(HP_clif_party_inviteack), 934 }, +{ HP_POP(clif->party_option), HP_POP2(HP_clif_party_option), 936 }, +{ HP_POP(clif->party_withdraw), HP_POP2(HP_clif_party_withdraw), 938 }, +{ HP_POP(clif->party_message), HP_POP2(HP_clif_party_message), 940 }, +{ HP_POP(clif->party_xy), HP_POP2(HP_clif_party_xy), 942 }, +{ HP_POP(clif->party_xy_single), HP_POP2(HP_clif_party_xy_single), 944 }, +{ HP_POP(clif->party_hp), HP_POP2(HP_clif_party_hp), 946 }, +{ HP_POP(clif->party_xy_remove), HP_POP2(HP_clif_party_xy_remove), 948 }, +{ HP_POP(clif->party_show_picker), HP_POP2(HP_clif_party_show_picker), 950 }, +{ HP_POP(clif->partyinvitationstate), HP_POP2(HP_clif_partyinvitationstate), 952 }, +{ HP_POP(clif->guild_created), HP_POP2(HP_clif_guild_created), 954 }, +{ HP_POP(clif->guild_belonginfo), HP_POP2(HP_clif_guild_belonginfo), 956 }, +{ HP_POP(clif->guild_masterormember), HP_POP2(HP_clif_guild_masterormember), 958 }, +{ HP_POP(clif->guild_basicinfo), HP_POP2(HP_clif_guild_basicinfo), 960 }, +{ HP_POP(clif->guild_allianceinfo), HP_POP2(HP_clif_guild_allianceinfo), 962 }, +{ HP_POP(clif->guild_memberlist), HP_POP2(HP_clif_guild_memberlist), 964 }, +{ HP_POP(clif->guild_skillinfo), HP_POP2(HP_clif_guild_skillinfo), 966 }, +{ HP_POP(clif->guild_send_onlineinfo), HP_POP2(HP_clif_guild_send_onlineinfo), 968 }, +{ HP_POP(clif->guild_memberlogin_notice), HP_POP2(HP_clif_guild_memberlogin_notice), 970 }, +{ HP_POP(clif->guild_invite), HP_POP2(HP_clif_guild_invite), 972 }, +{ HP_POP(clif->guild_inviteack), HP_POP2(HP_clif_guild_inviteack), 974 }, +{ HP_POP(clif->guild_leave), HP_POP2(HP_clif_guild_leave), 976 }, +{ HP_POP(clif->guild_expulsion), HP_POP2(HP_clif_guild_expulsion), 978 }, +{ HP_POP(clif->guild_positionchanged), HP_POP2(HP_clif_guild_positionchanged), 980 }, +{ HP_POP(clif->guild_memberpositionchanged), HP_POP2(HP_clif_guild_memberpositionchanged), 982 }, +{ HP_POP(clif->guild_emblem), HP_POP2(HP_clif_guild_emblem), 984 }, +{ HP_POP(clif->guild_emblem_area), HP_POP2(HP_clif_guild_emblem_area), 986 }, +{ HP_POP(clif->guild_notice), HP_POP2(HP_clif_guild_notice), 988 }, +{ HP_POP(clif->guild_message), HP_POP2(HP_clif_guild_message), 990 }, +{ HP_POP(clif->guild_skillup), HP_POP2(HP_clif_guild_skillup), 992 }, +{ HP_POP(clif->guild_reqalliance), HP_POP2(HP_clif_guild_reqalliance), 994 }, +{ HP_POP(clif->guild_allianceack), HP_POP2(HP_clif_guild_allianceack), 996 }, +{ HP_POP(clif->guild_delalliance), HP_POP2(HP_clif_guild_delalliance), 998 }, +{ HP_POP(clif->guild_oppositionack), HP_POP2(HP_clif_guild_oppositionack), 1000 }, +{ HP_POP(clif->guild_broken), HP_POP2(HP_clif_guild_broken), 1002 }, +{ HP_POP(clif->guild_xy), HP_POP2(HP_clif_guild_xy), 1004 }, +{ HP_POP(clif->guild_xy_single), HP_POP2(HP_clif_guild_xy_single), 1006 }, +{ HP_POP(clif->guild_xy_remove), HP_POP2(HP_clif_guild_xy_remove), 1008 }, +{ HP_POP(clif->guild_positionnamelist), HP_POP2(HP_clif_guild_positionnamelist), 1010 }, +{ HP_POP(clif->guild_positioninfolist), HP_POP2(HP_clif_guild_positioninfolist), 1012 }, +{ HP_POP(clif->guild_expulsionlist), HP_POP2(HP_clif_guild_expulsionlist), 1014 }, +{ HP_POP(clif->validate_emblem), HP_POP2(HP_clif_validate_emblem), 1016 }, +{ HP_POP(clif->bg_hp), HP_POP2(HP_clif_bg_hp), 1018 }, +{ HP_POP(clif->bg_xy), HP_POP2(HP_clif_bg_xy), 1020 }, +{ HP_POP(clif->bg_xy_remove), HP_POP2(HP_clif_bg_xy_remove), 1022 }, +{ HP_POP(clif->bg_message), HP_POP2(HP_clif_bg_message), 1024 }, +{ HP_POP(clif->bg_updatescore), HP_POP2(HP_clif_bg_updatescore), 1026 }, +{ HP_POP(clif->bg_updatescore_single), HP_POP2(HP_clif_bg_updatescore_single), 1028 }, +{ HP_POP(clif->sendbgemblem_area), HP_POP2(HP_clif_sendbgemblem_area), 1030 }, +{ HP_POP(clif->sendbgemblem_single), HP_POP2(HP_clif_sendbgemblem_single), 1032 }, +{ HP_POP(clif->instance), HP_POP2(HP_clif_instance), 1034 }, +{ HP_POP(clif->instance_join), HP_POP2(HP_clif_instance_join), 1036 }, +{ HP_POP(clif->instance_leave), HP_POP2(HP_clif_instance_leave), 1038 }, +{ HP_POP(clif->catch_process), HP_POP2(HP_clif_catch_process), 1040 }, +{ HP_POP(clif->pet_roulette), HP_POP2(HP_clif_pet_roulette), 1042 }, +{ HP_POP(clif->sendegg), HP_POP2(HP_clif_sendegg), 1044 }, +{ HP_POP(clif->send_petstatus), HP_POP2(HP_clif_send_petstatus), 1046 }, +{ HP_POP(clif->send_petdata), HP_POP2(HP_clif_send_petdata), 1048 }, +{ HP_POP(clif->pet_emotion), HP_POP2(HP_clif_pet_emotion), 1050 }, +{ HP_POP(clif->pet_food), HP_POP2(HP_clif_pet_food), 1052 }, +{ HP_POP(clif->friendslist_toggle_sub), HP_POP2(HP_clif_friendslist_toggle_sub), 1054 }, +{ HP_POP(clif->friendslist_send), HP_POP2(HP_clif_friendslist_send), 1056 }, +{ HP_POP(clif->friendslist_reqack), HP_POP2(HP_clif_friendslist_reqack), 1058 }, +{ HP_POP(clif->friendslist_toggle), HP_POP2(HP_clif_friendslist_toggle), 1060 }, +{ HP_POP(clif->friendlist_req), HP_POP2(HP_clif_friendlist_req), 1062 }, +{ HP_POP(clif->GM_kickack), HP_POP2(HP_clif_GM_kickack), 1064 }, +{ HP_POP(clif->GM_kick), HP_POP2(HP_clif_GM_kick), 1066 }, +{ HP_POP(clif->manner_message), HP_POP2(HP_clif_manner_message), 1068 }, +{ HP_POP(clif->GM_silence), HP_POP2(HP_clif_GM_silence), 1070 }, +{ HP_POP(clif->account_name), HP_POP2(HP_clif_account_name), 1072 }, +{ HP_POP(clif->check), HP_POP2(HP_clif_check), 1074 }, +{ HP_POP(clif->hominfo), HP_POP2(HP_clif_hominfo), 1076 }, +{ HP_POP(clif->homskillinfoblock), HP_POP2(HP_clif_homskillinfoblock), 1078 }, +{ HP_POP(clif->homskillup), HP_POP2(HP_clif_homskillup), 1080 }, +{ HP_POP(clif->hom_food), HP_POP2(HP_clif_hom_food), 1082 }, +{ HP_POP(clif->send_homdata), HP_POP2(HP_clif_send_homdata), 1084 }, +{ HP_POP(clif->quest_send_list), HP_POP2(HP_clif_quest_send_list), 1086 }, +{ HP_POP(clif->quest_send_mission), HP_POP2(HP_clif_quest_send_mission), 1088 }, +{ HP_POP(clif->quest_add), HP_POP2(HP_clif_quest_add), 1090 }, +{ HP_POP(clif->quest_delete), HP_POP2(HP_clif_quest_delete), 1092 }, +{ HP_POP(clif->quest_update_status), HP_POP2(HP_clif_quest_update_status), 1094 }, +{ HP_POP(clif->quest_update_objective), HP_POP2(HP_clif_quest_update_objective), 1096 }, +{ HP_POP(clif->quest_show_event), HP_POP2(HP_clif_quest_show_event), 1098 }, +{ HP_POP(clif->mail_window), HP_POP2(HP_clif_mail_window), 1100 }, +{ HP_POP(clif->mail_read), HP_POP2(HP_clif_mail_read), 1102 }, +{ HP_POP(clif->mail_delete), HP_POP2(HP_clif_mail_delete), 1104 }, +{ HP_POP(clif->mail_return), HP_POP2(HP_clif_mail_return), 1106 }, +{ HP_POP(clif->mail_send), HP_POP2(HP_clif_mail_send), 1108 }, +{ HP_POP(clif->mail_new), HP_POP2(HP_clif_mail_new), 1110 }, +{ HP_POP(clif->mail_refreshinbox), HP_POP2(HP_clif_mail_refreshinbox), 1112 }, +{ HP_POP(clif->mail_getattachment), HP_POP2(HP_clif_mail_getattachment), 1114 }, +{ HP_POP(clif->mail_setattachment), HP_POP2(HP_clif_mail_setattachment), 1116 }, +{ HP_POP(clif->auction_openwindow), HP_POP2(HP_clif_auction_openwindow), 1118 }, +{ HP_POP(clif->auction_results), HP_POP2(HP_clif_auction_results), 1120 }, +{ HP_POP(clif->auction_message), HP_POP2(HP_clif_auction_message), 1122 }, +{ HP_POP(clif->auction_close), HP_POP2(HP_clif_auction_close), 1124 }, +{ HP_POP(clif->auction_setitem), HP_POP2(HP_clif_auction_setitem), 1126 }, +{ HP_POP(clif->mercenary_info), HP_POP2(HP_clif_mercenary_info), 1128 }, +{ HP_POP(clif->mercenary_skillblock), HP_POP2(HP_clif_mercenary_skillblock), 1130 }, +{ HP_POP(clif->mercenary_message), HP_POP2(HP_clif_mercenary_message), 1132 }, +{ HP_POP(clif->mercenary_updatestatus), HP_POP2(HP_clif_mercenary_updatestatus), 1134 }, +{ HP_POP(clif->rental_time), HP_POP2(HP_clif_rental_time), 1136 }, +{ HP_POP(clif->rental_expired), HP_POP2(HP_clif_rental_expired), 1138 }, +{ HP_POP(clif->PartyBookingRegisterAck), HP_POP2(HP_clif_PartyBookingRegisterAck), 1140 }, +{ HP_POP(clif->PartyBookingDeleteAck), HP_POP2(HP_clif_PartyBookingDeleteAck), 1142 }, +{ HP_POP(clif->PartyBookingSearchAck), HP_POP2(HP_clif_PartyBookingSearchAck), 1144 }, +{ HP_POP(clif->PartyBookingUpdateNotify), HP_POP2(HP_clif_PartyBookingUpdateNotify), 1146 }, +{ HP_POP(clif->PartyBookingDeleteNotify), HP_POP2(HP_clif_PartyBookingDeleteNotify), 1148 }, +{ HP_POP(clif->PartyBookingInsertNotify), HP_POP2(HP_clif_PartyBookingInsertNotify), 1150 }, +{ HP_POP(clif->PartyBookingVolunteerInfo), HP_POP2(HP_clif_PartyBookingVolunteerInfo), 1152 }, +{ HP_POP(clif->PartyBookingRefuseVolunteer), HP_POP2(HP_clif_PartyBookingRefuseVolunteer), 1154 }, +{ HP_POP(clif->PartyBookingCancelVolunteer), HP_POP2(HP_clif_PartyBookingCancelVolunteer), 1156 }, +{ HP_POP(clif->PartyBookingAddFilteringList), HP_POP2(HP_clif_PartyBookingAddFilteringList), 1158 }, +{ HP_POP(clif->PartyBookingSubFilteringList), HP_POP2(HP_clif_PartyBookingSubFilteringList), 1160 }, +{ HP_POP(clif->buyingstore_open), HP_POP2(HP_clif_buyingstore_open), 1162 }, +{ HP_POP(clif->buyingstore_open_failed), HP_POP2(HP_clif_buyingstore_open_failed), 1164 }, +{ HP_POP(clif->buyingstore_myitemlist), HP_POP2(HP_clif_buyingstore_myitemlist), 1166 }, +{ HP_POP(clif->buyingstore_entry), HP_POP2(HP_clif_buyingstore_entry), 1168 }, +{ HP_POP(clif->buyingstore_entry_single), HP_POP2(HP_clif_buyingstore_entry_single), 1170 }, +{ HP_POP(clif->buyingstore_disappear_entry), HP_POP2(HP_clif_buyingstore_disappear_entry), 1172 }, +{ HP_POP(clif->buyingstore_disappear_entry_single), HP_POP2(HP_clif_buyingstore_disappear_entry_single), 1174 }, +{ HP_POP(clif->buyingstore_itemlist), HP_POP2(HP_clif_buyingstore_itemlist), 1176 }, +{ HP_POP(clif->buyingstore_trade_failed_buyer), HP_POP2(HP_clif_buyingstore_trade_failed_buyer), 1178 }, +{ HP_POP(clif->buyingstore_update_item), HP_POP2(HP_clif_buyingstore_update_item), 1180 }, +{ HP_POP(clif->buyingstore_delete_item), HP_POP2(HP_clif_buyingstore_delete_item), 1182 }, +{ HP_POP(clif->buyingstore_trade_failed_seller), HP_POP2(HP_clif_buyingstore_trade_failed_seller), 1184 }, +{ HP_POP(clif->search_store_info_ack), HP_POP2(HP_clif_search_store_info_ack), 1186 }, +{ HP_POP(clif->search_store_info_failed), HP_POP2(HP_clif_search_store_info_failed), 1188 }, +{ HP_POP(clif->open_search_store_info), HP_POP2(HP_clif_open_search_store_info), 1190 }, +{ HP_POP(clif->search_store_info_click_ack), HP_POP2(HP_clif_search_store_info_click_ack), 1192 }, +{ HP_POP(clif->elemental_info), HP_POP2(HP_clif_elemental_info), 1194 }, +{ HP_POP(clif->elemental_updatestatus), HP_POP2(HP_clif_elemental_updatestatus), 1196 }, +{ HP_POP(clif->bgqueue_ack), HP_POP2(HP_clif_bgqueue_ack), 1198 }, +{ HP_POP(clif->bgqueue_notice_delete), HP_POP2(HP_clif_bgqueue_notice_delete), 1200 }, +{ HP_POP(clif->bgqueue_update_info), HP_POP2(HP_clif_bgqueue_update_info), 1202 }, +{ HP_POP(clif->bgqueue_joined), HP_POP2(HP_clif_bgqueue_joined), 1204 }, +{ HP_POP(clif->bgqueue_pcleft), HP_POP2(HP_clif_bgqueue_pcleft), 1206 }, +{ HP_POP(clif->bgqueue_battlebegins), HP_POP2(HP_clif_bgqueue_battlebegins), 1208 }, +{ HP_POP(clif->adopt_reply), HP_POP2(HP_clif_adopt_reply), 1210 }, +{ HP_POP(clif->adopt_request), HP_POP2(HP_clif_adopt_request), 1212 }, +{ HP_POP(clif->readbook), HP_POP2(HP_clif_readbook), 1214 }, +{ HP_POP(clif->notify_time), HP_POP2(HP_clif_notify_time), 1216 }, +{ HP_POP(clif->user_count), HP_POP2(HP_clif_user_count), 1218 }, +{ HP_POP(clif->noask_sub), HP_POP2(HP_clif_noask_sub), 1220 }, +{ HP_POP(clif->bc_ready), HP_POP2(HP_clif_bc_ready), 1222 }, +{ HP_POP(clif->undisguise_timer), HP_POP2(HP_clif_undisguise_timer), 1224 }, +{ HP_POP(clif->chsys_create), HP_POP2(HP_clif_chsys_create), 1226 }, +{ HP_POP(clif->chsys_msg), HP_POP2(HP_clif_chsys_msg), 1228 }, +{ HP_POP(clif->chsys_msg2), HP_POP2(HP_clif_chsys_msg2), 1230 }, +{ HP_POP(clif->chsys_send), HP_POP2(HP_clif_chsys_send), 1232 }, +{ HP_POP(clif->chsys_join), HP_POP2(HP_clif_chsys_join), 1234 }, +{ HP_POP(clif->chsys_left), HP_POP2(HP_clif_chsys_left), 1236 }, +{ HP_POP(clif->chsys_delete), HP_POP2(HP_clif_chsys_delete), 1238 }, +{ HP_POP(clif->chsys_mjoin), HP_POP2(HP_clif_chsys_mjoin), 1240 }, +{ HP_POP(clif->chsys_quit), HP_POP2(HP_clif_chsys_quit), 1242 }, +{ HP_POP(clif->chsys_quitg), HP_POP2(HP_clif_chsys_quitg), 1244 }, +{ HP_POP(clif->chsys_gjoin), HP_POP2(HP_clif_chsys_gjoin), 1246 }, +{ HP_POP(clif->chsys_gleave), HP_POP2(HP_clif_chsys_gleave), 1248 }, +{ HP_POP(clif->pWantToConnection), HP_POP2(HP_clif_pWantToConnection), 1250 }, +{ HP_POP(clif->pLoadEndAck), HP_POP2(HP_clif_pLoadEndAck), 1252 }, +{ HP_POP(clif->pTickSend), HP_POP2(HP_clif_pTickSend), 1254 }, +{ HP_POP(clif->pHotkey), HP_POP2(HP_clif_pHotkey), 1256 }, +{ HP_POP(clif->pProgressbar), HP_POP2(HP_clif_pProgressbar), 1258 }, +{ HP_POP(clif->pWalkToXY), HP_POP2(HP_clif_pWalkToXY), 1260 }, +{ HP_POP(clif->pQuitGame), HP_POP2(HP_clif_pQuitGame), 1262 }, +{ HP_POP(clif->pGetCharNameRequest), HP_POP2(HP_clif_pGetCharNameRequest), 1264 }, +{ HP_POP(clif->pGlobalMessage), HP_POP2(HP_clif_pGlobalMessage), 1266 }, +{ HP_POP(clif->pMapMove), HP_POP2(HP_clif_pMapMove), 1268 }, +{ HP_POP(clif->pChangeDir), HP_POP2(HP_clif_pChangeDir), 1270 }, +{ HP_POP(clif->pEmotion), HP_POP2(HP_clif_pEmotion), 1272 }, +{ HP_POP(clif->pHowManyConnections), HP_POP2(HP_clif_pHowManyConnections), 1274 }, +{ HP_POP(clif->pActionRequest), HP_POP2(HP_clif_pActionRequest), 1276 }, +{ HP_POP(clif->pActionRequest_sub), HP_POP2(HP_clif_pActionRequest_sub), 1278 }, +{ HP_POP(clif->pRestart), HP_POP2(HP_clif_pRestart), 1280 }, +{ HP_POP(clif->pWisMessage), HP_POP2(HP_clif_pWisMessage), 1282 }, +{ HP_POP(clif->pBroadcast), HP_POP2(HP_clif_pBroadcast), 1284 }, +{ HP_POP(clif->pTakeItem), HP_POP2(HP_clif_pTakeItem), 1286 }, +{ HP_POP(clif->pDropItem), HP_POP2(HP_clif_pDropItem), 1288 }, +{ HP_POP(clif->pUseItem), HP_POP2(HP_clif_pUseItem), 1290 }, +{ HP_POP(clif->pEquipItem), HP_POP2(HP_clif_pEquipItem), 1292 }, +{ HP_POP(clif->pUnequipItem), HP_POP2(HP_clif_pUnequipItem), 1294 }, +{ HP_POP(clif->pNpcClicked), HP_POP2(HP_clif_pNpcClicked), 1296 }, +{ HP_POP(clif->pNpcBuySellSelected), HP_POP2(HP_clif_pNpcBuySellSelected), 1298 }, +{ HP_POP(clif->pNpcBuyListSend), HP_POP2(HP_clif_pNpcBuyListSend), 1300 }, +{ HP_POP(clif->pNpcSellListSend), HP_POP2(HP_clif_pNpcSellListSend), 1302 }, +{ HP_POP(clif->pCreateChatRoom), HP_POP2(HP_clif_pCreateChatRoom), 1304 }, +{ HP_POP(clif->pChatAddMember), HP_POP2(HP_clif_pChatAddMember), 1306 }, +{ HP_POP(clif->pChatRoomStatusChange), HP_POP2(HP_clif_pChatRoomStatusChange), 1308 }, +{ HP_POP(clif->pChangeChatOwner), HP_POP2(HP_clif_pChangeChatOwner), 1310 }, +{ HP_POP(clif->pKickFromChat), HP_POP2(HP_clif_pKickFromChat), 1312 }, +{ HP_POP(clif->pChatLeave), HP_POP2(HP_clif_pChatLeave), 1314 }, +{ HP_POP(clif->pTradeRequest), HP_POP2(HP_clif_pTradeRequest), 1316 }, +{ HP_POP(clif->chann_config_read), HP_POP2(HP_clif_chann_config_read), 1318 }, +{ HP_POP(clif->pTradeAck), HP_POP2(HP_clif_pTradeAck), 1320 }, +{ HP_POP(clif->pTradeAddItem), HP_POP2(HP_clif_pTradeAddItem), 1322 }, +{ HP_POP(clif->pTradeOk), HP_POP2(HP_clif_pTradeOk), 1324 }, +{ HP_POP(clif->pTradeCancel), HP_POP2(HP_clif_pTradeCancel), 1326 }, +{ HP_POP(clif->pTradeCommit), HP_POP2(HP_clif_pTradeCommit), 1328 }, +{ HP_POP(clif->pStopAttack), HP_POP2(HP_clif_pStopAttack), 1330 }, +{ HP_POP(clif->pPutItemToCart), HP_POP2(HP_clif_pPutItemToCart), 1332 }, +{ HP_POP(clif->pGetItemFromCart), HP_POP2(HP_clif_pGetItemFromCart), 1334 }, +{ HP_POP(clif->pRemoveOption), HP_POP2(HP_clif_pRemoveOption), 1336 }, +{ HP_POP(clif->pChangeCart), HP_POP2(HP_clif_pChangeCart), 1338 }, +{ HP_POP(clif->pStatusUp), HP_POP2(HP_clif_pStatusUp), 1340 }, +{ HP_POP(clif->pSkillUp), HP_POP2(HP_clif_pSkillUp), 1342 }, +{ HP_POP(clif->pUseSkillToId), HP_POP2(HP_clif_pUseSkillToId), 1344 }, +{ HP_POP(clif->pUseSkillToId_homun), HP_POP2(HP_clif_pUseSkillToId_homun), 1346 }, +{ HP_POP(clif->pUseSkillToId_mercenary), HP_POP2(HP_clif_pUseSkillToId_mercenary), 1348 }, +{ HP_POP(clif->pUseSkillToPos), HP_POP2(HP_clif_pUseSkillToPos), 1350 }, +{ HP_POP(clif->pUseSkillToPosSub), HP_POP2(HP_clif_pUseSkillToPosSub), 1352 }, +{ HP_POP(clif->pUseSkillToPos_homun), HP_POP2(HP_clif_pUseSkillToPos_homun), 1354 }, +{ HP_POP(clif->pUseSkillToPos_mercenary), HP_POP2(HP_clif_pUseSkillToPos_mercenary), 1356 }, +{ HP_POP(clif->pUseSkillToPosMoreInfo), HP_POP2(HP_clif_pUseSkillToPosMoreInfo), 1358 }, +{ HP_POP(clif->pUseSkillMap), HP_POP2(HP_clif_pUseSkillMap), 1360 }, +{ HP_POP(clif->pRequestMemo), HP_POP2(HP_clif_pRequestMemo), 1362 }, +{ HP_POP(clif->pProduceMix), HP_POP2(HP_clif_pProduceMix), 1364 }, +{ HP_POP(clif->pCooking), HP_POP2(HP_clif_pCooking), 1366 }, +{ HP_POP(clif->pRepairItem), HP_POP2(HP_clif_pRepairItem), 1368 }, +{ HP_POP(clif->pWeaponRefine), HP_POP2(HP_clif_pWeaponRefine), 1370 }, +{ HP_POP(clif->pNpcSelectMenu), HP_POP2(HP_clif_pNpcSelectMenu), 1372 }, +{ HP_POP(clif->pNpcNextClicked), HP_POP2(HP_clif_pNpcNextClicked), 1374 }, +{ HP_POP(clif->pNpcAmountInput), HP_POP2(HP_clif_pNpcAmountInput), 1376 }, +{ HP_POP(clif->pNpcStringInput), HP_POP2(HP_clif_pNpcStringInput), 1378 }, +{ HP_POP(clif->pNpcCloseClicked), HP_POP2(HP_clif_pNpcCloseClicked), 1380 }, +{ HP_POP(clif->pItemIdentify), HP_POP2(HP_clif_pItemIdentify), 1382 }, +{ HP_POP(clif->pSelectArrow), HP_POP2(HP_clif_pSelectArrow), 1384 }, +{ HP_POP(clif->pAutoSpell), HP_POP2(HP_clif_pAutoSpell), 1386 }, +{ HP_POP(clif->pUseCard), HP_POP2(HP_clif_pUseCard), 1388 }, +{ HP_POP(clif->pInsertCard), HP_POP2(HP_clif_pInsertCard), 1390 }, +{ HP_POP(clif->pSolveCharName), HP_POP2(HP_clif_pSolveCharName), 1392 }, +{ HP_POP(clif->pResetChar), HP_POP2(HP_clif_pResetChar), 1394 }, +{ HP_POP(clif->pLocalBroadcast), HP_POP2(HP_clif_pLocalBroadcast), 1396 }, +{ HP_POP(clif->pMoveToKafra), HP_POP2(HP_clif_pMoveToKafra), 1398 }, +{ HP_POP(clif->pMoveFromKafra), HP_POP2(HP_clif_pMoveFromKafra), 1400 }, +{ HP_POP(clif->pMoveToKafraFromCart), HP_POP2(HP_clif_pMoveToKafraFromCart), 1402 }, +{ HP_POP(clif->pMoveFromKafraToCart), HP_POP2(HP_clif_pMoveFromKafraToCart), 1404 }, +{ HP_POP(clif->pCloseKafra), HP_POP2(HP_clif_pCloseKafra), 1406 }, +{ HP_POP(clif->pStoragePassword), HP_POP2(HP_clif_pStoragePassword), 1408 }, +{ HP_POP(clif->pCreateParty), HP_POP2(HP_clif_pCreateParty), 1410 }, +{ HP_POP(clif->pCreateParty2), HP_POP2(HP_clif_pCreateParty2), 1412 }, +{ HP_POP(clif->pPartyInvite), HP_POP2(HP_clif_pPartyInvite), 1414 }, +{ HP_POP(clif->pPartyInvite2), HP_POP2(HP_clif_pPartyInvite2), 1416 }, +{ HP_POP(clif->pReplyPartyInvite), HP_POP2(HP_clif_pReplyPartyInvite), 1418 }, +{ HP_POP(clif->pReplyPartyInvite2), HP_POP2(HP_clif_pReplyPartyInvite2), 1420 }, +{ HP_POP(clif->pLeaveParty), HP_POP2(HP_clif_pLeaveParty), 1422 }, +{ HP_POP(clif->pRemovePartyMember), HP_POP2(HP_clif_pRemovePartyMember), 1424 }, +{ HP_POP(clif->pPartyChangeOption), HP_POP2(HP_clif_pPartyChangeOption), 1426 }, +{ HP_POP(clif->pPartyMessage), HP_POP2(HP_clif_pPartyMessage), 1428 }, +{ HP_POP(clif->pPartyChangeLeader), HP_POP2(HP_clif_pPartyChangeLeader), 1430 }, +{ HP_POP(clif->pPartyBookingRegisterReq), HP_POP2(HP_clif_pPartyBookingRegisterReq), 1432 }, +{ HP_POP(clif->pPartyBookingSearchReq), HP_POP2(HP_clif_pPartyBookingSearchReq), 1434 }, +{ HP_POP(clif->pPartyBookingDeleteReq), HP_POP2(HP_clif_pPartyBookingDeleteReq), 1436 }, +{ HP_POP(clif->pPartyBookingUpdateReq), HP_POP2(HP_clif_pPartyBookingUpdateReq), 1438 }, +{ HP_POP(clif->pCloseVending), HP_POP2(HP_clif_pCloseVending), 1440 }, +{ HP_POP(clif->pVendingListReq), HP_POP2(HP_clif_pVendingListReq), 1442 }, +{ HP_POP(clif->pPurchaseReq), HP_POP2(HP_clif_pPurchaseReq), 1444 }, +{ HP_POP(clif->pPurchaseReq2), HP_POP2(HP_clif_pPurchaseReq2), 1446 }, +{ HP_POP(clif->pOpenVending), HP_POP2(HP_clif_pOpenVending), 1448 }, +{ HP_POP(clif->pCreateGuild), HP_POP2(HP_clif_pCreateGuild), 1450 }, +{ HP_POP(clif->pGuildCheckMaster), HP_POP2(HP_clif_pGuildCheckMaster), 1452 }, +{ HP_POP(clif->pGuildRequestInfo), HP_POP2(HP_clif_pGuildRequestInfo), 1454 }, +{ HP_POP(clif->pGuildChangePositionInfo), HP_POP2(HP_clif_pGuildChangePositionInfo), 1456 }, +{ HP_POP(clif->pGuildChangeMemberPosition), HP_POP2(HP_clif_pGuildChangeMemberPosition), 1458 }, +{ HP_POP(clif->pGuildRequestEmblem), HP_POP2(HP_clif_pGuildRequestEmblem), 1460 }, +{ HP_POP(clif->pGuildChangeEmblem), HP_POP2(HP_clif_pGuildChangeEmblem), 1462 }, +{ HP_POP(clif->pGuildChangeNotice), HP_POP2(HP_clif_pGuildChangeNotice), 1464 }, +{ HP_POP(clif->pGuildInvite), HP_POP2(HP_clif_pGuildInvite), 1466 }, +{ HP_POP(clif->pGuildReplyInvite), HP_POP2(HP_clif_pGuildReplyInvite), 1468 }, +{ HP_POP(clif->pGuildLeave), HP_POP2(HP_clif_pGuildLeave), 1470 }, +{ HP_POP(clif->pGuildExpulsion), HP_POP2(HP_clif_pGuildExpulsion), 1472 }, +{ HP_POP(clif->pGuildMessage), HP_POP2(HP_clif_pGuildMessage), 1474 }, +{ HP_POP(clif->pGuildRequestAlliance), HP_POP2(HP_clif_pGuildRequestAlliance), 1476 }, +{ HP_POP(clif->pGuildReplyAlliance), HP_POP2(HP_clif_pGuildReplyAlliance), 1478 }, +{ HP_POP(clif->pGuildDelAlliance), HP_POP2(HP_clif_pGuildDelAlliance), 1480 }, +{ HP_POP(clif->pGuildOpposition), HP_POP2(HP_clif_pGuildOpposition), 1482 }, +{ HP_POP(clif->pGuildBreak), HP_POP2(HP_clif_pGuildBreak), 1484 }, +{ HP_POP(clif->pPetMenu), HP_POP2(HP_clif_pPetMenu), 1486 }, +{ HP_POP(clif->pCatchPet), HP_POP2(HP_clif_pCatchPet), 1488 }, +{ HP_POP(clif->pSelectEgg), HP_POP2(HP_clif_pSelectEgg), 1490 }, +{ HP_POP(clif->pSendEmotion), HP_POP2(HP_clif_pSendEmotion), 1492 }, +{ HP_POP(clif->pChangePetName), HP_POP2(HP_clif_pChangePetName), 1494 }, +{ HP_POP(clif->pGMKick), HP_POP2(HP_clif_pGMKick), 1496 }, +{ HP_POP(clif->pGMKickAll), HP_POP2(HP_clif_pGMKickAll), 1498 }, +{ HP_POP(clif->pGMShift), HP_POP2(HP_clif_pGMShift), 1500 }, +{ HP_POP(clif->pGMRemove2), HP_POP2(HP_clif_pGMRemove2), 1502 }, +{ HP_POP(clif->pGMRecall), HP_POP2(HP_clif_pGMRecall), 1504 }, +{ HP_POP(clif->pGMRecall2), HP_POP2(HP_clif_pGMRecall2), 1506 }, +{ HP_POP(clif->pGM_Monster_Item), HP_POP2(HP_clif_pGM_Monster_Item), 1508 }, +{ HP_POP(clif->pGMHide), HP_POP2(HP_clif_pGMHide), 1510 }, +{ HP_POP(clif->pGMReqNoChat), HP_POP2(HP_clif_pGMReqNoChat), 1512 }, +{ HP_POP(clif->pGMRc), HP_POP2(HP_clif_pGMRc), 1514 }, +{ HP_POP(clif->pGMReqAccountName), HP_POP2(HP_clif_pGMReqAccountName), 1516 }, +{ HP_POP(clif->pGMChangeMapType), HP_POP2(HP_clif_pGMChangeMapType), 1518 }, +{ HP_POP(clif->pPMIgnore), HP_POP2(HP_clif_pPMIgnore), 1520 }, +{ HP_POP(clif->pPMIgnoreAll), HP_POP2(HP_clif_pPMIgnoreAll), 1522 }, +{ HP_POP(clif->pPMIgnoreList), HP_POP2(HP_clif_pPMIgnoreList), 1524 }, +{ HP_POP(clif->pNoviceDoriDori), HP_POP2(HP_clif_pNoviceDoriDori), 1526 }, +{ HP_POP(clif->pNoviceExplosionSpirits), HP_POP2(HP_clif_pNoviceExplosionSpirits), 1528 }, +{ HP_POP(clif->pFriendsListAdd), HP_POP2(HP_clif_pFriendsListAdd), 1530 }, +{ HP_POP(clif->pFriendsListReply), HP_POP2(HP_clif_pFriendsListReply), 1532 }, +{ HP_POP(clif->pFriendsListRemove), HP_POP2(HP_clif_pFriendsListRemove), 1534 }, +{ HP_POP(clif->pPVPInfo), HP_POP2(HP_clif_pPVPInfo), 1536 }, +{ HP_POP(clif->pBlacksmith), HP_POP2(HP_clif_pBlacksmith), 1538 }, +{ HP_POP(clif->pAlchemist), HP_POP2(HP_clif_pAlchemist), 1540 }, +{ HP_POP(clif->pTaekwon), HP_POP2(HP_clif_pTaekwon), 1542 }, +{ HP_POP(clif->pRankingPk), HP_POP2(HP_clif_pRankingPk), 1544 }, +{ HP_POP(clif->pFeelSaveOk), HP_POP2(HP_clif_pFeelSaveOk), 1546 }, +{ HP_POP(clif->pChangeHomunculusName), HP_POP2(HP_clif_pChangeHomunculusName), 1548 }, +{ HP_POP(clif->pHomMoveToMaster), HP_POP2(HP_clif_pHomMoveToMaster), 1550 }, +{ HP_POP(clif->pHomMoveTo), HP_POP2(HP_clif_pHomMoveTo), 1552 }, +{ HP_POP(clif->pHomAttack), HP_POP2(HP_clif_pHomAttack), 1554 }, +{ HP_POP(clif->pHomMenu), HP_POP2(HP_clif_pHomMenu), 1556 }, +{ HP_POP(clif->pAutoRevive), HP_POP2(HP_clif_pAutoRevive), 1558 }, +{ HP_POP(clif->pCheck), HP_POP2(HP_clif_pCheck), 1560 }, +{ HP_POP(clif->pMail_refreshinbox), HP_POP2(HP_clif_pMail_refreshinbox), 1562 }, +{ HP_POP(clif->pMail_read), HP_POP2(HP_clif_pMail_read), 1564 }, +{ HP_POP(clif->pMail_getattach), HP_POP2(HP_clif_pMail_getattach), 1566 }, +{ HP_POP(clif->pMail_delete), HP_POP2(HP_clif_pMail_delete), 1568 }, +{ HP_POP(clif->pMail_return), HP_POP2(HP_clif_pMail_return), 1570 }, +{ HP_POP(clif->pMail_setattach), HP_POP2(HP_clif_pMail_setattach), 1572 }, +{ HP_POP(clif->pMail_winopen), HP_POP2(HP_clif_pMail_winopen), 1574 }, +{ HP_POP(clif->pMail_send), HP_POP2(HP_clif_pMail_send), 1576 }, +{ HP_POP(clif->pAuction_cancelreg), HP_POP2(HP_clif_pAuction_cancelreg), 1578 }, +{ HP_POP(clif->pAuction_setitem), HP_POP2(HP_clif_pAuction_setitem), 1580 }, +{ HP_POP(clif->pAuction_register), HP_POP2(HP_clif_pAuction_register), 1582 }, +{ HP_POP(clif->pAuction_cancel), HP_POP2(HP_clif_pAuction_cancel), 1584 }, +{ HP_POP(clif->pAuction_close), HP_POP2(HP_clif_pAuction_close), 1586 }, +{ HP_POP(clif->pAuction_bid), HP_POP2(HP_clif_pAuction_bid), 1588 }, +{ HP_POP(clif->pAuction_search), HP_POP2(HP_clif_pAuction_search), 1590 }, +{ HP_POP(clif->pAuction_buysell), HP_POP2(HP_clif_pAuction_buysell), 1592 }, +{ HP_POP(clif->pcashshop_buy), HP_POP2(HP_clif_pcashshop_buy), 1594 }, +{ HP_POP(clif->pAdopt_request), HP_POP2(HP_clif_pAdopt_request), 1596 }, +{ HP_POP(clif->pAdopt_reply), HP_POP2(HP_clif_pAdopt_reply), 1598 }, +{ HP_POP(clif->pViewPlayerEquip), HP_POP2(HP_clif_pViewPlayerEquip), 1600 }, +{ HP_POP(clif->pEquipTick), HP_POP2(HP_clif_pEquipTick), 1602 }, +{ HP_POP(clif->pquestStateAck), HP_POP2(HP_clif_pquestStateAck), 1604 }, +{ HP_POP(clif->pmercenary_action), HP_POP2(HP_clif_pmercenary_action), 1606 }, +{ HP_POP(clif->pBattleChat), HP_POP2(HP_clif_pBattleChat), 1608 }, +{ HP_POP(clif->pLessEffect), HP_POP2(HP_clif_pLessEffect), 1610 }, +{ HP_POP(clif->pItemListWindowSelected), HP_POP2(HP_clif_pItemListWindowSelected), 1612 }, +{ HP_POP(clif->pReqOpenBuyingStore), HP_POP2(HP_clif_pReqOpenBuyingStore), 1614 }, +{ HP_POP(clif->pReqCloseBuyingStore), HP_POP2(HP_clif_pReqCloseBuyingStore), 1616 }, +{ HP_POP(clif->pReqClickBuyingStore), HP_POP2(HP_clif_pReqClickBuyingStore), 1618 }, +{ HP_POP(clif->pReqTradeBuyingStore), HP_POP2(HP_clif_pReqTradeBuyingStore), 1620 }, +{ HP_POP(clif->pSearchStoreInfo), HP_POP2(HP_clif_pSearchStoreInfo), 1622 }, +{ HP_POP(clif->pSearchStoreInfoNextPage), HP_POP2(HP_clif_pSearchStoreInfoNextPage), 1624 }, +{ HP_POP(clif->pCloseSearchStoreInfo), HP_POP2(HP_clif_pCloseSearchStoreInfo), 1626 }, +{ HP_POP(clif->pSearchStoreInfoListItemClick), HP_POP2(HP_clif_pSearchStoreInfoListItemClick), 1628 }, +{ HP_POP(clif->pDebug), HP_POP2(HP_clif_pDebug), 1630 }, +{ HP_POP(clif->pSkillSelectMenu), HP_POP2(HP_clif_pSkillSelectMenu), 1632 }, +{ HP_POP(clif->pMoveItem), HP_POP2(HP_clif_pMoveItem), 1634 }, +{ HP_POP(clif->pDull), HP_POP2(HP_clif_pDull), 1636 }, +{ HP_POP(clif->pBGQueueRegister), HP_POP2(HP_clif_pBGQueueRegister), 1638 }, +{ HP_POP(clif->pBGQueueCheckState), HP_POP2(HP_clif_pBGQueueCheckState), 1640 }, +{ HP_POP(clif->pBGQueueRevokeReq), HP_POP2(HP_clif_pBGQueueRevokeReq), 1642 }, +{ HP_POP(clif->pBGQueueBattleBeginAck), HP_POP2(HP_clif_pBGQueueBattleBeginAck), 1644 }, +{ HP_POP(clif->pCashShopOpen), HP_POP2(HP_clif_pCashShopOpen), 1646 }, +{ HP_POP(clif->pCashShopClose), HP_POP2(HP_clif_pCashShopClose), 1648 }, +{ HP_POP(clif->pCashShopReqTab), HP_POP2(HP_clif_pCashShopReqTab), 1650 }, +{ HP_POP(clif->pCashShopSchedule), HP_POP2(HP_clif_pCashShopSchedule), 1652 }, +{ HP_POP(clif->pCashShopBuy), HP_POP2(HP_clif_pCashShopBuy), 1654 }, +{ HP_POP(clif->pPartyTick), HP_POP2(HP_clif_pPartyTick), 1656 }, +{ HP_POP(clif->pGuildInvite2), HP_POP2(HP_clif_pGuildInvite2), 1658 }, +{ HP_POP(clif->pPartyBookingAddFilter), HP_POP2(HP_clif_pPartyBookingAddFilter), 1660 }, +{ HP_POP(clif->pPartyBookingSubFilter), HP_POP2(HP_clif_pPartyBookingSubFilter), 1662 }, +{ HP_POP(clif->pPartyBookingReqVolunteer), HP_POP2(HP_clif_pPartyBookingReqVolunteer), 1664 }, +{ HP_POP(clif->pPartyBookingRefuseVolunteer), HP_POP2(HP_clif_pPartyBookingRefuseVolunteer), 1666 }, +{ HP_POP(clif->pPartyBookingCancelVolunteer), HP_POP2(HP_clif_pPartyBookingCancelVolunteer), 1668 }, +/* duel */ +{ HP_POP(duel->create), HP_POP2(HP_duel_create), 1670 }, +{ HP_POP(duel->invite), HP_POP2(HP_duel_invite), 1672 }, +{ HP_POP(duel->accept), HP_POP2(HP_duel_accept), 1674 }, +{ HP_POP(duel->reject), HP_POP2(HP_duel_reject), 1676 }, +{ HP_POP(duel->leave), HP_POP2(HP_duel_leave), 1678 }, +{ HP_POP(duel->showinfo), HP_POP2(HP_duel_showinfo), 1680 }, +{ HP_POP(duel->checktime), HP_POP2(HP_duel_checktime), 1682 }, +{ HP_POP(duel->init), HP_POP2(HP_duel_init), 1684 }, +{ HP_POP(duel->final), HP_POP2(HP_duel_final), 1686 }, +/* elemental */ +{ HP_POP(elemental->init), HP_POP2(HP_elemental_init), 1688 }, +{ HP_POP(elemental->final), HP_POP2(HP_elemental_final), 1690 }, +{ HP_POP(elemental->class), HP_POP2(HP_elemental_class), 1692 }, +{ HP_POP(elemental->get_viewdata), HP_POP2(HP_elemental_get_viewdata), 1694 }, +{ HP_POP(elemental->create), HP_POP2(HP_elemental_create), 1696 }, +{ HP_POP(elemental->data_received), HP_POP2(HP_elemental_data_received), 1698 }, +{ HP_POP(elemental->save), HP_POP2(HP_elemental_save), 1700 }, +{ HP_POP(elemental->change_mode_ack), HP_POP2(HP_elemental_change_mode_ack), 1702 }, +{ HP_POP(elemental->change_mode), HP_POP2(HP_elemental_change_mode), 1704 }, +{ HP_POP(elemental->heal), HP_POP2(HP_elemental_heal), 1706 }, +{ HP_POP(elemental->dead), HP_POP2(HP_elemental_dead), 1708 }, +{ HP_POP(elemental->delete), HP_POP2(HP_elemental_delete), 1710 }, +{ HP_POP(elemental->summon_stop), HP_POP2(HP_elemental_summon_stop), 1712 }, +{ HP_POP(elemental->get_lifetime), HP_POP2(HP_elemental_get_lifetime), 1714 }, +{ HP_POP(elemental->unlocktarget), HP_POP2(HP_elemental_unlocktarget), 1716 }, +{ HP_POP(elemental->skillnotok), HP_POP2(HP_elemental_skillnotok), 1718 }, +{ HP_POP(elemental->set_target), HP_POP2(HP_elemental_set_target), 1720 }, +{ HP_POP(elemental->clean_single_effect), HP_POP2(HP_elemental_clean_single_effect), 1722 }, +{ HP_POP(elemental->clean_effect), HP_POP2(HP_elemental_clean_effect), 1724 }, +{ HP_POP(elemental->action), HP_POP2(HP_elemental_action), 1726 }, +{ HP_POP(elemental->skill_get_requirements), HP_POP2(HP_elemental_skill_get_requirements), 1728 }, +{ HP_POP(elemental->read_skilldb), HP_POP2(HP_elemental_read_skilldb), 1730 }, +{ HP_POP(elemental->reload_db), HP_POP2(HP_elemental_reload_db), 1732 }, +{ HP_POP(elemental->reload_skilldb), HP_POP2(HP_elemental_reload_skilldb), 1734 }, +{ HP_POP(elemental->search_index), HP_POP2(HP_elemental_search_index), 1736 }, +{ HP_POP(elemental->summon_init), HP_POP2(HP_elemental_summon_init), 1738 }, +{ HP_POP(elemental->summon_end_timer), HP_POP2(HP_elemental_summon_end_timer), 1740 }, +{ HP_POP(elemental->ai_sub_timer_activesearch), HP_POP2(HP_elemental_ai_sub_timer_activesearch), 1742 }, +{ HP_POP(elemental->ai_sub_timer), HP_POP2(HP_elemental_ai_sub_timer), 1744 }, +{ HP_POP(elemental->ai_sub_foreachclient), HP_POP2(HP_elemental_ai_sub_foreachclient), 1746 }, +{ HP_POP(elemental->ai_timer), HP_POP2(HP_elemental_ai_timer), 1748 }, +{ HP_POP(elemental->read_db), HP_POP2(HP_elemental_read_db), 1750 }, +/* guild */ +{ HP_POP(guild->init), HP_POP2(HP_guild_init), 1752 }, +{ HP_POP(guild->final), HP_POP2(HP_guild_final), 1754 }, +{ HP_POP(guild->skill_get_max), HP_POP2(HP_guild_skill_get_max), 1756 }, +{ HP_POP(guild->checkskill), HP_POP2(HP_guild_checkskill), 1758 }, +{ HP_POP(guild->check_skill_require), HP_POP2(HP_guild_check_skill_require), 1760 }, +{ HP_POP(guild->checkcastles), HP_POP2(HP_guild_checkcastles), 1762 }, +{ HP_POP(guild->isallied), HP_POP2(HP_guild_isallied), 1764 }, +{ HP_POP(guild->search), HP_POP2(HP_guild_search), 1766 }, +{ HP_POP(guild->searchname), HP_POP2(HP_guild_searchname), 1768 }, +{ HP_POP(guild->castle_search), HP_POP2(HP_guild_castle_search), 1770 }, +{ HP_POP(guild->mapname2gc), HP_POP2(HP_guild_mapname2gc), 1772 }, +{ HP_POP(guild->mapindex2gc), HP_POP2(HP_guild_mapindex2gc), 1774 }, +{ HP_POP(guild->getavailablesd), HP_POP2(HP_guild_getavailablesd), 1776 }, +{ HP_POP(guild->getindex), HP_POP2(HP_guild_getindex), 1778 }, +{ HP_POP(guild->getposition), HP_POP2(HP_guild_getposition), 1780 }, +{ HP_POP(guild->payexp), HP_POP2(HP_guild_payexp), 1782 }, +{ HP_POP(guild->getexp), HP_POP2(HP_guild_getexp), 1784 }, +{ HP_POP(guild->create), HP_POP2(HP_guild_create), 1786 }, +{ HP_POP(guild->created), HP_POP2(HP_guild_created), 1788 }, +{ HP_POP(guild->request_info), HP_POP2(HP_guild_request_info), 1790 }, +{ HP_POP(guild->recv_noinfo), HP_POP2(HP_guild_recv_noinfo), 1792 }, +{ HP_POP(guild->recv_info), HP_POP2(HP_guild_recv_info), 1794 }, +{ HP_POP(guild->npc_request_info), HP_POP2(HP_guild_npc_request_info), 1796 }, +{ HP_POP(guild->invite), HP_POP2(HP_guild_invite), 1798 }, +{ HP_POP(guild->reply_invite), HP_POP2(HP_guild_reply_invite), 1800 }, +{ HP_POP(guild->member_joined), HP_POP2(HP_guild_member_joined), 1802 }, +{ HP_POP(guild->member_added), HP_POP2(HP_guild_member_added), 1804 }, +{ HP_POP(guild->leave), HP_POP2(HP_guild_leave), 1806 }, +{ HP_POP(guild->member_withdraw), HP_POP2(HP_guild_member_withdraw), 1808 }, +{ HP_POP(guild->expulsion), HP_POP2(HP_guild_expulsion), 1810 }, +{ HP_POP(guild->skillup), HP_POP2(HP_guild_skillup), 1812 }, +{ HP_POP(guild->block_skill), HP_POP2(HP_guild_block_skill), 1814 }, +{ HP_POP(guild->reqalliance), HP_POP2(HP_guild_reqalliance), 1816 }, +{ HP_POP(guild->reply_reqalliance), HP_POP2(HP_guild_reply_reqalliance), 1818 }, +{ HP_POP(guild->allianceack), HP_POP2(HP_guild_allianceack), 1820 }, +{ HP_POP(guild->delalliance), HP_POP2(HP_guild_delalliance), 1822 }, +{ HP_POP(guild->opposition), HP_POP2(HP_guild_opposition), 1824 }, +{ HP_POP(guild->check_alliance), HP_POP2(HP_guild_check_alliance), 1826 }, +{ HP_POP(guild->send_memberinfoshort), HP_POP2(HP_guild_send_memberinfoshort), 1828 }, +{ HP_POP(guild->recv_memberinfoshort), HP_POP2(HP_guild_recv_memberinfoshort), 1830 }, +{ HP_POP(guild->change_memberposition), HP_POP2(HP_guild_change_memberposition), 1832 }, +{ HP_POP(guild->memberposition_changed), HP_POP2(HP_guild_memberposition_changed), 1834 }, +{ HP_POP(guild->change_position), HP_POP2(HP_guild_change_position), 1836 }, +{ HP_POP(guild->position_changed), HP_POP2(HP_guild_position_changed), 1838 }, +{ HP_POP(guild->change_notice), HP_POP2(HP_guild_change_notice), 1840 }, +{ HP_POP(guild->notice_changed), HP_POP2(HP_guild_notice_changed), 1842 }, +{ HP_POP(guild->change_emblem), HP_POP2(HP_guild_change_emblem), 1844 }, +{ HP_POP(guild->emblem_changed), HP_POP2(HP_guild_emblem_changed), 1846 }, +{ HP_POP(guild->send_message), HP_POP2(HP_guild_send_message), 1848 }, +{ HP_POP(guild->recv_message), HP_POP2(HP_guild_recv_message), 1850 }, +{ HP_POP(guild->send_dot_remove), HP_POP2(HP_guild_send_dot_remove), 1852 }, +{ HP_POP(guild->skillupack), HP_POP2(HP_guild_skillupack), 1854 }, +{ HP_POP(guild->dobreak), HP_POP2(HP_guild_dobreak), 1856 }, +{ HP_POP(guild->broken), HP_POP2(HP_guild_broken), 1858 }, +{ HP_POP(guild->gm_change), HP_POP2(HP_guild_gm_change), 1860 }, +{ HP_POP(guild->gm_changed), HP_POP2(HP_guild_gm_changed), 1862 }, +{ HP_POP(guild->castle_map_init), HP_POP2(HP_guild_castle_map_init), 1864 }, +{ HP_POP(guild->castledatasave), HP_POP2(HP_guild_castledatasave), 1866 }, +{ HP_POP(guild->castledataloadack), HP_POP2(HP_guild_castledataloadack), 1868 }, +{ HP_POP(guild->castle_reconnect), HP_POP2(HP_guild_castle_reconnect), 1870 }, +{ HP_POP(guild->agit_start), HP_POP2(HP_guild_agit_start), 1872 }, +{ HP_POP(guild->agit_end), HP_POP2(HP_guild_agit_end), 1874 }, +{ HP_POP(guild->agit2_start), HP_POP2(HP_guild_agit2_start), 1876 }, +{ HP_POP(guild->agit2_end), HP_POP2(HP_guild_agit2_end), 1878 }, +{ HP_POP(guild->flag_add), HP_POP2(HP_guild_flag_add), 1880 }, +{ HP_POP(guild->flag_remove), HP_POP2(HP_guild_flag_remove), 1882 }, +{ HP_POP(guild->flags_clear), HP_POP2(HP_guild_flags_clear), 1884 }, +{ HP_POP(guild->aura_refresh), HP_POP2(HP_guild_aura_refresh), 1886 }, +{ HP_POP(guild->payexp_timer), HP_POP2(HP_guild_payexp_timer), 1888 }, +{ HP_POP(guild->sd_check), HP_POP2(HP_guild_sd_check), 1890 }, +{ HP_POP(guild->read_guildskill_tree_db), HP_POP2(HP_guild_read_guildskill_tree_db), 1892 }, +{ HP_POP(guild->read_castledb), HP_POP2(HP_guild_read_castledb), 1894 }, +{ HP_POP(guild->payexp_timer_sub), HP_POP2(HP_guild_payexp_timer_sub), 1896 }, +{ HP_POP(guild->send_xy_timer_sub), HP_POP2(HP_guild_send_xy_timer_sub), 1898 }, +{ HP_POP(guild->send_xy_timer), HP_POP2(HP_guild_send_xy_timer), 1900 }, +{ HP_POP(guild->create_expcache), HP_POP2(HP_guild_create_expcache), 1902 }, +{ HP_POP(guild->eventlist_db_final), HP_POP2(HP_guild_eventlist_db_final), 1904 }, +{ HP_POP(guild->expcache_db_final), HP_POP2(HP_guild_expcache_db_final), 1906 }, +{ HP_POP(guild->castle_db_final), HP_POP2(HP_guild_castle_db_final), 1908 }, +{ HP_POP(guild->broken_sub), HP_POP2(HP_guild_broken_sub), 1910 }, +{ HP_POP(guild->castle_broken_sub), HP_POP2(HP_guild_castle_broken_sub), 1912 }, +{ HP_POP(guild->makemember), HP_POP2(HP_guild_makemember), 1914 }, +{ HP_POP(guild->check_member), HP_POP2(HP_guild_check_member), 1916 }, +{ HP_POP(guild->get_alliance_count), HP_POP2(HP_guild_get_alliance_count), 1918 }, +{ HP_POP(guild->castle_reconnect_sub), HP_POP2(HP_guild_castle_reconnect_sub), 1920 }, +/* gstorage */ +{ HP_POP(gstorage->id2storage), HP_POP2(HP_gstorage_id2storage), 1922 }, +{ HP_POP(gstorage->id2storage2), HP_POP2(HP_gstorage_id2storage2), 1924 }, +{ HP_POP(gstorage->init), HP_POP2(HP_gstorage_init), 1926 }, +{ HP_POP(gstorage->final), HP_POP2(HP_gstorage_final), 1928 }, +{ HP_POP(gstorage->delete), HP_POP2(HP_gstorage_delete), 1930 }, +{ HP_POP(gstorage->open), HP_POP2(HP_gstorage_open), 1932 }, +{ HP_POP(gstorage->additem), HP_POP2(HP_gstorage_additem), 1934 }, +{ HP_POP(gstorage->delitem), HP_POP2(HP_gstorage_delitem), 1936 }, +{ HP_POP(gstorage->add), HP_POP2(HP_gstorage_add), 1938 }, +{ HP_POP(gstorage->get), HP_POP2(HP_gstorage_get), 1940 }, +{ HP_POP(gstorage->addfromcart), HP_POP2(HP_gstorage_addfromcart), 1942 }, +{ HP_POP(gstorage->gettocart), HP_POP2(HP_gstorage_gettocart), 1944 }, +{ HP_POP(gstorage->close), HP_POP2(HP_gstorage_close), 1946 }, +{ HP_POP(gstorage->pc_quit), HP_POP2(HP_gstorage_pc_quit), 1948 }, +{ HP_POP(gstorage->save), HP_POP2(HP_gstorage_save), 1950 }, +{ HP_POP(gstorage->saved), HP_POP2(HP_gstorage_saved), 1952 }, +{ HP_POP(gstorage->create), HP_POP2(HP_gstorage_create), 1954 }, +/* homun */ +{ HP_POP(homun->init), HP_POP2(HP_homun_init), 1956 }, +{ HP_POP(homun->final), HP_POP2(HP_homun_final), 1958 }, +{ HP_POP(homun->reload), HP_POP2(HP_homun_reload), 1960 }, +{ HP_POP(homun->reload_skill), HP_POP2(HP_homun_reload_skill), 1962 }, +{ HP_POP(homun->get_viewdata), HP_POP2(HP_homun_get_viewdata), 1964 }, +{ HP_POP(homun->class2type), HP_POP2(HP_homun_class2type), 1966 }, +{ HP_POP(homun->damaged), HP_POP2(HP_homun_damaged), 1968 }, +{ HP_POP(homun->dead), HP_POP2(HP_homun_dead), 1970 }, +{ HP_POP(homun->vaporize), HP_POP2(HP_homun_vaporize), 1972 }, +{ HP_POP(homun->delete), HP_POP2(HP_homun_delete), 1974 }, +{ HP_POP(homun->checkskill), HP_POP2(HP_homun_checkskill), 1976 }, +{ HP_POP(homun->calc_skilltree), HP_POP2(HP_homun_calc_skilltree), 1978 }, +{ HP_POP(homun->skill_tree_get_max), HP_POP2(HP_homun_skill_tree_get_max), 1980 }, +{ HP_POP(homun->skillup), HP_POP2(HP_homun_skillup), 1982 }, +{ HP_POP(homun->levelup), HP_POP2(HP_homun_levelup), 1984 }, +{ HP_POP(homun->change_class), HP_POP2(HP_homun_change_class), 1986 }, +{ HP_POP(homun->evolve), HP_POP2(HP_homun_evolve), 1988 }, +{ HP_POP(homun->mutate), HP_POP2(HP_homun_mutate), 1990 }, +{ HP_POP(homun->gainexp), HP_POP2(HP_homun_gainexp), 1992 }, +{ HP_POP(homun->add_intimacy), HP_POP2(HP_homun_add_intimacy), 1994 }, +{ HP_POP(homun->consume_intimacy), HP_POP2(HP_homun_consume_intimacy), 1996 }, +{ HP_POP(homun->healed), HP_POP2(HP_homun_healed), 1998 }, +{ HP_POP(homun->save), HP_POP2(HP_homun_save), 2000 }, +{ HP_POP(homun->menu), HP_POP2(HP_homun_menu), 2002 }, +{ HP_POP(homun->feed), HP_POP2(HP_homun_feed), 2004 }, +{ HP_POP(homun->hunger_timer), HP_POP2(HP_homun_hunger_timer), 2006 }, +{ HP_POP(homun->hunger_timer_delete), HP_POP2(HP_homun_hunger_timer_delete), 2008 }, +{ HP_POP(homun->change_name), HP_POP2(HP_homun_change_name), 2010 }, +{ HP_POP(homun->change_name_ack), HP_POP2(HP_homun_change_name_ack), 2012 }, +{ HP_POP(homun->db_search), HP_POP2(HP_homun_db_search), 2014 }, +{ HP_POP(homun->create), HP_POP2(HP_homun_create), 2016 }, +{ HP_POP(homun->init_timers), HP_POP2(HP_homun_init_timers), 2018 }, +{ HP_POP(homun->call), HP_POP2(HP_homun_call), 2020 }, +{ HP_POP(homun->recv_data), HP_POP2(HP_homun_recv_data), 2022 }, +{ HP_POP(homun->creation_request), HP_POP2(HP_homun_creation_request), 2024 }, +{ HP_POP(homun->ressurect), HP_POP2(HP_homun_ressurect), 2026 }, +{ HP_POP(homun->revive), HP_POP2(HP_homun_revive), 2028 }, +{ HP_POP(homun->stat_reset), HP_POP2(HP_homun_stat_reset), 2030 }, +{ HP_POP(homun->shuffle), HP_POP2(HP_homun_shuffle), 2032 }, +{ HP_POP(homun->read_db_sub), HP_POP2(HP_homun_read_db_sub), 2034 }, +{ HP_POP(homun->read_db), HP_POP2(HP_homun_read_db), 2036 }, +{ HP_POP(homun->read_skill_db_sub), HP_POP2(HP_homun_read_skill_db_sub), 2038 }, +{ HP_POP(homun->skill_db_read), HP_POP2(HP_homun_skill_db_read), 2040 }, +{ HP_POP(homun->exp_db_read), HP_POP2(HP_homun_exp_db_read), 2042 }, +{ HP_POP(homun->addspiritball), HP_POP2(HP_homun_addspiritball), 2044 }, +{ HP_POP(homun->delspiritball), HP_POP2(HP_homun_delspiritball), 2046 }, +/* instance */ +{ HP_POP(instance->init), HP_POP2(HP_instance_init), 2048 }, +{ HP_POP(instance->final), HP_POP2(HP_instance_final), 2050 }, +{ HP_POP(instance->create), HP_POP2(HP_instance_create), 2052 }, +{ HP_POP(instance->add_map), HP_POP2(HP_instance_add_map), 2054 }, +{ HP_POP(instance->del_map), HP_POP2(HP_instance_del_map), 2056 }, +{ HP_POP(instance->map2imap), HP_POP2(HP_instance_map2imap), 2058 }, +{ HP_POP(instance->mapid2imapid), HP_POP2(HP_instance_mapid2imapid), 2060 }, +{ HP_POP(instance->destroy), HP_POP2(HP_instance_destroy), 2062 }, +{ HP_POP(instance->start), HP_POP2(HP_instance_start), 2064 }, +{ HP_POP(instance->check_idle), HP_POP2(HP_instance_check_idle), 2066 }, +{ HP_POP(instance->check_kick), HP_POP2(HP_instance_check_kick), 2068 }, +{ HP_POP(instance->set_timeout), HP_POP2(HP_instance_set_timeout), 2070 }, +{ HP_POP(instance->valid), HP_POP2(HP_instance_valid), 2072 }, +{ HP_POP(instance->destroy_timer), HP_POP2(HP_instance_destroy_timer), 2074 }, +/* intif */ +{ HP_POP(intif->parse), HP_POP2(HP_intif_parse), 2076 }, +{ HP_POP(intif->create_pet), HP_POP2(HP_intif_create_pet), 2078 }, +{ HP_POP(intif->broadcast), HP_POP2(HP_intif_broadcast), 2080 }, +{ HP_POP(intif->broadcast2), HP_POP2(HP_intif_broadcast2), 2082 }, +{ HP_POP(intif->main_message), HP_POP2(HP_intif_main_message), 2084 }, +{ HP_POP(intif->wis_message), HP_POP2(HP_intif_wis_message), 2086 }, +{ HP_POP(intif->wis_message_to_gm), HP_POP2(HP_intif_wis_message_to_gm), 2088 }, +{ HP_POP(intif->saveregistry), HP_POP2(HP_intif_saveregistry), 2090 }, +{ HP_POP(intif->request_registry), HP_POP2(HP_intif_request_registry), 2092 }, +{ HP_POP(intif->request_guild_storage), HP_POP2(HP_intif_request_guild_storage), 2094 }, +{ HP_POP(intif->send_guild_storage), HP_POP2(HP_intif_send_guild_storage), 2096 }, +{ HP_POP(intif->create_party), HP_POP2(HP_intif_create_party), 2098 }, +{ HP_POP(intif->request_partyinfo), HP_POP2(HP_intif_request_partyinfo), 2100 }, +{ HP_POP(intif->party_addmember), HP_POP2(HP_intif_party_addmember), 2102 }, +{ HP_POP(intif->party_changeoption), HP_POP2(HP_intif_party_changeoption), 2104 }, +{ HP_POP(intif->party_leave), HP_POP2(HP_intif_party_leave), 2106 }, +{ HP_POP(intif->party_changemap), HP_POP2(HP_intif_party_changemap), 2108 }, +{ HP_POP(intif->break_party), HP_POP2(HP_intif_break_party), 2110 }, +{ HP_POP(intif->party_message), HP_POP2(HP_intif_party_message), 2112 }, +{ HP_POP(intif->party_leaderchange), HP_POP2(HP_intif_party_leaderchange), 2114 }, +{ HP_POP(intif->guild_create), HP_POP2(HP_intif_guild_create), 2116 }, +{ HP_POP(intif->guild_request_info), HP_POP2(HP_intif_guild_request_info), 2118 }, +{ HP_POP(intif->guild_addmember), HP_POP2(HP_intif_guild_addmember), 2120 }, +{ HP_POP(intif->guild_leave), HP_POP2(HP_intif_guild_leave), 2122 }, +{ HP_POP(intif->guild_memberinfoshort), HP_POP2(HP_intif_guild_memberinfoshort), 2124 }, +{ HP_POP(intif->guild_break), HP_POP2(HP_intif_guild_break), 2126 }, +{ HP_POP(intif->guild_message), HP_POP2(HP_intif_guild_message), 2128 }, +{ HP_POP(intif->guild_change_gm), HP_POP2(HP_intif_guild_change_gm), 2130 }, +{ HP_POP(intif->guild_change_basicinfo), HP_POP2(HP_intif_guild_change_basicinfo), 2132 }, +{ HP_POP(intif->guild_change_memberinfo), HP_POP2(HP_intif_guild_change_memberinfo), 2134 }, +{ HP_POP(intif->guild_position), HP_POP2(HP_intif_guild_position), 2136 }, +{ HP_POP(intif->guild_skillup), HP_POP2(HP_intif_guild_skillup), 2138 }, +{ HP_POP(intif->guild_alliance), HP_POP2(HP_intif_guild_alliance), 2140 }, +{ HP_POP(intif->guild_notice), HP_POP2(HP_intif_guild_notice), 2142 }, +{ HP_POP(intif->guild_emblem), HP_POP2(HP_intif_guild_emblem), 2144 }, +{ HP_POP(intif->guild_castle_dataload), HP_POP2(HP_intif_guild_castle_dataload), 2146 }, +{ HP_POP(intif->guild_castle_datasave), HP_POP2(HP_intif_guild_castle_datasave), 2148 }, +{ HP_POP(intif->request_petdata), HP_POP2(HP_intif_request_petdata), 2150 }, +{ HP_POP(intif->save_petdata), HP_POP2(HP_intif_save_petdata), 2152 }, +{ HP_POP(intif->delete_petdata), HP_POP2(HP_intif_delete_petdata), 2154 }, +{ HP_POP(intif->rename), HP_POP2(HP_intif_rename), 2156 }, +{ HP_POP(intif->homunculus_create), HP_POP2(HP_intif_homunculus_create), 2158 }, +{ HP_POP(intif->homunculus_requestload), HP_POP2(HP_intif_homunculus_requestload), 2160 }, +{ HP_POP(intif->homunculus_requestsave), HP_POP2(HP_intif_homunculus_requestsave), 2162 }, +{ HP_POP(intif->homunculus_requestdelete), HP_POP2(HP_intif_homunculus_requestdelete), 2164 }, +{ HP_POP(intif->request_questlog), HP_POP2(HP_intif_request_questlog), 2166 }, +{ HP_POP(intif->quest_save), HP_POP2(HP_intif_quest_save), 2168 }, +{ HP_POP(intif->mercenary_create), HP_POP2(HP_intif_mercenary_create), 2170 }, +{ HP_POP(intif->mercenary_request), HP_POP2(HP_intif_mercenary_request), 2172 }, +{ HP_POP(intif->mercenary_delete), HP_POP2(HP_intif_mercenary_delete), 2174 }, +{ HP_POP(intif->mercenary_save), HP_POP2(HP_intif_mercenary_save), 2176 }, +{ HP_POP(intif->Mail_requestinbox), HP_POP2(HP_intif_Mail_requestinbox), 2178 }, +{ HP_POP(intif->Mail_read), HP_POP2(HP_intif_Mail_read), 2180 }, +{ HP_POP(intif->Mail_getattach), HP_POP2(HP_intif_Mail_getattach), 2182 }, +{ HP_POP(intif->Mail_delete), HP_POP2(HP_intif_Mail_delete), 2184 }, +{ HP_POP(intif->Mail_return), HP_POP2(HP_intif_Mail_return), 2186 }, +{ HP_POP(intif->Mail_send), HP_POP2(HP_intif_Mail_send), 2188 }, +{ HP_POP(intif->Auction_requestlist), HP_POP2(HP_intif_Auction_requestlist), 2190 }, +{ HP_POP(intif->Auction_register), HP_POP2(HP_intif_Auction_register), 2192 }, +{ HP_POP(intif->Auction_cancel), HP_POP2(HP_intif_Auction_cancel), 2194 }, +{ HP_POP(intif->Auction_close), HP_POP2(HP_intif_Auction_close), 2196 }, +{ HP_POP(intif->Auction_bid), HP_POP2(HP_intif_Auction_bid), 2198 }, +{ HP_POP(intif->elemental_create), HP_POP2(HP_intif_elemental_create), 2200 }, +{ HP_POP(intif->elemental_request), HP_POP2(HP_intif_elemental_request), 2202 }, +{ HP_POP(intif->elemental_delete), HP_POP2(HP_intif_elemental_delete), 2204 }, +{ HP_POP(intif->elemental_save), HP_POP2(HP_intif_elemental_save), 2206 }, +{ HP_POP(intif->request_accinfo), HP_POP2(HP_intif_request_accinfo), 2208 }, +{ HP_POP(intif->CheckForCharServer), HP_POP2(HP_intif_CheckForCharServer), 2210 }, +{ HP_POP(intif->pWisMessage), HP_POP2(HP_intif_pWisMessage), 2212 }, +{ HP_POP(intif->pWisEnd), HP_POP2(HP_intif_pWisEnd), 2214 }, +{ HP_POP(intif->pWisToGM_sub), HP_POP2(HP_intif_pWisToGM_sub), 2216 }, +{ HP_POP(intif->pWisToGM), HP_POP2(HP_intif_pWisToGM), 2218 }, +{ HP_POP(intif->pRegisters), HP_POP2(HP_intif_pRegisters), 2220 }, +{ HP_POP(intif->pChangeNameOk), HP_POP2(HP_intif_pChangeNameOk), 2222 }, +{ HP_POP(intif->pMessageToFD), HP_POP2(HP_intif_pMessageToFD), 2224 }, +{ HP_POP(intif->pLoadGuildStorage), HP_POP2(HP_intif_pLoadGuildStorage), 2226 }, +{ HP_POP(intif->pSaveGuildStorage), HP_POP2(HP_intif_pSaveGuildStorage), 2228 }, +{ HP_POP(intif->pPartyCreated), HP_POP2(HP_intif_pPartyCreated), 2230 }, +{ HP_POP(intif->pPartyInfo), HP_POP2(HP_intif_pPartyInfo), 2232 }, +{ HP_POP(intif->pPartyMemberAdded), HP_POP2(HP_intif_pPartyMemberAdded), 2234 }, +{ HP_POP(intif->pPartyOptionChanged), HP_POP2(HP_intif_pPartyOptionChanged), 2236 }, +{ HP_POP(intif->pPartyMemberWithdraw), HP_POP2(HP_intif_pPartyMemberWithdraw), 2238 }, +{ HP_POP(intif->pPartyMove), HP_POP2(HP_intif_pPartyMove), 2240 }, +{ HP_POP(intif->pPartyBroken), HP_POP2(HP_intif_pPartyBroken), 2242 }, +{ HP_POP(intif->pPartyMessage), HP_POP2(HP_intif_pPartyMessage), 2244 }, +{ HP_POP(intif->pGuildCreated), HP_POP2(HP_intif_pGuildCreated), 2246 }, +{ HP_POP(intif->pGuildInfo), HP_POP2(HP_intif_pGuildInfo), 2248 }, +{ HP_POP(intif->pGuildMemberAdded), HP_POP2(HP_intif_pGuildMemberAdded), 2250 }, +{ HP_POP(intif->pGuildMemberWithdraw), HP_POP2(HP_intif_pGuildMemberWithdraw), 2252 }, +{ HP_POP(intif->pGuildMemberInfoShort), HP_POP2(HP_intif_pGuildMemberInfoShort), 2254 }, +{ HP_POP(intif->pGuildBroken), HP_POP2(HP_intif_pGuildBroken), 2256 }, +{ HP_POP(intif->pGuildMessage), HP_POP2(HP_intif_pGuildMessage), 2258 }, +{ HP_POP(intif->pGuildBasicInfoChanged), HP_POP2(HP_intif_pGuildBasicInfoChanged), 2260 }, +{ HP_POP(intif->pGuildMemberInfoChanged), HP_POP2(HP_intif_pGuildMemberInfoChanged), 2262 }, +{ HP_POP(intif->pGuildPosition), HP_POP2(HP_intif_pGuildPosition), 2264 }, +{ HP_POP(intif->pGuildSkillUp), HP_POP2(HP_intif_pGuildSkillUp), 2266 }, +{ HP_POP(intif->pGuildAlliance), HP_POP2(HP_intif_pGuildAlliance), 2268 }, +{ HP_POP(intif->pGuildNotice), HP_POP2(HP_intif_pGuildNotice), 2270 }, +{ HP_POP(intif->pGuildEmblem), HP_POP2(HP_intif_pGuildEmblem), 2272 }, +{ HP_POP(intif->pGuildCastleDataLoad), HP_POP2(HP_intif_pGuildCastleDataLoad), 2274 }, +{ HP_POP(intif->pGuildMasterChanged), HP_POP2(HP_intif_pGuildMasterChanged), 2276 }, +{ HP_POP(intif->pQuestLog), HP_POP2(HP_intif_pQuestLog), 2278 }, +{ HP_POP(intif->pQuestSave), HP_POP2(HP_intif_pQuestSave), 2280 }, +{ HP_POP(intif->pMailInboxReceived), HP_POP2(HP_intif_pMailInboxReceived), 2282 }, +{ HP_POP(intif->pMailNew), HP_POP2(HP_intif_pMailNew), 2284 }, +{ HP_POP(intif->pMailGetAttach), HP_POP2(HP_intif_pMailGetAttach), 2286 }, +{ HP_POP(intif->pMailDelete), HP_POP2(HP_intif_pMailDelete), 2288 }, +{ HP_POP(intif->pMailReturn), HP_POP2(HP_intif_pMailReturn), 2290 }, +{ HP_POP(intif->pMailSend), HP_POP2(HP_intif_pMailSend), 2292 }, +{ HP_POP(intif->pAuctionResults), HP_POP2(HP_intif_pAuctionResults), 2294 }, +{ HP_POP(intif->pAuctionRegister), HP_POP2(HP_intif_pAuctionRegister), 2296 }, +{ HP_POP(intif->pAuctionCancel), HP_POP2(HP_intif_pAuctionCancel), 2298 }, +{ HP_POP(intif->pAuctionClose), HP_POP2(HP_intif_pAuctionClose), 2300 }, +{ HP_POP(intif->pAuctionMessage), HP_POP2(HP_intif_pAuctionMessage), 2302 }, +{ HP_POP(intif->pAuctionBid), HP_POP2(HP_intif_pAuctionBid), 2304 }, +{ HP_POP(intif->pMercenaryReceived), HP_POP2(HP_intif_pMercenaryReceived), 2306 }, +{ HP_POP(intif->pMercenaryDeleted), HP_POP2(HP_intif_pMercenaryDeleted), 2308 }, +{ HP_POP(intif->pMercenarySaved), HP_POP2(HP_intif_pMercenarySaved), 2310 }, +{ HP_POP(intif->pElementalReceived), HP_POP2(HP_intif_pElementalReceived), 2312 }, +{ HP_POP(intif->pElementalDeleted), HP_POP2(HP_intif_pElementalDeleted), 2314 }, +{ HP_POP(intif->pElementalSaved), HP_POP2(HP_intif_pElementalSaved), 2316 }, +{ HP_POP(intif->pCreatePet), HP_POP2(HP_intif_pCreatePet), 2318 }, +{ HP_POP(intif->pRecvPetData), HP_POP2(HP_intif_pRecvPetData), 2320 }, +{ HP_POP(intif->pSavePetOk), HP_POP2(HP_intif_pSavePetOk), 2322 }, +{ HP_POP(intif->pDeletePetOk), HP_POP2(HP_intif_pDeletePetOk), 2324 }, +{ HP_POP(intif->pCreateHomunculus), HP_POP2(HP_intif_pCreateHomunculus), 2326 }, +{ HP_POP(intif->pRecvHomunculusData), HP_POP2(HP_intif_pRecvHomunculusData), 2328 }, +{ HP_POP(intif->pSaveHomunculusOk), HP_POP2(HP_intif_pSaveHomunculusOk), 2330 }, +{ HP_POP(intif->pDeleteHomunculusOk), HP_POP2(HP_intif_pDeleteHomunculusOk), 2332 }, +/* ircbot */ +{ HP_POP(ircbot->init), HP_POP2(HP_ircbot_init), 2334 }, +{ HP_POP(ircbot->final), HP_POP2(HP_ircbot_final), 2336 }, +{ HP_POP(ircbot->parse), HP_POP2(HP_ircbot_parse), 2338 }, +{ HP_POP(ircbot->parse_sub), HP_POP2(HP_ircbot_parse_sub), 2340 }, +{ HP_POP(ircbot->parse_source), HP_POP2(HP_ircbot_parse_source), 2342 }, +{ HP_POP(ircbot->func_search), HP_POP2(HP_ircbot_func_search), 2344 }, +{ HP_POP(ircbot->connect_timer), HP_POP2(HP_ircbot_connect_timer), 2346 }, +{ HP_POP(ircbot->identify_timer), HP_POP2(HP_ircbot_identify_timer), 2348 }, +{ HP_POP(ircbot->join_timer), HP_POP2(HP_ircbot_join_timer), 2350 }, +{ HP_POP(ircbot->send), HP_POP2(HP_ircbot_send), 2352 }, +{ HP_POP(ircbot->relay), HP_POP2(HP_ircbot_relay), 2354 }, +{ HP_POP(ircbot->pong), HP_POP2(HP_ircbot_pong), 2356 }, +{ HP_POP(ircbot->privmsg), HP_POP2(HP_ircbot_privmsg), 2358 }, +{ HP_POP(ircbot->userjoin), HP_POP2(HP_ircbot_userjoin), 2360 }, +{ HP_POP(ircbot->userleave), HP_POP2(HP_ircbot_userleave), 2362 }, +{ HP_POP(ircbot->usernick), HP_POP2(HP_ircbot_usernick), 2364 }, +/* itemdb */ +{ HP_POP(itemdb->init), HP_POP2(HP_itemdb_init), 2366 }, +{ HP_POP(itemdb->final), HP_POP2(HP_itemdb_final), 2368 }, +{ HP_POP(itemdb->reload), HP_POP2(HP_itemdb_reload), 2370 }, +{ HP_POP(itemdb->name_constants), HP_POP2(HP_itemdb_name_constants), 2372 }, +{ HP_POP(itemdb->force_name_constants), HP_POP2(HP_itemdb_force_name_constants), 2374 }, +{ HP_POP(itemdb->read_groups), HP_POP2(HP_itemdb_read_groups), 2376 }, +{ HP_POP(itemdb->read_chains), HP_POP2(HP_itemdb_read_chains), 2378 }, +{ HP_POP(itemdb->read_packages), HP_POP2(HP_itemdb_read_packages), 2380 }, +{ HP_POP(itemdb->write_cached_packages), HP_POP2(HP_itemdb_write_cached_packages), 2382 }, +{ HP_POP(itemdb->read_cached_packages), HP_POP2(HP_itemdb_read_cached_packages), 2384 }, +{ HP_POP(itemdb->name2id), HP_POP2(HP_itemdb_name2id), 2386 }, +{ HP_POP(itemdb->search_name), HP_POP2(HP_itemdb_search_name), 2388 }, +{ HP_POP(itemdb->search_name_array), HP_POP2(HP_itemdb_search_name_array), 2390 }, +{ HP_POP(itemdb->load), HP_POP2(HP_itemdb_load), 2392 }, +{ HP_POP(itemdb->search), HP_POP2(HP_itemdb_search), 2394 }, +{ HP_POP(itemdb->parse_dbrow), HP_POP2(HP_itemdb_parse_dbrow), 2396 }, +{ HP_POP(itemdb->exists), HP_POP2(HP_itemdb_exists), 2398 }, +{ HP_POP(itemdb->in_group), HP_POP2(HP_itemdb_in_group), 2400 }, +{ HP_POP(itemdb->group_item), HP_POP2(HP_itemdb_group_item), 2402 }, +{ HP_POP(itemdb->chain_item), HP_POP2(HP_itemdb_chain_item), 2404 }, +{ HP_POP(itemdb->package_item), HP_POP2(HP_itemdb_package_item), 2406 }, +{ HP_POP(itemdb->searchname_sub), HP_POP2(HP_itemdb_searchname_sub), 2408 }, +{ HP_POP(itemdb->searchname_array_sub), HP_POP2(HP_itemdb_searchname_array_sub), 2410 }, +{ HP_POP(itemdb->searchrandomid), HP_POP2(HP_itemdb_searchrandomid), 2412 }, +{ HP_POP(itemdb->typename), HP_POP2(HP_itemdb_typename), 2414 }, +{ HP_POP(itemdb->jobid2mapid), HP_POP2(HP_itemdb_jobid2mapid), 2416 }, +{ HP_POP(itemdb->create_dummy_data), HP_POP2(HP_itemdb_create_dummy_data), 2418 }, +{ HP_POP(itemdb->create_item_data), HP_POP2(HP_itemdb_create_item_data), 2420 }, +{ HP_POP(itemdb->isequip), HP_POP2(HP_itemdb_isequip), 2422 }, +{ HP_POP(itemdb->isequip2), HP_POP2(HP_itemdb_isequip2), 2424 }, +{ HP_POP(itemdb->isstackable), HP_POP2(HP_itemdb_isstackable), 2426 }, +{ HP_POP(itemdb->isstackable2), HP_POP2(HP_itemdb_isstackable2), 2428 }, +{ HP_POP(itemdb->isdropable_sub), HP_POP2(HP_itemdb_isdropable_sub), 2430 }, +{ HP_POP(itemdb->cantrade_sub), HP_POP2(HP_itemdb_cantrade_sub), 2432 }, +{ HP_POP(itemdb->canpartnertrade_sub), HP_POP2(HP_itemdb_canpartnertrade_sub), 2434 }, +{ HP_POP(itemdb->cansell_sub), HP_POP2(HP_itemdb_cansell_sub), 2436 }, +{ HP_POP(itemdb->cancartstore_sub), HP_POP2(HP_itemdb_cancartstore_sub), 2438 }, +{ HP_POP(itemdb->canstore_sub), HP_POP2(HP_itemdb_canstore_sub), 2440 }, +{ HP_POP(itemdb->canguildstore_sub), HP_POP2(HP_itemdb_canguildstore_sub), 2442 }, +{ HP_POP(itemdb->canmail_sub), HP_POP2(HP_itemdb_canmail_sub), 2444 }, +{ HP_POP(itemdb->canauction_sub), HP_POP2(HP_itemdb_canauction_sub), 2446 }, +{ HP_POP(itemdb->isrestricted), HP_POP2(HP_itemdb_isrestricted), 2448 }, +{ HP_POP(itemdb->isidentified), HP_POP2(HP_itemdb_isidentified), 2450 }, +{ HP_POP(itemdb->isidentified2), HP_POP2(HP_itemdb_isidentified2), 2452 }, +{ HP_POP(itemdb->read_itemavail), HP_POP2(HP_itemdb_read_itemavail), 2454 }, +{ HP_POP(itemdb->read_itemtrade), HP_POP2(HP_itemdb_read_itemtrade), 2456 }, +{ HP_POP(itemdb->read_itemdelay), HP_POP2(HP_itemdb_read_itemdelay), 2458 }, +{ HP_POP(itemdb->read_stack), HP_POP2(HP_itemdb_read_stack), 2460 }, +{ HP_POP(itemdb->read_buyingstore), HP_POP2(HP_itemdb_read_buyingstore), 2462 }, +{ HP_POP(itemdb->read_nouse), HP_POP2(HP_itemdb_read_nouse), 2464 }, +{ HP_POP(itemdb->combo_split_atoi), HP_POP2(HP_itemdb_combo_split_atoi), 2466 }, +{ HP_POP(itemdb->read_combos), HP_POP2(HP_itemdb_read_combos), 2468 }, +{ HP_POP(itemdb->gendercheck), HP_POP2(HP_itemdb_gendercheck), 2470 }, +{ HP_POP(itemdb->re_split_atoi), HP_POP2(HP_itemdb_re_split_atoi), 2472 }, +{ HP_POP(itemdb->readdb), HP_POP2(HP_itemdb_readdb), 2474 }, +{ HP_POP(itemdb->read_sqldb), HP_POP2(HP_itemdb_read_sqldb), 2476 }, +{ HP_POP(itemdb->unique_id), HP_POP2(HP_itemdb_unique_id), 2478 }, +{ HP_POP(itemdb->uid_load), HP_POP2(HP_itemdb_uid_load), 2480 }, +{ HP_POP(itemdb->read), HP_POP2(HP_itemdb_read), 2482 }, +{ HP_POP(itemdb->destroy_item_data), HP_POP2(HP_itemdb_destroy_item_data), 2484 }, +{ HP_POP(itemdb->final_sub), HP_POP2(HP_itemdb_final_sub), 2486 }, +/* logs */ +{ HP_POP(logs->pick_pc), HP_POP2(HP_logs_pick_pc), 2488 }, +{ HP_POP(logs->pick_mob), HP_POP2(HP_logs_pick_mob), 2490 }, +{ HP_POP(logs->zeny), HP_POP2(HP_logs_zeny), 2492 }, +{ HP_POP(logs->npc), HP_POP2(HP_logs_npc), 2494 }, +{ HP_POP(logs->chat), HP_POP2(HP_logs_chat), 2496 }, +{ HP_POP(logs->atcommand), HP_POP2(HP_logs_atcommand), 2498 }, +{ HP_POP(logs->branch), HP_POP2(HP_logs_branch), 2500 }, +{ HP_POP(logs->mvpdrop), HP_POP2(HP_logs_mvpdrop), 2502 }, +{ HP_POP(logs->pick_sub), HP_POP2(HP_logs_pick_sub), 2504 }, +{ HP_POP(logs->zeny_sub), HP_POP2(HP_logs_zeny_sub), 2506 }, +{ HP_POP(logs->npc_sub), HP_POP2(HP_logs_npc_sub), 2508 }, +{ HP_POP(logs->chat_sub), HP_POP2(HP_logs_chat_sub), 2510 }, +{ HP_POP(logs->atcommand_sub), HP_POP2(HP_logs_atcommand_sub), 2512 }, +{ HP_POP(logs->branch_sub), HP_POP2(HP_logs_branch_sub), 2514 }, +{ HP_POP(logs->mvpdrop_sub), HP_POP2(HP_logs_mvpdrop_sub), 2516 }, +{ HP_POP(logs->config_read), HP_POP2(HP_logs_config_read), 2518 }, +{ HP_POP(logs->config_done), HP_POP2(HP_logs_config_done), 2520 }, +{ HP_POP(logs->sql_init), HP_POP2(HP_logs_sql_init), 2522 }, +{ HP_POP(logs->sql_final), HP_POP2(HP_logs_sql_final), 2524 }, +{ HP_POP(logs->picktype2char), HP_POP2(HP_logs_picktype2char), 2526 }, +{ HP_POP(logs->chattype2char), HP_POP2(HP_logs_chattype2char), 2528 }, +{ HP_POP(logs->should_log_item), HP_POP2(HP_logs_should_log_item), 2530 }, +/* mail */ +{ HP_POP(mail->clear), HP_POP2(HP_mail_clear), 2532 }, +{ HP_POP(mail->removeitem), HP_POP2(HP_mail_removeitem), 2534 }, +{ HP_POP(mail->removezeny), HP_POP2(HP_mail_removezeny), 2536 }, +{ HP_POP(mail->setitem), HP_POP2(HP_mail_setitem), 2538 }, +{ HP_POP(mail->setattachment), HP_POP2(HP_mail_setattachment), 2540 }, +{ HP_POP(mail->getattachment), HP_POP2(HP_mail_getattachment), 2542 }, +{ HP_POP(mail->openmail), HP_POP2(HP_mail_openmail), 2544 }, +{ HP_POP(mail->deliveryfail), HP_POP2(HP_mail_deliveryfail), 2546 }, +{ HP_POP(mail->invalid_operation), HP_POP2(HP_mail_invalid_operation), 2548 }, +/* map */ +{ HP_POP(map->zone_init), HP_POP2(HP_map_zone_init), 2550 }, +{ HP_POP(map->zone_remove), HP_POP2(HP_map_zone_remove), 2552 }, +{ HP_POP(map->zone_apply), HP_POP2(HP_map_zone_apply), 2554 }, +{ HP_POP(map->zone_change), HP_POP2(HP_map_zone_change), 2556 }, +{ HP_POP(map->zone_change2), HP_POP2(HP_map_zone_change2), 2558 }, +{ HP_POP(map->getcell), HP_POP2(HP_map_getcell), 2560 }, +{ HP_POP(map->setgatcell), HP_POP2(HP_map_setgatcell), 2562 }, +{ HP_POP(map->cellfromcache), HP_POP2(HP_map_cellfromcache), 2564 }, +{ HP_POP(map->setusers), HP_POP2(HP_map_setusers), 2566 }, +{ HP_POP(map->getusers), HP_POP2(HP_map_getusers), 2568 }, +{ HP_POP(map->usercount), HP_POP2(HP_map_usercount), 2570 }, +{ HP_POP(map->freeblock), HP_POP2(HP_map_freeblock), 2572 }, +{ HP_POP(map->freeblock_lock), HP_POP2(HP_map_freeblock_lock), 2574 }, +{ HP_POP(map->freeblock_unlock), HP_POP2(HP_map_freeblock_unlock), 2576 }, +{ HP_POP(map->addblock), HP_POP2(HP_map_addblock), 2578 }, +{ HP_POP(map->delblock), HP_POP2(HP_map_delblock), 2580 }, +{ HP_POP(map->moveblock), HP_POP2(HP_map_moveblock), 2582 }, +{ HP_POP(map->count_oncell), HP_POP2(HP_map_count_oncell), 2584 }, +{ HP_POP(map->find_skill_unit_oncell), HP_POP2(HP_map_find_skill_unit_oncell), 2586 }, +{ HP_POP(map->get_new_object_id), HP_POP2(HP_map_get_new_object_id), 2588 }, +{ HP_POP(map->search_freecell), HP_POP2(HP_map_search_freecell), 2590 }, +{ HP_POP(map->quit), HP_POP2(HP_map_quit), 2592 }, +{ HP_POP(map->addnpc), HP_POP2(HP_map_addnpc), 2594 }, +{ HP_POP(map->clearflooritem_timer), HP_POP2(HP_map_clearflooritem_timer), 2596 }, +{ HP_POP(map->removemobs_timer), HP_POP2(HP_map_removemobs_timer), 2598 }, +{ HP_POP(map->clearflooritem), HP_POP2(HP_map_clearflooritem), 2600 }, +{ HP_POP(map->addflooritem), HP_POP2(HP_map_addflooritem), 2602 }, +{ HP_POP(map->addnickdb), HP_POP2(HP_map_addnickdb), 2604 }, +{ HP_POP(map->delnickdb), HP_POP2(HP_map_delnickdb), 2606 }, +{ HP_POP(map->reqnickdb), HP_POP2(HP_map_reqnickdb), 2608 }, +{ HP_POP(map->charid2nick), HP_POP2(HP_map_charid2nick), 2610 }, +{ HP_POP(map->charid2sd), HP_POP2(HP_map_charid2sd), 2612 }, +{ HP_POP(map->vforeachpc), HP_POP2(HP_map_vforeachpc), 2614 }, +{ HP_POP(map->vforeachmob), HP_POP2(HP_map_vforeachmob), 2616 }, +{ HP_POP(map->vforeachnpc), HP_POP2(HP_map_vforeachnpc), 2618 }, +{ HP_POP(map->vforeachregen), HP_POP2(HP_map_vforeachregen), 2620 }, +{ HP_POP(map->vforeachiddb), HP_POP2(HP_map_vforeachiddb), 2622 }, +{ HP_POP(map->vforeachinrange), HP_POP2(HP_map_vforeachinrange), 2624 }, +{ HP_POP(map->vforeachinshootrange), HP_POP2(HP_map_vforeachinshootrange), 2626 }, +{ HP_POP(map->vforeachinarea), HP_POP2(HP_map_vforeachinarea), 2628 }, +{ HP_POP(map->vforcountinrange), HP_POP2(HP_map_vforcountinrange), 2630 }, +{ HP_POP(map->vforcountinarea), HP_POP2(HP_map_vforcountinarea), 2632 }, +{ HP_POP(map->vforeachinmovearea), HP_POP2(HP_map_vforeachinmovearea), 2634 }, +{ HP_POP(map->vforeachincell), HP_POP2(HP_map_vforeachincell), 2636 }, +{ HP_POP(map->vforeachinpath), HP_POP2(HP_map_vforeachinpath), 2638 }, +{ HP_POP(map->vforeachinmap), HP_POP2(HP_map_vforeachinmap), 2640 }, +{ HP_POP(map->vforeachininstance), HP_POP2(HP_map_vforeachininstance), 2642 }, +{ HP_POP(map->id2sd), HP_POP2(HP_map_id2sd), 2644 }, +{ HP_POP(map->id2md), HP_POP2(HP_map_id2md), 2646 }, +{ HP_POP(map->id2nd), HP_POP2(HP_map_id2nd), 2648 }, +{ HP_POP(map->id2hd), HP_POP2(HP_map_id2hd), 2650 }, +{ HP_POP(map->id2mc), HP_POP2(HP_map_id2mc), 2652 }, +{ HP_POP(map->id2cd), HP_POP2(HP_map_id2cd), 2654 }, +{ HP_POP(map->id2bl), HP_POP2(HP_map_id2bl), 2656 }, +{ HP_POP(map->blid_exists), HP_POP2(HP_map_blid_exists), 2658 }, +{ HP_POP(map->mapindex2mapid), HP_POP2(HP_map_mapindex2mapid), 2660 }, +{ HP_POP(map->mapname2mapid), HP_POP2(HP_map_mapname2mapid), 2662 }, +{ HP_POP(map->mapname2ipport), HP_POP2(HP_map_mapname2ipport), 2664 }, +{ HP_POP(map->setipport), HP_POP2(HP_map_setipport), 2666 }, +{ HP_POP(map->eraseipport), HP_POP2(HP_map_eraseipport), 2668 }, +{ HP_POP(map->eraseallipport), HP_POP2(HP_map_eraseallipport), 2670 }, +{ HP_POP(map->addiddb), HP_POP2(HP_map_addiddb), 2672 }, +{ HP_POP(map->deliddb), HP_POP2(HP_map_deliddb), 2674 }, +{ HP_POP(map->nick2sd), HP_POP2(HP_map_nick2sd), 2676 }, +{ HP_POP(map->getmob_boss), HP_POP2(HP_map_getmob_boss), 2678 }, +{ HP_POP(map->id2boss), HP_POP2(HP_map_id2boss), 2680 }, +{ HP_POP(map->reloadnpc), HP_POP2(HP_map_reloadnpc), 2682 }, +{ HP_POP(map->check_dir), HP_POP2(HP_map_check_dir), 2684 }, +{ HP_POP(map->calc_dir), HP_POP2(HP_map_calc_dir), 2686 }, +{ HP_POP(map->random_dir), HP_POP2(HP_map_random_dir), 2688 }, +{ HP_POP(map->cleanup_sub), HP_POP2(HP_map_cleanup_sub), 2690 }, +{ HP_POP(map->delmap), HP_POP2(HP_map_delmap), 2692 }, +{ HP_POP(map->flags_init), HP_POP2(HP_map_flags_init), 2694 }, +{ HP_POP(map->iwall_set), HP_POP2(HP_map_iwall_set), 2696 }, +{ HP_POP(map->iwall_get), HP_POP2(HP_map_iwall_get), 2698 }, +{ HP_POP(map->iwall_remove), HP_POP2(HP_map_iwall_remove), 2700 }, +{ HP_POP(map->addmobtolist), HP_POP2(HP_map_addmobtolist), 2702 }, +{ HP_POP(map->spawnmobs), HP_POP2(HP_map_spawnmobs), 2704 }, +{ HP_POP(map->removemobs), HP_POP2(HP_map_removemobs), 2706 }, +{ HP_POP(map->addmap2db), HP_POP2(HP_map_addmap2db), 2708 }, +{ HP_POP(map->removemapdb), HP_POP2(HP_map_removemapdb), 2710 }, +{ HP_POP(map->clean), HP_POP2(HP_map_clean), 2712 }, +{ HP_POP(map->do_shutdown), HP_POP2(HP_map_do_shutdown), 2714 }, +{ HP_POP(map->freeblock_timer), HP_POP2(HP_map_freeblock_timer), 2716 }, +{ HP_POP(map->searchrandfreecell), HP_POP2(HP_map_searchrandfreecell), 2718 }, +{ HP_POP(map->count_sub), HP_POP2(HP_map_count_sub), 2720 }, +{ HP_POP(map->create_charid2nick), HP_POP2(HP_map_create_charid2nick), 2722 }, +{ HP_POP(map->removemobs_sub), HP_POP2(HP_map_removemobs_sub), 2724 }, +{ HP_POP(map->gat2cell), HP_POP2(HP_map_gat2cell), 2726 }, +{ HP_POP(map->cell2gat), HP_POP2(HP_map_cell2gat), 2728 }, +{ HP_POP(map->getcellp), HP_POP2(HP_map_getcellp), 2730 }, +{ HP_POP(map->setcell), HP_POP2(HP_map_setcell), 2732 }, +{ HP_POP(map->sub_getcellp), HP_POP2(HP_map_sub_getcellp), 2734 }, +{ HP_POP(map->sub_setcell), HP_POP2(HP_map_sub_setcell), 2736 }, +{ HP_POP(map->iwall_nextxy), HP_POP2(HP_map_iwall_nextxy), 2738 }, +{ HP_POP(map->create_map_data_other_server), HP_POP2(HP_map_create_map_data_other_server), 2740 }, +{ HP_POP(map->eraseallipport_sub), HP_POP2(HP_map_eraseallipport_sub), 2742 }, +{ HP_POP(map->init_mapcache), HP_POP2(HP_map_init_mapcache), 2744 }, +{ HP_POP(map->readfromcache), HP_POP2(HP_map_readfromcache), 2746 }, +{ HP_POP(map->addmap), HP_POP2(HP_map_addmap), 2748 }, +{ HP_POP(map->delmapid), HP_POP2(HP_map_delmapid), 2750 }, +{ HP_POP(map->zone_db_clear), HP_POP2(HP_map_zone_db_clear), 2752 }, +{ HP_POP(map->list_final), HP_POP2(HP_map_list_final), 2754 }, +{ HP_POP(map->waterheight), HP_POP2(HP_map_waterheight), 2756 }, +{ HP_POP(map->readgat), HP_POP2(HP_map_readgat), 2758 }, +{ HP_POP(map->readallmaps), HP_POP2(HP_map_readallmaps), 2760 }, +{ HP_POP(map->config_read), HP_POP2(HP_map_config_read), 2762 }, +{ HP_POP(map->config_read_sub), HP_POP2(HP_map_config_read_sub), 2764 }, +{ HP_POP(map->reloadnpc_sub), HP_POP2(HP_map_reloadnpc_sub), 2766 }, +{ HP_POP(map->inter_config_read), HP_POP2(HP_map_inter_config_read), 2768 }, +{ HP_POP(map->sql_init), HP_POP2(HP_map_sql_init), 2770 }, +{ HP_POP(map->sql_close), HP_POP2(HP_map_sql_close), 2772 }, +{ HP_POP(map->zone_mf_cache), HP_POP2(HP_map_zone_mf_cache), 2774 }, +{ HP_POP(map->zone_str2itemid), HP_POP2(HP_map_zone_str2itemid), 2776 }, +{ HP_POP(map->zone_str2skillid), HP_POP2(HP_map_zone_str2skillid), 2778 }, +{ HP_POP(map->zone_bl_type), HP_POP2(HP_map_zone_bl_type), 2780 }, +{ HP_POP(map->read_zone_db), HP_POP2(HP_map_read_zone_db), 2782 }, +{ HP_POP(map->db_final), HP_POP2(HP_map_db_final), 2784 }, +{ HP_POP(map->nick_db_final), HP_POP2(HP_map_nick_db_final), 2786 }, +{ HP_POP(map->cleanup_db_sub), HP_POP2(HP_map_cleanup_db_sub), 2788 }, +{ HP_POP(map->abort_sub), HP_POP2(HP_map_abort_sub), 2790 }, +{ HP_POP(map->helpscreen), HP_POP2(HP_map_helpscreen), 2792 }, +{ HP_POP(map->versionscreen), HP_POP2(HP_map_versionscreen), 2794 }, +{ HP_POP(map->arg_next_value), HP_POP2(HP_map_arg_next_value), 2796 }, +/* mapit */ +{ HP_POP(mapit->alloc), HP_POP2(HP_mapit_alloc), 2798 }, +{ HP_POP(mapit->free), HP_POP2(HP_mapit_free), 2800 }, +{ HP_POP(mapit->first), HP_POP2(HP_mapit_first), 2802 }, +{ HP_POP(mapit->last), HP_POP2(HP_mapit_last), 2804 }, +{ HP_POP(mapit->next), HP_POP2(HP_mapit_next), 2806 }, +{ HP_POP(mapit->prev), HP_POP2(HP_mapit_prev), 2808 }, +{ HP_POP(mapit->exists), HP_POP2(HP_mapit_exists), 2810 }, +/* mapreg */ +{ HP_POP(mapreg->init), HP_POP2(HP_mapreg_init), 2812 }, +{ HP_POP(mapreg->final), HP_POP2(HP_mapreg_final), 2814 }, +{ HP_POP(mapreg->readreg), HP_POP2(HP_mapreg_readreg), 2816 }, +{ HP_POP(mapreg->readregstr), HP_POP2(HP_mapreg_readregstr), 2818 }, +{ HP_POP(mapreg->setreg), HP_POP2(HP_mapreg_setreg), 2820 }, +{ HP_POP(mapreg->setregstr), HP_POP2(HP_mapreg_setregstr), 2822 }, +{ HP_POP(mapreg->load), HP_POP2(HP_mapreg_load), 2824 }, +{ HP_POP(mapreg->save), HP_POP2(HP_mapreg_save), 2826 }, +{ HP_POP(mapreg->save_timer), HP_POP2(HP_mapreg_save_timer), 2828 }, +{ HP_POP(mapreg->reload), HP_POP2(HP_mapreg_reload), 2830 }, +{ HP_POP(mapreg->config_read), HP_POP2(HP_mapreg_config_read), 2832 }, +/* mercenary */ +{ HP_POP(mercenary->init), HP_POP2(HP_mercenary_init), 2834 }, +{ HP_POP(mercenary->class), HP_POP2(HP_mercenary_class), 2836 }, +{ HP_POP(mercenary->get_viewdata), HP_POP2(HP_mercenary_get_viewdata), 2838 }, +{ HP_POP(mercenary->create), HP_POP2(HP_mercenary_create), 2840 }, +{ HP_POP(mercenary->data_received), HP_POP2(HP_mercenary_data_received), 2842 }, +{ HP_POP(mercenary->save), HP_POP2(HP_mercenary_save), 2844 }, +{ HP_POP(mercenary->heal), HP_POP2(HP_mercenary_heal), 2846 }, +{ HP_POP(mercenary->dead), HP_POP2(HP_mercenary_dead), 2848 }, +{ HP_POP(mercenary->delete), HP_POP2(HP_mercenary_delete), 2850 }, +{ HP_POP(mercenary->contract_stop), HP_POP2(HP_mercenary_contract_stop), 2852 }, +{ HP_POP(mercenary->get_lifetime), HP_POP2(HP_mercenary_get_lifetime), 2854 }, +{ HP_POP(mercenary->get_guild), HP_POP2(HP_mercenary_get_guild), 2856 }, +{ HP_POP(mercenary->get_faith), HP_POP2(HP_mercenary_get_faith), 2858 }, +{ HP_POP(mercenary->set_faith), HP_POP2(HP_mercenary_set_faith), 2860 }, +{ HP_POP(mercenary->get_calls), HP_POP2(HP_mercenary_get_calls), 2862 }, +{ HP_POP(mercenary->set_calls), HP_POP2(HP_mercenary_set_calls), 2864 }, +{ HP_POP(mercenary->kills), HP_POP2(HP_mercenary_kills), 2866 }, +{ HP_POP(mercenary->checkskill), HP_POP2(HP_mercenary_checkskill), 2868 }, +{ HP_POP(mercenary->read_db), HP_POP2(HP_mercenary_read_db), 2870 }, +{ HP_POP(mercenary->read_skilldb), HP_POP2(HP_mercenary_read_skilldb), 2872 }, +{ HP_POP(mercenary->killbonus), HP_POP2(HP_mercenary_killbonus), 2874 }, +{ HP_POP(mercenary->search_index), HP_POP2(HP_mercenary_search_index), 2876 }, +{ HP_POP(mercenary->contract_end_timer), HP_POP2(HP_mercenary_contract_end_timer), 2878 }, +{ HP_POP(mercenary->read_db_sub), HP_POP2(HP_mercenary_read_db_sub), 2880 }, +{ HP_POP(mercenary->read_skill_db_sub), HP_POP2(HP_mercenary_read_skill_db_sub), 2882 }, +/* mob */ +{ HP_POP(mob->init), HP_POP2(HP_mob_init), 2884 }, +{ HP_POP(mob->final), HP_POP2(HP_mob_final), 2886 }, +{ HP_POP(mob->reload), HP_POP2(HP_mob_reload), 2888 }, +{ HP_POP(mob->db), HP_POP2(HP_mob_db), 2890 }, +{ HP_POP(mob->chat), HP_POP2(HP_mob_chat), 2892 }, +{ HP_POP(mob->makedummymobdb), HP_POP2(HP_mob_makedummymobdb), 2894 }, +{ HP_POP(mob->spawn_guardian_sub), HP_POP2(HP_mob_spawn_guardian_sub), 2896 }, +{ HP_POP(mob->skill_id2skill_idx), HP_POP2(HP_mob_skill_id2skill_idx), 2898 }, +{ HP_POP(mob->db_searchname), HP_POP2(HP_mob_db_searchname), 2900 }, +{ HP_POP(mob->db_searchname_array_sub), HP_POP2(HP_mob_db_searchname_array_sub), 2902 }, +{ HP_POP(mob->mvptomb_create), HP_POP2(HP_mob_mvptomb_create), 2904 }, +{ HP_POP(mob->mvptomb_destroy), HP_POP2(HP_mob_mvptomb_destroy), 2906 }, +{ HP_POP(mob->db_searchname_array), HP_POP2(HP_mob_db_searchname_array), 2908 }, +{ HP_POP(mob->db_checkid), HP_POP2(HP_mob_db_checkid), 2910 }, +{ HP_POP(mob->get_viewdata), HP_POP2(HP_mob_get_viewdata), 2912 }, +{ HP_POP(mob->parse_dataset), HP_POP2(HP_mob_parse_dataset), 2914 }, +{ HP_POP(mob->spawn_dataset), HP_POP2(HP_mob_spawn_dataset), 2916 }, +{ HP_POP(mob->get_random_id), HP_POP2(HP_mob_get_random_id), 2918 }, +{ HP_POP(mob->ksprotected), HP_POP2(HP_mob_ksprotected), 2920 }, +{ HP_POP(mob->once_spawn_sub), HP_POP2(HP_mob_once_spawn_sub), 2922 }, +{ HP_POP(mob->once_spawn), HP_POP2(HP_mob_once_spawn), 2924 }, +{ HP_POP(mob->once_spawn_area), HP_POP2(HP_mob_once_spawn_area), 2926 }, +{ HP_POP(mob->spawn_guardian), HP_POP2(HP_mob_spawn_guardian), 2928 }, +{ HP_POP(mob->spawn_bg), HP_POP2(HP_mob_spawn_bg), 2930 }, +{ HP_POP(mob->can_reach), HP_POP2(HP_mob_can_reach), 2932 }, +{ HP_POP(mob->linksearch), HP_POP2(HP_mob_linksearch), 2934 }, +{ HP_POP(mob->delayspawn), HP_POP2(HP_mob_delayspawn), 2936 }, +{ HP_POP(mob->setdelayspawn), HP_POP2(HP_mob_setdelayspawn), 2938 }, +{ HP_POP(mob->count_sub), HP_POP2(HP_mob_count_sub), 2940 }, +{ HP_POP(mob->spawn), HP_POP2(HP_mob_spawn), 2942 }, +{ HP_POP(mob->can_changetarget), HP_POP2(HP_mob_can_changetarget), 2944 }, +{ HP_POP(mob->target), HP_POP2(HP_mob_target), 2946 }, +{ HP_POP(mob->ai_sub_hard_activesearch), HP_POP2(HP_mob_ai_sub_hard_activesearch), 2948 }, +{ HP_POP(mob->ai_sub_hard_changechase), HP_POP2(HP_mob_ai_sub_hard_changechase), 2950 }, +{ HP_POP(mob->ai_sub_hard_bg_ally), HP_POP2(HP_mob_ai_sub_hard_bg_ally), 2952 }, +{ HP_POP(mob->ai_sub_hard_lootsearch), HP_POP2(HP_mob_ai_sub_hard_lootsearch), 2954 }, +{ HP_POP(mob->warpchase_sub), HP_POP2(HP_mob_warpchase_sub), 2956 }, +{ HP_POP(mob->ai_sub_hard_slavemob), HP_POP2(HP_mob_ai_sub_hard_slavemob), 2958 }, +{ HP_POP(mob->unlocktarget), HP_POP2(HP_mob_unlocktarget), 2960 }, +{ HP_POP(mob->randomwalk), HP_POP2(HP_mob_randomwalk), 2962 }, +{ HP_POP(mob->warpchase), HP_POP2(HP_mob_warpchase), 2964 }, +{ HP_POP(mob->ai_sub_hard), HP_POP2(HP_mob_ai_sub_hard), 2966 }, +{ HP_POP(mob->ai_sub_hard_timer), HP_POP2(HP_mob_ai_sub_hard_timer), 2968 }, +{ HP_POP(mob->ai_sub_foreachclient), HP_POP2(HP_mob_ai_sub_foreachclient), 2970 }, +{ HP_POP(mob->ai_sub_lazy), HP_POP2(HP_mob_ai_sub_lazy), 2972 }, +{ HP_POP(mob->ai_lazy), HP_POP2(HP_mob_ai_lazy), 2974 }, +{ HP_POP(mob->ai_hard), HP_POP2(HP_mob_ai_hard), 2976 }, +{ HP_POP(mob->setdropitem), HP_POP2(HP_mob_setdropitem), 2978 }, +{ HP_POP(mob->setlootitem), HP_POP2(HP_mob_setlootitem), 2980 }, +{ HP_POP(mob->delay_item_drop), HP_POP2(HP_mob_delay_item_drop), 2982 }, +{ HP_POP(mob->item_drop), HP_POP2(HP_mob_item_drop), 2984 }, +{ HP_POP(mob->timer_delete), HP_POP2(HP_mob_timer_delete), 2986 }, +{ HP_POP(mob->deleteslave_sub), HP_POP2(HP_mob_deleteslave_sub), 2988 }, +{ HP_POP(mob->deleteslave), HP_POP2(HP_mob_deleteslave), 2990 }, +{ HP_POP(mob->respawn), HP_POP2(HP_mob_respawn), 2992 }, +{ HP_POP(mob->log_damage), HP_POP2(HP_mob_log_damage), 2994 }, +{ HP_POP(mob->damage), HP_POP2(HP_mob_damage), 2996 }, +{ HP_POP(mob->dead), HP_POP2(HP_mob_dead), 2998 }, +{ HP_POP(mob->revive), HP_POP2(HP_mob_revive), 3000 }, +{ HP_POP(mob->guardian_guildchange), HP_POP2(HP_mob_guardian_guildchange), 3002 }, +{ HP_POP(mob->random_class), HP_POP2(HP_mob_random_class), 3004 }, +{ HP_POP(mob->class_change), HP_POP2(HP_mob_class_change), 3006 }, +{ HP_POP(mob->heal), HP_POP2(HP_mob_heal), 3008 }, +{ HP_POP(mob->warpslave_sub), HP_POP2(HP_mob_warpslave_sub), 3010 }, +{ HP_POP(mob->warpslave), HP_POP2(HP_mob_warpslave), 3012 }, +{ HP_POP(mob->countslave_sub), HP_POP2(HP_mob_countslave_sub), 3014 }, +{ HP_POP(mob->countslave), HP_POP2(HP_mob_countslave), 3016 }, +{ HP_POP(mob->summonslave), HP_POP2(HP_mob_summonslave), 3018 }, +{ HP_POP(mob->getfriendhprate_sub), HP_POP2(HP_mob_getfriendhprate_sub), 3020 }, +{ HP_POP(mob->getfriendhprate), HP_POP2(HP_mob_getfriendhprate), 3022 }, +{ HP_POP(mob->getmasterhpltmaxrate), HP_POP2(HP_mob_getmasterhpltmaxrate), 3024 }, +{ HP_POP(mob->getfriendstatus_sub), HP_POP2(HP_mob_getfriendstatus_sub), 3026 }, +{ HP_POP(mob->getfriendstatus), HP_POP2(HP_mob_getfriendstatus), 3028 }, +{ HP_POP(mob->skill_use), HP_POP2(HP_mob_skill_use), 3030 }, +{ HP_POP(mob->skill_event), HP_POP2(HP_mob_skill_event), 3032 }, +{ HP_POP(mob->is_clone), HP_POP2(HP_mob_is_clone), 3034 }, +{ HP_POP(mob->clone_spawn), HP_POP2(HP_mob_clone_spawn), 3036 }, +{ HP_POP(mob->clone_delete), HP_POP2(HP_mob_clone_delete), 3038 }, +{ HP_POP(mob->drop_adjust), HP_POP2(HP_mob_drop_adjust), 3040 }, +{ HP_POP(mob->item_dropratio_adjust), HP_POP2(HP_mob_item_dropratio_adjust), 3042 }, +{ HP_POP(mob->parse_dbrow), HP_POP2(HP_mob_parse_dbrow), 3044 }, +{ HP_POP(mob->readdb_sub), HP_POP2(HP_mob_readdb_sub), 3046 }, +{ HP_POP(mob->readdb), HP_POP2(HP_mob_readdb), 3048 }, +{ HP_POP(mob->read_sqldb), HP_POP2(HP_mob_read_sqldb), 3050 }, +{ HP_POP(mob->readdb_mobavail), HP_POP2(HP_mob_readdb_mobavail), 3052 }, +{ HP_POP(mob->read_randommonster), HP_POP2(HP_mob_read_randommonster), 3054 }, +{ HP_POP(mob->parse_row_chatdb), HP_POP2(HP_mob_parse_row_chatdb), 3056 }, +{ HP_POP(mob->readchatdb), HP_POP2(HP_mob_readchatdb), 3058 }, +{ HP_POP(mob->parse_row_mobskilldb), HP_POP2(HP_mob_parse_row_mobskilldb), 3060 }, +{ HP_POP(mob->readskilldb), HP_POP2(HP_mob_readskilldb), 3062 }, +{ HP_POP(mob->read_sqlskilldb), HP_POP2(HP_mob_read_sqlskilldb), 3064 }, +{ HP_POP(mob->readdb_race2), HP_POP2(HP_mob_readdb_race2), 3066 }, +{ HP_POP(mob->readdb_itemratio), HP_POP2(HP_mob_readdb_itemratio), 3068 }, +{ HP_POP(mob->load), HP_POP2(HP_mob_load), 3070 }, +{ HP_POP(mob->clear_spawninfo), HP_POP2(HP_mob_clear_spawninfo), 3072 }, +/* npc */ +{ HP_POP(npc->init), HP_POP2(HP_npc_init), 3074 }, +{ HP_POP(npc->final), HP_POP2(HP_npc_final), 3076 }, +{ HP_POP(npc->get_new_npc_id), HP_POP2(HP_npc_get_new_npc_id), 3078 }, +{ HP_POP(npc->get_viewdata), HP_POP2(HP_npc_get_viewdata), 3080 }, +{ HP_POP(npc->isnear_sub), HP_POP2(HP_npc_isnear_sub), 3082 }, +{ HP_POP(npc->isnear), HP_POP2(HP_npc_isnear), 3084 }, +{ HP_POP(npc->ontouch_event), HP_POP2(HP_npc_ontouch_event), 3086 }, +{ HP_POP(npc->ontouch2_event), HP_POP2(HP_npc_ontouch2_event), 3088 }, +{ HP_POP(npc->enable_sub), HP_POP2(HP_npc_enable_sub), 3090 }, +{ HP_POP(npc->enable), HP_POP2(HP_npc_enable), 3092 }, +{ HP_POP(npc->name2id), HP_POP2(HP_npc_name2id), 3094 }, +{ HP_POP(npc->event_dequeue), HP_POP2(HP_npc_event_dequeue), 3096 }, +{ HP_POP(npc->event_export_create), HP_POP2(HP_npc_event_export_create), 3098 }, +{ HP_POP(npc->event_export), HP_POP2(HP_npc_event_export), 3100 }, +{ HP_POP(npc->event_sub), HP_POP2(HP_npc_event_sub), 3102 }, +{ HP_POP(npc->event_doall_sub), HP_POP2(HP_npc_event_doall_sub), 3104 }, +{ HP_POP(npc->event_do), HP_POP2(HP_npc_event_do), 3106 }, +{ HP_POP(npc->event_doall_id), HP_POP2(HP_npc_event_doall_id), 3108 }, +{ HP_POP(npc->event_doall), HP_POP2(HP_npc_event_doall), 3110 }, +{ HP_POP(npc->event_do_clock), HP_POP2(HP_npc_event_do_clock), 3112 }, +{ HP_POP(npc->event_do_oninit), HP_POP2(HP_npc_event_do_oninit), 3114 }, +{ HP_POP(npc->timerevent_export), HP_POP2(HP_npc_timerevent_export), 3116 }, +{ HP_POP(npc->timerevent), HP_POP2(HP_npc_timerevent), 3118 }, +{ HP_POP(npc->timerevent_start), HP_POP2(HP_npc_timerevent_start), 3120 }, +{ HP_POP(npc->timerevent_stop), HP_POP2(HP_npc_timerevent_stop), 3122 }, +{ HP_POP(npc->timerevent_quit), HP_POP2(HP_npc_timerevent_quit), 3124 }, +{ HP_POP(npc->gettimerevent_tick), HP_POP2(HP_npc_gettimerevent_tick), 3126 }, +{ HP_POP(npc->settimerevent_tick), HP_POP2(HP_npc_settimerevent_tick), 3128 }, +{ HP_POP(npc->event), HP_POP2(HP_npc_event), 3130 }, +{ HP_POP(npc->touch_areanpc_sub), HP_POP2(HP_npc_touch_areanpc_sub), 3132 }, +{ HP_POP(npc->touchnext_areanpc), HP_POP2(HP_npc_touchnext_areanpc), 3134 }, +{ HP_POP(npc->touch_areanpc), HP_POP2(HP_npc_touch_areanpc), 3136 }, +{ HP_POP(npc->touch_areanpc2), HP_POP2(HP_npc_touch_areanpc2), 3138 }, +{ HP_POP(npc->check_areanpc), HP_POP2(HP_npc_check_areanpc), 3140 }, +{ HP_POP(npc->checknear), HP_POP2(HP_npc_checknear), 3142 }, +{ HP_POP(npc->globalmessage), HP_POP2(HP_npc_globalmessage), 3144 }, +{ HP_POP(npc->run_tomb), HP_POP2(HP_npc_run_tomb), 3146 }, +{ HP_POP(npc->click), HP_POP2(HP_npc_click), 3148 }, +{ HP_POP(npc->scriptcont), HP_POP2(HP_npc_scriptcont), 3150 }, +{ HP_POP(npc->buysellsel), HP_POP2(HP_npc_buysellsel), 3152 }, +{ HP_POP(npc->cashshop_buylist), HP_POP2(HP_npc_cashshop_buylist), 3154 }, +{ HP_POP(npc->buylist_sub), HP_POP2(HP_npc_buylist_sub), 3156 }, +{ HP_POP(npc->cashshop_buy), HP_POP2(HP_npc_cashshop_buy), 3158 }, +{ HP_POP(npc->buylist), HP_POP2(HP_npc_buylist), 3160 }, +{ HP_POP(npc->selllist_sub), HP_POP2(HP_npc_selllist_sub), 3162 }, +{ HP_POP(npc->selllist), HP_POP2(HP_npc_selllist), 3164 }, +{ HP_POP(npc->remove_map), HP_POP2(HP_npc_remove_map), 3166 }, +{ HP_POP(npc->unload_ev), HP_POP2(HP_npc_unload_ev), 3168 }, +{ HP_POP(npc->unload_ev_label), HP_POP2(HP_npc_unload_ev_label), 3170 }, +{ HP_POP(npc->unload_dup_sub), HP_POP2(HP_npc_unload_dup_sub), 3172 }, +{ HP_POP(npc->unload_duplicates), HP_POP2(HP_npc_unload_duplicates), 3174 }, +{ HP_POP(npc->unload), HP_POP2(HP_npc_unload), 3176 }, +{ HP_POP(npc->clearsrcfile), HP_POP2(HP_npc_clearsrcfile), 3178 }, +{ HP_POP(npc->addsrcfile), HP_POP2(HP_npc_addsrcfile), 3180 }, +{ HP_POP(npc->delsrcfile), HP_POP2(HP_npc_delsrcfile), 3182 }, +{ HP_POP(npc->parsename), HP_POP2(HP_npc_parsename), 3184 }, +{ HP_POP(npc->add_warp), HP_POP2(HP_npc_add_warp), 3186 }, +{ HP_POP(npc->parse_warp), HP_POP2(HP_npc_parse_warp), 3188 }, +{ HP_POP(npc->parse_shop), HP_POP2(HP_npc_parse_shop), 3190 }, +{ HP_POP(npc->convertlabel_db), HP_POP2(HP_npc_convertlabel_db), 3192 }, +{ HP_POP(npc->skip_script), HP_POP2(HP_npc_skip_script), 3194 }, +{ HP_POP(npc->parse_script), HP_POP2(HP_npc_parse_script), 3196 }, +{ HP_POP(npc->parse_duplicate), HP_POP2(HP_npc_parse_duplicate), 3198 }, +{ HP_POP(npc->duplicate4instance), HP_POP2(HP_npc_duplicate4instance), 3200 }, +{ HP_POP(npc->setcells), HP_POP2(HP_npc_setcells), 3202 }, +{ HP_POP(npc->unsetcells_sub), HP_POP2(HP_npc_unsetcells_sub), 3204 }, +{ HP_POP(npc->unsetcells), HP_POP2(HP_npc_unsetcells), 3206 }, +{ HP_POP(npc->movenpc), HP_POP2(HP_npc_movenpc), 3208 }, +{ HP_POP(npc->setdisplayname), HP_POP2(HP_npc_setdisplayname), 3210 }, +{ HP_POP(npc->setclass), HP_POP2(HP_npc_setclass), 3212 }, +{ HP_POP(npc->do_atcmd_event), HP_POP2(HP_npc_do_atcmd_event), 3214 }, +{ HP_POP(npc->parse_function), HP_POP2(HP_npc_parse_function), 3216 }, +{ HP_POP(npc->parse_mob2), HP_POP2(HP_npc_parse_mob2), 3218 }, +{ HP_POP(npc->parse_mob), HP_POP2(HP_npc_parse_mob), 3220 }, +{ HP_POP(npc->parse_mapflag), HP_POP2(HP_npc_parse_mapflag), 3222 }, +{ HP_POP(npc->parsesrcfile), HP_POP2(HP_npc_parsesrcfile), 3224 }, +{ HP_POP(npc->script_event), HP_POP2(HP_npc_script_event), 3226 }, +{ HP_POP(npc->read_event_script), HP_POP2(HP_npc_read_event_script), 3228 }, +{ HP_POP(npc->path_db_clear_sub), HP_POP2(HP_npc_path_db_clear_sub), 3230 }, +{ HP_POP(npc->ev_label_db_clear_sub), HP_POP2(HP_npc_ev_label_db_clear_sub), 3232 }, +{ HP_POP(npc->reload), HP_POP2(HP_npc_reload), 3234 }, +{ HP_POP(npc->unloadfile), HP_POP2(HP_npc_unloadfile), 3236 }, +{ HP_POP(npc->do_clear_npc), HP_POP2(HP_npc_do_clear_npc), 3238 }, +{ HP_POP(npc->debug_warps_sub), HP_POP2(HP_npc_debug_warps_sub), 3240 }, +{ HP_POP(npc->debug_warps), HP_POP2(HP_npc_debug_warps), 3242 }, +/* party */ +{ HP_POP(party->init), HP_POP2(HP_party_init), 3244 }, +{ HP_POP(party->final), HP_POP2(HP_party_final), 3246 }, +{ HP_POP(party->search), HP_POP2(HP_party_search), 3248 }, +{ HP_POP(party->searchname), HP_POP2(HP_party_searchname), 3250 }, +{ HP_POP(party->getmemberid), HP_POP2(HP_party_getmemberid), 3252 }, +{ HP_POP(party->getavailablesd), HP_POP2(HP_party_getavailablesd), 3254 }, +{ HP_POP(party->create), HP_POP2(HP_party_create), 3256 }, +{ HP_POP(party->created), HP_POP2(HP_party_created), 3258 }, +{ HP_POP(party->request_info), HP_POP2(HP_party_request_info), 3260 }, +{ HP_POP(party->invite), HP_POP2(HP_party_invite), 3262 }, +{ HP_POP(party->member_joined), HP_POP2(HP_party_member_joined), 3264 }, +{ HP_POP(party->member_added), HP_POP2(HP_party_member_added), 3266 }, +{ HP_POP(party->leave), HP_POP2(HP_party_leave), 3268 }, +{ HP_POP(party->removemember), HP_POP2(HP_party_removemember), 3270 }, +{ HP_POP(party->member_withdraw), HP_POP2(HP_party_member_withdraw), 3272 }, +{ HP_POP(party->reply_invite), HP_POP2(HP_party_reply_invite), 3274 }, +{ HP_POP(party->recv_noinfo), HP_POP2(HP_party_recv_noinfo), 3276 }, +{ HP_POP(party->recv_info), HP_POP2(HP_party_recv_info), 3278 }, +{ HP_POP(party->recv_movemap), HP_POP2(HP_party_recv_movemap), 3280 }, +{ HP_POP(party->broken), HP_POP2(HP_party_broken), 3282 }, +{ HP_POP(party->optionchanged), HP_POP2(HP_party_optionchanged), 3284 }, +{ HP_POP(party->changeoption), HP_POP2(HP_party_changeoption), 3286 }, +{ HP_POP(party->changeleader), HP_POP2(HP_party_changeleader), 3288 }, +{ HP_POP(party->send_movemap), HP_POP2(HP_party_send_movemap), 3290 }, +{ HP_POP(party->send_levelup), HP_POP2(HP_party_send_levelup), 3292 }, +{ HP_POP(party->send_logout), HP_POP2(HP_party_send_logout), 3294 }, +{ HP_POP(party->send_message), HP_POP2(HP_party_send_message), 3296 }, +{ HP_POP(party->recv_message), HP_POP2(HP_party_recv_message), 3298 }, +{ HP_POP(party->skill_check), HP_POP2(HP_party_skill_check), 3300 }, +{ HP_POP(party->send_xy_clear), HP_POP2(HP_party_send_xy_clear), 3302 }, +{ HP_POP(party->exp_share), HP_POP2(HP_party_exp_share), 3304 }, +{ HP_POP(party->share_loot), HP_POP2(HP_party_share_loot), 3306 }, +{ HP_POP(party->send_dot_remove), HP_POP2(HP_party_send_dot_remove), 3308 }, +{ HP_POP(party->sub_count), HP_POP2(HP_party_sub_count), 3310 }, +{ HP_POP(party->booking_register), HP_POP2(HP_party_booking_register), 3312 }, +{ HP_POP(party->booking_update), HP_POP2(HP_party_booking_update), 3314 }, +{ HP_POP(party->booking_search), HP_POP2(HP_party_booking_search), 3316 }, +{ HP_POP(party->booking_delete), HP_POP2(HP_party_booking_delete), 3318 }, +{ HP_POP(party->vforeachsamemap), HP_POP2(HP_party_vforeachsamemap), 3320 }, +{ HP_POP(party->send_xy_timer), HP_POP2(HP_party_send_xy_timer), 3322 }, +{ HP_POP(party->fill_member), HP_POP2(HP_party_fill_member), 3324 }, +{ HP_POP(party->sd_check), HP_POP2(HP_party_sd_check), 3326 }, +{ HP_POP(party->check_state), HP_POP2(HP_party_check_state), 3328 }, +{ HP_POP(party->create_booking_data), HP_POP2(HP_party_create_booking_data), 3330 }, +{ HP_POP(party->db_final), HP_POP2(HP_party_db_final), 3332 }, +/* path */ +{ HP_POP(path->blownpos), HP_POP2(HP_path_blownpos), 3334 }, +{ HP_POP(path->search), HP_POP2(HP_path_search), 3336 }, +{ HP_POP(path->search_long), HP_POP2(HP_path_search_long), 3338 }, +{ HP_POP(path->check_distance), HP_POP2(HP_path_check_distance), 3340 }, +{ HP_POP(path->distance), HP_POP2(HP_path_distance), 3342 }, +/* pc */ +{ HP_POP(pc->init), HP_POP2(HP_pc_init), 3344 }, +{ HP_POP(pc->final), HP_POP2(HP_pc_final), 3346 }, +{ HP_POP(pc->get_dummy_sd), HP_POP2(HP_pc_get_dummy_sd), 3348 }, +{ HP_POP(pc->class2idx), HP_POP2(HP_pc_class2idx), 3350 }, +{ HP_POP(pc->get_group_level), HP_POP2(HP_pc_get_group_level), 3352 }, +{ HP_POP(pc->can_give_items), HP_POP2(HP_pc_can_give_items), 3354 }, +{ HP_POP(pc->can_use_command), HP_POP2(HP_pc_can_use_command), 3356 }, +{ HP_POP(pc->has_permission), HP_POP2(HP_pc_has_permission), 3358 }, +{ HP_POP(pc->set_group), HP_POP2(HP_pc_set_group), 3360 }, +{ HP_POP(pc->should_log_commands), HP_POP2(HP_pc_should_log_commands), 3362 }, +{ HP_POP(pc->setrestartvalue), HP_POP2(HP_pc_setrestartvalue), 3364 }, +{ HP_POP(pc->makesavestatus), HP_POP2(HP_pc_makesavestatus), 3366 }, +{ HP_POP(pc->respawn), HP_POP2(HP_pc_respawn), 3368 }, +{ HP_POP(pc->setnewpc), HP_POP2(HP_pc_setnewpc), 3370 }, +{ HP_POP(pc->authok), HP_POP2(HP_pc_authok), 3372 }, +{ HP_POP(pc->authfail), HP_POP2(HP_pc_authfail), 3374 }, +{ HP_POP(pc->reg_received), HP_POP2(HP_pc_reg_received), 3376 }, +{ HP_POP(pc->isequip), HP_POP2(HP_pc_isequip), 3378 }, +{ HP_POP(pc->equippoint), HP_POP2(HP_pc_equippoint), 3380 }, +{ HP_POP(pc->setinventorydata), HP_POP2(HP_pc_setinventorydata), 3382 }, +{ HP_POP(pc->checkskill), HP_POP2(HP_pc_checkskill), 3384 }, +{ HP_POP(pc->checkskill2), HP_POP2(HP_pc_checkskill2), 3386 }, +{ HP_POP(pc->checkallowskill), HP_POP2(HP_pc_checkallowskill), 3388 }, +{ HP_POP(pc->checkequip), HP_POP2(HP_pc_checkequip), 3390 }, +{ HP_POP(pc->calc_skilltree), HP_POP2(HP_pc_calc_skilltree), 3392 }, +{ HP_POP(pc->calc_skilltree_normalize_job), HP_POP2(HP_pc_calc_skilltree_normalize_job), 3394 }, +{ HP_POP(pc->clean_skilltree), HP_POP2(HP_pc_clean_skilltree), 3396 }, +{ HP_POP(pc->setpos), HP_POP2(HP_pc_setpos), 3398 }, +{ HP_POP(pc->setsavepoint), HP_POP2(HP_pc_setsavepoint), 3400 }, +{ HP_POP(pc->randomwarp), HP_POP2(HP_pc_randomwarp), 3402 }, +{ HP_POP(pc->memo), HP_POP2(HP_pc_memo), 3404 }, +{ HP_POP(pc->checkadditem), HP_POP2(HP_pc_checkadditem), 3406 }, +{ HP_POP(pc->inventoryblank), HP_POP2(HP_pc_inventoryblank), 3408 }, +{ HP_POP(pc->search_inventory), HP_POP2(HP_pc_search_inventory), 3410 }, +{ HP_POP(pc->payzeny), HP_POP2(HP_pc_payzeny), 3412 }, +{ HP_POP(pc->additem), HP_POP2(HP_pc_additem), 3414 }, +{ HP_POP(pc->getzeny), HP_POP2(HP_pc_getzeny), 3416 }, +{ HP_POP(pc->delitem), HP_POP2(HP_pc_delitem), 3418 }, +{ HP_POP(pc->paycash), HP_POP2(HP_pc_paycash), 3420 }, +{ HP_POP(pc->getcash), HP_POP2(HP_pc_getcash), 3422 }, +{ HP_POP(pc->cart_additem), HP_POP2(HP_pc_cart_additem), 3424 }, +{ HP_POP(pc->cart_delitem), HP_POP2(HP_pc_cart_delitem), 3426 }, +{ HP_POP(pc->putitemtocart), HP_POP2(HP_pc_putitemtocart), 3428 }, +{ HP_POP(pc->getitemfromcart), HP_POP2(HP_pc_getitemfromcart), 3430 }, +{ HP_POP(pc->cartitem_amount), HP_POP2(HP_pc_cartitem_amount), 3432 }, +{ HP_POP(pc->takeitem), HP_POP2(HP_pc_takeitem), 3434 }, +{ HP_POP(pc->dropitem), HP_POP2(HP_pc_dropitem), 3436 }, +{ HP_POP(pc->isequipped), HP_POP2(HP_pc_isequipped), 3438 }, +{ HP_POP(pc->can_Adopt), HP_POP2(HP_pc_can_Adopt), 3440 }, +{ HP_POP(pc->adoption), HP_POP2(HP_pc_adoption), 3442 }, +{ HP_POP(pc->updateweightstatus), HP_POP2(HP_pc_updateweightstatus), 3444 }, +{ HP_POP(pc->addautobonus), HP_POP2(HP_pc_addautobonus), 3446 }, +{ HP_POP(pc->exeautobonus), HP_POP2(HP_pc_exeautobonus), 3448 }, +{ HP_POP(pc->endautobonus), HP_POP2(HP_pc_endautobonus), 3450 }, +{ HP_POP(pc->delautobonus), HP_POP2(HP_pc_delautobonus), 3452 }, +{ HP_POP(pc->bonus), HP_POP2(HP_pc_bonus), 3454 }, +{ HP_POP(pc->bonus2), HP_POP2(HP_pc_bonus2), 3456 }, +{ HP_POP(pc->bonus3), HP_POP2(HP_pc_bonus3), 3458 }, +{ HP_POP(pc->bonus4), HP_POP2(HP_pc_bonus4), 3460 }, +{ HP_POP(pc->bonus5), HP_POP2(HP_pc_bonus5), 3462 }, +{ HP_POP(pc->skill), HP_POP2(HP_pc_skill), 3464 }, +{ HP_POP(pc->insert_card), HP_POP2(HP_pc_insert_card), 3466 }, +{ HP_POP(pc->steal_item), HP_POP2(HP_pc_steal_item), 3468 }, +{ HP_POP(pc->steal_coin), HP_POP2(HP_pc_steal_coin), 3470 }, +{ HP_POP(pc->modifybuyvalue), HP_POP2(HP_pc_modifybuyvalue), 3472 }, +{ HP_POP(pc->modifysellvalue), HP_POP2(HP_pc_modifysellvalue), 3474 }, +{ HP_POP(pc->follow), HP_POP2(HP_pc_follow), 3476 }, +{ HP_POP(pc->stop_following), HP_POP2(HP_pc_stop_following), 3478 }, +{ HP_POP(pc->maxbaselv), HP_POP2(HP_pc_maxbaselv), 3480 }, +{ HP_POP(pc->maxjoblv), HP_POP2(HP_pc_maxjoblv), 3482 }, +{ HP_POP(pc->checkbaselevelup), HP_POP2(HP_pc_checkbaselevelup), 3484 }, +{ HP_POP(pc->checkjoblevelup), HP_POP2(HP_pc_checkjoblevelup), 3486 }, +{ HP_POP(pc->gainexp), HP_POP2(HP_pc_gainexp), 3488 }, +{ HP_POP(pc->nextbaseexp), HP_POP2(HP_pc_nextbaseexp), 3490 }, +{ HP_POP(pc->thisbaseexp), HP_POP2(HP_pc_thisbaseexp), 3492 }, +{ HP_POP(pc->nextjobexp), HP_POP2(HP_pc_nextjobexp), 3494 }, +{ HP_POP(pc->thisjobexp), HP_POP2(HP_pc_thisjobexp), 3496 }, +{ HP_POP(pc->gets_status_point), HP_POP2(HP_pc_gets_status_point), 3498 }, +{ HP_POP(pc->need_status_point), HP_POP2(HP_pc_need_status_point), 3500 }, +{ HP_POP(pc->statusup), HP_POP2(HP_pc_statusup), 3502 }, +{ HP_POP(pc->statusup2), HP_POP2(HP_pc_statusup2), 3504 }, +{ HP_POP(pc->skillup), HP_POP2(HP_pc_skillup), 3506 }, +{ HP_POP(pc->allskillup), HP_POP2(HP_pc_allskillup), 3508 }, +{ HP_POP(pc->resetlvl), HP_POP2(HP_pc_resetlvl), 3510 }, +{ HP_POP(pc->resetstate), HP_POP2(HP_pc_resetstate), 3512 }, +{ HP_POP(pc->resetskill), HP_POP2(HP_pc_resetskill), 3514 }, +{ HP_POP(pc->resetfeel), HP_POP2(HP_pc_resetfeel), 3516 }, +{ HP_POP(pc->resethate), HP_POP2(HP_pc_resethate), 3518 }, +{ HP_POP(pc->equipitem), HP_POP2(HP_pc_equipitem), 3520 }, +{ HP_POP(pc->unequipitem), HP_POP2(HP_pc_unequipitem), 3522 }, +{ HP_POP(pc->checkitem), HP_POP2(HP_pc_checkitem), 3524 }, +{ HP_POP(pc->useitem), HP_POP2(HP_pc_useitem), 3526 }, +{ HP_POP(pc->skillatk_bonus), HP_POP2(HP_pc_skillatk_bonus), 3528 }, +{ HP_POP(pc->skillheal_bonus), HP_POP2(HP_pc_skillheal_bonus), 3530 }, +{ HP_POP(pc->skillheal2_bonus), HP_POP2(HP_pc_skillheal2_bonus), 3532 }, +{ HP_POP(pc->damage), HP_POP2(HP_pc_damage), 3534 }, +{ HP_POP(pc->dead), HP_POP2(HP_pc_dead), 3536 }, +{ HP_POP(pc->revive), HP_POP2(HP_pc_revive), 3538 }, +{ HP_POP(pc->heal), HP_POP2(HP_pc_heal), 3540 }, +{ HP_POP(pc->itemheal), HP_POP2(HP_pc_itemheal), 3542 }, +{ HP_POP(pc->percentheal), HP_POP2(HP_pc_percentheal), 3544 }, +{ HP_POP(pc->jobchange), HP_POP2(HP_pc_jobchange), 3546 }, +{ HP_POP(pc->setoption), HP_POP2(HP_pc_setoption), 3548 }, +{ HP_POP(pc->setcart), HP_POP2(HP_pc_setcart), 3550 }, +{ HP_POP(pc->setfalcon), HP_POP2(HP_pc_setfalcon), 3552 }, +{ HP_POP(pc->setriding), HP_POP2(HP_pc_setriding), 3554 }, +{ HP_POP(pc->setmadogear), HP_POP2(HP_pc_setmadogear), 3556 }, +{ HP_POP(pc->changelook), HP_POP2(HP_pc_changelook), 3558 }, +{ HP_POP(pc->equiplookall), HP_POP2(HP_pc_equiplookall), 3560 }, +{ HP_POP(pc->readparam), HP_POP2(HP_pc_readparam), 3562 }, +{ HP_POP(pc->setparam), HP_POP2(HP_pc_setparam), 3564 }, +{ HP_POP(pc->readreg), HP_POP2(HP_pc_readreg), 3566 }, +{ HP_POP(pc->setreg), HP_POP2(HP_pc_setreg), 3568 }, +{ HP_POP(pc->readregstr), HP_POP2(HP_pc_readregstr), 3570 }, +{ HP_POP(pc->setregstr), HP_POP2(HP_pc_setregstr), 3572 }, +{ HP_POP(pc->readregistry), HP_POP2(HP_pc_readregistry), 3574 }, +{ HP_POP(pc->setregistry), HP_POP2(HP_pc_setregistry), 3576 }, +{ HP_POP(pc->readregistry_str), HP_POP2(HP_pc_readregistry_str), 3578 }, +{ HP_POP(pc->setregistry_str), HP_POP2(HP_pc_setregistry_str), 3580 }, +{ HP_POP(pc->addeventtimer), HP_POP2(HP_pc_addeventtimer), 3582 }, +{ HP_POP(pc->deleventtimer), HP_POP2(HP_pc_deleventtimer), 3584 }, +{ HP_POP(pc->cleareventtimer), HP_POP2(HP_pc_cleareventtimer), 3586 }, +{ HP_POP(pc->addeventtimercount), HP_POP2(HP_pc_addeventtimercount), 3588 }, +{ HP_POP(pc->calc_pvprank), HP_POP2(HP_pc_calc_pvprank), 3590 }, +{ HP_POP(pc->calc_pvprank_timer), HP_POP2(HP_pc_calc_pvprank_timer), 3592 }, +{ HP_POP(pc->ismarried), HP_POP2(HP_pc_ismarried), 3594 }, +{ HP_POP(pc->marriage), HP_POP2(HP_pc_marriage), 3596 }, +{ HP_POP(pc->divorce), HP_POP2(HP_pc_divorce), 3598 }, +{ HP_POP(pc->get_partner), HP_POP2(HP_pc_get_partner), 3600 }, +{ HP_POP(pc->get_father), HP_POP2(HP_pc_get_father), 3602 }, +{ HP_POP(pc->get_mother), HP_POP2(HP_pc_get_mother), 3604 }, +{ HP_POP(pc->get_child), HP_POP2(HP_pc_get_child), 3606 }, +{ HP_POP(pc->bleeding), HP_POP2(HP_pc_bleeding), 3608 }, +{ HP_POP(pc->regen), HP_POP2(HP_pc_regen), 3610 }, +{ HP_POP(pc->setstand), HP_POP2(HP_pc_setstand), 3612 }, +{ HP_POP(pc->candrop), HP_POP2(HP_pc_candrop), 3614 }, +{ HP_POP(pc->jobid2mapid), HP_POP2(HP_pc_jobid2mapid), 3616 }, +{ HP_POP(pc->mapid2jobid), HP_POP2(HP_pc_mapid2jobid), 3618 }, +{ HP_POP(pc->job_name), HP_POP2(HP_pc_job_name), 3620 }, +{ HP_POP(pc->setinvincibletimer), HP_POP2(HP_pc_setinvincibletimer), 3622 }, +{ HP_POP(pc->delinvincibletimer), HP_POP2(HP_pc_delinvincibletimer), 3624 }, +{ HP_POP(pc->addspiritball), HP_POP2(HP_pc_addspiritball), 3626 }, +{ HP_POP(pc->delspiritball), HP_POP2(HP_pc_delspiritball), 3628 }, +{ HP_POP(pc->addfame), HP_POP2(HP_pc_addfame), 3630 }, +{ HP_POP(pc->famerank), HP_POP2(HP_pc_famerank), 3632 }, +{ HP_POP(pc->set_hate_mob), HP_POP2(HP_pc_set_hate_mob), 3634 }, +{ HP_POP(pc->readdb), HP_POP2(HP_pc_readdb), 3636 }, +{ HP_POP(pc->map_day_timer), HP_POP2(HP_pc_map_day_timer), 3638 }, +{ HP_POP(pc->map_night_timer), HP_POP2(HP_pc_map_night_timer), 3640 }, +{ HP_POP(pc->inventory_rentals), HP_POP2(HP_pc_inventory_rentals), 3642 }, +{ HP_POP(pc->inventory_rental_clear), HP_POP2(HP_pc_inventory_rental_clear), 3644 }, +{ HP_POP(pc->inventory_rental_add), HP_POP2(HP_pc_inventory_rental_add), 3646 }, +{ HP_POP(pc->disguise), HP_POP2(HP_pc_disguise), 3648 }, +{ HP_POP(pc->isautolooting), HP_POP2(HP_pc_isautolooting), 3650 }, +{ HP_POP(pc->overheat), HP_POP2(HP_pc_overheat), 3652 }, +{ HP_POP(pc->banding), HP_POP2(HP_pc_banding), 3654 }, +{ HP_POP(pc->itemcd_do), HP_POP2(HP_pc_itemcd_do), 3656 }, +{ HP_POP(pc->load_combo), HP_POP2(HP_pc_load_combo), 3658 }, +{ HP_POP(pc->add_charm), HP_POP2(HP_pc_add_charm), 3660 }, +{ HP_POP(pc->del_charm), HP_POP2(HP_pc_del_charm), 3662 }, +{ HP_POP(pc->baselevelchanged), HP_POP2(HP_pc_baselevelchanged), 3664 }, +{ HP_POP(pc->level_penalty_mod), HP_POP2(HP_pc_level_penalty_mod), 3666 }, +{ HP_POP(pc->calc_skillpoint), HP_POP2(HP_pc_calc_skillpoint), 3668 }, +{ HP_POP(pc->invincible_timer), HP_POP2(HP_pc_invincible_timer), 3670 }, +{ HP_POP(pc->spiritball_timer), HP_POP2(HP_pc_spiritball_timer), 3672 }, +{ HP_POP(pc->check_banding), HP_POP2(HP_pc_check_banding), 3674 }, +{ HP_POP(pc->inventory_rental_end), HP_POP2(HP_pc_inventory_rental_end), 3676 }, +{ HP_POP(pc->check_skilltree), HP_POP2(HP_pc_check_skilltree), 3678 }, +{ HP_POP(pc->bonus_autospell), HP_POP2(HP_pc_bonus_autospell), 3680 }, +{ HP_POP(pc->bonus_autospell_onskill), HP_POP2(HP_pc_bonus_autospell_onskill), 3682 }, +{ HP_POP(pc->bonus_addeff), HP_POP2(HP_pc_bonus_addeff), 3684 }, +{ HP_POP(pc->bonus_addeff_onskill), HP_POP2(HP_pc_bonus_addeff_onskill), 3686 }, +{ HP_POP(pc->bonus_item_drop), HP_POP2(HP_pc_bonus_item_drop), 3688 }, +{ HP_POP(pc->calcexp), HP_POP2(HP_pc_calcexp), 3690 }, +{ HP_POP(pc->respawn_timer), HP_POP2(HP_pc_respawn_timer), 3692 }, +{ HP_POP(pc->jobchange_killclone), HP_POP2(HP_pc_jobchange_killclone), 3694 }, +{ HP_POP(pc->getstat), HP_POP2(HP_pc_getstat), 3696 }, +{ HP_POP(pc->setstat), HP_POP2(HP_pc_setstat), 3698 }, +{ HP_POP(pc->eventtimer), HP_POP2(HP_pc_eventtimer), 3700 }, +{ HP_POP(pc->daynight_timer_sub), HP_POP2(HP_pc_daynight_timer_sub), 3702 }, +{ HP_POP(pc->charm_timer), HP_POP2(HP_pc_charm_timer), 3704 }, +{ HP_POP(pc->readdb_levelpenalty), HP_POP2(HP_pc_readdb_levelpenalty), 3706 }, +{ HP_POP(pc->autosave), HP_POP2(HP_pc_autosave), 3708 }, +{ HP_POP(pc->follow_timer), HP_POP2(HP_pc_follow_timer), 3710 }, +{ HP_POP(pc->read_skill_tree), HP_POP2(HP_pc_read_skill_tree), 3712 }, +{ HP_POP(pc->isUseitem), HP_POP2(HP_pc_isUseitem), 3714 }, +{ HP_POP(pc->show_steal), HP_POP2(HP_pc_show_steal), 3716 }, +{ HP_POP(pc->checkcombo), HP_POP2(HP_pc_checkcombo), 3718 }, +{ HP_POP(pc->calcweapontype), HP_POP2(HP_pc_calcweapontype), 3720 }, +{ HP_POP(pc->removecombo), HP_POP2(HP_pc_removecombo), 3722 }, +/* pet */ +{ HP_POP(pet->init), HP_POP2(HP_pet_init), 3724 }, +{ HP_POP(pet->final), HP_POP2(HP_pet_final), 3726 }, +{ HP_POP(pet->hungry_val), HP_POP2(HP_pet_hungry_val), 3728 }, +{ HP_POP(pet->set_intimate), HP_POP2(HP_pet_set_intimate), 3730 }, +{ HP_POP(pet->create_egg), HP_POP2(HP_pet_create_egg), 3732 }, +{ HP_POP(pet->unlocktarget), HP_POP2(HP_pet_unlocktarget), 3734 }, +{ HP_POP(pet->attackskill), HP_POP2(HP_pet_attackskill), 3736 }, +{ HP_POP(pet->target_check), HP_POP2(HP_pet_target_check), 3738 }, +{ HP_POP(pet->sc_check), HP_POP2(HP_pet_sc_check), 3740 }, +{ HP_POP(pet->hungry), HP_POP2(HP_pet_hungry), 3742 }, +{ HP_POP(pet->search_petDB_index), HP_POP2(HP_pet_search_petDB_index), 3744 }, +{ HP_POP(pet->hungry_timer_delete), HP_POP2(HP_pet_hungry_timer_delete), 3746 }, +{ HP_POP(pet->performance), HP_POP2(HP_pet_performance), 3748 }, +{ HP_POP(pet->return_egg), HP_POP2(HP_pet_return_egg), 3750 }, +{ HP_POP(pet->data_init), HP_POP2(HP_pet_data_init), 3752 }, +{ HP_POP(pet->birth_process), HP_POP2(HP_pet_birth_process), 3754 }, +{ HP_POP(pet->recv_petdata), HP_POP2(HP_pet_recv_petdata), 3756 }, +{ HP_POP(pet->select_egg), HP_POP2(HP_pet_select_egg), 3758 }, +{ HP_POP(pet->catch_process1), HP_POP2(HP_pet_catch_process1), 3760 }, +{ HP_POP(pet->catch_process2), HP_POP2(HP_pet_catch_process2), 3762 }, +{ HP_POP(pet->get_egg), HP_POP2(HP_pet_get_egg), 3764 }, +{ HP_POP(pet->unequipitem), HP_POP2(HP_pet_unequipitem), 3766 }, +{ HP_POP(pet->food), HP_POP2(HP_pet_food), 3768 }, +{ HP_POP(pet->ai_sub_hard_lootsearch), HP_POP2(HP_pet_ai_sub_hard_lootsearch), 3770 }, +{ HP_POP(pet->menu), HP_POP2(HP_pet_menu), 3772 }, +{ HP_POP(pet->change_name), HP_POP2(HP_pet_change_name), 3774 }, +{ HP_POP(pet->change_name_ack), HP_POP2(HP_pet_change_name_ack), 3776 }, +{ HP_POP(pet->equipitem), HP_POP2(HP_pet_equipitem), 3778 }, +{ HP_POP(pet->randomwalk), HP_POP2(HP_pet_randomwalk), 3780 }, +{ HP_POP(pet->ai_sub_hard), HP_POP2(HP_pet_ai_sub_hard), 3782 }, +{ HP_POP(pet->ai_sub_foreachclient), HP_POP2(HP_pet_ai_sub_foreachclient), 3784 }, +{ HP_POP(pet->ai_hard), HP_POP2(HP_pet_ai_hard), 3786 }, +{ HP_POP(pet->delay_item_drop), HP_POP2(HP_pet_delay_item_drop), 3788 }, +{ HP_POP(pet->lootitem_drop), HP_POP2(HP_pet_lootitem_drop), 3790 }, +{ HP_POP(pet->skill_bonus_timer), HP_POP2(HP_pet_skill_bonus_timer), 3792 }, +{ HP_POP(pet->recovery_timer), HP_POP2(HP_pet_recovery_timer), 3794 }, +{ HP_POP(pet->heal_timer), HP_POP2(HP_pet_heal_timer), 3796 }, +{ HP_POP(pet->skill_support_timer), HP_POP2(HP_pet_skill_support_timer), 3798 }, +{ HP_POP(pet->read_db), HP_POP2(HP_pet_read_db), 3800 }, +/* quest */ +{ HP_POP(quest->init), HP_POP2(HP_quest_init), 3802 }, +{ HP_POP(quest->reload), HP_POP2(HP_quest_reload), 3804 }, +{ HP_POP(quest->search_db), HP_POP2(HP_quest_search_db), 3806 }, +{ HP_POP(quest->pc_login), HP_POP2(HP_quest_pc_login), 3808 }, +{ HP_POP(quest->add), HP_POP2(HP_quest_add), 3810 }, +{ HP_POP(quest->change), HP_POP2(HP_quest_change), 3812 }, +{ HP_POP(quest->delete), HP_POP2(HP_quest_delete), 3814 }, +{ HP_POP(quest->update_objective_sub), HP_POP2(HP_quest_update_objective_sub), 3816 }, +{ HP_POP(quest->update_objective), HP_POP2(HP_quest_update_objective), 3818 }, +{ HP_POP(quest->update_status), HP_POP2(HP_quest_update_status), 3820 }, +{ HP_POP(quest->check), HP_POP2(HP_quest_check), 3822 }, +{ HP_POP(quest->read_db), HP_POP2(HP_quest_read_db), 3824 }, +/* script */ +{ HP_POP(script->init), HP_POP2(HP_script_init), 3826 }, +{ HP_POP(script->final), HP_POP2(HP_script_final), 3828 }, +{ HP_POP(script->reload), HP_POP2(HP_script_reload), 3830 }, +{ HP_POP(script->parse), HP_POP2(HP_script_parse), 3832 }, +{ HP_POP(script->parse_builtin), HP_POP2(HP_script_parse_builtin), 3834 }, +{ HP_POP(script->parse_subexpr), HP_POP2(HP_script_parse_subexpr), 3836 }, +{ HP_POP(script->skip_space), HP_POP2(HP_script_skip_space), 3838 }, +{ HP_POP(script->error), HP_POP2(HP_script_error), 3840 }, +{ HP_POP(script->warning), HP_POP2(HP_script_warning), 3842 }, +{ HP_POP(script->addScript), HP_POP2(HP_script_addScript), 3844 }, +{ HP_POP(script->conv_num), HP_POP2(HP_script_conv_num), 3846 }, +{ HP_POP(script->conv_str), HP_POP2(HP_script_conv_str), 3848 }, +{ HP_POP(script->rid2sd), HP_POP2(HP_script_rid2sd), 3850 }, +{ HP_POP(script->detach_rid), HP_POP2(HP_script_detach_rid), 3852 }, +{ HP_POP(script->push_val), HP_POP2(HP_script_push_val), 3854 }, +{ HP_POP(script->get_val), HP_POP2(HP_script_get_val), 3856 }, +{ HP_POP(script->get_val2), HP_POP2(HP_script_get_val2), 3858 }, +{ HP_POP(script->push_str), HP_POP2(HP_script_push_str), 3860 }, +{ HP_POP(script->push_copy), HP_POP2(HP_script_push_copy), 3862 }, +{ HP_POP(script->pop_stack), HP_POP2(HP_script_pop_stack), 3864 }, +{ HP_POP(script->set_constant), HP_POP2(HP_script_set_constant), 3866 }, +{ HP_POP(script->set_constant2), HP_POP2(HP_script_set_constant2), 3868 }, +{ HP_POP(script->set_constant_force), HP_POP2(HP_script_set_constant_force), 3870 }, +{ HP_POP(script->get_constant), HP_POP2(HP_script_get_constant), 3872 }, +{ HP_POP(script->label_add), HP_POP2(HP_script_label_add), 3874 }, +{ HP_POP(script->run), HP_POP2(HP_script_run), 3876 }, +{ HP_POP(script->run_main), HP_POP2(HP_script_run_main), 3878 }, +{ HP_POP(script->run_timer), HP_POP2(HP_script_run_timer), 3880 }, +{ HP_POP(script->set_var), HP_POP2(HP_script_set_var), 3882 }, +{ HP_POP(script->stop_instances), HP_POP2(HP_script_stop_instances), 3884 }, +{ HP_POP(script->free_code), HP_POP2(HP_script_free_code), 3886 }, +{ HP_POP(script->free_vars), HP_POP2(HP_script_free_vars), 3888 }, +{ HP_POP(script->alloc_state), HP_POP2(HP_script_alloc_state), 3890 }, +{ HP_POP(script->free_state), HP_POP2(HP_script_free_state), 3892 }, +{ HP_POP(script->run_autobonus), HP_POP2(HP_script_run_autobonus), 3894 }, +{ HP_POP(script->cleararray_pc), HP_POP2(HP_script_cleararray_pc), 3896 }, +{ HP_POP(script->setarray_pc), HP_POP2(HP_script_setarray_pc), 3898 }, +{ HP_POP(script->config_read), HP_POP2(HP_script_config_read), 3900 }, +{ HP_POP(script->add_str), HP_POP2(HP_script_add_str), 3902 }, +{ HP_POP(script->get_str), HP_POP2(HP_script_get_str), 3904 }, +{ HP_POP(script->search_str), HP_POP2(HP_script_search_str), 3906 }, +{ HP_POP(script->setd_sub), HP_POP2(HP_script_setd_sub), 3908 }, +{ HP_POP(script->attach_state), HP_POP2(HP_script_attach_state), 3910 }, +{ HP_POP(script->queue), HP_POP2(HP_script_queue), 3912 }, +{ HP_POP(script->queue_add), HP_POP2(HP_script_queue_add), 3914 }, +{ HP_POP(script->queue_del), HP_POP2(HP_script_queue_del), 3916 }, +{ HP_POP(script->queue_remove), HP_POP2(HP_script_queue_remove), 3918 }, +{ HP_POP(script->queue_create), HP_POP2(HP_script_queue_create), 3920 }, +{ HP_POP(script->queue_clear), HP_POP2(HP_script_queue_clear), 3922 }, +{ HP_POP(script->parse_curly_close), HP_POP2(HP_script_parse_curly_close), 3924 }, +{ HP_POP(script->parse_syntax_close), HP_POP2(HP_script_parse_syntax_close), 3926 }, +{ HP_POP(script->parse_syntax_close_sub), HP_POP2(HP_script_parse_syntax_close_sub), 3928 }, +{ HP_POP(script->parse_syntax), HP_POP2(HP_script_parse_syntax), 3930 }, +{ HP_POP(script->get_com), HP_POP2(HP_script_get_com), 3932 }, +{ HP_POP(script->get_num), HP_POP2(HP_script_get_num), 3934 }, +{ HP_POP(script->op2name), HP_POP2(HP_script_op2name), 3936 }, +{ HP_POP(script->reportsrc), HP_POP2(HP_script_reportsrc), 3938 }, +{ HP_POP(script->reportdata), HP_POP2(HP_script_reportdata), 3940 }, +{ HP_POP(script->reportfunc), HP_POP2(HP_script_reportfunc), 3942 }, +{ HP_POP(script->disp_error_message2), HP_POP2(HP_script_disp_error_message2), 3944 }, +{ HP_POP(script->disp_warning_message), HP_POP2(HP_script_disp_warning_message), 3946 }, +{ HP_POP(script->check_event), HP_POP2(HP_script_check_event), 3948 }, +{ HP_POP(script->calc_hash), HP_POP2(HP_script_calc_hash), 3950 }, +{ HP_POP(script->addb), HP_POP2(HP_script_addb), 3952 }, +{ HP_POP(script->addc), HP_POP2(HP_script_addc), 3954 }, +{ HP_POP(script->addi), HP_POP2(HP_script_addi), 3956 }, +{ HP_POP(script->addl), HP_POP2(HP_script_addl), 3958 }, +{ HP_POP(script->set_label), HP_POP2(HP_script_set_label), 3960 }, +{ HP_POP(script->skip_word), HP_POP2(HP_script_skip_word), 3962 }, +{ HP_POP(script->add_word), HP_POP2(HP_script_add_word), 3964 }, +{ HP_POP(script->parse_callfunc), HP_POP2(HP_script_parse_callfunc), 3966 }, +{ HP_POP(script->parse_nextline), HP_POP2(HP_script_parse_nextline), 3968 }, +{ HP_POP(script->parse_variable), HP_POP2(HP_script_parse_variable), 3970 }, +{ HP_POP(script->parse_simpleexpr), HP_POP2(HP_script_parse_simpleexpr), 3972 }, +{ HP_POP(script->parse_expr), HP_POP2(HP_script_parse_expr), 3974 }, +{ HP_POP(script->parse_line), HP_POP2(HP_script_parse_line), 3976 }, +{ HP_POP(script->read_constdb), HP_POP2(HP_script_read_constdb), 3978 }, +{ HP_POP(script->print_line), HP_POP2(HP_script_print_line), 3980 }, +{ HP_POP(script->errorwarning_sub), HP_POP2(HP_script_errorwarning_sub), 3982 }, +{ HP_POP(script->set_reg), HP_POP2(HP_script_set_reg), 3984 }, +{ HP_POP(script->stack_expand), HP_POP2(HP_script_stack_expand), 3986 }, +{ HP_POP(script->push_retinfo), HP_POP2(HP_script_push_retinfo), 3988 }, +{ HP_POP(script->pop_val), HP_POP2(HP_script_pop_val), 3990 }, +{ HP_POP(script->op_3), HP_POP2(HP_script_op_3), 3992 }, +{ HP_POP(script->op_2str), HP_POP2(HP_script_op_2str), 3994 }, +{ HP_POP(script->op_2num), HP_POP2(HP_script_op_2num), 3996 }, +{ HP_POP(script->op_2), HP_POP2(HP_script_op_2), 3998 }, +{ HP_POP(script->op_1), HP_POP2(HP_script_op_1), 4000 }, +{ HP_POP(script->check_buildin_argtype), HP_POP2(HP_script_check_buildin_argtype), 4002 }, +{ HP_POP(script->detach_state), HP_POP2(HP_script_detach_state), 4004 }, +{ HP_POP(script->db_free_code_sub), HP_POP2(HP_script_db_free_code_sub), 4006 }, +{ HP_POP(script->add_autobonus), HP_POP2(HP_script_add_autobonus), 4008 }, +{ HP_POP(script->menu_countoptions), HP_POP2(HP_script_menu_countoptions), 4010 }, +{ HP_POP(script->buildin_areawarp_sub), HP_POP2(HP_script_buildin_areawarp_sub), 4012 }, +{ HP_POP(script->buildin_areapercentheal_sub), HP_POP2(HP_script_buildin_areapercentheal_sub), 4014 }, +{ HP_POP(script->getarraysize), HP_POP2(HP_script_getarraysize), 4016 }, +{ HP_POP(script->buildin_delitem_delete), HP_POP2(HP_script_buildin_delitem_delete), 4018 }, +{ HP_POP(script->buildin_delitem_search), HP_POP2(HP_script_buildin_delitem_search), 4020 }, +{ HP_POP(script->buildin_killmonster_sub_strip), HP_POP2(HP_script_buildin_killmonster_sub_strip), 4022 }, +{ HP_POP(script->buildin_killmonster_sub), HP_POP2(HP_script_buildin_killmonster_sub), 4024 }, +{ HP_POP(script->buildin_killmonsterall_sub_strip), HP_POP2(HP_script_buildin_killmonsterall_sub_strip), 4026 }, +{ HP_POP(script->buildin_killmonsterall_sub), HP_POP2(HP_script_buildin_killmonsterall_sub), 4028 }, +{ HP_POP(script->buildin_announce_sub), HP_POP2(HP_script_buildin_announce_sub), 4030 }, +{ HP_POP(script->buildin_getareausers_sub), HP_POP2(HP_script_buildin_getareausers_sub), 4032 }, +{ HP_POP(script->buildin_getareadropitem_sub), HP_POP2(HP_script_buildin_getareadropitem_sub), 4034 }, +{ HP_POP(script->mapflag_pvp_sub), HP_POP2(HP_script_mapflag_pvp_sub), 4036 }, +{ HP_POP(script->buildin_pvpoff_sub), HP_POP2(HP_script_buildin_pvpoff_sub), 4038 }, +{ HP_POP(script->buildin_maprespawnguildid_sub_pc), HP_POP2(HP_script_buildin_maprespawnguildid_sub_pc), 4040 }, +{ HP_POP(script->buildin_maprespawnguildid_sub_mob), HP_POP2(HP_script_buildin_maprespawnguildid_sub_mob), 4042 }, +{ HP_POP(script->buildin_mobcount_sub), HP_POP2(HP_script_buildin_mobcount_sub), 4044 }, +{ HP_POP(script->playBGM_sub), HP_POP2(HP_script_playBGM_sub), 4046 }, +{ HP_POP(script->playBGM_foreachpc_sub), HP_POP2(HP_script_playBGM_foreachpc_sub), 4048 }, +{ HP_POP(script->soundeffect_sub), HP_POP2(HP_script_soundeffect_sub), 4050 }, +{ HP_POP(script->buildin_query_sql_sub), HP_POP2(HP_script_buildin_query_sql_sub), 4052 }, +{ HP_POP(script->axtoi), HP_POP2(HP_script_axtoi), 4054 }, +{ HP_POP(script->buildin_instance_warpall_sub), HP_POP2(HP_script_buildin_instance_warpall_sub), 4056 }, +{ HP_POP(script->buildin_mobuseskill_sub), HP_POP2(HP_script_buildin_mobuseskill_sub), 4058 }, +{ HP_POP(script->cleanfloor_sub), HP_POP2(HP_script_cleanfloor_sub), 4060 }, +{ HP_POP(script->run_func), HP_POP2(HP_script_run_func), 4062 }, +/* searchstore */ +{ HP_POP(searchstore->open), HP_POP2(HP_searchstore_open), 4064 }, +{ HP_POP(searchstore->query), HP_POP2(HP_searchstore_query), 4066 }, +{ HP_POP(searchstore->querynext), HP_POP2(HP_searchstore_querynext), 4068 }, +{ HP_POP(searchstore->next), HP_POP2(HP_searchstore_next), 4070 }, +{ HP_POP(searchstore->clear), HP_POP2(HP_searchstore_clear), 4072 }, +{ HP_POP(searchstore->close), HP_POP2(HP_searchstore_close), 4074 }, +{ HP_POP(searchstore->click), HP_POP2(HP_searchstore_click), 4076 }, +{ HP_POP(searchstore->queryremote), HP_POP2(HP_searchstore_queryremote), 4078 }, +{ HP_POP(searchstore->clearremote), HP_POP2(HP_searchstore_clearremote), 4080 }, +{ HP_POP(searchstore->result), HP_POP2(HP_searchstore_result), 4082 }, +/* skill */ +{ HP_POP(skill->init), HP_POP2(HP_skill_init), 4084 }, +{ HP_POP(skill->final), HP_POP2(HP_skill_final), 4086 }, +{ HP_POP(skill->reload), HP_POP2(HP_skill_reload), 4088 }, +{ HP_POP(skill->read_db), HP_POP2(HP_skill_read_db), 4090 }, +{ HP_POP(skill->get_index), HP_POP2(HP_skill_get_index), 4092 }, +{ HP_POP(skill->get_type), HP_POP2(HP_skill_get_type), 4094 }, +{ HP_POP(skill->get_hit), HP_POP2(HP_skill_get_hit), 4096 }, +{ HP_POP(skill->get_inf), HP_POP2(HP_skill_get_inf), 4098 }, +{ HP_POP(skill->get_ele), HP_POP2(HP_skill_get_ele), 4100 }, +{ HP_POP(skill->get_nk), HP_POP2(HP_skill_get_nk), 4102 }, +{ HP_POP(skill->get_max), HP_POP2(HP_skill_get_max), 4104 }, +{ HP_POP(skill->get_range), HP_POP2(HP_skill_get_range), 4106 }, +{ HP_POP(skill->get_range2), HP_POP2(HP_skill_get_range2), 4108 }, +{ HP_POP(skill->get_splash), HP_POP2(HP_skill_get_splash), 4110 }, +{ HP_POP(skill->get_hp), HP_POP2(HP_skill_get_hp), 4112 }, +{ HP_POP(skill->get_mhp), HP_POP2(HP_skill_get_mhp), 4114 }, +{ HP_POP(skill->get_sp), HP_POP2(HP_skill_get_sp), 4116 }, +{ HP_POP(skill->get_state), HP_POP2(HP_skill_get_state), 4118 }, +{ HP_POP(skill->get_spiritball), HP_POP2(HP_skill_get_spiritball), 4120 }, +{ HP_POP(skill->get_zeny), HP_POP2(HP_skill_get_zeny), 4122 }, +{ HP_POP(skill->get_num), HP_POP2(HP_skill_get_num), 4124 }, +{ HP_POP(skill->get_cast), HP_POP2(HP_skill_get_cast), 4126 }, +{ HP_POP(skill->get_delay), HP_POP2(HP_skill_get_delay), 4128 }, +{ HP_POP(skill->get_walkdelay), HP_POP2(HP_skill_get_walkdelay), 4130 }, +{ HP_POP(skill->get_time), HP_POP2(HP_skill_get_time), 4132 }, +{ HP_POP(skill->get_time2), HP_POP2(HP_skill_get_time2), 4134 }, +{ HP_POP(skill->get_castnodex), HP_POP2(HP_skill_get_castnodex), 4136 }, +{ HP_POP(skill->get_delaynodex), HP_POP2(HP_skill_get_delaynodex), 4138 }, +{ HP_POP(skill->get_castdef), HP_POP2(HP_skill_get_castdef), 4140 }, +{ HP_POP(skill->get_weapontype), HP_POP2(HP_skill_get_weapontype), 4142 }, +{ HP_POP(skill->get_ammotype), HP_POP2(HP_skill_get_ammotype), 4144 }, +{ HP_POP(skill->get_ammo_qty), HP_POP2(HP_skill_get_ammo_qty), 4146 }, +{ HP_POP(skill->get_unit_id), HP_POP2(HP_skill_get_unit_id), 4148 }, +{ HP_POP(skill->get_inf2), HP_POP2(HP_skill_get_inf2), 4150 }, +{ HP_POP(skill->get_castcancel), HP_POP2(HP_skill_get_castcancel), 4152 }, +{ HP_POP(skill->get_maxcount), HP_POP2(HP_skill_get_maxcount), 4154 }, +{ HP_POP(skill->get_blewcount), HP_POP2(HP_skill_get_blewcount), 4156 }, +{ HP_POP(skill->get_unit_flag), HP_POP2(HP_skill_get_unit_flag), 4158 }, +{ HP_POP(skill->get_unit_target), HP_POP2(HP_skill_get_unit_target), 4160 }, +{ HP_POP(skill->get_unit_interval), HP_POP2(HP_skill_get_unit_interval), 4162 }, +{ HP_POP(skill->get_unit_bl_target), HP_POP2(HP_skill_get_unit_bl_target), 4164 }, +{ HP_POP(skill->get_unit_layout_type), HP_POP2(HP_skill_get_unit_layout_type), 4166 }, +{ HP_POP(skill->get_unit_range), HP_POP2(HP_skill_get_unit_range), 4168 }, +{ HP_POP(skill->get_cooldown), HP_POP2(HP_skill_get_cooldown), 4170 }, +{ HP_POP(skill->tree_get_max), HP_POP2(HP_skill_tree_get_max), 4172 }, +{ HP_POP(skill->get_name), HP_POP2(HP_skill_get_name), 4174 }, +{ HP_POP(skill->get_desc), HP_POP2(HP_skill_get_desc), 4176 }, +{ HP_POP(skill->chk), HP_POP2(HP_skill_chk), 4178 }, +{ HP_POP(skill->get_casttype), HP_POP2(HP_skill_get_casttype), 4180 }, +{ HP_POP(skill->get_casttype2), HP_POP2(HP_skill_get_casttype2), 4182 }, +{ HP_POP(skill->name2id), HP_POP2(HP_skill_name2id), 4184 }, +{ HP_POP(skill->isammotype), HP_POP2(HP_skill_isammotype), 4186 }, +{ HP_POP(skill->castend_id), HP_POP2(HP_skill_castend_id), 4188 }, +{ HP_POP(skill->castend_pos), HP_POP2(HP_skill_castend_pos), 4190 }, +{ HP_POP(skill->castend_map), HP_POP2(HP_skill_castend_map), 4192 }, +{ HP_POP(skill->cleartimerskill), HP_POP2(HP_skill_cleartimerskill), 4194 }, +{ HP_POP(skill->addtimerskill), HP_POP2(HP_skill_addtimerskill), 4196 }, +{ HP_POP(skill->additional_effect), HP_POP2(HP_skill_additional_effect), 4198 }, +{ HP_POP(skill->counter_additional_effect), HP_POP2(HP_skill_counter_additional_effect), 4200 }, +{ HP_POP(skill->blown), HP_POP2(HP_skill_blown), 4202 }, +{ HP_POP(skill->break_equip), HP_POP2(HP_skill_break_equip), 4204 }, +{ HP_POP(skill->strip_equip), HP_POP2(HP_skill_strip_equip), 4206 }, +{ HP_POP(skill->id2group), HP_POP2(HP_skill_id2group), 4208 }, +{ HP_POP(skill->unitsetting), HP_POP2(HP_skill_unitsetting), 4210 }, +{ HP_POP(skill->initunit), HP_POP2(HP_skill_initunit), 4212 }, +{ HP_POP(skill->delunit), HP_POP2(HP_skill_delunit), 4214 }, +{ HP_POP(skill->init_unitgroup), HP_POP2(HP_skill_init_unitgroup), 4216 }, +{ HP_POP(skill->del_unitgroup), HP_POP2(HP_skill_del_unitgroup), 4218 }, +{ HP_POP(skill->clear_unitgroup), HP_POP2(HP_skill_clear_unitgroup), 4220 }, +{ HP_POP(skill->clear_group), HP_POP2(HP_skill_clear_group), 4222 }, +{ HP_POP(skill->unit_onplace), HP_POP2(HP_skill_unit_onplace), 4224 }, +{ HP_POP(skill->unit_ondamaged), HP_POP2(HP_skill_unit_ondamaged), 4226 }, +{ HP_POP(skill->cast_fix), HP_POP2(HP_skill_cast_fix), 4228 }, +{ HP_POP(skill->cast_fix_sc), HP_POP2(HP_skill_cast_fix_sc), 4230 }, +{ HP_POP(skill->vf_cast_fix), HP_POP2(HP_skill_vf_cast_fix), 4232 }, +{ HP_POP(skill->delay_fix), HP_POP2(HP_skill_delay_fix), 4234 }, +{ HP_POP(skill->check_condition_castbegin), HP_POP2(HP_skill_check_condition_castbegin), 4236 }, +{ HP_POP(skill->check_condition_castend), HP_POP2(HP_skill_check_condition_castend), 4238 }, +{ HP_POP(skill->consume_requirement), HP_POP2(HP_skill_consume_requirement), 4240 }, +{ HP_POP(skill->get_requirement), HP_POP2(HP_skill_get_requirement), 4242 }, +{ HP_POP(skill->check_pc_partner), HP_POP2(HP_skill_check_pc_partner), 4244 }, +{ HP_POP(skill->unit_move), HP_POP2(HP_skill_unit_move), 4246 }, +{ HP_POP(skill->unit_onleft), HP_POP2(HP_skill_unit_onleft), 4248 }, +{ HP_POP(skill->unit_onout), HP_POP2(HP_skill_unit_onout), 4250 }, +{ HP_POP(skill->unit_move_unit_group), HP_POP2(HP_skill_unit_move_unit_group), 4252 }, +{ HP_POP(skill->sit), HP_POP2(HP_skill_sit), 4254 }, +{ HP_POP(skill->brandishspear), HP_POP2(HP_skill_brandishspear), 4256 }, +{ HP_POP(skill->repairweapon), HP_POP2(HP_skill_repairweapon), 4258 }, +{ HP_POP(skill->identify), HP_POP2(HP_skill_identify), 4260 }, +{ HP_POP(skill->weaponrefine), HP_POP2(HP_skill_weaponrefine), 4262 }, +{ HP_POP(skill->autospell), HP_POP2(HP_skill_autospell), 4264 }, +{ HP_POP(skill->calc_heal), HP_POP2(HP_skill_calc_heal), 4266 }, +{ HP_POP(skill->check_cloaking), HP_POP2(HP_skill_check_cloaking), 4268 }, +{ HP_POP(skill->enchant_elemental_end), HP_POP2(HP_skill_enchant_elemental_end), 4270 }, +{ HP_POP(skill->not_ok), HP_POP2(HP_skill_not_ok), 4272 }, +{ HP_POP(skill->not_ok_hom), HP_POP2(HP_skill_not_ok_hom), 4274 }, +{ HP_POP(skill->not_ok_mercenary), HP_POP2(HP_skill_not_ok_mercenary), 4276 }, +{ HP_POP(skill->chastle_mob_changetarget), HP_POP2(HP_skill_chastle_mob_changetarget), 4278 }, +{ HP_POP(skill->can_produce_mix), HP_POP2(HP_skill_can_produce_mix), 4280 }, +{ HP_POP(skill->produce_mix), HP_POP2(HP_skill_produce_mix), 4282 }, +{ HP_POP(skill->arrow_create), HP_POP2(HP_skill_arrow_create), 4284 }, +{ HP_POP(skill->castend_nodamage_id), HP_POP2(HP_skill_castend_nodamage_id), 4286 }, +{ HP_POP(skill->castend_damage_id), HP_POP2(HP_skill_castend_damage_id), 4288 }, +{ HP_POP(skill->castend_pos2), HP_POP2(HP_skill_castend_pos2), 4290 }, +{ HP_POP(skill->blockpc_start), HP_POP2(HP_skill_blockpc_start), 4292 }, +{ HP_POP(skill->blockhomun_start), HP_POP2(HP_skill_blockhomun_start), 4294 }, +{ HP_POP(skill->blockmerc_start), HP_POP2(HP_skill_blockmerc_start), 4296 }, +{ HP_POP(skill->attack), HP_POP2(HP_skill_attack), 4298 }, +{ HP_POP(skill->attack_area), HP_POP2(HP_skill_attack_area), 4300 }, +{ HP_POP(skill->area_sub), HP_POP2(HP_skill_area_sub), 4302 }, +{ HP_POP(skill->area_sub_count), HP_POP2(HP_skill_area_sub_count), 4304 }, +{ HP_POP(skill->check_unit_range), HP_POP2(HP_skill_check_unit_range), 4306 }, +{ HP_POP(skill->check_unit_range_sub), HP_POP2(HP_skill_check_unit_range_sub), 4308 }, +{ HP_POP(skill->check_unit_range2), HP_POP2(HP_skill_check_unit_range2), 4310 }, +{ HP_POP(skill->check_unit_range2_sub), HP_POP2(HP_skill_check_unit_range2_sub), 4312 }, +{ HP_POP(skill->toggle_magicpower), HP_POP2(HP_skill_toggle_magicpower), 4314 }, +{ HP_POP(skill->magic_reflect), HP_POP2(HP_skill_magic_reflect), 4316 }, +{ HP_POP(skill->onskillusage), HP_POP2(HP_skill_onskillusage), 4318 }, +{ HP_POP(skill->cell_overlap), HP_POP2(HP_skill_cell_overlap), 4320 }, +{ HP_POP(skill->timerskill), HP_POP2(HP_skill_timerskill), 4322 }, +{ HP_POP(skill->trap_splash), HP_POP2(HP_skill_trap_splash), 4324 }, +{ HP_POP(skill->check_condition_mercenary), HP_POP2(HP_skill_check_condition_mercenary), 4326 }, +{ HP_POP(skill->locate_element_field), HP_POP2(HP_skill_locate_element_field), 4328 }, +{ HP_POP(skill->graffitiremover), HP_POP2(HP_skill_graffitiremover), 4330 }, +{ HP_POP(skill->activate_reverberation), HP_POP2(HP_skill_activate_reverberation), 4332 }, +{ HP_POP(skill->dance_overlap_sub), HP_POP2(HP_skill_dance_overlap_sub), 4334 }, +{ HP_POP(skill->dance_overlap), HP_POP2(HP_skill_dance_overlap), 4336 }, +{ HP_POP(skill->get_unit_layout), HP_POP2(HP_skill_get_unit_layout), 4338 }, +{ HP_POP(skill->frostjoke_scream), HP_POP2(HP_skill_frostjoke_scream), 4340 }, +{ HP_POP(skill->greed), HP_POP2(HP_skill_greed), 4342 }, +{ HP_POP(skill->destroy_trap), HP_POP2(HP_skill_destroy_trap), 4344 }, +{ HP_POP(skill->icewall_block), HP_POP2(HP_skill_icewall_block), 4346 }, +{ HP_POP(skill->unitgrouptickset_search), HP_POP2(HP_skill_unitgrouptickset_search), 4348 }, +{ HP_POP(skill->dance_switch), HP_POP2(HP_skill_dance_switch), 4350 }, +{ HP_POP(skill->check_condition_char_sub), HP_POP2(HP_skill_check_condition_char_sub), 4352 }, +{ HP_POP(skill->check_condition_mob_master_sub), HP_POP2(HP_skill_check_condition_mob_master_sub), 4354 }, +{ HP_POP(skill->brandishspear_first), HP_POP2(HP_skill_brandishspear_first), 4356 }, +{ HP_POP(skill->brandishspear_dir), HP_POP2(HP_skill_brandishspear_dir), 4358 }, +{ HP_POP(skill->get_fixed_cast), HP_POP2(HP_skill_get_fixed_cast), 4360 }, +{ HP_POP(skill->sit_count), HP_POP2(HP_skill_sit_count), 4362 }, +{ HP_POP(skill->sit_in), HP_POP2(HP_skill_sit_in), 4364 }, +{ HP_POP(skill->sit_out), HP_POP2(HP_skill_sit_out), 4366 }, +{ HP_POP(skill->unitsetmapcell), HP_POP2(HP_skill_unitsetmapcell), 4368 }, +{ HP_POP(skill->unit_onplace_timer), HP_POP2(HP_skill_unit_onplace_timer), 4370 }, +{ HP_POP(skill->unit_effect), HP_POP2(HP_skill_unit_effect), 4372 }, +{ HP_POP(skill->unit_timer_sub_onplace), HP_POP2(HP_skill_unit_timer_sub_onplace), 4374 }, +{ HP_POP(skill->unit_move_sub), HP_POP2(HP_skill_unit_move_sub), 4376 }, +{ HP_POP(skill->blockpc_end), HP_POP2(HP_skill_blockpc_end), 4378 }, +{ HP_POP(skill->blockhomun_end), HP_POP2(HP_skill_blockhomun_end), 4380 }, +{ HP_POP(skill->blockmerc_end), HP_POP2(HP_skill_blockmerc_end), 4382 }, +{ HP_POP(skill->split_atoi), HP_POP2(HP_skill_split_atoi), 4384 }, +{ HP_POP(skill->unit_timer), HP_POP2(HP_skill_unit_timer), 4386 }, +{ HP_POP(skill->unit_timer_sub), HP_POP2(HP_skill_unit_timer_sub), 4388 }, +{ HP_POP(skill->init_unit_layout), HP_POP2(HP_skill_init_unit_layout), 4390 }, +{ HP_POP(skill->parse_row_skilldb), HP_POP2(HP_skill_parse_row_skilldb), 4392 }, +{ HP_POP(skill->parse_row_requiredb), HP_POP2(HP_skill_parse_row_requiredb), 4394 }, +{ HP_POP(skill->parse_row_castdb), HP_POP2(HP_skill_parse_row_castdb), 4396 }, +{ HP_POP(skill->parse_row_castnodexdb), HP_POP2(HP_skill_parse_row_castnodexdb), 4398 }, +{ HP_POP(skill->parse_row_unitdb), HP_POP2(HP_skill_parse_row_unitdb), 4400 }, +{ HP_POP(skill->parse_row_producedb), HP_POP2(HP_skill_parse_row_producedb), 4402 }, +{ HP_POP(skill->parse_row_createarrowdb), HP_POP2(HP_skill_parse_row_createarrowdb), 4404 }, +{ HP_POP(skill->parse_row_abradb), HP_POP2(HP_skill_parse_row_abradb), 4406 }, +{ HP_POP(skill->parse_row_spellbookdb), HP_POP2(HP_skill_parse_row_spellbookdb), 4408 }, +{ HP_POP(skill->parse_row_magicmushroomdb), HP_POP2(HP_skill_parse_row_magicmushroomdb), 4410 }, +{ HP_POP(skill->parse_row_reproducedb), HP_POP2(HP_skill_parse_row_reproducedb), 4412 }, +{ HP_POP(skill->parse_row_improvisedb), HP_POP2(HP_skill_parse_row_improvisedb), 4414 }, +{ HP_POP(skill->parse_row_changematerialdb), HP_POP2(HP_skill_parse_row_changematerialdb), 4416 }, +{ HP_POP(skill->usave_add), HP_POP2(HP_skill_usave_add), 4418 }, +{ HP_POP(skill->usave_trigger), HP_POP2(HP_skill_usave_trigger), 4420 }, +{ HP_POP(skill->cooldown_load), HP_POP2(HP_skill_cooldown_load), 4422 }, +{ HP_POP(skill->spellbook), HP_POP2(HP_skill_spellbook), 4424 }, +{ HP_POP(skill->block_check), HP_POP2(HP_skill_block_check), 4426 }, +{ HP_POP(skill->detonator), HP_POP2(HP_skill_detonator), 4428 }, +{ HP_POP(skill->check_camouflage), HP_POP2(HP_skill_check_camouflage), 4430 }, +{ HP_POP(skill->magicdecoy), HP_POP2(HP_skill_magicdecoy), 4432 }, +{ HP_POP(skill->poisoningweapon), HP_POP2(HP_skill_poisoningweapon), 4434 }, +{ HP_POP(skill->select_menu), HP_POP2(HP_skill_select_menu), 4436 }, +{ HP_POP(skill->elementalanalysis), HP_POP2(HP_skill_elementalanalysis), 4438 }, +{ HP_POP(skill->changematerial), HP_POP2(HP_skill_changematerial), 4440 }, +{ HP_POP(skill->get_elemental_type), HP_POP2(HP_skill_get_elemental_type), 4442 }, +{ HP_POP(skill->cooldown_save), HP_POP2(HP_skill_cooldown_save), 4444 }, +{ HP_POP(skill->maelstrom_suction), HP_POP2(HP_skill_maelstrom_suction), 4446 }, +{ HP_POP(skill->get_new_group_id), HP_POP2(HP_skill_get_new_group_id), 4448 }, +/* status */ +{ HP_POP(status->init), HP_POP2(HP_status_init), 4450 }, +{ HP_POP(status->final), HP_POP2(HP_status_final), 4452 }, +{ HP_POP(status->get_refine_chance), HP_POP2(HP_status_get_refine_chance), 4454 }, +{ HP_POP(status->skill2sc), HP_POP2(HP_status_skill2sc), 4456 }, +{ HP_POP(status->sc2skill), HP_POP2(HP_status_sc2skill), 4458 }, +{ HP_POP(status->sc2scb_flag), HP_POP2(HP_status_sc2scb_flag), 4460 }, +{ HP_POP(status->type2relevant_bl_types), HP_POP2(HP_status_type2relevant_bl_types), 4462 }, +{ HP_POP(status->get_sc_type), HP_POP2(HP_status_get_sc_type), 4464 }, +{ HP_POP(status->damage), HP_POP2(HP_status_damage), 4466 }, +{ HP_POP(status->charge), HP_POP2(HP_status_charge), 4468 }, +{ HP_POP(status->percent_change), HP_POP2(HP_status_percent_change), 4470 }, +{ HP_POP(status->set_hp), HP_POP2(HP_status_set_hp), 4472 }, +{ HP_POP(status->set_sp), HP_POP2(HP_status_set_sp), 4474 }, +{ HP_POP(status->heal), HP_POP2(HP_status_heal), 4476 }, +{ HP_POP(status->revive), HP_POP2(HP_status_revive), 4478 }, +{ HP_POP(status->get_regen_data), HP_POP2(HP_status_get_regen_data), 4480 }, +{ HP_POP(status->get_status_data), HP_POP2(HP_status_get_status_data), 4482 }, +{ HP_POP(status->get_base_status), HP_POP2(HP_status_get_base_status), 4484 }, +{ HP_POP(status->get_name), HP_POP2(HP_status_get_name), 4486 }, +{ HP_POP(status->get_class), HP_POP2(HP_status_get_class), 4488 }, +{ HP_POP(status->get_lv), HP_POP2(HP_status_get_lv), 4490 }, +{ HP_POP(status->get_def), HP_POP2(HP_status_get_def), 4492 }, +{ HP_POP(status->get_speed), HP_POP2(HP_status_get_speed), 4494 }, +{ HP_POP(status->calc_attack_element), HP_POP2(HP_status_calc_attack_element), 4496 }, +{ HP_POP(status->get_party_id), HP_POP2(HP_status_get_party_id), 4498 }, +{ HP_POP(status->get_guild_id), HP_POP2(HP_status_get_guild_id), 4500 }, +{ HP_POP(status->get_emblem_id), HP_POP2(HP_status_get_emblem_id), 4502 }, +{ HP_POP(status->get_mexp), HP_POP2(HP_status_get_mexp), 4504 }, +{ HP_POP(status->get_race2), HP_POP2(HP_status_get_race2), 4506 }, +{ HP_POP(status->get_viewdata), HP_POP2(HP_status_get_viewdata), 4508 }, +{ HP_POP(status->set_viewdata), HP_POP2(HP_status_set_viewdata), 4510 }, +{ HP_POP(status->change_init), HP_POP2(HP_status_change_init), 4512 }, +{ HP_POP(status->get_sc), HP_POP2(HP_status_get_sc), 4514 }, +{ HP_POP(status->isdead), HP_POP2(HP_status_isdead), 4516 }, +{ HP_POP(status->isimmune), HP_POP2(HP_status_isimmune), 4518 }, +{ HP_POP(status->get_sc_def), HP_POP2(HP_status_get_sc_def), 4520 }, +{ HP_POP(status->change_start), HP_POP2(HP_status_change_start), 4522 }, +{ HP_POP(status->change_end_), HP_POP2(HP_status_change_end_), 4524 }, +{ HP_POP(status->kaahi_heal_timer), HP_POP2(HP_status_kaahi_heal_timer), 4526 }, +{ HP_POP(status->change_timer), HP_POP2(HP_status_change_timer), 4528 }, +{ HP_POP(status->change_timer_sub), HP_POP2(HP_status_change_timer_sub), 4530 }, +{ HP_POP(status->change_clear), HP_POP2(HP_status_change_clear), 4532 }, +{ HP_POP(status->change_clear_buffs), HP_POP2(HP_status_change_clear_buffs), 4534 }, +{ HP_POP(status->calc_bl_), HP_POP2(HP_status_calc_bl_), 4536 }, +{ HP_POP(status->calc_mob_), HP_POP2(HP_status_calc_mob_), 4538 }, +{ HP_POP(status->calc_pet_), HP_POP2(HP_status_calc_pet_), 4540 }, +{ HP_POP(status->calc_pc_), HP_POP2(HP_status_calc_pc_), 4542 }, +{ HP_POP(status->calc_homunculus_), HP_POP2(HP_status_calc_homunculus_), 4544 }, +{ HP_POP(status->calc_mercenary_), HP_POP2(HP_status_calc_mercenary_), 4546 }, +{ HP_POP(status->calc_elemental_), HP_POP2(HP_status_calc_elemental_), 4548 }, +{ HP_POP(status->calc_misc), HP_POP2(HP_status_calc_misc), 4550 }, +{ HP_POP(status->calc_regen), HP_POP2(HP_status_calc_regen), 4552 }, +{ HP_POP(status->calc_regen_rate), HP_POP2(HP_status_calc_regen_rate), 4554 }, +{ HP_POP(status->check_skilluse), HP_POP2(HP_status_check_skilluse), 4556 }, +{ HP_POP(status->check_visibility), HP_POP2(HP_status_check_visibility), 4558 }, +{ HP_POP(status->change_spread), HP_POP2(HP_status_change_spread), 4560 }, +{ HP_POP(status->calc_def), HP_POP2(HP_status_calc_def), 4562 }, +{ HP_POP(status->calc_def2), HP_POP2(HP_status_calc_def2), 4564 }, +{ HP_POP(status->calc_mdef), HP_POP2(HP_status_calc_mdef), 4566 }, +{ HP_POP(status->calc_mdef2), HP_POP2(HP_status_calc_mdef2), 4568 }, +{ HP_POP(status->calc_batk), HP_POP2(HP_status_calc_batk), 4570 }, +{ HP_POP(status->get_total_mdef), HP_POP2(HP_status_get_total_mdef), 4572 }, +{ HP_POP(status->get_total_def), HP_POP2(HP_status_get_total_def), 4574 }, +{ HP_POP(status->get_matk), HP_POP2(HP_status_get_matk), 4576 }, +{ HP_POP(status->readdb), HP_POP2(HP_status_readdb), 4578 }, +{ HP_POP(status->initChangeTables), HP_POP2(HP_status_initChangeTables), 4580 }, +{ HP_POP(status->initDummyData), HP_POP2(HP_status_initDummyData), 4582 }, +{ HP_POP(status->base_amotion_pc), HP_POP2(HP_status_base_amotion_pc), 4584 }, +{ HP_POP(status->base_atk), HP_POP2(HP_status_base_atk), 4586 }, +{ HP_POP(status->calc_sigma), HP_POP2(HP_status_calc_sigma), 4588 }, +{ HP_POP(status->base_pc_maxhp), HP_POP2(HP_status_base_pc_maxhp), 4590 }, +{ HP_POP(status->base_pc_maxsp), HP_POP2(HP_status_base_pc_maxsp), 4592 }, +{ HP_POP(status->calc_npc_), HP_POP2(HP_status_calc_npc_), 4594 }, +{ HP_POP(status->calc_str), HP_POP2(HP_status_calc_str), 4596 }, +{ HP_POP(status->calc_agi), HP_POP2(HP_status_calc_agi), 4598 }, +{ HP_POP(status->calc_vit), HP_POP2(HP_status_calc_vit), 4600 }, +{ HP_POP(status->calc_int), HP_POP2(HP_status_calc_int), 4602 }, +{ HP_POP(status->calc_dex), HP_POP2(HP_status_calc_dex), 4604 }, +{ HP_POP(status->calc_luk), HP_POP2(HP_status_calc_luk), 4606 }, +{ HP_POP(status->calc_watk), HP_POP2(HP_status_calc_watk), 4608 }, +{ HP_POP(status->calc_matk), HP_POP2(HP_status_calc_matk), 4610 }, +{ HP_POP(status->calc_hit), HP_POP2(HP_status_calc_hit), 4612 }, +{ HP_POP(status->calc_critical), HP_POP2(HP_status_calc_critical), 4614 }, +{ HP_POP(status->calc_flee), HP_POP2(HP_status_calc_flee), 4616 }, +{ HP_POP(status->calc_flee2), HP_POP2(HP_status_calc_flee2), 4618 }, +{ HP_POP(status->calc_speed), HP_POP2(HP_status_calc_speed), 4620 }, +{ HP_POP(status->calc_aspd_rate), HP_POP2(HP_status_calc_aspd_rate), 4622 }, +{ HP_POP(status->calc_dmotion), HP_POP2(HP_status_calc_dmotion), 4624 }, +{ HP_POP(status->calc_fix_aspd), HP_POP2(HP_status_calc_fix_aspd), 4626 }, +{ HP_POP(status->calc_maxhp), HP_POP2(HP_status_calc_maxhp), 4628 }, +{ HP_POP(status->calc_maxsp), HP_POP2(HP_status_calc_maxsp), 4630 }, +{ HP_POP(status->calc_element), HP_POP2(HP_status_calc_element), 4632 }, +{ HP_POP(status->calc_element_lv), HP_POP2(HP_status_calc_element_lv), 4634 }, +{ HP_POP(status->calc_mode), HP_POP2(HP_status_calc_mode), 4636 }, +{ HP_POP(status->calc_bl_main), HP_POP2(HP_status_calc_bl_main), 4638 }, +{ HP_POP(status->display_add), HP_POP2(HP_status_display_add), 4640 }, +{ HP_POP(status->display_remove), HP_POP2(HP_status_display_remove), 4642 }, +{ HP_POP(status->natural_heal), HP_POP2(HP_status_natural_heal), 4644 }, +{ HP_POP(status->natural_heal_timer), HP_POP2(HP_status_natural_heal_timer), 4646 }, +{ HP_POP(status->readdb_job1), HP_POP2(HP_status_readdb_job1), 4648 }, +{ HP_POP(status->readdb_job2), HP_POP2(HP_status_readdb_job2), 4650 }, +{ HP_POP(status->readdb_sizefix), HP_POP2(HP_status_readdb_sizefix), 4652 }, +{ HP_POP(status->readdb_refine), HP_POP2(HP_status_readdb_refine), 4654 }, +{ HP_POP(status->readdb_scconfig), HP_POP2(HP_status_readdb_scconfig), 4656 }, +/* storage */ +{ HP_POP(storage->reconnect), HP_POP2(HP_storage_reconnect), 4658 }, +{ HP_POP(storage->delitem), HP_POP2(HP_storage_delitem), 4660 }, +{ HP_POP(storage->open), HP_POP2(HP_storage_open), 4662 }, +{ HP_POP(storage->add), HP_POP2(HP_storage_add), 4664 }, +{ HP_POP(storage->get), HP_POP2(HP_storage_get), 4666 }, +{ HP_POP(storage->additem), HP_POP2(HP_storage_additem), 4668 }, +{ HP_POP(storage->addfromcart), HP_POP2(HP_storage_addfromcart), 4670 }, +{ HP_POP(storage->gettocart), HP_POP2(HP_storage_gettocart), 4672 }, +{ HP_POP(storage->close), HP_POP2(HP_storage_close), 4674 }, +{ HP_POP(storage->pc_quit), HP_POP2(HP_storage_pc_quit), 4676 }, +{ HP_POP(storage->comp_item), HP_POP2(HP_storage_comp_item), 4678 }, +{ HP_POP(storage->sortitem), HP_POP2(HP_storage_sortitem), 4680 }, +{ HP_POP(storage->reconnect_sub), HP_POP2(HP_storage_reconnect_sub), 4682 }, +/* trade */ +{ HP_POP(trade->request), HP_POP2(HP_trade_request), 4684 }, +{ HP_POP(trade->ack), HP_POP2(HP_trade_ack), 4686 }, +{ HP_POP(trade->check_impossible), HP_POP2(HP_trade_check_impossible), 4688 }, +{ HP_POP(trade->check), HP_POP2(HP_trade_check), 4690 }, +{ HP_POP(trade->additem), HP_POP2(HP_trade_additem), 4692 }, +{ HP_POP(trade->addzeny), HP_POP2(HP_trade_addzeny), 4694 }, +{ HP_POP(trade->ok), HP_POP2(HP_trade_ok), 4696 }, +{ HP_POP(trade->cancel), HP_POP2(HP_trade_cancel), 4698 }, +{ HP_POP(trade->commit), HP_POP2(HP_trade_commit), 4700 }, +/* unit */ +{ HP_POP(unit->init), HP_POP2(HP_unit_init), 4702 }, +{ HP_POP(unit->final), HP_POP2(HP_unit_final), 4704 }, +{ HP_POP(unit->bl2ud), HP_POP2(HP_unit_bl2ud), 4706 }, +{ HP_POP(unit->bl2ud2), HP_POP2(HP_unit_bl2ud2), 4708 }, +{ HP_POP(unit->attack_timer), HP_POP2(HP_unit_attack_timer), 4710 }, +{ HP_POP(unit->walktoxy_timer), HP_POP2(HP_unit_walktoxy_timer), 4712 }, +{ HP_POP(unit->walktoxy_sub), HP_POP2(HP_unit_walktoxy_sub), 4714 }, +{ HP_POP(unit->delay_walktoxy_timer), HP_POP2(HP_unit_delay_walktoxy_timer), 4716 }, +{ HP_POP(unit->walktoxy), HP_POP2(HP_unit_walktoxy), 4718 }, +{ HP_POP(unit->walktobl_sub), HP_POP2(HP_unit_walktobl_sub), 4720 }, +{ HP_POP(unit->walktobl), HP_POP2(HP_unit_walktobl), 4722 }, +{ HP_POP(unit->run), HP_POP2(HP_unit_run), 4724 }, +{ HP_POP(unit->wugdash), HP_POP2(HP_unit_wugdash), 4726 }, +{ HP_POP(unit->escape), HP_POP2(HP_unit_escape), 4728 }, +{ HP_POP(unit->movepos), HP_POP2(HP_unit_movepos), 4730 }, +{ HP_POP(unit->setdir), HP_POP2(HP_unit_setdir), 4732 }, +{ HP_POP(unit->getdir), HP_POP2(HP_unit_getdir), 4734 }, +{ HP_POP(unit->blown), HP_POP2(HP_unit_blown), 4736 }, +{ HP_POP(unit->warp), HP_POP2(HP_unit_warp), 4738 }, +{ HP_POP(unit->stop_walking), HP_POP2(HP_unit_stop_walking), 4740 }, +{ HP_POP(unit->skilluse_id), HP_POP2(HP_unit_skilluse_id), 4742 }, +{ HP_POP(unit->is_walking), HP_POP2(HP_unit_is_walking), 4744 }, +{ HP_POP(unit->can_move), HP_POP2(HP_unit_can_move), 4746 }, +{ HP_POP(unit->resume_running), HP_POP2(HP_unit_resume_running), 4748 }, +{ HP_POP(unit->set_walkdelay), HP_POP2(HP_unit_set_walkdelay), 4750 }, +{ HP_POP(unit->skilluse_id2), HP_POP2(HP_unit_skilluse_id2), 4752 }, +{ HP_POP(unit->skilluse_pos), HP_POP2(HP_unit_skilluse_pos), 4754 }, +{ HP_POP(unit->skilluse_pos2), HP_POP2(HP_unit_skilluse_pos2), 4756 }, +{ HP_POP(unit->set_target), HP_POP2(HP_unit_set_target), 4758 }, +{ HP_POP(unit->stop_attack), HP_POP2(HP_unit_stop_attack), 4760 }, +{ HP_POP(unit->unattackable), HP_POP2(HP_unit_unattackable), 4762 }, +{ HP_POP(unit->attack), HP_POP2(HP_unit_attack), 4764 }, +{ HP_POP(unit->cancel_combo), HP_POP2(HP_unit_cancel_combo), 4766 }, +{ HP_POP(unit->can_reach_pos), HP_POP2(HP_unit_can_reach_pos), 4768 }, +{ HP_POP(unit->can_reach_bl), HP_POP2(HP_unit_can_reach_bl), 4770 }, +{ HP_POP(unit->calc_pos), HP_POP2(HP_unit_calc_pos), 4772 }, +{ HP_POP(unit->attack_timer_sub), HP_POP2(HP_unit_attack_timer_sub), 4774 }, +{ HP_POP(unit->skillcastcancel), HP_POP2(HP_unit_skillcastcancel), 4776 }, +{ HP_POP(unit->dataset), HP_POP2(HP_unit_dataset), 4778 }, +{ HP_POP(unit->counttargeted), HP_POP2(HP_unit_counttargeted), 4780 }, +{ HP_POP(unit->fixdamage), HP_POP2(HP_unit_fixdamage), 4782 }, +{ HP_POP(unit->changeviewsize), HP_POP2(HP_unit_changeviewsize), 4784 }, +{ HP_POP(unit->remove_map), HP_POP2(HP_unit_remove_map), 4786 }, +{ HP_POP(unit->remove_map_pc), HP_POP2(HP_unit_remove_map_pc), 4788 }, +{ HP_POP(unit->free_pc), HP_POP2(HP_unit_free_pc), 4790 }, +{ HP_POP(unit->free), HP_POP2(HP_unit_free), 4792 }, +/* vending */ +{ HP_POP(vending->init), HP_POP2(HP_vending_init), 4794 }, +{ HP_POP(vending->final), HP_POP2(HP_vending_final), 4796 }, +{ HP_POP(vending->close), HP_POP2(HP_vending_close), 4798 }, +{ HP_POP(vending->open), HP_POP2(HP_vending_open), 4800 }, +{ HP_POP(vending->list), HP_POP2(HP_vending_list), 4802 }, +{ HP_POP(vending->purchase), HP_POP2(HP_vending_purchase), 4804 }, +{ HP_POP(vending->search), HP_POP2(HP_vending_search), 4806 }, +{ HP_POP(vending->searchall), HP_POP2(HP_vending_searchall), 4808 }, +}; +int HookingPointsLenMax = 41; diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc new file mode 100644 index 000000000..ce8e3b4b1 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -0,0 +1,63639 @@ +/* atcommand */ +void HP_atcommand_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.init(); + } + if( HPMHooks.count.HP_atcommand_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_atcommand_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.final(); + } + if( HPMHooks.count.HP_atcommand_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_atcommand_parse(const int fd, struct map_session_data *sd, const char *message, int type) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_atcommand_parse_pre ) { + bool (*preHookFunc) (const int *fd, struct map_session_data *sd, const char *message, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_parse_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd, message, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.parse(fd, sd, message, type); + } + if( HPMHooks.count.HP_atcommand_parse_post ) { + bool (*postHookFunc) (bool retVal___, const int *fd, struct map_session_data *sd, const char *message, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd, message, &type); + } + } + return retVal___; +} +bool HP_atcommand_create(char *name, AtCommandFunc func) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_atcommand_create_pre ) { + bool (*preHookFunc) (char *name, AtCommandFunc *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_create_pre[hIndex].func; + retVal___ = preHookFunc(name, &func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.create(name, func); + } + if( HPMHooks.count.HP_atcommand_create_post ) { + bool (*postHookFunc) (bool retVal___, char *name, AtCommandFunc *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, &func); + } + } + return retVal___; +} +bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_atcommand_can_use_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, const char *command); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_can_use_pre[hIndex].func; + retVal___ = preHookFunc(sd, command); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.can_use(sd, command); + } + if( HPMHooks.count.HP_atcommand_can_use_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_can_use_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, command); + } + } + return retVal___; +} +bool HP_atcommand_can_use2(struct map_session_data *sd, const char *command, AtCommandType type) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_atcommand_can_use2_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, const char *command, AtCommandType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_can_use2_pre[hIndex].func; + retVal___ = preHookFunc(sd, command, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.can_use2(sd, command, type); + } + if( HPMHooks.count.HP_atcommand_can_use2_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command, AtCommandType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_can_use2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, command, &type); + } + } + return retVal___; +} +void HP_atcommand_load_groups(GroupSettings **groups, config_setting_t **commands_, size_t sz) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_load_groups_pre ) { + void (*preHookFunc) (GroupSettings **groups, config_setting_t **commands_, size_t *sz); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_load_groups_pre[hIndex].func; + preHookFunc(groups, commands_, &sz); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.load_groups(groups, commands_, sz); + } + if( HPMHooks.count.HP_atcommand_load_groups_post ) { + void (*postHookFunc) (GroupSettings **groups, config_setting_t **commands_, size_t *sz); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_load_groups_post[hIndex].func; + postHookFunc(groups, commands_, &sz); + } + } + return; +} +AtCommandInfo* HP_atcommand_exists(const char *name) { + int hIndex = 0; + AtCommandInfo* retVal___ = NULL; + if( HPMHooks.count.HP_atcommand_exists_pre ) { + AtCommandInfo* (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_exists_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.exists(name); + } + if( HPMHooks.count.HP_atcommand_exists_post ) { + AtCommandInfo* (*postHookFunc) (AtCommandInfo* retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +int HP_atcommand_msg_read(const char *cfgName) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_atcommand_msg_read_pre ) { + int (*preHookFunc) (const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_msg_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.msg_read(cfgName); + } + if( HPMHooks.count.HP_atcommand_msg_read_post ) { + int (*postHookFunc) (int retVal___, const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_msg_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +void HP_atcommand_final_msg(void) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_final_msg_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_final_msg_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.final_msg(); + } + if( HPMHooks.count.HP_atcommand_final_msg_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_final_msg_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct atcmd_binding_data* HP_atcommand_get_bind_byname(const char *name) { + int hIndex = 0; + struct atcmd_binding_data* retVal___ = NULL; + if( HPMHooks.count.HP_atcommand_get_bind_byname_pre ) { + struct atcmd_binding_data* (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_bind_byname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_get_bind_byname_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.get_bind_byname(name); + } + if( HPMHooks.count.HP_atcommand_get_bind_byname_post ) { + struct atcmd_binding_data* (*postHookFunc) (struct atcmd_binding_data* retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_bind_byname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_get_bind_byname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +AtCommandInfo* HP_atcommand_get_info_byname(const char *name) { + int hIndex = 0; + AtCommandInfo* retVal___ = NULL; + if( HPMHooks.count.HP_atcommand_get_info_byname_pre ) { + AtCommandInfo* (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_get_info_byname_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.get_info_byname(name); + } + if( HPMHooks.count.HP_atcommand_get_info_byname_post ) { + AtCommandInfo* (*postHookFunc) (AtCommandInfo* retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_get_info_byname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +const char* HP_atcommand_check_alias(const char *aliasname) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_atcommand_check_alias_pre ) { + const char* (*preHookFunc) (const char *aliasname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_check_alias_pre[hIndex].func; + retVal___ = preHookFunc(aliasname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.atcommand.check_alias(aliasname); + } + if( HPMHooks.count.HP_atcommand_check_alias_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *aliasname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_check_alias_post[hIndex].func; + retVal___ = postHookFunc(retVal___, aliasname); + } + } + return retVal___; +} +void HP_atcommand_get_suggestions(struct map_session_data *sd, const char *name, bool is_atcmd_cmd) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_get_suggestions_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *name, bool *is_atcmd_cmd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_suggestions_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_get_suggestions_pre[hIndex].func; + preHookFunc(sd, name, &is_atcmd_cmd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.get_suggestions(sd, name, is_atcmd_cmd); + } + if( HPMHooks.count.HP_atcommand_get_suggestions_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *name, bool *is_atcmd_cmd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_suggestions_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_get_suggestions_post[hIndex].func; + postHookFunc(sd, name, &is_atcmd_cmd); + } + } + return; +} +void HP_atcommand_config_read(const char *config_filename) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_config_read_pre ) { + void (*preHookFunc) (const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_config_read_pre[hIndex].func; + preHookFunc(config_filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.config_read(config_filename); + } + if( HPMHooks.count.HP_atcommand_config_read_post ) { + void (*postHookFunc) (const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_config_read_post[hIndex].func; + postHookFunc(config_filename); + } + } + return; +} +int HP_atcommand_stopattack(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_atcommand_stopattack_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_atcommand_stopattack_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.atcommand.stopattack(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_atcommand_stopattack_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_atcommand_stopattack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_atcommand_pvpoff_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_atcommand_pvpoff_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.atcommand.pvpoff_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_atcommand_pvpoff_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_atcommand_pvpoff_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_atcommand_pvpon_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_atcommand_pvpon_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.atcommand.pvpon_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_atcommand_pvpon_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_atcommand_pvpon_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_atcommand_atkillmonster_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_atcommand_atkillmonster_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.atcommand.atkillmonster_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_atcommand_atkillmonster_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_atcommand_atkillmonster_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_atcommand_raise_sub(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_raise_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_raise_sub_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.raise_sub(sd); + } + if( HPMHooks.count.HP_atcommand_raise_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_raise_sub_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_atcommand_get_jail_time(int jailtime, int *year, int *month, int *day, int *hour, int *minute) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_get_jail_time_pre ) { + void (*preHookFunc) (int *jailtime, int *year, int *month, int *day, int *hour, int *minute); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_jail_time_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_get_jail_time_pre[hIndex].func; + preHookFunc(&jailtime, year, month, day, hour, minute); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.get_jail_time(jailtime, year, month, day, hour, minute); + } + if( HPMHooks.count.HP_atcommand_get_jail_time_post ) { + void (*postHookFunc) (int *jailtime, int *year, int *month, int *day, int *hour, int *minute); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_jail_time_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_get_jail_time_post[hIndex].func; + postHookFunc(&jailtime, year, month, day, hour, minute); + } + } + return; +} +int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_atcommand_cleanfloor_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_atcommand_cleanfloor_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.atcommand.cleanfloor_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_atcommand_cleanfloor_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_atcommand_cleanfloor_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_atcommand_mutearea_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_atcommand_mutearea_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.atcommand.mutearea_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_atcommand_mutearea_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_atcommand_mutearea_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_atcommand_commands_sub(struct map_session_data *sd, const int fd, AtCommandType type) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_commands_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const int *fd, AtCommandType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_commands_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_commands_sub_pre[hIndex].func; + preHookFunc(sd, &fd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.commands_sub(sd, fd, type); + } + if( HPMHooks.count.HP_atcommand_commands_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, const int *fd, AtCommandType *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_commands_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_commands_sub_post[hIndex].func; + postHookFunc(sd, &fd, &type); + } + } + return; +} +void HP_atcommand_cmd_db_clear(void) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_cmd_db_clear_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.cmd_db_clear(); + } + if( HPMHooks.count.HP_atcommand_cmd_db_clear_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_atcommand_cmd_db_clear_sub(DBKey key, DBData *data, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.atcommand.cmd_db_clear_sub(key, data, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_atcommand_cmd_db_clear_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +void HP_atcommand_doload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_doload_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_doload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.doload(); + } + if( HPMHooks.count.HP_atcommand_doload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_doload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_atcommand_base_commands(void) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_base_commands_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_base_commands_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.base_commands(); + } + if( HPMHooks.count.HP_atcommand_base_commands_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_base_commands_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* battle */ +void HP_battle_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_battle_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.battle.init(); + } + if( HPMHooks.count.HP_battle_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_battle_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_battle_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.battle.final(); + } + if( HPMHooks.count.HP_battle_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct Damage HP_battle_calc_attack(int attack_type, struct block_list *bl, struct block_list *target, uint16 skill_id, uint16 skill_lv, int count) { + int hIndex = 0; + struct Damage retVal___; + memset(&retVal___, '\0', sizeof(struct Damage)); + if( HPMHooks.count.HP_battle_calc_attack_pre ) { + struct Damage (*preHookFunc) (int *attack_type, struct block_list *bl, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_attack_pre[hIndex].func; + retVal___ = preHookFunc(&attack_type, bl, target, &skill_id, &skill_lv, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_attack(attack_type, bl, target, skill_id, skill_lv, count); + } + if( HPMHooks.count.HP_battle_calc_attack_post ) { + struct Damage (*postHookFunc) (struct Damage retVal___, int *attack_type, struct block_list *bl, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &attack_type, bl, target, &skill_id, &skill_lv, &count); + } + } + return retVal___; +} +int64 HP_battle_calc_damage(struct block_list *src, struct block_list *bl, struct Damage *d, int64 damage, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_damage_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, struct Damage *d, int64 *damage, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, d, &damage, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_damage(src, bl, d, damage, skill_id, skill_lv); + } + if( HPMHooks.count.HP_battle_calc_damage_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, struct Damage *d, int64 *damage, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, d, &damage, &skill_id, &skill_lv); + } + } + return retVal___; +} +int64 HP_battle_calc_gvg_damage(struct block_list *src, struct block_list *bl, int64 damage, int div_, uint16 skill_id, uint16 skill_lv, int flag) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_gvg_damage_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_gvg_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_gvg_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &damage, &div_, &skill_id, &skill_lv, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_gvg_damage(src, bl, damage, div_, skill_id, skill_lv, flag); + } + if( HPMHooks.count.HP_battle_calc_gvg_damage_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_gvg_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_gvg_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &damage, &div_, &skill_id, &skill_lv, &flag); + } + } + return retVal___; +} +int64 HP_battle_calc_bg_damage(struct block_list *src, struct block_list *bl, int64 damage, int div_, uint16 skill_id, uint16 skill_lv, int flag) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_bg_damage_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_bg_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_bg_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &damage, &div_, &skill_id, &skill_lv, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_bg_damage(src, bl, damage, div_, skill_id, skill_lv, flag); + } + if( HPMHooks.count.HP_battle_calc_bg_damage_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_bg_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_bg_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &damage, &div_, &skill_id, &skill_lv, &flag); + } + } + return retVal___; +} +enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list *target, unsigned int tick, int flag) { + int hIndex = 0; + enum damage_lv retVal___; + memset(&retVal___, '\0', sizeof(enum damage_lv)); + if( HPMHooks.count.HP_battle_weapon_attack_pre ) { + enum damage_lv (*preHookFunc) (struct block_list *bl, struct block_list *target, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_weapon_attack_pre[hIndex].func; + retVal___ = preHookFunc(bl, target, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.weapon_attack(bl, target, tick, flag); + } + if( HPMHooks.count.HP_battle_weapon_attack_post ) { + enum damage_lv (*postHookFunc) (enum damage_lv retVal___, struct block_list *bl, struct block_list *target, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_weapon_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, target, &tick, &flag); + } + } + return retVal___; +} +struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int wflag) { + int hIndex = 0; + struct Damage retVal___; + memset(&retVal___, '\0', sizeof(struct Damage)); + if( HPMHooks.count.HP_battle_calc_weapon_attack_pre ) { + struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *wflag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_weapon_attack_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &wflag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_weapon_attack(src, target, skill_id, skill_lv, wflag); + } + if( HPMHooks.count.HP_battle_calc_weapon_attack_post ) { + struct Damage (*postHookFunc) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *wflag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_weapon_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &wflag); + } + } + return retVal___; +} +int HP_battle_delay_damage(unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_delay_damage_pre ) { + int (*preHookFunc) (unsigned int *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_delay_damage_pre[hIndex].func; + retVal___ = preHookFunc(&tick, &amotion, src, target, &attack_type, &skill_id, &skill_lv, &damage, &dmg_lv, &ddelay, &additional_effects); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.delay_damage(tick, amotion, src, target, attack_type, skill_id, skill_lv, damage, dmg_lv, ddelay, additional_effects); + } + if( HPMHooks.count.HP_battle_delay_damage_post ) { + int (*postHookFunc) (int retVal___, unsigned int *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_delay_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tick, &amotion, src, target, &attack_type, &skill_id, &skill_lv, &damage, &dmg_lv, &ddelay, &additional_effects); + } + } + return retVal___; +} +void HP_battle_drain(struct map_session_data *sd, struct block_list *tbl, int64 rdamage, int64 ldamage, int race, int boss) { + int hIndex = 0; + if( HPMHooks.count.HP_battle_drain_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct block_list *tbl, int64 *rdamage, int64 *ldamage, int *race, int *boss); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_drain_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_drain_pre[hIndex].func; + preHookFunc(sd, tbl, &rdamage, &ldamage, &race, &boss); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.battle.drain(sd, tbl, rdamage, ldamage, race, boss); + } + if( HPMHooks.count.HP_battle_drain_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct block_list *tbl, int64 *rdamage, int64 *ldamage, int *race, int *boss); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_drain_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_drain_post[hIndex].func; + postHookFunc(sd, tbl, &rdamage, &ldamage, &race, &boss); + } + } + return; +} +int64 HP_battle_calc_return_damage(struct block_list *bl, struct block_list *src, int64 *p1, int flag, uint16 skill_id, int *rdelay) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_return_damage_pre ) { + int64 (*preHookFunc) (struct block_list *bl, struct block_list *src, int64 *p1, int *flag, uint16 *skill_id, int *rdelay); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_return_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_return_damage_pre[hIndex].func; + retVal___ = preHookFunc(bl, src, p1, &flag, &skill_id, rdelay); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_return_damage(bl, src, p1, flag, skill_id, rdelay); + } + if( HPMHooks.count.HP_battle_calc_return_damage_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *bl, struct block_list *src, int64 *p1, int *flag, uint16 *skill_id, int *rdelay); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_return_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_return_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, src, p1, &flag, &skill_id, rdelay); + } + } + return retVal___; +} +int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_attr_ratio_pre ) { + int (*preHookFunc) (int *atk_elem, int *def_type, int *def_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_ratio_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_attr_ratio_pre[hIndex].func; + retVal___ = preHookFunc(&atk_elem, &def_type, &def_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.attr_ratio(atk_elem, def_type, def_lv); + } + if( HPMHooks.count.HP_battle_attr_ratio_post ) { + int (*postHookFunc) (int retVal___, int *atk_elem, int *def_type, int *def_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_ratio_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_attr_ratio_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &atk_elem, &def_type, &def_lv); + } + } + return retVal___; +} +int64 HP_battle_attr_fix(struct block_list *src, struct block_list *target, int64 damage, int atk_elem, int def_type, int def_lv) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_attr_fix_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *damage, int *atk_elem, int *def_type, int *def_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_fix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_attr_fix_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &damage, &atk_elem, &def_type, &def_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.attr_fix(src, target, damage, atk_elem, def_type, def_lv); + } + if( HPMHooks.count.HP_battle_attr_fix_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *target, int64 *damage, int *atk_elem, int *def_type, int *def_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_fix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_attr_fix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &damage, &atk_elem, &def_type, &def_lv); + } + } + return retVal___; +} +int64 HP_battle_calc_cardfix(int attack_type, struct block_list *src, struct block_list *target, int nk, int s_ele, int s_ele_, int64 damage, int left, int flag) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_cardfix_pre ) { + int64 (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, int *nk, int *s_ele, int *s_ele_, int64 *damage, int *left, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_cardfix_pre[hIndex].func; + retVal___ = preHookFunc(&attack_type, src, target, &nk, &s_ele, &s_ele_, &damage, &left, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_cardfix(attack_type, src, target, nk, s_ele, s_ele_, damage, left, flag); + } + if( HPMHooks.count.HP_battle_calc_cardfix_post ) { + int64 (*postHookFunc) (int64 retVal___, int *attack_type, struct block_list *src, struct block_list *target, int *nk, int *s_ele, int *s_ele_, int64 *damage, int *left, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_cardfix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &attack_type, src, target, &nk, &s_ele, &s_ele_, &damage, &left, &flag); + } + } + return retVal___; +} +int64 HP_battle_calc_elefix(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int nk, int n_ele, int s_ele, int s_ele_, bool left, int flag) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_elefix_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *nk, int *n_ele, int *s_ele, int *s_ele_, bool *left, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_elefix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_elefix_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &damage, &nk, &n_ele, &s_ele, &s_ele_, &left, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_elefix(src, target, skill_id, skill_lv, damage, nk, n_ele, s_ele, s_ele_, left, flag); + } + if( HPMHooks.count.HP_battle_calc_elefix_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *nk, int *n_ele, int *s_ele, int *s_ele_, bool *left, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_elefix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_elefix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &damage, &nk, &n_ele, &s_ele, &s_ele_, &left, &flag); + } + } + return retVal___; +} +int64 HP_battle_calc_masteryfix(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int div, bool left, bool weapon) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_masteryfix_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &damage, &div, &left, &weapon); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_masteryfix(src, target, skill_id, skill_lv, damage, div, left, weapon); + } + if( HPMHooks.count.HP_battle_calc_masteryfix_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &damage, &div, &left, &weapon); + } + } + return retVal___; +} +int HP_battle_calc_skillratio(int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_calc_skillratio_pre ) { + int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_skillratio_pre[hIndex].func; + retVal___ = preHookFunc(&attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_skillratio(attack_type, src, target, skill_id, skill_lv, skillratio, flag); + } + if( HPMHooks.count.HP_battle_calc_skillratio_post ) { + int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_skillratio_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag); + } + } + return retVal___; +} +int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type, int size, bool ignore) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_sizefix_pre ) { + int64 (*preHookFunc) (struct map_session_data *sd, int64 *damage, int *type, int *size, bool *ignore); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_sizefix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_sizefix_pre[hIndex].func; + retVal___ = preHookFunc(sd, &damage, &type, &size, &ignore); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_sizefix(sd, damage, type, size, ignore); + } + if( HPMHooks.count.HP_battle_calc_sizefix_post ) { + int64 (*postHookFunc) (int64 retVal___, struct map_session_data *sd, int64 *damage, int *type, int *size, bool *ignore); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_sizefix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_sizefix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &damage, &type, &size, &ignore); + } + } + return retVal___; +} +int64 HP_battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, struct weapon_atk *watk, int nk, bool n_ele, short s_ele, short s_ele_, int size, int type, int flag, int flag2) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_weapon_damage_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, struct weapon_atk *watk, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *size, int *type, int *flag, int *flag2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_weapon_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, watk, &nk, &n_ele, &s_ele, &s_ele_, &size, &type, &flag, &flag2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_weapon_damage(src, bl, skill_id, skill_lv, watk, nk, n_ele, s_ele, s_ele_, size, type, flag, flag2); + } + if( HPMHooks.count.HP_battle_calc_weapon_damage_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, struct weapon_atk *watk, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *size, int *type, int *flag, int *flag2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_weapon_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, watk, &nk, &n_ele, &s_ele, &s_ele_, &size, &type, &flag, &flag2); + } + } + return retVal___; +} +int64 HP_battle_calc_defense(int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int flag, int pdef) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_defense_pre ) { + int64 (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *flag, int *pdef); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_defense_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_defense_pre[hIndex].func; + retVal___ = preHookFunc(&attack_type, src, target, &skill_id, &skill_lv, &damage, &flag, &pdef); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_defense(attack_type, src, target, skill_id, skill_lv, damage, flag, pdef); + } + if( HPMHooks.count.HP_battle_calc_defense_post ) { + int64 (*postHookFunc) (int64 retVal___, int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *flag, int *pdef); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_defense_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_defense_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &attack_type, src, target, &skill_id, &skill_lv, &damage, &flag, &pdef); + } + } + return retVal___; +} +struct block_list* HP_battle_get_master(struct block_list *src) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_battle_get_master_pre ) { + struct block_list* (*preHookFunc) (struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_get_master_pre[hIndex].func; + retVal___ = preHookFunc(src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.get_master(src); + } + if( HPMHooks.count.HP_battle_get_master_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_get_master_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); + } + } + return retVal___; +} +struct block_list* HP_battle_get_targeted(struct block_list *target) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_battle_get_targeted_pre ) { + struct block_list* (*preHookFunc) (struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_get_targeted_pre[hIndex].func; + retVal___ = preHookFunc(target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.get_targeted(target); + } + if( HPMHooks.count.HP_battle_get_targeted_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_get_targeted_post[hIndex].func; + retVal___ = postHookFunc(retVal___, target); + } + } + return retVal___; +} +struct block_list* HP_battle_get_enemy(struct block_list *target, int type, int range) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_battle_get_enemy_pre ) { + struct block_list* (*preHookFunc) (struct block_list *target, int *type, int *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_get_enemy_pre[hIndex].func; + retVal___ = preHookFunc(target, &type, &range); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.get_enemy(target, type, range); + } + if( HPMHooks.count.HP_battle_get_enemy_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *target, int *type, int *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_get_enemy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, target, &type, &range); + } + } + return retVal___; +} +int HP_battle_get_target(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_get_target_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_get_target_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.get_target(bl); + } + if( HPMHooks.count.HP_battle_get_target_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_get_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_battle_get_current_skill(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_get_current_skill_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_get_current_skill_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.get_current_skill(bl); + } + if( HPMHooks.count.HP_battle_get_current_skill_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_get_current_skill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_battle_check_undead(int race, int element) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_check_undead_pre ) { + int (*preHookFunc) (int *race, int *element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_check_undead_pre[hIndex].func; + retVal___ = preHookFunc(&race, &element); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.check_undead(race, element); + } + if( HPMHooks.count.HP_battle_check_undead_post ) { + int (*postHookFunc) (int retVal___, int *race, int *element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_check_undead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &race, &element); + } + } + return retVal___; +} +int HP_battle_check_target(struct block_list *src, struct block_list *target, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_check_target_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_check_target_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.check_target(src, target, flag); + } + if( HPMHooks.count.HP_battle_check_target_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_check_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &flag); + } + } + return retVal___; +} +bool HP_battle_check_range(struct block_list *src, struct block_list *bl, int range) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_battle_check_range_pre ) { + bool (*preHookFunc) (struct block_list *src, struct block_list *bl, int *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_range_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_check_range_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &range); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.check_range(src, bl, range); + } + if( HPMHooks.count.HP_battle_check_range_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, int *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_range_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_check_range_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &range); + } + } + return retVal___; +} +void HP_battle_consume_ammo(struct map_session_data *sd, int skill_id, int lv) { + int hIndex = 0; + if( HPMHooks.count.HP_battle_consume_ammo_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_consume_ammo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_consume_ammo_pre[hIndex].func; + preHookFunc(sd, &skill_id, &lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.battle.consume_ammo(sd, skill_id, lv); + } + if( HPMHooks.count.HP_battle_consume_ammo_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *skill_id, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_consume_ammo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_consume_ammo_post[hIndex].func; + postHookFunc(sd, &skill_id, &lv); + } + } + return; +} +int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_get_targeted_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_battle_get_targeted_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.battle.get_targeted_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_battle_get_targeted_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_battle_get_targeted_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_get_enemy_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_battle_get_enemy_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.battle.get_enemy_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_battle_get_enemy_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_battle_get_enemy_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_get_enemy_area_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_battle_get_enemy_area_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.battle.get_enemy_area_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_battle_get_enemy_area_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_battle_get_enemy_area_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_delay_damage_sub_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_delay_damage_sub_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.delay_damage_sub(tid, tick, id, data); + } + if( HPMHooks.count.HP_battle_delay_damage_sub_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_delay_damage_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_blewcount_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_blewcount_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_blewcount_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.blewcount_bonus(sd, skill_id); + } + if( HPMHooks.count.HP_battle_blewcount_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_blewcount_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_blewcount_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); + } + } + return retVal___; +} +int HP_battle_range_type(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_range_type_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_range_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_range_type_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.range_type(src, target, skill_id, skill_lv); + } + if( HPMHooks.count.HP_battle_range_type_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_range_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_range_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv); + } + } + return retVal___; +} +int64 HP_battle_calc_base_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_base_damage_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *type, int *flag, int *flag2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_base_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &nk, &n_ele, &s_ele, &s_ele_, &type, &flag, &flag2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_base_damage(src, bl, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, type, flag, flag2); + } + if( HPMHooks.count.HP_battle_calc_base_damage_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *type, int *flag, int *flag2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_base_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &nk, &n_ele, &s_ele, &s_ele_, &type, &flag, &flag2); + } + } + return retVal___; +} +int64 HP_battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_calc_base_damage2_pre ) { + int64 (*preHookFunc) (struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short *t_size, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_base_damage2_pre[hIndex].func; + retVal___ = preHookFunc(st, wa, sc, &t_size, sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_base_damage2(st, wa, sc, t_size, sd, flag); + } + if( HPMHooks.count.HP_battle_calc_base_damage2_post ) { + int64 (*postHookFunc) (int64 retVal___, struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short *t_size, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_base_damage2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, wa, sc, &t_size, sd, &flag); + } + } + return retVal___; +} +struct Damage HP_battle_calc_misc_attack(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int mflag) { + int hIndex = 0; + struct Damage retVal___; + memset(&retVal___, '\0', sizeof(struct Damage)); + if( HPMHooks.count.HP_battle_calc_misc_attack_pre ) { + struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &mflag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_misc_attack(src, target, skill_id, skill_lv, mflag); + } + if( HPMHooks.count.HP_battle_calc_misc_attack_post ) { + struct Damage (*postHookFunc) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &mflag); + } + } + return retVal___; +} +struct Damage HP_battle_calc_magic_attack(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int mflag) { + int hIndex = 0; + struct Damage retVal___; + memset(&retVal___, '\0', sizeof(struct Damage)); + if( HPMHooks.count.HP_battle_calc_magic_attack_pre ) { + struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_magic_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_magic_attack_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &mflag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_magic_attack(src, target, skill_id, skill_lv, mflag); + } + if( HPMHooks.count.HP_battle_calc_magic_attack_post ) { + struct Damage (*postHookFunc) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_magic_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_magic_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &mflag); + } + } + return retVal___; +} +int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_adjust_skill_damage_pre ) { + int (*preHookFunc) (int *m, unsigned short *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_adjust_skill_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_adjust_skill_damage_pre[hIndex].func; + retVal___ = preHookFunc(&m, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.adjust_skill_damage(m, skill_id); + } + if( HPMHooks.count.HP_battle_adjust_skill_damage_post ) { + int (*postHookFunc) (int retVal___, int *m, unsigned short *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_adjust_skill_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_adjust_skill_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &skill_id); + } + } + return retVal___; +} +int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *target, int64 dmg, int type) { + int hIndex = 0; + int64 retVal___; + memset(&retVal___, '\0', sizeof(int64)); + if( HPMHooks.count.HP_battle_add_mastery_pre ) { + int64 (*preHookFunc) (struct map_session_data *sd, struct block_list *target, int64 *dmg, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_add_mastery_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_add_mastery_pre[hIndex].func; + retVal___ = preHookFunc(sd, target, &dmg, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.add_mastery(sd, target, dmg, type); + } + if( HPMHooks.count.HP_battle_add_mastery_post ) { + int64 (*postHookFunc) (int64 retVal___, struct map_session_data *sd, struct block_list *target, int64 *dmg, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_add_mastery_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_add_mastery_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, target, &dmg, &type); + } + } + return retVal___; +} +int HP_battle_calc_drain(int64 damage, int rate, int per) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_calc_drain_pre ) { + int (*preHookFunc) (int64 *damage, int *rate, int *per); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_drain_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_drain_pre[hIndex].func; + retVal___ = preHookFunc(&damage, &rate, &per); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_drain(damage, rate, per); + } + if( HPMHooks.count.HP_battle_calc_drain_post ) { + int (*postHookFunc) (int retVal___, int64 *damage, int *rate, int *per); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_drain_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_drain_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &damage, &rate, &per); + } + } + return retVal___; +} +int HP_battle_config_read(const char *cfgName) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_config_read_pre ) { + int (*preHookFunc) (const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.config_read(cfgName); + } + if( HPMHooks.count.HP_battle_config_read_post ) { + int (*postHookFunc) (int retVal___, const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +void HP_battle_config_set_defaults(void) { + int hIndex = 0; + if( HPMHooks.count.HP_battle_config_set_defaults_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_config_set_defaults_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.battle.config_set_defaults(); + } + if( HPMHooks.count.HP_battle_config_set_defaults_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_config_set_defaults_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_battle_config_set_value(const char *w1, const char *w2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_config_set_value_pre ) { + int (*preHookFunc) (const char *w1, const char *w2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_config_set_value_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.config_set_value(w1, w2); + } + if( HPMHooks.count.HP_battle_config_set_value_post ) { + int (*postHookFunc) (int retVal___, const char *w1, const char *w2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_config_set_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2); + } + } + return retVal___; +} +int HP_battle_config_get_value(const char *w1) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_config_get_value_pre ) { + int (*preHookFunc) (const char *w1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_config_get_value_pre[hIndex].func; + retVal___ = preHookFunc(w1); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.config_get_value(w1); + } + if( HPMHooks.count.HP_battle_config_get_value_post ) { + int (*postHookFunc) (int retVal___, const char *w1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_config_get_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1); + } + } + return retVal___; +} +void HP_battle_config_adjust(void) { + int hIndex = 0; + if( HPMHooks.count.HP_battle_config_adjust_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_config_adjust_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.battle.config_adjust(); + } + if( HPMHooks.count.HP_battle_config_adjust_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_config_adjust_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct block_list* HP_battle_get_enemy_area(struct block_list *src, int x, int y, int range, int type, int ignore_id) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_battle_get_enemy_area_pre ) { + struct block_list* (*preHookFunc) (struct block_list *src, int *x, int *y, int *range, int *type, int *ignore_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_get_enemy_area_pre[hIndex].func; + retVal___ = preHookFunc(src, &x, &y, &range, &type, &ignore_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.get_enemy_area(src, x, y, range, type, ignore_id); + } + if( HPMHooks.count.HP_battle_get_enemy_area_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *src, int *x, int *y, int *range, int *type, int *ignore_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_get_enemy_area_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &x, &y, &range, &type, &ignore_id); + } + } + return retVal___; +} +int HP_battle_damage_area(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_battle_damage_area_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_battle_damage_area_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.battle.damage_area(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_battle_damage_area_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_battle_damage_area_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +/* bg */ +void HP_bg_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.init(); + } + if( HPMHooks.count.HP_bg_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_bg_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.final(); + } + if( HPMHooks.count.HP_bg_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct bg_arena* HP_bg_name2arena(char *name) { + int hIndex = 0; + struct bg_arena* retVal___ = NULL; + if( HPMHooks.count.HP_bg_name2arena_pre ) { + struct bg_arena* (*preHookFunc) (char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_name2arena_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.name2arena(name); + } + if( HPMHooks.count.HP_bg_name2arena_post ) { + struct bg_arena* (*postHookFunc) (struct bg_arena* retVal___, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_name2arena_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +void HP_bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_queue_add_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_queue_add_pre[hIndex].func; + preHookFunc(sd, arena, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.queue_add(sd, arena, type); + } + if( HPMHooks.count.HP_bg_queue_add_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_queue_add_post[hIndex].func; + postHookFunc(sd, arena, &type); + } + } + return; +} +enum BATTLEGROUNDS_QUEUE_ACK HP_bg_can_queue(struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type) { + int hIndex = 0; + enum BATTLEGROUNDS_QUEUE_ACK retVal___; + memset(&retVal___, '\0', sizeof(enum BATTLEGROUNDS_QUEUE_ACK)); + if( HPMHooks.count.HP_bg_can_queue_pre ) { + enum BATTLEGROUNDS_QUEUE_ACK (*preHookFunc) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_can_queue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_can_queue_pre[hIndex].func; + retVal___ = preHookFunc(sd, arena, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.can_queue(sd, arena, type); + } + if( HPMHooks.count.HP_bg_can_queue_post ) { + enum BATTLEGROUNDS_QUEUE_ACK (*postHookFunc) (enum BATTLEGROUNDS_QUEUE_ACK retVal___, struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_can_queue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_can_queue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, arena, &type); + } + } + return retVal___; +} +int HP_bg_id2pos(int queue_id, int account_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_id2pos_pre ) { + int (*preHookFunc) (int *queue_id, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_id2pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_id2pos_pre[hIndex].func; + retVal___ = preHookFunc(&queue_id, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.id2pos(queue_id, account_id); + } + if( HPMHooks.count.HP_bg_id2pos_post ) { + int (*postHookFunc) (int retVal___, int *queue_id, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_id2pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_id2pos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &queue_id, &account_id); + } + } + return retVal___; +} +void HP_bg_queue_pc_cleanup(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_queue_pc_cleanup_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_queue_pc_cleanup_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.queue_pc_cleanup(sd); + } + if( HPMHooks.count.HP_bg_queue_pc_cleanup_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_queue_pc_cleanup_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_bg_begin(struct bg_arena *arena) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_begin_pre ) { + void (*preHookFunc) (struct bg_arena *arena); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_begin_pre[hIndex].func; + preHookFunc(arena); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.begin(arena); + } + if( HPMHooks.count.HP_bg_begin_post ) { + void (*postHookFunc) (struct bg_arena *arena); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_begin_post[hIndex].func; + postHookFunc(arena); + } + } + return; +} +int HP_bg_begin_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_begin_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_begin_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.begin_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_bg_begin_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_begin_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_bg_queue_pregame(struct bg_arena *arena) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_queue_pregame_pre ) { + void (*preHookFunc) (struct bg_arena *arena); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_queue_pregame_pre[hIndex].func; + preHookFunc(arena); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.queue_pregame(arena); + } + if( HPMHooks.count.HP_bg_queue_pregame_post ) { + void (*postHookFunc) (struct bg_arena *arena); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_queue_pregame_post[hIndex].func; + postHookFunc(arena); + } + } + return; +} +int HP_bg_fillup_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_fillup_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_fillup_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.fillup_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_bg_fillup_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_fillup_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_bg_queue_ready_ack(struct bg_arena *arena, struct map_session_data *sd, bool response) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_queue_ready_ack_pre ) { + void (*preHookFunc) (struct bg_arena *arena, struct map_session_data *sd, bool *response); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_ready_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_queue_ready_ack_pre[hIndex].func; + preHookFunc(arena, sd, &response); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.queue_ready_ack(arena, sd, response); + } + if( HPMHooks.count.HP_bg_queue_ready_ack_post ) { + void (*postHookFunc) (struct bg_arena *arena, struct map_session_data *sd, bool *response); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_ready_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_queue_ready_ack_post[hIndex].func; + postHookFunc(arena, sd, &response); + } + } + return; +} +void HP_bg_match_over(struct bg_arena *arena, bool canceled) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_match_over_pre ) { + void (*preHookFunc) (struct bg_arena *arena, bool *canceled); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_match_over_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_match_over_pre[hIndex].func; + preHookFunc(arena, &canceled); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.match_over(arena, canceled); + } + if( HPMHooks.count.HP_bg_match_over_post ) { + void (*postHookFunc) (struct bg_arena *arena, bool *canceled); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_match_over_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_match_over_post[hIndex].func; + postHookFunc(arena, &canceled); + } + } + return; +} +void HP_bg_queue_check(struct bg_arena *arena) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_queue_check_pre ) { + void (*preHookFunc) (struct bg_arena *arena); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_queue_check_pre[hIndex].func; + preHookFunc(arena); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.queue_check(arena); + } + if( HPMHooks.count.HP_bg_queue_check_post ) { + void (*postHookFunc) (struct bg_arena *arena); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_queue_check_post[hIndex].func; + postHookFunc(arena); + } + } + return; +} +struct battleground_data* HP_bg_team_search(int bg_id) { + int hIndex = 0; + struct battleground_data* retVal___ = NULL; + if( HPMHooks.count.HP_bg_team_search_pre ) { + struct battleground_data* (*preHookFunc) (int *bg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_team_search_pre[hIndex].func; + retVal___ = preHookFunc(&bg_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.team_search(bg_id); + } + if( HPMHooks.count.HP_bg_team_search_post ) { + struct battleground_data* (*postHookFunc) (struct battleground_data* retVal___, int *bg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_team_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &bg_id); + } + } + return retVal___; +} +struct map_session_data* HP_bg_getavailablesd(struct battleground_data *bgd) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_bg_getavailablesd_pre ) { + struct map_session_data* (*preHookFunc) (struct battleground_data *bgd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_getavailablesd_pre[hIndex].func; + retVal___ = preHookFunc(bgd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.getavailablesd(bgd); + } + if( HPMHooks.count.HP_bg_getavailablesd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct battleground_data *bgd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_getavailablesd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bgd); + } + } + return retVal___; +} +int HP_bg_team_delete(int bg_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_team_delete_pre ) { + int (*preHookFunc) (int *bg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_team_delete_pre[hIndex].func; + retVal___ = preHookFunc(&bg_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.team_delete(bg_id); + } + if( HPMHooks.count.HP_bg_team_delete_post ) { + int (*postHookFunc) (int retVal___, int *bg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_team_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &bg_id); + } + } + return retVal___; +} +int HP_bg_team_warp(int bg_id, unsigned short mapindex, short x, short y) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_team_warp_pre ) { + int (*preHookFunc) (int *bg_id, unsigned short *mapindex, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_team_warp_pre[hIndex].func; + retVal___ = preHookFunc(&bg_id, &mapindex, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.team_warp(bg_id, mapindex, x, y); + } + if( HPMHooks.count.HP_bg_team_warp_post ) { + int (*postHookFunc) (int retVal___, int *bg_id, unsigned short *mapindex, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_team_warp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &bg_id, &mapindex, &x, &y); + } + } + return retVal___; +} +int HP_bg_send_dot_remove(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_send_dot_remove_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_send_dot_remove_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.send_dot_remove(sd); + } + if( HPMHooks.count.HP_bg_send_dot_remove_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_send_dot_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_bg_team_join(int bg_id, struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_team_join_pre ) { + int (*preHookFunc) (int *bg_id, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_team_join_pre[hIndex].func; + retVal___ = preHookFunc(&bg_id, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.team_join(bg_id, sd); + } + if( HPMHooks.count.HP_bg_team_join_post ) { + int (*postHookFunc) (int retVal___, int *bg_id, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_team_join_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &bg_id, sd); + } + } + return retVal___; +} +int HP_bg_team_leave(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_team_leave_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_team_leave_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.team_leave(sd, flag); + } + if( HPMHooks.count.HP_bg_team_leave_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_team_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_bg_member_respawn(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_member_respawn_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_member_respawn_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.member_respawn(sd); + } + if( HPMHooks.count.HP_bg_member_respawn_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_member_respawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_bg_create(unsigned short mapindex, short rx, short ry, const char *ev, const char *dev) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_create_pre ) { + int (*preHookFunc) (unsigned short *mapindex, short *rx, short *ry, const char *ev, const char *dev); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_create_pre[hIndex].func; + retVal___ = preHookFunc(&mapindex, &rx, &ry, ev, dev); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.create(mapindex, rx, ry, ev, dev); + } + if( HPMHooks.count.HP_bg_create_post ) { + int (*postHookFunc) (int retVal___, unsigned short *mapindex, short *rx, short *ry, const char *ev, const char *dev); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mapindex, &rx, &ry, ev, dev); + } + } + return retVal___; +} +int HP_bg_team_get_id(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_team_get_id_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_team_get_id_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.team_get_id(bl); + } + if( HPMHooks.count.HP_bg_team_get_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_team_get_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_bg_send_message(struct map_session_data *sd, const char *mes, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_send_message_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_send_message_pre[hIndex].func; + retVal___ = preHookFunc(sd, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.send_message(sd, mes, len); + } + if( HPMHooks.count.HP_bg_send_message_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_send_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, mes, &len); + } + } + return retVal___; +} +int HP_bg_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_send_xy_timer_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_bg_send_xy_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.bg.send_xy_timer_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_bg_send_xy_timer_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_bg_send_xy_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_bg_send_xy_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_send_xy_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.bg.send_xy_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_bg_send_xy_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_send_xy_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_bg_config_read(void) { + int hIndex = 0; + if( HPMHooks.count.HP_bg_config_read_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_bg_config_read_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.bg.config_read(); + } + if( HPMHooks.count.HP_bg_config_read_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_bg_config_read_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* buyingstore */ +bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_buyingstore_setup_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, unsigned char *slots); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_buyingstore_setup_pre[hIndex].func; + retVal___ = preHookFunc(sd, &slots); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.buyingstore.setup(sd, slots); + } + if( HPMHooks.count.HP_buyingstore_setup_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned char *slots); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_buyingstore_setup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &slots); + } + } + return retVal___; +} +void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const uint8 *itemlist, unsigned int count) { + int hIndex = 0; + if( HPMHooks.count.HP_buyingstore_create_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *zenylimit, unsigned char *result, const char *storename, const uint8 *itemlist, unsigned int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_buyingstore_create_pre[hIndex].func; + preHookFunc(sd, &zenylimit, &result, storename, itemlist, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.buyingstore.create(sd, zenylimit, result, storename, itemlist, count); + } + if( HPMHooks.count.HP_buyingstore_create_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *zenylimit, unsigned char *result, const char *storename, const uint8 *itemlist, unsigned int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_buyingstore_create_post[hIndex].func; + postHookFunc(sd, &zenylimit, &result, storename, itemlist, &count); + } + } + return; +} +void HP_buyingstore_close(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_buyingstore_close_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_buyingstore_close_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.buyingstore.close(sd); + } + if( HPMHooks.count.HP_buyingstore_close_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_buyingstore_close_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_buyingstore_open(struct map_session_data *sd, int account_id) { + int hIndex = 0; + if( HPMHooks.count.HP_buyingstore_open_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_buyingstore_open_pre[hIndex].func; + preHookFunc(sd, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.buyingstore.open(sd, account_id); + } + if( HPMHooks.count.HP_buyingstore_open_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_buyingstore_open_post[hIndex].func; + postHookFunc(sd, &account_id); + } + } + return; +} +void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count) { + int hIndex = 0; + if( HPMHooks.count.HP_buyingstore_trade_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *account_id, unsigned int *buyer_id, const uint8 *itemlist, unsigned int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_buyingstore_trade_pre[hIndex].func; + preHookFunc(sd, &account_id, &buyer_id, itemlist, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.buyingstore.trade(sd, account_id, buyer_id, itemlist, count); + } + if( HPMHooks.count.HP_buyingstore_trade_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *account_id, unsigned int *buyer_id, const uint8 *itemlist, unsigned int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_buyingstore_trade_post[hIndex].func; + postHookFunc(sd, &account_id, &buyer_id, itemlist, &count); + } + } + return; +} +bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_buyingstore_search_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_buyingstore_search_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.buyingstore.search(sd, nameid); + } + if( HPMHooks.count.HP_buyingstore_search_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_buyingstore_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); + } + } + return retVal___; +} +bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search_store_search *s) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_buyingstore_searchall_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, const struct s_search_store_search *s); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_searchall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_buyingstore_searchall_pre[hIndex].func; + retVal___ = preHookFunc(sd, s); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.buyingstore.searchall(sd, s); + } + if( HPMHooks.count.HP_buyingstore_searchall_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_search_store_search *s); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_searchall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_buyingstore_searchall_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, s); + } + } + return retVal___; +} +unsigned int HP_buyingstore_getuid(void) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_buyingstore_getuid_pre ) { + unsigned int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_buyingstore_getuid_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.buyingstore.getuid(); + } + if( HPMHooks.count.HP_buyingstore_getuid_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_buyingstore_getuid_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +/* chat */ +int HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_create_pc_chat_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pc_chat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_create_pc_chat_pre[hIndex].func; + retVal___ = preHookFunc(sd, title, pass, &limit, &pub); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.create_pc_chat(sd, title, pass, limit, pub); + } + if( HPMHooks.count.HP_chat_create_pc_chat_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pc_chat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_create_pc_chat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, title, pass, &limit, &pub); + } + } + return retVal___; +} +int HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_join_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *chatid, const char *pass); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_join_pre[hIndex].func; + retVal___ = preHookFunc(sd, &chatid, pass); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.join(sd, chatid, pass); + } + if( HPMHooks.count.HP_chat_join_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *chatid, const char *pass); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_join_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &chatid, pass); + } + } + return retVal___; +} +int HP_chat_leave(struct map_session_data *sd, bool kicked) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_leave_pre ) { + int (*preHookFunc) (struct map_session_data *sd, bool *kicked); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_leave_pre[hIndex].func; + retVal___ = preHookFunc(sd, &kicked); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.leave(sd, kicked); + } + if( HPMHooks.count.HP_chat_leave_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool *kicked); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &kicked); + } + } + return retVal___; +} +int HP_chat_change_owner(struct map_session_data *sd, const char *nextownername) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_change_owner_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *nextownername); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_change_owner_pre[hIndex].func; + retVal___ = preHookFunc(sd, nextownername); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.change_owner(sd, nextownername); + } + if( HPMHooks.count.HP_chat_change_owner_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *nextownername); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_change_owner_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nextownername); + } + } + return retVal___; +} +int HP_chat_change_status(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_change_status_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_status_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_change_status_pre[hIndex].func; + retVal___ = preHookFunc(sd, title, pass, &limit, &pub); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.change_status(sd, title, pass, limit, pub); + } + if( HPMHooks.count.HP_chat_change_status_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_status_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_change_status_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, title, pass, &limit, &pub); + } + } + return retVal___; +} +int HP_chat_kick(struct map_session_data *sd, const char *kickusername) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_kick_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *kickusername); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_kick_pre[hIndex].func; + retVal___ = preHookFunc(sd, kickusername); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.kick(sd, kickusername); + } + if( HPMHooks.count.HP_chat_kick_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *kickusername); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_kick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, kickusername); + } + } + return retVal___; +} +int HP_chat_create_npc_chat(struct npc_data *nd, const char *title, int limit, bool pub, int trigger, const char *ev, int zeny, int minLvl, int maxLvl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_create_npc_chat_pre ) { + int (*preHookFunc) (struct npc_data *nd, const char *title, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_npc_chat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_create_npc_chat_pre[hIndex].func; + retVal___ = preHookFunc(nd, title, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.create_npc_chat(nd, title, limit, pub, trigger, ev, zeny, minLvl, maxLvl); + } + if( HPMHooks.count.HP_chat_create_npc_chat_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, const char *title, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_npc_chat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_create_npc_chat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, title, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl); + } + } + return retVal___; +} +int HP_chat_delete_npc_chat(struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_delete_npc_chat_pre ) { + int (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_delete_npc_chat_pre[hIndex].func; + retVal___ = preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.delete_npc_chat(nd); + } + if( HPMHooks.count.HP_chat_delete_npc_chat_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_delete_npc_chat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd); + } + } + return retVal___; +} +int HP_chat_enable_event(struct chat_data *cd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_enable_event_pre ) { + int (*preHookFunc) (struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_enable_event_pre[hIndex].func; + retVal___ = preHookFunc(cd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.enable_event(cd); + } + if( HPMHooks.count.HP_chat_enable_event_post ) { + int (*postHookFunc) (int retVal___, struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_enable_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cd); + } + } + return retVal___; +} +int HP_chat_disable_event(struct chat_data *cd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_disable_event_pre ) { + int (*preHookFunc) (struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_disable_event_pre[hIndex].func; + retVal___ = preHookFunc(cd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.disable_event(cd); + } + if( HPMHooks.count.HP_chat_disable_event_post ) { + int (*postHookFunc) (int retVal___, struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_disable_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cd); + } + } + return retVal___; +} +int HP_chat_npc_kick_all(struct chat_data *cd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_npc_kick_all_pre ) { + int (*preHookFunc) (struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_npc_kick_all_pre[hIndex].func; + retVal___ = preHookFunc(cd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.npc_kick_all(cd); + } + if( HPMHooks.count.HP_chat_npc_kick_all_post ) { + int (*postHookFunc) (int retVal___, struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_npc_kick_all_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cd); + } + } + return retVal___; +} +int HP_chat_trigger_event(struct chat_data *cd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chat_trigger_event_pre ) { + int (*preHookFunc) (struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_trigger_event_pre[hIndex].func; + retVal___ = preHookFunc(cd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.trigger_event(cd); + } + if( HPMHooks.count.HP_chat_trigger_event_post ) { + int (*postHookFunc) (int retVal___, struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_trigger_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cd); + } + } + return retVal___; +} +struct chat_data* HP_chat_create(struct block_list *bl, const char *title, const char *pass, int limit, bool pub, int trigger, const char *ev, int zeny, int minLvl, int maxLvl) { + int hIndex = 0; + struct chat_data* retVal___ = NULL; + if( HPMHooks.count.HP_chat_create_pre ) { + struct chat_data* (*preHookFunc) (struct block_list *bl, const char *title, const char *pass, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chat_create_pre[hIndex].func; + retVal___ = preHookFunc(bl, title, pass, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chat.create(bl, title, pass, limit, pub, trigger, ev, zeny, minLvl, maxLvl); + } + if( HPMHooks.count.HP_chat_create_post ) { + struct chat_data* (*postHookFunc) (struct chat_data* retVal___, struct block_list *bl, const char *title, const char *pass, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chat_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, title, pass, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl); + } + } + return retVal___; +} +/* chrif */ +int HP_chrif_final(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_final_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_final_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.final(); + } + if( HPMHooks.count.HP_chrif_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_chrif_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.init(); + } + if( HPMHooks.count.HP_chrif_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_chrif_setuserid(char *id) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_setuserid_pre ) { + void (*preHookFunc) (char *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_setuserid_pre[hIndex].func; + preHookFunc(id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.setuserid(id); + } + if( HPMHooks.count.HP_chrif_setuserid_post ) { + void (*postHookFunc) (char *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_setuserid_post[hIndex].func; + postHookFunc(id); + } + } + return; +} +void HP_chrif_setpasswd(char *pwd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_setpasswd_pre ) { + void (*preHookFunc) (char *pwd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_setpasswd_pre[hIndex].func; + preHookFunc(pwd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.setpasswd(pwd); + } + if( HPMHooks.count.HP_chrif_setpasswd_post ) { + void (*postHookFunc) (char *pwd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_setpasswd_post[hIndex].func; + postHookFunc(pwd); + } + } + return; +} +void HP_chrif_checkdefaultlogin(void) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_checkdefaultlogin_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.checkdefaultlogin(); + } + if( HPMHooks.count.HP_chrif_checkdefaultlogin_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_chrif_setip(const char *ip) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_setip_pre ) { + int (*preHookFunc) (const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_setip_pre[hIndex].func; + retVal___ = preHookFunc(ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.setip(ip); + } + if( HPMHooks.count.HP_chrif_setip_post ) { + int (*postHookFunc) (int retVal___, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_setip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ip); + } + } + return retVal___; +} +void HP_chrif_setport(uint16 port) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_setport_pre ) { + void (*preHookFunc) (uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_setport_pre[hIndex].func; + preHookFunc(&port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.setport(port); + } + if( HPMHooks.count.HP_chrif_setport_post ) { + void (*postHookFunc) (uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_setport_post[hIndex].func; + postHookFunc(&port); + } + } + return; +} +int HP_chrif_isconnected(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_isconnected_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_isconnected_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.isconnected(); + } + if( HPMHooks.count.HP_chrif_isconnected_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_isconnected_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_chrif_check_shutdown(void) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_check_shutdown_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_check_shutdown_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.check_shutdown(); + } + if( HPMHooks.count.HP_chrif_check_shutdown_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_check_shutdown_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct auth_node* HP_chrif_search(int account_id) { + int hIndex = 0; + struct auth_node* retVal___ = NULL; + if( HPMHooks.count.HP_chrif_search_pre ) { + struct auth_node* (*preHookFunc) (int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_search_pre[hIndex].func; + retVal___ = preHookFunc(&account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.search(account_id); + } + if( HPMHooks.count.HP_chrif_search_post ) { + struct auth_node* (*postHookFunc) (struct auth_node* retVal___, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id); + } + } + return retVal___; +} +struct auth_node* HP_chrif_auth_check(int account_id, int char_id, enum sd_state state) { + int hIndex = 0; + struct auth_node* retVal___ = NULL; + if( HPMHooks.count.HP_chrif_auth_check_pre ) { + struct auth_node* (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_auth_check_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id, &state); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.auth_check(account_id, char_id, state); + } + if( HPMHooks.count.HP_chrif_auth_check_post ) { + struct auth_node* (*postHookFunc) (struct auth_node* retVal___, int *account_id, int *char_id, enum sd_state *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_auth_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &char_id, &state); + } + } + return retVal___; +} +bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_chrif_auth_delete_pre ) { + bool (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_auth_delete_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id, &state); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.auth_delete(account_id, char_id, state); + } + if( HPMHooks.count.HP_chrif_auth_delete_post ) { + bool (*postHookFunc) (bool retVal___, int *account_id, int *char_id, enum sd_state *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_auth_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &char_id, &state); + } + } + return retVal___; +} +bool HP_chrif_auth_finished(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_chrif_auth_finished_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_auth_finished_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.auth_finished(sd); + } + if( HPMHooks.count.HP_chrif_auth_finished_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_auth_finished_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_chrif_authreq(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_authreq_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_authreq_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.authreq(sd); + } + if( HPMHooks.count.HP_chrif_authreq_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_authreq_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_chrif_authok(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_authok_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_authok_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.authok(fd); + } + if( HPMHooks.count.HP_chrif_authok_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_authok_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +int HP_chrif_scdata_request(int account_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_scdata_request_pre ) { + int (*preHookFunc) (int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_scdata_request_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.scdata_request(account_id, char_id); + } + if( HPMHooks.count.HP_chrif_scdata_request_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_scdata_request_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &char_id); + } + } + return retVal___; +} +int HP_chrif_save(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_save_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_save_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.save(sd, flag); + } + if( HPMHooks.count.HP_chrif_save_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_charselectreq_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint32 *s_ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_charselectreq_pre[hIndex].func; + retVal___ = preHookFunc(sd, &s_ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.charselectreq(sd, s_ip); + } + if( HPMHooks.count.HP_chrif_charselectreq_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint32 *s_ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_charselectreq_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &s_ip); + } + } + return retVal___; +} +int HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 port) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_changemapserver_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_changemapserver_pre[hIndex].func; + retVal___ = preHookFunc(sd, &ip, &port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.changemapserver(sd, ip, port); + } + if( HPMHooks.count.HP_chrif_changemapserver_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_changemapserver_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &ip, &port); + } + } + return retVal___; +} +int HP_chrif_searchcharid(int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_searchcharid_pre ) { + int (*preHookFunc) (int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_searchcharid_pre[hIndex].func; + retVal___ = preHookFunc(&char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.searchcharid(char_id); + } + if( HPMHooks.count.HP_chrif_searchcharid_post ) { + int (*postHookFunc) (int retVal___, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_searchcharid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id); + } + } + return retVal___; +} +int HP_chrif_changeemail(int id, const char *actual_email, const char *new_email) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_changeemail_pre ) { + int (*preHookFunc) (int *id, const char *actual_email, const char *new_email); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_changeemail_pre[hIndex].func; + retVal___ = preHookFunc(&id, actual_email, new_email); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.changeemail(id, actual_email, new_email); + } + if( HPMHooks.count.HP_chrif_changeemail_post ) { + int (*postHookFunc) (int retVal___, int *id, const char *actual_email, const char *new_email); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_changeemail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id, actual_email, new_email); + } + } + return retVal___; +} +int HP_chrif_char_ask_name(int acc, const char *character_name, unsigned short operation_type, int year, int month, int day, int hour, int minute, int second) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_char_ask_name_pre ) { + int (*preHookFunc) (int *acc, const char *character_name, unsigned short *operation_type, int *year, int *month, int *day, int *hour, int *minute, int *second); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_char_ask_name_pre[hIndex].func; + retVal___ = preHookFunc(&acc, character_name, &operation_type, &year, &month, &day, &hour, &minute, &second); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.char_ask_name(acc, character_name, operation_type, year, month, day, hour, minute, second); + } + if( HPMHooks.count.HP_chrif_char_ask_name_post ) { + int (*postHookFunc) (int retVal___, int *acc, const char *character_name, unsigned short *operation_type, int *year, int *month, int *day, int *hour, int *minute, int *second); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_char_ask_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &acc, character_name, &operation_type, &year, &month, &day, &hour, &minute, &second); + } + } + return retVal___; +} +int HP_chrif_updatefamelist(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_updatefamelist_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_updatefamelist_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.updatefamelist(sd); + } + if( HPMHooks.count.HP_chrif_updatefamelist_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_updatefamelist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_chrif_buildfamelist(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_buildfamelist_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_buildfamelist_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.buildfamelist(); + } + if( HPMHooks.count.HP_chrif_buildfamelist_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_buildfamelist_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_chrif_save_scdata(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_save_scdata_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_save_scdata_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.save_scdata(sd); + } + if( HPMHooks.count.HP_chrif_save_scdata_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_save_scdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_ragsrvinfo_pre ) { + int (*preHookFunc) (int *base_rate, int *job_rate, int *drop_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_ragsrvinfo_pre[hIndex].func; + retVal___ = preHookFunc(&base_rate, &job_rate, &drop_rate); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.ragsrvinfo(base_rate, job_rate, drop_rate); + } + if( HPMHooks.count.HP_chrif_ragsrvinfo_post ) { + int (*postHookFunc) (int retVal___, int *base_rate, int *job_rate, int *drop_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_ragsrvinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &base_rate, &job_rate, &drop_rate); + } + } + return retVal___; +} +int HP_chrif_char_offline(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_char_offline_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_char_offline_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.char_offline(sd); + } + if( HPMHooks.count.HP_chrif_char_offline_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_char_offline_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_chrif_char_offline_nsd(int account_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_char_offline_nsd_pre ) { + int (*preHookFunc) (int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_char_offline_nsd_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.char_offline_nsd(account_id, char_id); + } + if( HPMHooks.count.HP_chrif_char_offline_nsd_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_char_offline_nsd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &char_id); + } + } + return retVal___; +} +int HP_chrif_char_reset_offline(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_char_reset_offline_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_char_reset_offline_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.char_reset_offline(); + } + if( HPMHooks.count.HP_chrif_char_reset_offline_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_char_reset_offline_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_chrif_send_users_tochar(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_send_users_tochar_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_send_users_tochar_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.send_users_tochar(); + } + if( HPMHooks.count.HP_chrif_send_users_tochar_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_send_users_tochar_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_chrif_char_online(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_char_online_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_char_online_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.char_online(sd); + } + if( HPMHooks.count.HP_chrif_char_online_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_char_online_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_chrif_changesex(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_changesex_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_changesex_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.changesex(sd); + } + if( HPMHooks.count.HP_chrif_changesex_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_changesex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_chrif_divorce(int partner_id1, int partner_id2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_divorce_pre ) { + int (*preHookFunc) (int *partner_id1, int *partner_id2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_divorce_pre[hIndex].func; + retVal___ = preHookFunc(&partner_id1, &partner_id2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.divorce(partner_id1, partner_id2); + } + if( HPMHooks.count.HP_chrif_divorce_post ) { + int (*postHookFunc) (int retVal___, int *partner_id1, int *partner_id2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_divorce_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &partner_id1, &partner_id2); + } + } + return retVal___; +} +int HP_chrif_removefriend(int char_id, int friend_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_removefriend_pre ) { + int (*preHookFunc) (int *char_id, int *friend_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_removefriend_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &friend_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.removefriend(char_id, friend_id); + } + if( HPMHooks.count.HP_chrif_removefriend_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *friend_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_removefriend_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &friend_id); + } + } + return retVal___; +} +void HP_chrif_send_report(char *buf, int len) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_send_report_pre ) { + void (*preHookFunc) (char *buf, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_send_report_pre[hIndex].func; + preHookFunc(buf, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.send_report(buf, len); + } + if( HPMHooks.count.HP_chrif_send_report_post ) { + void (*postHookFunc) (char *buf, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_send_report_post[hIndex].func; + postHookFunc(buf, &len); + } + } + return; +} +int HP_chrif_flush_fifo(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_flush_fifo_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_fifo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_flush_fifo_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.flush_fifo(); + } + if( HPMHooks.count.HP_chrif_flush_fifo_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_fifo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_flush_fifo_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_chrif_skillid2idx(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_skillid2idx_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_skillid2idx_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.skillid2idx(fd); + } + if( HPMHooks.count.HP_chrif_skillid2idx_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_skillid2idx_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +bool HP_chrif_sd_to_auth(TBL_PC *sd, enum sd_state state) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_chrif_sd_to_auth_pre ) { + bool (*preHookFunc) (TBL_PC *sd, enum sd_state *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_sd_to_auth_pre[hIndex].func; + retVal___ = preHookFunc(sd, &state); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.sd_to_auth(sd, state); + } + if( HPMHooks.count.HP_chrif_sd_to_auth_post ) { + bool (*postHookFunc) (bool retVal___, TBL_PC *sd, enum sd_state *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_sd_to_auth_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &state); + } + } + return retVal___; +} +int HP_chrif_check_connect_char_server(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_check_connect_char_server_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_check_connect_char_server_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.check_connect_char_server(tid, tick, id, data); + } + if( HPMHooks.count.HP_chrif_check_connect_char_server_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_check_connect_char_server_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +bool HP_chrif_auth_logout(TBL_PC *sd, enum sd_state state) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_chrif_auth_logout_pre ) { + bool (*preHookFunc) (TBL_PC *sd, enum sd_state *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_auth_logout_pre[hIndex].func; + retVal___ = preHookFunc(sd, &state); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.auth_logout(sd, state); + } + if( HPMHooks.count.HP_chrif_auth_logout_post ) { + bool (*postHookFunc) (bool retVal___, TBL_PC *sd, enum sd_state *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_auth_logout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &state); + } + } + return retVal___; +} +void HP_chrif_save_ack(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_save_ack_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_save_ack_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.save_ack(fd); + } + if( HPMHooks.count.HP_chrif_save_ack_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_save_ack_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +int HP_chrif_reconnect(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_reconnect_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_chrif_reconnect_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.chrif.reconnect(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_chrif_reconnect_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_chrif_reconnect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_chrif_auth_db_cleanup_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.chrif.auth_db_cleanup_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_chrif_auth_db_cleanup_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type, uint16 answer) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_char_ask_name_answer_pre ) { + void (*preHookFunc) (int *acc, const char *player_name, uint16 *type, uint16 *answer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_char_ask_name_answer_pre[hIndex].func; + preHookFunc(&acc, player_name, &type, &answer); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.char_ask_name_answer(acc, player_name, type, answer); + } + if( HPMHooks.count.HP_chrif_char_ask_name_answer_post ) { + void (*postHookFunc) (int *acc, const char *player_name, uint16 *type, uint16 *answer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_char_ask_name_answer_post[hIndex].func; + postHookFunc(&acc, player_name, &type, &answer); + } + } + return; +} +int HP_chrif_auth_db_final(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_auth_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_chrif_auth_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.chrif.auth_db_final(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_chrif_auth_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_chrif_auth_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_chrif_send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_send_usercount_tochar_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_send_usercount_tochar_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.send_usercount_tochar(tid, tick, id, data); + } + if( HPMHooks.count.HP_chrif_send_usercount_tochar_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_send_usercount_tochar_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_chrif_auth_db_cleanup(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_auth_db_cleanup_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.auth_db_cleanup(tid, tick, id, data); + } + if( HPMHooks.count.HP_chrif_auth_db_cleanup_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_chrif_connect(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_connect_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_connect_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.connect(fd); + } + if( HPMHooks.count.HP_chrif_connect_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_connect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_connectack(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_connectack_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_connectack_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.connectack(fd); + } + if( HPMHooks.count.HP_chrif_connectack_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_connectack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_sendmap(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_sendmap_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_sendmap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.sendmap(fd); + } + if( HPMHooks.count.HP_chrif_sendmap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_sendmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_sendmapack(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_sendmapack_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_sendmapack_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.sendmapack(fd); + } + if( HPMHooks.count.HP_chrif_sendmapack_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_sendmapack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_recvmap(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_recvmap_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_recvmap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.recvmap(fd); + } + if( HPMHooks.count.HP_chrif_recvmap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_recvmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_changemapserverack(int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_changemapserverack_pre ) { + int (*preHookFunc) (int *account_id, int *login_id1, int *login_id2, int *char_id, short *map_index, short *x, short *y, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserverack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_changemapserverack_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &login_id1, &login_id2, &char_id, &map_index, &x, &y, &ip, &port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.changemapserverack(account_id, login_id1, login_id2, char_id, map_index, x, y, ip, port); + } + if( HPMHooks.count.HP_chrif_changemapserverack_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *login_id1, int *login_id2, int *char_id, short *map_index, short *x, short *y, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserverack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_changemapserverack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &login_id1, &login_id2, &char_id, &map_index, &x, &y, &ip, &port); + } + } + return retVal___; +} +int HP_chrif_changedsex(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_changedsex_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_changedsex_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.changedsex(fd); + } + if( HPMHooks.count.HP_chrif_changedsex_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_changedsex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_divorceack(int char_id, int partner_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_divorceack_pre ) { + int (*preHookFunc) (int *char_id, int *partner_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_divorceack_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &partner_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.divorceack(char_id, partner_id); + } + if( HPMHooks.count.HP_chrif_divorceack_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *partner_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_divorceack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &partner_id); + } + } + return retVal___; +} +int HP_chrif_accountban(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_accountban_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_accountban_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.accountban(fd); + } + if( HPMHooks.count.HP_chrif_accountban_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_accountban_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_recvfamelist(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_recvfamelist_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_recvfamelist_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.recvfamelist(fd); + } + if( HPMHooks.count.HP_chrif_recvfamelist_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_recvfamelist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_load_scdata(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_load_scdata_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_load_scdata_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.load_scdata(fd); + } + if( HPMHooks.count.HP_chrif_load_scdata_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_load_scdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +void HP_chrif_update_ip(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_update_ip_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_update_ip_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.update_ip(fd); + } + if( HPMHooks.count.HP_chrif_update_ip_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_update_ip_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +int HP_chrif_disconnectplayer(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_disconnectplayer_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_disconnectplayer_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.disconnectplayer(fd); + } + if( HPMHooks.count.HP_chrif_disconnectplayer_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_disconnectplayer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_removemap(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_removemap_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_removemap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.removemap(fd); + } + if( HPMHooks.count.HP_chrif_removemap_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_removemap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_chrif_updatefamelist_ack(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_updatefamelist_ack_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_updatefamelist_ack_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.updatefamelist_ack(fd); + } + if( HPMHooks.count.HP_chrif_updatefamelist_ack_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_updatefamelist_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +void HP_chrif_keepalive(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_keepalive_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_keepalive_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.keepalive(fd); + } + if( HPMHooks.count.HP_chrif_keepalive_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_keepalive_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_chrif_keepalive_ack(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_keepalive_ack_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_keepalive_ack_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.keepalive_ack(fd); + } + if( HPMHooks.count.HP_chrif_keepalive_ack_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_keepalive_ack_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +int HP_chrif_deadopt(int father_id, int mother_id, int child_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_deadopt_pre ) { + int (*preHookFunc) (int *father_id, int *mother_id, int *child_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_deadopt_pre[hIndex].func; + retVal___ = preHookFunc(&father_id, &mother_id, &child_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.deadopt(father_id, mother_id, child_id); + } + if( HPMHooks.count.HP_chrif_deadopt_post ) { + int (*postHookFunc) (int retVal___, int *father_id, int *mother_id, int *child_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_deadopt_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &father_id, &mother_id, &child_id); + } + } + return retVal___; +} +void HP_chrif_authfail(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_authfail_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_authfail_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.authfail(fd); + } + if( HPMHooks.count.HP_chrif_authfail_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_authfail_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_chrif_on_ready(void) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_on_ready_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_on_ready_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.on_ready(); + } + if( HPMHooks.count.HP_chrif_on_ready_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_on_ready_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_chrif_on_disconnect(void) { + int hIndex = 0; + if( HPMHooks.count.HP_chrif_on_disconnect_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_on_disconnect_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chrif.on_disconnect(); + } + if( HPMHooks.count.HP_chrif_on_disconnect_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_on_disconnect_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_chrif_parse(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_chrif_parse_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_parse_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chrif.parse(fd); + } + if( HPMHooks.count.HP_chrif_parse_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +/* clif */ +int HP_clif_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.init(); + } + if( HPMHooks.count.HP_clif_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_clif_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.final(); + } + if( HPMHooks.count.HP_clif_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_clif_setip(const char *ip) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_setip_pre ) { + int (*preHookFunc) (const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_setip_pre[hIndex].func; + retVal___ = preHookFunc(ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.setip(ip); + } + if( HPMHooks.count.HP_clif_setip_post ) { + int (*postHookFunc) (int retVal___, const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_setip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ip); + } + } + return retVal___; +} +void HP_clif_setbindip(const char *ip) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_setbindip_pre ) { + void (*preHookFunc) (const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_setbindip_pre[hIndex].func; + preHookFunc(ip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.setbindip(ip); + } + if( HPMHooks.count.HP_clif_setbindip_post ) { + void (*postHookFunc) (const char *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_setbindip_post[hIndex].func; + postHookFunc(ip); + } + } + return; +} +void HP_clif_setport(uint16 port) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_setport_pre ) { + void (*preHookFunc) (uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_setport_pre[hIndex].func; + preHookFunc(&port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.setport(port); + } + if( HPMHooks.count.HP_clif_setport_post ) { + void (*postHookFunc) (uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_setport_post[hIndex].func; + postHookFunc(&port); + } + } + return; +} +uint32 HP_clif_refresh_ip(void) { + int hIndex = 0; + uint32 retVal___; + memset(&retVal___, '\0', sizeof(uint32)); + if( HPMHooks.count.HP_clif_refresh_ip_pre ) { + uint32 (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_refresh_ip_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.refresh_ip(); + } + if( HPMHooks.count.HP_clif_refresh_ip_post ) { + uint32 (*postHookFunc) (uint32 retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_refresh_ip_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_target type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_send_pre ) { + int (*preHookFunc) (const void *buf, int *len, struct block_list *bl, enum send_target *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_send_pre[hIndex].func; + retVal___ = preHookFunc(buf, &len, bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.send(buf, len, bl, type); + } + if( HPMHooks.count.HP_clif_send_post ) { + int (*postHookFunc) (int retVal___, const void *buf, int *len, struct block_list *bl, enum send_target *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_send_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buf, &len, bl, &type); + } + } + return retVal___; +} +int HP_clif_send_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_send_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clif_send_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.clif.send_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_clif_send_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clif_send_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_clif_parse(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_parse_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_parse_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.parse(fd); + } + if( HPMHooks.count.HP_clif_parse_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_clif_parse_cmd_pre ) { + unsigned short (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_cmd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_parse_cmd_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.parse_cmd(fd, sd); + } + if( HPMHooks.count.HP_clif_parse_cmd_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_cmd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_parse_cmd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +unsigned short HP_clif_decrypt_cmd(int cmd, struct map_session_data *sd) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_clif_decrypt_cmd_pre ) { + unsigned short (*preHookFunc) (int *cmd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_decrypt_cmd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_decrypt_cmd_pre[hIndex].func; + retVal___ = preHookFunc(&cmd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.decrypt_cmd(cmd, sd); + } + if( HPMHooks.count.HP_clif_decrypt_cmd_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, int *cmd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_decrypt_cmd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_decrypt_cmd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &cmd, sd); + } + } + return retVal___; +} +void HP_clif_authok(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_authok_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_authok_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.authok(sd); + } + if( HPMHooks.count.HP_clif_authok_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_authok_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_authrefuse(int fd, uint8 error_code) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_authrefuse_pre ) { + void (*preHookFunc) (int *fd, uint8 *error_code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_authrefuse_pre[hIndex].func; + preHookFunc(&fd, &error_code); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.authrefuse(fd, error_code); + } + if( HPMHooks.count.HP_clif_authrefuse_post ) { + void (*postHookFunc) (int *fd, uint8 *error_code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_authrefuse_post[hIndex].func; + postHookFunc(&fd, &error_code); + } + } + return; +} +void HP_clif_authfail_fd(int fd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_authfail_fd_pre ) { + void (*preHookFunc) (int *fd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authfail_fd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_authfail_fd_pre[hIndex].func; + preHookFunc(&fd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.authfail_fd(fd, type); + } + if( HPMHooks.count.HP_clif_authfail_fd_post ) { + void (*postHookFunc) (int *fd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authfail_fd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_authfail_fd_post[hIndex].func; + postHookFunc(&fd, &type); + } + } + return; +} +void HP_clif_charselectok(int id, uint8 ok) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_charselectok_pre ) { + void (*preHookFunc) (int *id, uint8 *ok); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_charselectok_pre[hIndex].func; + preHookFunc(&id, &ok); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.charselectok(id, ok); + } + if( HPMHooks.count.HP_clif_charselectok_post ) { + void (*postHookFunc) (int *id, uint8 *ok); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_charselectok_post[hIndex].func; + postHookFunc(&id, &ok); + } + } + return; +} +void HP_clif_dropflooritem(struct flooritem_data *fitem) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_dropflooritem_pre ) { + void (*preHookFunc) (struct flooritem_data *fitem); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_dropflooritem_pre[hIndex].func; + preHookFunc(fitem); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.dropflooritem(fitem); + } + if( HPMHooks.count.HP_clif_dropflooritem_post ) { + void (*postHookFunc) (struct flooritem_data *fitem); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_dropflooritem_post[hIndex].func; + postHookFunc(fitem); + } + } + return; +} +void HP_clif_clearflooritem(struct flooritem_data *fitem, int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_clearflooritem_pre ) { + void (*preHookFunc) (struct flooritem_data *fitem, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_clearflooritem_pre[hIndex].func; + preHookFunc(fitem, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clearflooritem(fitem, fd); + } + if( HPMHooks.count.HP_clif_clearflooritem_post ) { + void (*postHookFunc) (struct flooritem_data *fitem, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_clearflooritem_post[hIndex].func; + postHookFunc(fitem, &fd); + } + } + return; +} +void HP_clif_additem(struct map_session_data *sd, int n, int amount, int fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_additem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_additem_pre[hIndex].func; + preHookFunc(sd, &n, &amount, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.additem(sd, n, amount, fail); + } + if( HPMHooks.count.HP_clif_additem_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_additem_post[hIndex].func; + postHookFunc(sd, &n, &amount, &fail); + } + } + return; +} +void HP_clif_dropitem(struct map_session_data *sd, int n, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_dropitem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_dropitem_pre[hIndex].func; + preHookFunc(sd, &n, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.dropitem(sd, n, amount); + } + if( HPMHooks.count.HP_clif_dropitem_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_dropitem_post[hIndex].func; + postHookFunc(sd, &n, &amount); + } + } + return; +} +void HP_clif_delitem(struct map_session_data *sd, int n, int amount, short reason) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_delitem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, short *reason); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_delitem_pre[hIndex].func; + preHookFunc(sd, &n, &amount, &reason); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.delitem(sd, n, amount, reason); + } + if( HPMHooks.count.HP_clif_delitem_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount, short *reason); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_delitem_post[hIndex].func; + postHookFunc(sd, &n, &amount, &reason); + } + } + return; +} +void HP_clif_takeitem(struct block_list *src, struct block_list *dst) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_takeitem_pre ) { + void (*preHookFunc) (struct block_list *src, struct block_list *dst); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_takeitem_pre[hIndex].func; + preHookFunc(src, dst); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.takeitem(src, dst); + } + if( HPMHooks.count.HP_clif_takeitem_post ) { + void (*postHookFunc) (struct block_list *src, struct block_list *dst); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_takeitem_post[hIndex].func; + postHookFunc(src, dst); + } + } + return; +} +void HP_clif_arrowequip(struct map_session_data *sd, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_arrowequip_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_arrowequip_pre[hIndex].func; + preHookFunc(sd, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.arrowequip(sd, val); + } + if( HPMHooks.count.HP_clif_arrowequip_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_arrowequip_post[hIndex].func; + postHookFunc(sd, &val); + } + } + return; +} +void HP_clif_arrow_fail(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_arrow_fail_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_fail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_arrow_fail_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.arrow_fail(sd, type); + } + if( HPMHooks.count.HP_clif_arrow_fail_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_fail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_arrow_fail_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_use_card(struct map_session_data *sd, int idx) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_use_card_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_use_card_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_use_card_pre[hIndex].func; + preHookFunc(sd, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.use_card(sd, idx); + } + if( HPMHooks.count.HP_clif_use_card_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_use_card_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_use_card_post[hIndex].func; + postHookFunc(sd, &idx); + } + } + return; +} +void HP_clif_cart_additem(struct map_session_data *sd, int n, int amount, int fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cart_additem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cart_additem_pre[hIndex].func; + preHookFunc(sd, &n, &amount, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cart_additem(sd, n, amount, fail); + } + if( HPMHooks.count.HP_clif_cart_additem_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cart_additem_post[hIndex].func; + postHookFunc(sd, &n, &amount, &fail); + } + } + return; +} +void HP_clif_cart_delitem(struct map_session_data *sd, int n, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cart_delitem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cart_delitem_pre[hIndex].func; + preHookFunc(sd, &n, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cart_delitem(sd, n, amount); + } + if( HPMHooks.count.HP_clif_cart_delitem_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cart_delitem_post[hIndex].func; + postHookFunc(sd, &n, &amount); + } + } + return; +} +void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, int ok) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_equipitemack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_equipitemack_pre[hIndex].func; + preHookFunc(sd, &n, &pos, &ok); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.equipitemack(sd, n, pos, ok); + } + if( HPMHooks.count.HP_clif_equipitemack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_equipitemack_post[hIndex].func; + postHookFunc(sd, &n, &pos, &ok); + } + } + return; +} +void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, int ok) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_unequipitemack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_unequipitemack_pre[hIndex].func; + preHookFunc(sd, &n, &pos, &ok); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.unequipitemack(sd, n, pos, ok); + } + if( HPMHooks.count.HP_clif_unequipitemack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_unequipitemack_post[hIndex].func; + postHookFunc(sd, &n, &pos, &ok); + } + } + return; +} +void HP_clif_useitemack(struct map_session_data *sd, int index, int amount, bool ok) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_useitemack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount, bool *ok); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useitemack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_useitemack_pre[hIndex].func; + preHookFunc(sd, &index, &amount, &ok); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.useitemack(sd, index, amount, ok); + } + if( HPMHooks.count.HP_clif_useitemack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *index, int *amount, bool *ok); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useitemack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_useitemack_post[hIndex].func; + postHookFunc(sd, &index, &amount, &ok); + } + } + return; +} +void HP_clif_addcards(unsigned char *buf, struct item *item) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_addcards_pre ) { + void (*preHookFunc) (unsigned char *buf, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_addcards_pre[hIndex].func; + preHookFunc(buf, item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.addcards(buf, item); + } + if( HPMHooks.count.HP_clif_addcards_post ) { + void (*postHookFunc) (unsigned char *buf, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_addcards_post[hIndex].func; + postHookFunc(buf, item); + } + } + return; +} +void HP_clif_addcards2(unsigned short *cards, struct item *item) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_addcards2_pre ) { + void (*preHookFunc) (unsigned short *cards, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_addcards2_pre[hIndex].func; + preHookFunc(cards, item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.addcards2(cards, item); + } + if( HPMHooks.count.HP_clif_addcards2_post ) { + void (*postHookFunc) (unsigned short *cards, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_addcards2_post[hIndex].func; + postHookFunc(cards, item); + } + } + return; +} +void HP_clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *id, int equip) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_sub_pre ) { + void (*preHookFunc) (unsigned char *buf, int *n, struct item *i, struct item_data *id, int *equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_sub_pre[hIndex].func; + preHookFunc(buf, &n, i, id, &equip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_sub(buf, n, i, id, equip); + } + if( HPMHooks.count.HP_clif_item_sub_post ) { + void (*postHookFunc) (unsigned char *buf, int *n, struct item *i, struct item_data *id, int *equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_sub_post[hIndex].func; + postHookFunc(buf, &n, i, id, &equip); + } + } + return; +} +void HP_clif_getareachar_item(struct map_session_data *sd, struct flooritem_data *fitem) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_getareachar_item_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_getareachar_item_pre[hIndex].func; + preHookFunc(sd, fitem); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.getareachar_item(sd, fitem); + } + if( HPMHooks.count.HP_clif_getareachar_item_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_getareachar_item_post[hIndex].func; + postHookFunc(sd, fitem); + } + } + return; +} +void HP_clif_cart_additem_ack(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cart_additem_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cart_additem_ack_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cart_additem_ack(sd, flag); + } + if( HPMHooks.count.HP_clif_cart_additem_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cart_additem_ack_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_cashshop_load(void) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cashshop_load_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cashshop_load_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashshop_load(); + } + if( HPMHooks.count.HP_clif_cashshop_load_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cashshop_load_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid, unsigned short containerid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_package_announce_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *containerid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_package_announce_pre[hIndex].func; + preHookFunc(sd, &nameid, &containerid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.package_announce(sd, nameid, containerid); + } + if( HPMHooks.count.HP_clif_package_announce_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *containerid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_package_announce_post[hIndex].func; + postHookFunc(sd, &nameid, &containerid); + } + } + return; +} +void HP_clif_clearunit_single(int id, clr_type type, int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_clearunit_single_pre ) { + void (*preHookFunc) (int *id, clr_type *type, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_clearunit_single_pre[hIndex].func; + preHookFunc(&id, &type, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clearunit_single(id, type, fd); + } + if( HPMHooks.count.HP_clif_clearunit_single_post ) { + void (*postHookFunc) (int *id, clr_type *type, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_clearunit_single_post[hIndex].func; + postHookFunc(&id, &type, &fd); + } + } + return; +} +void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_clearunit_area_pre ) { + void (*preHookFunc) (struct block_list *bl, clr_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_clearunit_area_pre[hIndex].func; + preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clearunit_area(bl, type); + } + if( HPMHooks.count.HP_clif_clearunit_area_post ) { + void (*postHookFunc) (struct block_list *bl, clr_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_clearunit_area_post[hIndex].func; + postHookFunc(bl, &type); + } + } + return; +} +void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, unsigned int tick) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_clearunit_delayed_pre ) { + void (*preHookFunc) (struct block_list *bl, clr_type *type, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_pre[hIndex].func; + preHookFunc(bl, &type, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clearunit_delayed(bl, type, tick); + } + if( HPMHooks.count.HP_clif_clearunit_delayed_post ) { + void (*postHookFunc) (struct block_list *bl, clr_type *type, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_post[hIndex].func; + postHookFunc(bl, &type, &tick); + } + } + return; +} +void HP_clif_walkok(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_walkok_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_walkok_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.walkok(sd); + } + if( HPMHooks.count.HP_clif_walkok_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_walkok_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_move(struct unit_data *ud) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_move_pre ) { + void (*preHookFunc) (struct unit_data *ud); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_move_pre[hIndex].func; + preHookFunc(ud); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.move(ud); + } + if( HPMHooks.count.HP_clif_move_post ) { + void (*postHookFunc) (struct unit_data *ud); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_move_post[hIndex].func; + postHookFunc(ud); + } + } + return; +} +void HP_clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *ud) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_move2_pre ) { + void (*preHookFunc) (struct block_list *bl, struct view_data *vd, struct unit_data *ud); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_move2_pre[hIndex].func; + preHookFunc(bl, vd, ud); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.move2(bl, vd, ud); + } + if( HPMHooks.count.HP_clif_move2_post ) { + void (*postHookFunc) (struct block_list *bl, struct view_data *vd, struct unit_data *ud); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_move2_post[hIndex].func; + postHookFunc(bl, vd, ud); + } + } + return; +} +void HP_clif_blown(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_blown_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_blown_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.blown(bl); + } + if( HPMHooks.count.HP_clif_blown_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_blown_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_slide(struct block_list *bl, int x, int y) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_slide_pre ) { + void (*preHookFunc) (struct block_list *bl, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_slide_pre[hIndex].func; + preHookFunc(bl, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.slide(bl, x, y); + } + if( HPMHooks.count.HP_clif_slide_post ) { + void (*postHookFunc) (struct block_list *bl, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_slide_post[hIndex].func; + postHookFunc(bl, &x, &y); + } + } + return; +} +void HP_clif_fixpos(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_fixpos_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_fixpos_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.fixpos(bl); + } + if( HPMHooks.count.HP_clif_fixpos_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_fixpos_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_changelook(struct block_list *bl, int type, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changelook_pre ) { + void (*preHookFunc) (struct block_list *bl, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changelook_pre[hIndex].func; + preHookFunc(bl, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changelook(bl, type, val); + } + if( HPMHooks.count.HP_clif_changelook_post ) { + void (*postHookFunc) (struct block_list *bl, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changelook_post[hIndex].func; + postHookFunc(bl, &type, &val); + } + } + return; +} +void HP_clif_changetraplook(struct block_list *bl, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changetraplook_pre ) { + void (*preHookFunc) (struct block_list *bl, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changetraplook_pre[hIndex].func; + preHookFunc(bl, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changetraplook(bl, val); + } + if( HPMHooks.count.HP_clif_changetraplook_post ) { + void (*postHookFunc) (struct block_list *bl, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changetraplook_post[hIndex].func; + postHookFunc(bl, &val); + } + } + return; +} +void HP_clif_refreshlook(struct block_list *bl, int id, int type, int val, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_refreshlook_pre ) { + void (*preHookFunc) (struct block_list *bl, int *id, int *type, int *val, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refreshlook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_refreshlook_pre[hIndex].func; + preHookFunc(bl, &id, &type, &val, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.refreshlook(bl, id, type, val, target); + } + if( HPMHooks.count.HP_clif_refreshlook_post ) { + void (*postHookFunc) (struct block_list *bl, int *id, int *type, int *val, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refreshlook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_refreshlook_post[hIndex].func; + postHookFunc(bl, &id, &type, &val, &target); + } + } + return; +} +void HP_clif_class_change(struct block_list *bl, int class_, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_class_change_pre ) { + void (*preHookFunc) (struct block_list *bl, int *class_, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_class_change_pre[hIndex].func; + preHookFunc(bl, &class_, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.class_change(bl, class_, type); + } + if( HPMHooks.count.HP_clif_class_change_post ) { + void (*postHookFunc) (struct block_list *bl, int *class_, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_class_change_post[hIndex].func; + postHookFunc(bl, &class_, &type); + } + } + return; +} +void HP_clif_skill_setunit(struct skill_unit *su) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_setunit_pre ) { + void (*preHookFunc) (struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_setunit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_setunit_pre[hIndex].func; + preHookFunc(su); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_setunit(su); + } + if( HPMHooks.count.HP_clif_skill_setunit_post ) { + void (*postHookFunc) (struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_setunit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_setunit_post[hIndex].func; + postHookFunc(su); + } + } + return; +} +void HP_clif_skill_delunit(struct skill_unit *su) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_delunit_pre ) { + void (*preHookFunc) (struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_delunit_pre[hIndex].func; + preHookFunc(su); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_delunit(su); + } + if( HPMHooks.count.HP_clif_skill_delunit_post ) { + void (*postHookFunc) (struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_delunit_post[hIndex].func; + postHookFunc(su); + } + } + return; +} +void HP_clif_skillunit_update(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skillunit_update_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skillunit_update_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skillunit_update(bl); + } + if( HPMHooks.count.HP_clif_skillunit_update_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skillunit_update_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +int HP_clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_clearunit_delayed_sub_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_sub_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.clearunit_delayed_sub(tid, tick, id, data); + } + if( HPMHooks.count.HP_clif_clearunit_delayed_sub_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_clif_set_unit_idle(struct block_list *bl, struct map_session_data *tsd, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_set_unit_idle_pre ) { + void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_set_unit_idle_pre[hIndex].func; + preHookFunc(bl, tsd, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.set_unit_idle(bl, tsd, target); + } + if( HPMHooks.count.HP_clif_set_unit_idle_post ) { + void (*postHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_set_unit_idle_post[hIndex].func; + postHookFunc(bl, tsd, &target); + } + } + return; +} +void HP_clif_spawn_unit(struct block_list *bl, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_spawn_unit_pre ) { + void (*preHookFunc) (struct block_list *bl, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_spawn_unit_pre[hIndex].func; + preHookFunc(bl, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.spawn_unit(bl, target); + } + if( HPMHooks.count.HP_clif_spawn_unit_post ) { + void (*postHookFunc) (struct block_list *bl, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_spawn_unit_post[hIndex].func; + postHookFunc(bl, &target); + } + } + return; +} +void HP_clif_set_unit_walking(struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_set_unit_walking_pre ) { + void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_walking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_set_unit_walking_pre[hIndex].func; + preHookFunc(bl, tsd, ud, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.set_unit_walking(bl, tsd, ud, target); + } + if( HPMHooks.count.HP_clif_set_unit_walking_post ) { + void (*postHookFunc) (struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_walking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_set_unit_walking_post[hIndex].func; + postHookFunc(bl, tsd, ud, &target); + } + } + return; +} +int HP_clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damage, int div_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_calc_walkdelay_pre ) { + int (*preHookFunc) (struct block_list *bl, int *delay, int *type, int *damage, int *div_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_calc_walkdelay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_calc_walkdelay_pre[hIndex].func; + retVal___ = preHookFunc(bl, &delay, &type, &damage, &div_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.calc_walkdelay(bl, delay, type, damage, div_); + } + if( HPMHooks.count.HP_clif_calc_walkdelay_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *delay, int *type, int *damage, int *div_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_calc_walkdelay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_calc_walkdelay_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &delay, &type, &damage, &div_); + } + } + return retVal___; +} +void HP_clif_getareachar_skillunit(struct map_session_data *sd, struct skill_unit *su) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_getareachar_skillunit_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_pre[hIndex].func; + preHookFunc(sd, su); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.getareachar_skillunit(sd, su); + } + if( HPMHooks.count.HP_clif_getareachar_skillunit_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_post[hIndex].func; + postHookFunc(sd, su); + } + } + return; +} +void HP_clif_getareachar_unit(struct map_session_data *sd, struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_getareachar_unit_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_getareachar_unit_pre[hIndex].func; + preHookFunc(sd, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.getareachar_unit(sd, bl); + } + if( HPMHooks.count.HP_clif_getareachar_unit_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_getareachar_unit_post[hIndex].func; + postHookFunc(sd, bl); + } + } + return; +} +void HP_clif_clearchar_skillunit(struct skill_unit *su, int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_clearchar_skillunit_pre ) { + void (*preHookFunc) (struct skill_unit *su, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchar_skillunit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_clearchar_skillunit_pre[hIndex].func; + preHookFunc(su, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clearchar_skillunit(su, fd); + } + if( HPMHooks.count.HP_clif_clearchar_skillunit_post ) { + void (*postHookFunc) (struct skill_unit *su, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchar_skillunit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_clearchar_skillunit_post[hIndex].func; + postHookFunc(su, &fd); + } + } + return; +} +int HP_clif_getareachar(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_getareachar_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clif_getareachar_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.clif.getareachar(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_clif_getareachar_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clif_getareachar_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_clif_spawn(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_spawn_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_spawn_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.spawn(bl); + } + if( HPMHooks.count.HP_clif_spawn_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_spawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +void HP_clif_changemap(struct map_session_data *sd, short m, int x, int y) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changemap_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *m, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changemap_pre[hIndex].func; + preHookFunc(sd, &m, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changemap(sd, m, x, y); + } + if( HPMHooks.count.HP_clif_changemap_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *m, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changemap_post[hIndex].func; + postHookFunc(sd, &m, &x, &y); + } + } + return; +} +void HP_clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changemapcell_pre ) { + void (*preHookFunc) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changemapcell_pre[hIndex].func; + preHookFunc(&fd, &m, &x, &y, &type, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changemapcell(fd, m, x, y, type, target); + } + if( HPMHooks.count.HP_clif_changemapcell_post ) { + void (*postHookFunc) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changemapcell_post[hIndex].func; + postHookFunc(&fd, &m, &x, &y, &type, &target); + } + } + return; +} +void HP_clif_map_property(struct map_session_data *sd, enum map_property property) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_map_property_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum map_property *property); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_map_property_pre[hIndex].func; + preHookFunc(sd, &property); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.map_property(sd, property); + } + if( HPMHooks.count.HP_clif_map_property_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum map_property *property); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_map_property_post[hIndex].func; + postHookFunc(sd, &property); + } + } + return; +} +void HP_clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pvpset_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *pvprank, int *pvpnum, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pvpset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pvpset_pre[hIndex].func; + preHookFunc(sd, &pvprank, &pvpnum, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pvpset(sd, pvprank, pvpnum, type); + } + if( HPMHooks.count.HP_clif_pvpset_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *pvprank, int *pvpnum, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pvpset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pvpset_post[hIndex].func; + postHookFunc(sd, &pvprank, &pvpnum, &type); + } + } + return; +} +void HP_clif_map_property_mapall(int mapid, enum map_property property) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_map_property_mapall_pre ) { + void (*preHookFunc) (int *mapid, enum map_property *property); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_mapall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_map_property_mapall_pre[hIndex].func; + preHookFunc(&mapid, &property); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.map_property_mapall(mapid, property); + } + if( HPMHooks.count.HP_clif_map_property_mapall_post ) { + void (*postHookFunc) (int *mapid, enum map_property *property); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_mapall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_map_property_mapall_post[hIndex].func; + postHookFunc(&mapid, &property); + } + } + return; +} +void HP_clif_bossmapinfo(int fd, struct mob_data *md, short flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bossmapinfo_pre ) { + void (*preHookFunc) (int *fd, struct mob_data *md, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bossmapinfo_pre[hIndex].func; + preHookFunc(&fd, md, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bossmapinfo(fd, md, flag); + } + if( HPMHooks.count.HP_clif_bossmapinfo_post ) { + void (*postHookFunc) (int *fd, struct mob_data *md, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bossmapinfo_post[hIndex].func; + postHookFunc(&fd, md, &flag); + } + } + return; +} +void HP_clif_map_type(struct map_session_data *sd, enum map_type type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_map_type_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum map_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_map_type_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.map_type(sd, type); + } + if( HPMHooks.count.HP_clif_map_type_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum map_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_map_type_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_maptypeproperty2_pre ) { + void (*preHookFunc) (struct block_list *bl, enum send_target *t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_maptypeproperty2_pre[hIndex].func; + preHookFunc(bl, &t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.maptypeproperty2(bl, t); + } + if( HPMHooks.count.HP_clif_maptypeproperty2_post ) { + void (*postHookFunc) (struct block_list *bl, enum send_target *t); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_maptypeproperty2_post[hIndex].func; + postHookFunc(bl, &t); + } + } + return; +} +void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changemapserver_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changemapserver_pre[hIndex].func; + preHookFunc(sd, &map_index, &x, &y, &ip, &port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port); + } + if( HPMHooks.count.HP_clif_changemapserver_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changemapserver_post[hIndex].func; + postHookFunc(sd, &map_index, &x, &y, &ip, &port); + } + } + return; +} +void HP_clif_npcbuysell(struct map_session_data *sd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_npcbuysell_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_npcbuysell_pre[hIndex].func; + preHookFunc(sd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npcbuysell(sd, id); + } + if( HPMHooks.count.HP_clif_npcbuysell_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_npcbuysell_post[hIndex].func; + postHookFunc(sd, &id); + } + } + return; +} +void HP_clif_buylist(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buylist_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buylist_pre[hIndex].func; + preHookFunc(sd, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buylist(sd, nd); + } + if( HPMHooks.count.HP_clif_buylist_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buylist_post[hIndex].func; + postHookFunc(sd, nd); + } + } + return; +} +void HP_clif_selllist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_selllist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_selllist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.selllist(sd); + } + if( HPMHooks.count.HP_clif_selllist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_selllist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cashshop_show_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cashshop_show_pre[hIndex].func; + preHookFunc(sd, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashshop_show(sd, nd); + } + if( HPMHooks.count.HP_clif_cashshop_show_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cashshop_show_post[hIndex].func; + postHookFunc(sd, nd); + } + } + return; +} +void HP_clif_npc_buy_result(struct map_session_data *sd, unsigned char result) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_npc_buy_result_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_buy_result_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_npc_buy_result_pre[hIndex].func; + preHookFunc(sd, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npc_buy_result(sd, result); + } + if( HPMHooks.count.HP_clif_npc_buy_result_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_buy_result_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_npc_buy_result_post[hIndex].func; + postHookFunc(sd, &result); + } + } + return; +} +void HP_clif_npc_sell_result(struct map_session_data *sd, unsigned char result) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_npc_sell_result_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_sell_result_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_npc_sell_result_pre[hIndex].func; + preHookFunc(sd, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npc_sell_result(sd, result); + } + if( HPMHooks.count.HP_clif_npc_sell_result_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_sell_result_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_npc_sell_result_post[hIndex].func; + postHookFunc(sd, &result); + } + } + return; +} +void HP_clif_cashshop_ack(struct map_session_data *sd, int error) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cashshop_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *error); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cashshop_ack_pre[hIndex].func; + preHookFunc(sd, &error); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashshop_ack(sd, error); + } + if( HPMHooks.count.HP_clif_cashshop_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *error); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cashshop_ack_post[hIndex].func; + postHookFunc(sd, &error); + } + } + return; +} +void HP_clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_scriptmes_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npcid, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_scriptmes_pre[hIndex].func; + preHookFunc(sd, &npcid, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.scriptmes(sd, npcid, mes); + } + if( HPMHooks.count.HP_clif_scriptmes_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npcid, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_scriptmes_post[hIndex].func; + postHookFunc(sd, &npcid, mes); + } + } + return; +} +void HP_clif_scriptnext(struct map_session_data *sd, int npcid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_scriptnext_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_scriptnext_pre[hIndex].func; + preHookFunc(sd, &npcid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.scriptnext(sd, npcid); + } + if( HPMHooks.count.HP_clif_scriptnext_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_scriptnext_post[hIndex].func; + postHookFunc(sd, &npcid); + } + } + return; +} +void HP_clif_scriptclose(struct map_session_data *sd, int npcid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_scriptclose_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_scriptclose_pre[hIndex].func; + preHookFunc(sd, &npcid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.scriptclose(sd, npcid); + } + if( HPMHooks.count.HP_clif_scriptclose_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_scriptclose_post[hIndex].func; + postHookFunc(sd, &npcid); + } + } + return; +} +void HP_clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_scriptmenu_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npcid, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_scriptmenu_pre[hIndex].func; + preHookFunc(sd, &npcid, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.scriptmenu(sd, npcid, mes); + } + if( HPMHooks.count.HP_clif_scriptmenu_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npcid, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_scriptmenu_post[hIndex].func; + postHookFunc(sd, &npcid, mes); + } + } + return; +} +void HP_clif_scriptinput(struct map_session_data *sd, int npcid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_scriptinput_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_scriptinput_pre[hIndex].func; + preHookFunc(sd, &npcid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.scriptinput(sd, npcid); + } + if( HPMHooks.count.HP_clif_scriptinput_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_scriptinput_post[hIndex].func; + postHookFunc(sd, &npcid); + } + } + return; +} +void HP_clif_scriptinputstr(struct map_session_data *sd, int npcid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_scriptinputstr_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_scriptinputstr_pre[hIndex].func; + preHookFunc(sd, &npcid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.scriptinputstr(sd, npcid); + } + if( HPMHooks.count.HP_clif_scriptinputstr_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_scriptinputstr_post[hIndex].func; + postHookFunc(sd, &npcid); + } + } + return; +} +void HP_clif_cutin(struct map_session_data *sd, const char *image, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cutin_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *image, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cutin_pre[hIndex].func; + preHookFunc(sd, image, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cutin(sd, image, type); + } + if( HPMHooks.count.HP_clif_cutin_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *image, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cutin_post[hIndex].func; + postHookFunc(sd, image, &type); + } + } + return; +} +void HP_clif_sendfakenpc(struct map_session_data *sd, int npcid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_sendfakenpc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_sendfakenpc_pre[hIndex].func; + preHookFunc(sd, &npcid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.sendfakenpc(sd, npcid); + } + if( HPMHooks.count.HP_clif_sendfakenpc_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_sendfakenpc_post[hIndex].func; + postHookFunc(sd, &npcid); + } + } + return; +} +void HP_clif_scriptclear(struct map_session_data *sd, int npcid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_scriptclear_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_scriptclear_pre[hIndex].func; + preHookFunc(sd, &npcid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.scriptclear(sd, npcid); + } + if( HPMHooks.count.HP_clif_scriptclear_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_scriptclear_post[hIndex].func; + postHookFunc(sd, &npcid); + } + } + return; +} +void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_viewpoint_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *npc_id, int *type, int *x, int *y, int *id, int *color); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewpoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_viewpoint_pre[hIndex].func; + preHookFunc(sd, &npc_id, &type, &x, &y, &id, &color); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.viewpoint(sd, npc_id, type, x, y, id, color); + } + if( HPMHooks.count.HP_clif_viewpoint_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *npc_id, int *type, int *x, int *y, int *id, int *color); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewpoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_viewpoint_post[hIndex].func; + postHookFunc(sd, &npc_id, &type, &x, &y, &id, &color); + } + } + return; +} +int HP_clif_damage(struct block_list *src, struct block_list *dst, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_damage_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, dst, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.damage(src, dst, tick, sdelay, ddelay, damage, div, type, damage2); + } + if( HPMHooks.count.HP_clif_damage_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, dst, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2); + } + } + return retVal___; +} +void HP_clif_sitting(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_sitting_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_sitting_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.sitting(bl); + } + if( HPMHooks.count.HP_clif_sitting_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_sitting_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_standing(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_standing_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_standing_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.standing(bl); + } + if( HPMHooks.count.HP_clif_standing_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_standing_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_arrow_create_list(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_arrow_create_list_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_arrow_create_list_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.arrow_create_list(sd); + } + if( HPMHooks.count.HP_clif_arrow_create_list_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_arrow_create_list_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_refresh(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_refresh_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_refresh_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.refresh(sd); + } + if( HPMHooks.count.HP_clif_refresh_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_refresh_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_fame_blacksmith(struct map_session_data *sd, int points) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_fame_blacksmith_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_blacksmith_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_fame_blacksmith_pre[hIndex].func; + preHookFunc(sd, &points); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.fame_blacksmith(sd, points); + } + if( HPMHooks.count.HP_clif_fame_blacksmith_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_blacksmith_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_fame_blacksmith_post[hIndex].func; + postHookFunc(sd, &points); + } + } + return; +} +void HP_clif_fame_alchemist(struct map_session_data *sd, int points) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_fame_alchemist_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_alchemist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_fame_alchemist_pre[hIndex].func; + preHookFunc(sd, &points); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.fame_alchemist(sd, points); + } + if( HPMHooks.count.HP_clif_fame_alchemist_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_alchemist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_fame_alchemist_post[hIndex].func; + postHookFunc(sd, &points); + } + } + return; +} +void HP_clif_fame_taekwon(struct map_session_data *sd, int points) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_fame_taekwon_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_taekwon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_fame_taekwon_pre[hIndex].func; + preHookFunc(sd, &points); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.fame_taekwon(sd, points); + } + if( HPMHooks.count.HP_clif_fame_taekwon_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_taekwon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_fame_taekwon_post[hIndex].func; + postHookFunc(sd, &points); + } + } + return; +} +void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_ranklist_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum fame_list_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_ranklist_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ranklist(sd, type); + } + if( HPMHooks.count.HP_clif_ranklist_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum fame_list_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_ranklist_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type type, int points) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_update_rankingpoint_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum fame_list_type *type, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_update_rankingpoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_update_rankingpoint_pre[hIndex].func; + preHookFunc(sd, &type, &points); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.update_rankingpoint(sd, type, points); + } + if( HPMHooks.count.HP_clif_update_rankingpoint_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum fame_list_type *type, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_update_rankingpoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_update_rankingpoint_post[hIndex].func; + postHookFunc(sd, &type, &points); + } + } + return; +} +void HP_clif_pRanklist(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRanklist_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRanklist_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRanklist(fd, sd); + } + if( HPMHooks.count.HP_clif_pRanklist_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRanklist_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_hotkeys(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_hotkeys_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_hotkeys_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hotkeys(sd); + } + if( HPMHooks.count.HP_clif_hotkeys_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_hotkeys_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_clif_insight(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_insight_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clif_insight_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.clif.insight(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_clif_insight_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clif_insight_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_clif_outsight(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_outsight_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clif_outsight_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.clif.outsight(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_clif_outsight_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clif_outsight_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_clif_skillcastcancel(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skillcastcancel_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skillcastcancel_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skillcastcancel(bl); + } + if( HPMHooks.count.HP_clif_skillcastcancel_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skillcastcancel_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_fail_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_fail_pre[hIndex].func; + preHookFunc(sd, &skill_id, &cause, &btype); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype); + } + if( HPMHooks.count.HP_clif_skill_fail_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_fail_post[hIndex].func; + postHookFunc(sd, &skill_id, &cause, &btype); + } + } + return; +} +void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int tick) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_cooldown_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_cooldown_pre[hIndex].func; + preHookFunc(sd, &skill_id, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_cooldown(sd, skill_id, tick); + } + if( HPMHooks.count.HP_clif_skill_cooldown_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_cooldown_post[hIndex].func; + postHookFunc(sd, &skill_id, &tick); + } + } + return; +} +void HP_clif_skill_memomessage(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_memomessage_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_memomessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_memomessage_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_memomessage(sd, type); + } + if( HPMHooks.count.HP_clif_skill_memomessage_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_memomessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_memomessage_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_skill_mapinfomessage(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_mapinfomessage_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_mapinfomessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_mapinfomessage_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_mapinfomessage(sd, type); + } + if( HPMHooks.count.HP_clif_skill_mapinfomessage_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_mapinfomessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_mapinfomessage_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id, int trigger) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_produce_mix_list_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *trigger); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_produce_mix_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_produce_mix_list_pre[hIndex].func; + preHookFunc(sd, &skill_id, &trigger); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_produce_mix_list(sd, skill_id, trigger); + } + if( HPMHooks.count.HP_clif_skill_produce_mix_list_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *skill_id, int *trigger); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_produce_mix_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_produce_mix_list_post[hIndex].func; + postHookFunc(sd, &skill_id, &trigger); + } + } + return; +} +void HP_clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id, int qty, int list_type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cooking_list_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *trigger, uint16 *skill_id, int *qty, int *list_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooking_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cooking_list_pre[hIndex].func; + preHookFunc(sd, &trigger, &skill_id, &qty, &list_type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cooking_list(sd, trigger, skill_id, qty, list_type); + } + if( HPMHooks.count.HP_clif_cooking_list_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *trigger, uint16 *skill_id, int *qty, int *list_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooking_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cooking_list_post[hIndex].func; + postHookFunc(sd, &trigger, &skill_id, &qty, &list_type); + } + } + return; +} +void HP_clif_autospell(struct map_session_data *sd, uint16 skill_lv) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_autospell_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_autospell_pre[hIndex].func; + preHookFunc(sd, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.autospell(sd, skill_lv); + } + if( HPMHooks.count.HP_clif_autospell_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_autospell_post[hIndex].func; + postHookFunc(sd, &skill_lv); + } + } + return; +} +void HP_clif_combo_delay(struct block_list *bl, int wait) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_combo_delay_pre ) { + void (*preHookFunc) (struct block_list *bl, int *wait); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_combo_delay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_combo_delay_pre[hIndex].func; + preHookFunc(bl, &wait); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.combo_delay(bl, wait); + } + if( HPMHooks.count.HP_clif_combo_delay_post ) { + void (*postHookFunc) (struct block_list *bl, int *wait); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_combo_delay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_combo_delay_post[hIndex].func; + postHookFunc(bl, &wait); + } + } + return; +} +void HP_clif_status_change(struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_status_change_pre ) { + void (*preHookFunc) (struct block_list *bl, int *type, int *flag, int *tick, int *val1, int *val2, int *val3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_status_change_pre[hIndex].func; + preHookFunc(bl, &type, &flag, &tick, &val1, &val2, &val3); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.status_change(bl, type, flag, tick, val1, val2, val3); + } + if( HPMHooks.count.HP_clif_status_change_post ) { + void (*postHookFunc) (struct block_list *bl, int *type, int *flag, int *tick, int *val1, int *val2, int *val3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_status_change_post[hIndex].func; + postHookFunc(bl, &type, &flag, &tick, &val1, &val2, &val3); + } + } + return; +} +void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_card, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_insert_card_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx_equip, int *idx_card, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insert_card_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_insert_card_pre[hIndex].func; + preHookFunc(sd, &idx_equip, &idx_card, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.insert_card(sd, idx_equip, idx_card, flag); + } + if( HPMHooks.count.HP_clif_insert_card_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx_equip, int *idx_card, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insert_card_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_insert_card_post[hIndex].func; + postHookFunc(sd, &idx_equip, &idx_card, &flag); + } + } + return; +} +void HP_clif_inventorylist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_inventorylist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_inventorylist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventorylist(sd); + } + if( HPMHooks.count.HP_clif_inventorylist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_inventorylist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_equiplist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_equiplist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_equiplist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.equiplist(sd); + } + if( HPMHooks.count.HP_clif_equiplist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_equiplist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_cartlist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cartlist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cartlist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cartlist(sd); + } + if( HPMHooks.count.HP_clif_cartlist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cartlist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_favorite_item_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_favorite_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_favorite_item_pre[hIndex].func; + preHookFunc(sd, &index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.favorite_item(sd, index); + } + if( HPMHooks.count.HP_clif_favorite_item_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_favorite_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_favorite_item_post[hIndex].func; + postHookFunc(sd, &index); + } + } + return; +} +void HP_clif_clearcart(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_clearcart_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_clearcart_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clearcart(fd); + } + if( HPMHooks.count.HP_clif_clearcart_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_clearcart_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_clif_item_identify_list(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_identify_list_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_identify_list_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_identify_list(sd); + } + if( HPMHooks.count.HP_clif_item_identify_list_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_identify_list_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_item_identified(struct map_session_data *sd, int idx, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_identified_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identified_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_identified_pre[hIndex].func; + preHookFunc(sd, &idx, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_identified(sd, idx, flag); + } + if( HPMHooks.count.HP_clif_item_identified_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identified_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_identified_post[hIndex].func; + postHookFunc(sd, &idx, &flag); + } + } + return; +} +void HP_clif_item_repair_list(struct map_session_data *sd, struct map_session_data *dstsd, int lv) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_repair_list_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repair_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_repair_list_pre[hIndex].func; + preHookFunc(sd, dstsd, &lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_repair_list(sd, dstsd, lv); + } + if( HPMHooks.count.HP_clif_item_repair_list_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repair_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_repair_list_post[hIndex].func; + postHookFunc(sd, dstsd, &lv); + } + } + return; +} +void HP_clif_item_repaireffect(struct map_session_data *sd, int idx, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_repaireffect_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repaireffect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_repaireffect_pre[hIndex].func; + preHookFunc(sd, &idx, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_repaireffect(sd, idx, flag); + } + if( HPMHooks.count.HP_clif_item_repaireffect_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repaireffect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_repaireffect_post[hIndex].func; + postHookFunc(sd, &idx, &flag); + } + } + return; +} +void HP_clif_item_damaged(struct map_session_data *sd, unsigned short position) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_damaged_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *position); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_damaged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_damaged_pre[hIndex].func; + preHookFunc(sd, &position); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_damaged(sd, position); + } + if( HPMHooks.count.HP_clif_item_damaged_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *position); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_damaged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_damaged_post[hIndex].func; + postHookFunc(sd, &position); + } + } + return; +} +void HP_clif_item_refine_list(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_refine_list_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_refine_list_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_refine_list(sd); + } + if( HPMHooks.count.HP_clif_item_refine_list_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_refine_list_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_skill_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_skill_pre[hIndex].func; + preHookFunc(sd, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_skill(sd, skill_id, skill_lv); + } + if( HPMHooks.count.HP_clif_item_skill_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_skill_post[hIndex].func; + postHookFunc(sd, &skill_id, &skill_lv); + } + } + return; +} +void HP_clif_mvp_item(struct map_session_data *sd, int nameid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mvp_item_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mvp_item_pre[hIndex].func; + preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mvp_item(sd, nameid); + } + if( HPMHooks.count.HP_clif_mvp_item_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mvp_item_post[hIndex].func; + postHookFunc(sd, &nameid); + } + } + return; +} +void HP_clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mvp_exp_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *exp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_exp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mvp_exp_pre[hIndex].func; + preHookFunc(sd, &exp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mvp_exp(sd, exp); + } + if( HPMHooks.count.HP_clif_mvp_exp_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *exp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_exp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mvp_exp_post[hIndex].func; + postHookFunc(sd, &exp); + } + } + return; +} +void HP_clif_mvp_noitem(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mvp_noitem_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mvp_noitem_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mvp_noitem(sd); + } + if( HPMHooks.count.HP_clif_mvp_noitem_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mvp_noitem_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_changed_dir(struct block_list *bl, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changed_dir_pre ) { + void (*preHookFunc) (struct block_list *bl, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changed_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changed_dir_pre[hIndex].func; + preHookFunc(bl, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changed_dir(bl, target); + } + if( HPMHooks.count.HP_clif_changed_dir_post ) { + void (*postHookFunc) (struct block_list *bl, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changed_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changed_dir_post[hIndex].func; + postHookFunc(bl, &target); + } + } + return; +} +void HP_clif_charnameack(int fd, struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_charnameack_pre ) { + void (*preHookFunc) (int *fd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_charnameack_pre[hIndex].func; + preHookFunc(&fd, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.charnameack(fd, bl); + } + if( HPMHooks.count.HP_clif_charnameack_post ) { + void (*postHookFunc) (int *fd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_charnameack_post[hIndex].func; + postHookFunc(&fd, bl); + } + } + return; +} +void HP_clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_monster_hp_bar_pre ) { + void (*preHookFunc) (struct mob_data *md, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_monster_hp_bar_pre[hIndex].func; + preHookFunc(md, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.monster_hp_bar(md, sd); + } + if( HPMHooks.count.HP_clif_monster_hp_bar_post ) { + void (*postHookFunc) (struct mob_data *md, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_monster_hp_bar_post[hIndex].func; + postHookFunc(md, sd); + } + } + return; +} +int HP_clif_hpmeter(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_hpmeter_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_hpmeter_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.hpmeter(sd); + } + if( HPMHooks.count.HP_clif_hpmeter_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_hpmeter_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_hpmeter_single_pre ) { + void (*preHookFunc) (int *fd, int *id, unsigned int *hp, unsigned int *maxhp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_hpmeter_single_pre[hIndex].func; + preHookFunc(&fd, &id, &hp, &maxhp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hpmeter_single(fd, id, hp, maxhp); + } + if( HPMHooks.count.HP_clif_hpmeter_single_post ) { + void (*postHookFunc) (int *fd, int *id, unsigned int *hp, unsigned int *maxhp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_hpmeter_single_post[hIndex].func; + postHookFunc(&fd, &id, &hp, &maxhp); + } + } + return; +} +int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_hpmeter_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clif_hpmeter_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.clif.hpmeter_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_clif_hpmeter_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clif_hpmeter_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_clif_upgrademessage(int fd, int result, int item_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_upgrademessage_pre ) { + void (*preHookFunc) (int *fd, int *result, int *item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_upgrademessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_upgrademessage_pre[hIndex].func; + preHookFunc(&fd, &result, &item_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.upgrademessage(fd, result, item_id); + } + if( HPMHooks.count.HP_clif_upgrademessage_post ) { + void (*postHookFunc) (int *fd, int *result, int *item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_upgrademessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_upgrademessage_post[hIndex].func; + postHookFunc(&fd, &result, &item_id); + } + } + return; +} +void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_get_weapon_view_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_get_weapon_view_pre[hIndex].func; + preHookFunc(sd, rhand, lhand); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.get_weapon_view(sd, rhand, lhand); + } + if( HPMHooks.count.HP_clif_get_weapon_view_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_get_weapon_view_post[hIndex].func; + postHookFunc(sd, rhand, lhand); + } + } + return; +} +void HP_clif_gospel_info(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_gospel_info_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_gospel_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_gospel_info_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.gospel_info(sd, type); + } + if( HPMHooks.count.HP_clif_gospel_info_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_gospel_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_gospel_info_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_feel_req_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_req_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_feel_req_pre[hIndex].func; + preHookFunc(&fd, sd, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.feel_req(fd, sd, skill_lv); + } + if( HPMHooks.count.HP_clif_feel_req_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_req_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_feel_req_post[hIndex].func; + postHookFunc(&fd, sd, &skill_lv); + } + } + return; +} +void HP_clif_starskill(struct map_session_data *sd, const char *mapname, int monster_id, unsigned char star, unsigned char result) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_starskill_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *mapname, int *monster_id, unsigned char *star, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_starskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_starskill_pre[hIndex].func; + preHookFunc(sd, mapname, &monster_id, &star, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.starskill(sd, mapname, monster_id, star, result); + } + if( HPMHooks.count.HP_clif_starskill_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *mapname, int *monster_id, unsigned char *star, unsigned char *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_starskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_starskill_post[hIndex].func; + postHookFunc(sd, mapname, &monster_id, &star, &result); + } + } + return; +} +void HP_clif_feel_info(struct map_session_data *sd, unsigned char feel_level, unsigned char type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_feel_info_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *feel_level, unsigned char *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_feel_info_pre[hIndex].func; + preHookFunc(sd, &feel_level, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.feel_info(sd, feel_level, type); + } + if( HPMHooks.count.HP_clif_feel_info_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *feel_level, unsigned char *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_feel_info_post[hIndex].func; + postHookFunc(sd, &feel_level, &type); + } + } + return; +} +void HP_clif_hate_info(struct map_session_data *sd, unsigned char hate_level, int class_, unsigned char type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_hate_info_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *hate_level, int *class_, unsigned char *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hate_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_hate_info_pre[hIndex].func; + preHookFunc(sd, &hate_level, &class_, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hate_info(sd, hate_level, class_, type); + } + if( HPMHooks.count.HP_clif_hate_info_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *hate_level, int *class_, unsigned char *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hate_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_hate_info_post[hIndex].func; + postHookFunc(sd, &hate_level, &class_, &type); + } + } + return; +} +void HP_clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char progress) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mission_info_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *mob_id, unsigned char *progress); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mission_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mission_info_pre[hIndex].func; + preHookFunc(sd, &mob_id, &progress); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mission_info(sd, mob_id, progress); + } + if( HPMHooks.count.HP_clif_mission_info_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *mob_id, unsigned char *progress); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mission_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mission_info_post[hIndex].func; + postHookFunc(sd, &mob_id, &progress); + } + } + return; +} +void HP_clif_feel_hate_reset(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_feel_hate_reset_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_feel_hate_reset_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.feel_hate_reset(sd); + } + if( HPMHooks.count.HP_clif_feel_hate_reset_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_feel_hate_reset_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_partytickack(struct map_session_data *sd, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_partytickack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_partytickack_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.partytickack(sd, flag); + } + if( HPMHooks.count.HP_clif_partytickack_post ) { + void (*postHookFunc) (struct map_session_data *sd, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_partytickack_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_equiptickack(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_equiptickack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_equiptickack_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.equiptickack(sd, flag); + } + if( HPMHooks.count.HP_clif_equiptickack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_equiptickack_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_viewequip_ack(struct map_session_data *sd, struct map_session_data *tsd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_viewequip_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_viewequip_ack_pre[hIndex].func; + preHookFunc(sd, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.viewequip_ack(sd, tsd); + } + if( HPMHooks.count.HP_clif_viewequip_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_viewequip_ack_post[hIndex].func; + postHookFunc(sd, tsd); + } + } + return; +} +void HP_clif_viewequip_fail(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_viewequip_fail_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_fail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_viewequip_fail_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.viewequip_fail(sd); + } + if( HPMHooks.count.HP_clif_viewequip_fail_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_fail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_viewequip_fail_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_equpcheckbox(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_equpcheckbox_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_equpcheckbox_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.equpcheckbox(sd); + } + if( HPMHooks.count.HP_clif_equpcheckbox_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_equpcheckbox_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_displayexp_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *exp, char *type, bool *is_quest); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_displayexp_pre[hIndex].func; + preHookFunc(sd, &exp, &type, &is_quest); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.displayexp(sd, exp, type, is_quest); + } + if( HPMHooks.count.HP_clif_displayexp_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *exp, char *type, bool *is_quest); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_displayexp_post[hIndex].func; + postHookFunc(sd, &exp, &type, &is_quest); + } + } + return; +} +void HP_clif_font(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_font_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_font_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.font(sd); + } + if( HPMHooks.count.HP_clif_font_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_font_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_progressbar(struct map_session_data *sd, unsigned long color, unsigned int second) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_progressbar_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned long *color, unsigned int *second); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_progressbar_pre[hIndex].func; + preHookFunc(sd, &color, &second); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.progressbar(sd, color, second); + } + if( HPMHooks.count.HP_clif_progressbar_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned long *color, unsigned int *second); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_progressbar_post[hIndex].func; + postHookFunc(sd, &color, &second); + } + } + return; +} +void HP_clif_progressbar_abort(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_progressbar_abort_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_progressbar_abort_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.progressbar_abort(sd); + } + if( HPMHooks.count.HP_clif_progressbar_abort_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_progressbar_abort_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int value) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_showdigit_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *type, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_showdigit_pre[hIndex].func; + preHookFunc(sd, &type, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.showdigit(sd, type, value); + } + if( HPMHooks.count.HP_clif_showdigit_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *type, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_showdigit_post[hIndex].func; + postHookFunc(sd, &type, &value); + } + } + return; +} +int HP_clif_elementalconverter_list(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_elementalconverter_list_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_elementalconverter_list_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.elementalconverter_list(sd); + } + if( HPMHooks.count.HP_clif_elementalconverter_list_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_elementalconverter_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_clif_spellbook_list(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_spellbook_list_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_spellbook_list_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.spellbook_list(sd); + } + if( HPMHooks.count.HP_clif_spellbook_list_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_spellbook_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short x, short y) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_magicdecoy_list_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_magicdecoy_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_magicdecoy_list_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_lv, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.magicdecoy_list(sd, skill_lv, x, y); + } + if( HPMHooks.count.HP_clif_magicdecoy_list_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_magicdecoy_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_magicdecoy_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_lv, &x, &y); + } + } + return retVal___; +} +int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_poison_list_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_poison_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_poison_list_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.poison_list(sd, skill_lv); + } + if( HPMHooks.count.HP_clif_poison_list_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_poison_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_poison_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_lv); + } + } + return retVal___; +} +int HP_clif_autoshadowspell_list(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_autoshadowspell_list_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_autoshadowspell_list_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.autoshadowspell_list(sd); + } + if( HPMHooks.count.HP_clif_autoshadowspell_list_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_autoshadowspell_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_skill_itemlistwindow_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_itemlistwindow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_itemlistwindow_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.skill_itemlistwindow(sd, skill_id, skill_lv); + } + if( HPMHooks.count.HP_clif_skill_itemlistwindow_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_itemlistwindow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_itemlistwindow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); + } + } + return retVal___; +} +void HP_clif_sc_load(struct block_list *bl, int tid, enum send_target target, int type, int val1, int val2, int val3) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_sc_load_pre ) { + void (*preHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_sc_load_pre[hIndex].func; + preHookFunc(bl, &tid, &target, &type, &val1, &val2, &val3); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.sc_load(bl, tid, target, type, val1, val2, val3); + } + if( HPMHooks.count.HP_clif_sc_load_post ) { + void (*postHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_sc_load_post[hIndex].func; + postHookFunc(bl, &tid, &target, &type, &val1, &val2, &val3); + } + } + return; +} +void HP_clif_sc_end(struct block_list *bl, int tid, enum send_target target, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_sc_end_pre ) { + void (*preHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_sc_end_pre[hIndex].func; + preHookFunc(bl, &tid, &target, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.sc_end(bl, tid, target, type); + } + if( HPMHooks.count.HP_clif_sc_end_post ) { + void (*postHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_sc_end_post[hIndex].func; + postHookFunc(bl, &tid, &target, &type); + } + } + return; +} +void HP_clif_initialstatus(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_initialstatus_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_initialstatus_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.initialstatus(sd); + } + if( HPMHooks.count.HP_clif_initialstatus_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_initialstatus_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_cooldown_list(int fd, struct skill_cd *cd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cooldown_list_pre ) { + void (*preHookFunc) (int *fd, struct skill_cd *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooldown_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cooldown_list_pre[hIndex].func; + preHookFunc(&fd, cd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cooldown_list(fd, cd); + } + if( HPMHooks.count.HP_clif_cooldown_list_post ) { + void (*postHookFunc) (int *fd, struct skill_cd *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooldown_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cooldown_list_post[hIndex].func; + postHookFunc(&fd, cd); + } + } + return; +} +void HP_clif_updatestatus(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_updatestatus_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_updatestatus_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.updatestatus(sd, type); + } + if( HPMHooks.count.HP_clif_updatestatus_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_updatestatus_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_changestatus(struct map_session_data *sd, int type, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changestatus_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changestatus_pre[hIndex].func; + preHookFunc(sd, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changestatus(sd, type, val); + } + if( HPMHooks.count.HP_clif_changestatus_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changestatus_post[hIndex].func; + postHookFunc(sd, &type, &val); + } + } + return; +} +void HP_clif_statusupack(struct map_session_data *sd, int type, int ok, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_statusupack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type, int *ok, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_statusupack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_statusupack_pre[hIndex].func; + preHookFunc(sd, &type, &ok, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.statusupack(sd, type, ok, val); + } + if( HPMHooks.count.HP_clif_statusupack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type, int *ok, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_statusupack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_statusupack_post[hIndex].func; + postHookFunc(sd, &type, &ok, &val); + } + } + return; +} +void HP_clif_movetoattack(struct map_session_data *sd, struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_movetoattack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_movetoattack_pre[hIndex].func; + preHookFunc(sd, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.movetoattack(sd, bl); + } + if( HPMHooks.count.HP_clif_movetoattack_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_movetoattack_post[hIndex].func; + postHookFunc(sd, bl); + } + } + return; +} +void HP_clif_solved_charname(int fd, int charid, const char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_solved_charname_pre ) { + void (*preHookFunc) (int *fd, int *charid, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_solved_charname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_solved_charname_pre[hIndex].func; + preHookFunc(&fd, &charid, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.solved_charname(fd, charid, name); + } + if( HPMHooks.count.HP_clif_solved_charname_post ) { + void (*postHookFunc) (int *fd, int *charid, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_solved_charname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_solved_charname_post[hIndex].func; + postHookFunc(&fd, &charid, name); + } + } + return; +} +void HP_clif_charnameupdate(struct map_session_data *ssd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_charnameupdate_pre ) { + void (*preHookFunc) (struct map_session_data *ssd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_charnameupdate_pre[hIndex].func; + preHookFunc(ssd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.charnameupdate(ssd); + } + if( HPMHooks.count.HP_clif_charnameupdate_post ) { + void (*postHookFunc) (struct map_session_data *ssd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_charnameupdate_post[hIndex].func; + postHookFunc(ssd); + } + } + return; +} +int HP_clif_delayquit(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_delayquit_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_delayquit_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.delayquit(tid, tick, id, data); + } + if( HPMHooks.count.HP_clif_delayquit_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_delayquit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_clif_getareachar_pc(struct map_session_data *sd, struct map_session_data *dstsd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_getareachar_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_getareachar_pc_pre[hIndex].func; + preHookFunc(sd, dstsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.getareachar_pc(sd, dstsd); + } + if( HPMHooks.count.HP_clif_getareachar_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_getareachar_pc_post[hIndex].func; + postHookFunc(sd, dstsd); + } + } + return; +} +void HP_clif_disconnect_ack(struct map_session_data *sd, short result) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_disconnect_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disconnect_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_disconnect_ack_pre[hIndex].func; + preHookFunc(sd, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.disconnect_ack(sd, result); + } + if( HPMHooks.count.HP_clif_disconnect_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disconnect_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_disconnect_ack_post[hIndex].func; + postHookFunc(sd, &result); + } + } + return; +} +void HP_clif_PVPInfo(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PVPInfo_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PVPInfo_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PVPInfo(sd); + } + if( HPMHooks.count.HP_clif_PVPInfo_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PVPInfo_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_blacksmith(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_blacksmith_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_blacksmith_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.blacksmith(sd); + } + if( HPMHooks.count.HP_clif_blacksmith_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_blacksmith_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_alchemist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_alchemist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_alchemist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.alchemist(sd); + } + if( HPMHooks.count.HP_clif_alchemist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_alchemist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_taekwon(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_taekwon_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_taekwon_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.taekwon(sd); + } + if( HPMHooks.count.HP_clif_taekwon_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_taekwon_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_ranking_pk(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_ranking_pk_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_ranking_pk_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ranking_pk(sd); + } + if( HPMHooks.count.HP_clif_ranking_pk_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_ranking_pk_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_quitsave(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_quitsave_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_quitsave_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quitsave(fd, sd); + } + if( HPMHooks.count.HP_clif_quitsave_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_quitsave_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_misceffect(struct block_list *bl, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_misceffect_pre ) { + void (*preHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_misceffect_pre[hIndex].func; + preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.misceffect(bl, type); + } + if( HPMHooks.count.HP_clif_misceffect_post ) { + void (*postHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_misceffect_post[hIndex].func; + postHookFunc(bl, &type); + } + } + return; +} +void HP_clif_changeoption(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changeoption_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changeoption_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changeoption(bl); + } + if( HPMHooks.count.HP_clif_changeoption_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changeoption_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_changeoption2(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changeoption2_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changeoption2_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changeoption2(bl); + } + if( HPMHooks.count.HP_clif_changeoption2_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changeoption2_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_emotion(struct block_list *bl, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_emotion_pre ) { + void (*preHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_emotion_pre[hIndex].func; + preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.emotion(bl, type); + } + if( HPMHooks.count.HP_clif_emotion_post ) { + void (*postHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_emotion_post[hIndex].func; + postHookFunc(bl, &type); + } + } + return; +} +void HP_clif_talkiebox(struct block_list *bl, const char *talkie) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_talkiebox_pre ) { + void (*preHookFunc) (struct block_list *bl, const char *talkie); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_talkiebox_pre[hIndex].func; + preHookFunc(bl, talkie); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.talkiebox(bl, talkie); + } + if( HPMHooks.count.HP_clif_talkiebox_post ) { + void (*postHookFunc) (struct block_list *bl, const char *talkie); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_talkiebox_post[hIndex].func; + postHookFunc(bl, talkie); + } + } + return; +} +void HP_clif_wedding_effect(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_wedding_effect_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_wedding_effect_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.wedding_effect(bl); + } + if( HPMHooks.count.HP_clif_wedding_effect_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_wedding_effect_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_divorced(struct map_session_data *sd, const char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_divorced_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_divorced_pre[hIndex].func; + preHookFunc(sd, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.divorced(sd, name); + } + if( HPMHooks.count.HP_clif_divorced_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_divorced_post[hIndex].func; + postHookFunc(sd, name); + } + } + return; +} +void HP_clif_callpartner(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_callpartner_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_callpartner_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.callpartner(sd); + } + if( HPMHooks.count.HP_clif_callpartner_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_callpartner_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_skill_damage_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, dst, &tick, &sdelay, &ddelay, &damage, &div, &skill_id, &skill_lv, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.skill_damage(src, dst, tick, sdelay, ddelay, damage, div, skill_id, skill_lv, type); + } + if( HPMHooks.count.HP_clif_skill_damage_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, dst, &tick, &sdelay, &ddelay, &damage, &div, &skill_id, &skill_lv, &type); + } + } + return retVal___; +} +int HP_clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint16 skill_id, int heal, int fail) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_skill_nodamage_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *dst, uint16 *skill_id, int *heal, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_nodamage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_nodamage_pre[hIndex].func; + retVal___ = preHookFunc(src, dst, &skill_id, &heal, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.skill_nodamage(src, dst, skill_id, heal, fail); + } + if( HPMHooks.count.HP_clif_skill_nodamage_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, uint16 *skill_id, int *heal, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_nodamage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_nodamage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, dst, &skill_id, &heal, &fail); + } + } + return retVal___; +} +void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int x, int y, int tick) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_poseffect_pre ) { + void (*preHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_poseffect_pre[hIndex].func; + preHookFunc(src, &skill_id, &val, &x, &y, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_poseffect(src, skill_id, val, x, y, tick); + } + if( HPMHooks.count.HP_clif_skill_poseffect_post ) { + void (*postHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_poseffect_post[hIndex].func; + postHookFunc(src, &skill_id, &val, &x, &y, &tick); + } + } + return; +} +void HP_clif_skill_estimation(struct map_session_data *sd, struct block_list *dst) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_estimation_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct block_list *dst); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_estimation_pre[hIndex].func; + preHookFunc(sd, dst); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_estimation(sd, dst); + } + if( HPMHooks.count.HP_clif_skill_estimation_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct block_list *dst); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_estimation_post[hIndex].func; + postHookFunc(sd, dst); + } + } + return; +} +void HP_clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skill_warppoint_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, unsigned short *map1, unsigned short *map2, unsigned short *map3, unsigned short *map4); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_warppoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skill_warppoint_pre[hIndex].func; + preHookFunc(sd, &skill_id, &skill_lv, &map1, &map2, &map3, &map4); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_warppoint(sd, skill_id, skill_lv, map1, map2, map3, map4); + } + if( HPMHooks.count.HP_clif_skill_warppoint_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, unsigned short *map1, unsigned short *map2, unsigned short *map3, unsigned short *map4); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_warppoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skill_warppoint_post[hIndex].func; + postHookFunc(sd, &skill_id, &skill_lv, &map1, &map2, &map3, &map4); + } + } + return; +} +void HP_clif_skillcasting(struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, int property, int casttime) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skillcasting_pre ) { + void (*preHookFunc) (struct block_list *bl, int *src_id, int *dst_id, int *dst_x, int *dst_y, uint16 *skill_id, int *property, int *casttime); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcasting_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skillcasting_pre[hIndex].func; + preHookFunc(bl, &src_id, &dst_id, &dst_x, &dst_y, &skill_id, &property, &casttime); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skillcasting(bl, src_id, dst_id, dst_x, dst_y, skill_id, property, casttime); + } + if( HPMHooks.count.HP_clif_skillcasting_post ) { + void (*postHookFunc) (struct block_list *bl, int *src_id, int *dst_id, int *dst_x, int *dst_y, uint16 *skill_id, int *property, int *casttime); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcasting_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skillcasting_post[hIndex].func; + postHookFunc(bl, &src_id, &dst_id, &dst_x, &dst_y, &skill_id, &property, &casttime); + } + } + return; +} +void HP_clif_produce_effect(struct map_session_data *sd, int flag, int nameid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_produce_effect_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_produce_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_produce_effect_pre[hIndex].func; + preHookFunc(sd, &flag, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.produce_effect(sd, flag, nameid); + } + if( HPMHooks.count.HP_clif_produce_effect_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_produce_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_produce_effect_post[hIndex].func; + postHookFunc(sd, &flag, &nameid); + } + } + return; +} +void HP_clif_devotion(struct block_list *src, struct map_session_data *tsd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_devotion_pre ) { + void (*preHookFunc) (struct block_list *src, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_devotion_pre[hIndex].func; + preHookFunc(src, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.devotion(src, tsd); + } + if( HPMHooks.count.HP_clif_devotion_post ) { + void (*postHookFunc) (struct block_list *src, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_devotion_post[hIndex].func; + postHookFunc(src, tsd); + } + } + return; +} +void HP_clif_spiritball(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_spiritball_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_spiritball_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.spiritball(bl); + } + if( HPMHooks.count.HP_clif_spiritball_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_spiritball_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_spiritball_single(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_spiritball_single_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_spiritball_single_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.spiritball_single(fd, sd); + } + if( HPMHooks.count.HP_clif_spiritball_single_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_spiritball_single_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_bladestop(struct block_list *src, int dst_id, int active) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bladestop_pre ) { + void (*preHookFunc) (struct block_list *src, int *dst_id, int *active); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bladestop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bladestop_pre[hIndex].func; + preHookFunc(src, &dst_id, &active); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bladestop(src, dst_id, active); + } + if( HPMHooks.count.HP_clif_bladestop_post ) { + void (*postHookFunc) (struct block_list *src, int *dst_id, int *active); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bladestop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bladestop_post[hIndex].func; + postHookFunc(src, &dst_id, &active); + } + } + return; +} +void HP_clif_mvp_effect(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mvp_effect_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mvp_effect_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mvp_effect(sd); + } + if( HPMHooks.count.HP_clif_mvp_effect_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mvp_effect_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_heal(int fd, int type, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_heal_pre ) { + void (*preHookFunc) (int *fd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_heal_pre[hIndex].func; + preHookFunc(&fd, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.heal(fd, type, val); + } + if( HPMHooks.count.HP_clif_heal_post ) { + void (*postHookFunc) (int *fd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_heal_post[hIndex].func; + postHookFunc(&fd, &type, &val); + } + } + return; +} +void HP_clif_resurrection(struct block_list *bl, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_resurrection_pre ) { + void (*preHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_resurrection_pre[hIndex].func; + preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.resurrection(bl, type); + } + if( HPMHooks.count.HP_clif_resurrection_post ) { + void (*postHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_resurrection_post[hIndex].func; + postHookFunc(bl, &type); + } + } + return; +} +void HP_clif_refine(int fd, int fail, int index, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_refine_pre ) { + void (*preHookFunc) (int *fd, int *fail, int *index, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refine_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_refine_pre[hIndex].func; + preHookFunc(&fd, &fail, &index, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.refine(fd, fail, index, val); + } + if( HPMHooks.count.HP_clif_refine_post ) { + void (*postHookFunc) (int *fd, int *fail, int *index, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refine_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_refine_post[hIndex].func; + postHookFunc(&fd, &fail, &index, &val); + } + } + return; +} +void HP_clif_weather(int16 m) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_weather_pre ) { + void (*preHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_weather_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.weather(m); + } + if( HPMHooks.count.HP_clif_weather_post ) { + void (*postHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_weather_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +void HP_clif_specialeffect(struct block_list *bl, int type, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_specialeffect_pre ) { + void (*preHookFunc) (struct block_list *bl, int *type, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_specialeffect_pre[hIndex].func; + preHookFunc(bl, &type, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.specialeffect(bl, type, target); + } + if( HPMHooks.count.HP_clif_specialeffect_post ) { + void (*postHookFunc) (struct block_list *bl, int *type, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_specialeffect_post[hIndex].func; + postHookFunc(bl, &type, &target); + } + } + return; +} +void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_specialeffect_single_pre ) { + void (*preHookFunc) (struct block_list *bl, int *type, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_specialeffect_single_pre[hIndex].func; + preHookFunc(bl, &type, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.specialeffect_single(bl, type, fd); + } + if( HPMHooks.count.HP_clif_specialeffect_single_post ) { + void (*postHookFunc) (struct block_list *bl, int *type, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_specialeffect_single_post[hIndex].func; + postHookFunc(bl, &type, &fd); + } + } + return; +} +void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_specialeffect_value_pre ) { + void (*preHookFunc) (struct block_list *bl, int *effect_id, int *num, send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_specialeffect_value_pre[hIndex].func; + preHookFunc(bl, &effect_id, &num, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.specialeffect_value(bl, effect_id, num, target); + } + if( HPMHooks.count.HP_clif_specialeffect_value_post ) { + void (*postHookFunc) (struct block_list *bl, int *effect_id, int *num, send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_specialeffect_value_post[hIndex].func; + postHookFunc(bl, &effect_id, &num, &target); + } + } + return; +} +void HP_clif_millenniumshield(struct map_session_data *sd, short shields) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_millenniumshield_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *shields); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_millenniumshield_pre[hIndex].func; + preHookFunc(sd, &shields); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.millenniumshield(sd, shields); + } + if( HPMHooks.count.HP_clif_millenniumshield_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *shields); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_millenniumshield_post[hIndex].func; + postHookFunc(sd, &shields); + } + } + return; +} +void HP_clif_charm(struct map_session_data *sd, short type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_charm_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_charm_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.charm(sd, type); + } + if( HPMHooks.count.HP_clif_charm_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_charm_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_charm_single(int fd, struct map_session_data *sd, short type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_charm_single_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd, short *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_charm_single_pre[hIndex].func; + preHookFunc(&fd, sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.charm_single(fd, sd, type); + } + if( HPMHooks.count.HP_clif_charm_single_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd, short *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_charm_single_post[hIndex].func; + postHookFunc(&fd, sd, &type); + } + } + return; +} +void HP_clif_snap(struct block_list *bl, short x, short y) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_snap_pre ) { + void (*preHookFunc) (struct block_list *bl, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_snap_pre[hIndex].func; + preHookFunc(bl, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.snap(bl, x, y); + } + if( HPMHooks.count.HP_clif_snap_post ) { + void (*postHookFunc) (struct block_list *bl, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_snap_post[hIndex].func; + postHookFunc(bl, &x, &y); + } + } + return; +} +void HP_clif_weather_check(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_weather_check_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_weather_check_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.weather_check(sd); + } + if( HPMHooks.count.HP_clif_weather_check_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_weather_check_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_playBGM(struct map_session_data *sd, const char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_playBGM_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_playBGM_pre[hIndex].func; + preHookFunc(sd, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.playBGM(sd, name); + } + if( HPMHooks.count.HP_clif_playBGM_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_playBGM_post[hIndex].func; + postHookFunc(sd, name); + } + } + return; +} +void HP_clif_soundeffect(struct map_session_data *sd, struct block_list *bl, const char *name, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_soundeffect_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, const char *name, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_soundeffect_pre[hIndex].func; + preHookFunc(sd, bl, name, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.soundeffect(sd, bl, name, type); + } + if( HPMHooks.count.HP_clif_soundeffect_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl, const char *name, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_soundeffect_post[hIndex].func; + postHookFunc(sd, bl, name, &type); + } + } + return; +} +void HP_clif_soundeffectall(struct block_list *bl, const char *name, int type, enum send_target coverage) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_soundeffectall_pre ) { + void (*preHookFunc) (struct block_list *bl, const char *name, int *type, enum send_target *coverage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffectall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_soundeffectall_pre[hIndex].func; + preHookFunc(bl, name, &type, &coverage); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.soundeffectall(bl, name, type, coverage); + } + if( HPMHooks.count.HP_clif_soundeffectall_post ) { + void (*postHookFunc) (struct block_list *bl, const char *name, int *type, enum send_target *coverage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffectall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_soundeffectall_post[hIndex].func; + postHookFunc(bl, name, &type, &coverage); + } + } + return; +} +void HP_clif_GlobalMessage(struct block_list *bl, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_GlobalMessage_pre ) { + void (*preHookFunc) (struct block_list *bl, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_GlobalMessage_pre[hIndex].func; + preHookFunc(bl, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.GlobalMessage(bl, message); + } + if( HPMHooks.count.HP_clif_GlobalMessage_post ) { + void (*postHookFunc) (struct block_list *bl, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_GlobalMessage_post[hIndex].func; + postHookFunc(bl, message); + } + } + return; +} +void HP_clif_createchat(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_createchat_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_createchat_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.createchat(sd, flag); + } + if( HPMHooks.count.HP_clif_createchat_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_createchat_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_dispchat(struct chat_data *cd, int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_dispchat_pre ) { + void (*preHookFunc) (struct chat_data *cd, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_dispchat_pre[hIndex].func; + preHookFunc(cd, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.dispchat(cd, fd); + } + if( HPMHooks.count.HP_clif_dispchat_post ) { + void (*postHookFunc) (struct chat_data *cd, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_dispchat_post[hIndex].func; + postHookFunc(cd, &fd); + } + } + return; +} +void HP_clif_joinchatfail(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_joinchatfail_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_joinchatfail_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.joinchatfail(sd, flag); + } + if( HPMHooks.count.HP_clif_joinchatfail_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_joinchatfail_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_joinchatok(struct map_session_data *sd, struct chat_data *cd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_joinchatok_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_joinchatok_pre[hIndex].func; + preHookFunc(sd, cd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.joinchatok(sd, cd); + } + if( HPMHooks.count.HP_clif_joinchatok_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_joinchatok_post[hIndex].func; + postHookFunc(sd, cd); + } + } + return; +} +void HP_clif_addchat(struct chat_data *cd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_addchat_pre ) { + void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_addchat_pre[hIndex].func; + preHookFunc(cd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.addchat(cd, sd); + } + if( HPMHooks.count.HP_clif_addchat_post ) { + void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_addchat_post[hIndex].func; + postHookFunc(cd, sd); + } + } + return; +} +void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changechatowner_pre ) { + void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changechatowner_pre[hIndex].func; + preHookFunc(cd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changechatowner(cd, sd); + } + if( HPMHooks.count.HP_clif_changechatowner_post ) { + void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changechatowner_post[hIndex].func; + postHookFunc(cd, sd); + } + } + return; +} +void HP_clif_clearchat(struct chat_data *cd, int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_clearchat_pre ) { + void (*preHookFunc) (struct chat_data *cd, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_clearchat_pre[hIndex].func; + preHookFunc(cd, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clearchat(cd, fd); + } + if( HPMHooks.count.HP_clif_clearchat_post ) { + void (*postHookFunc) (struct chat_data *cd, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_clearchat_post[hIndex].func; + postHookFunc(cd, &fd); + } + } + return; +} +void HP_clif_leavechat(struct chat_data *cd, struct map_session_data *sd, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_leavechat_pre ) { + void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_leavechat_pre[hIndex].func; + preHookFunc(cd, sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.leavechat(cd, sd, flag); + } + if( HPMHooks.count.HP_clif_leavechat_post ) { + void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_leavechat_post[hIndex].func; + postHookFunc(cd, sd, &flag); + } + } + return; +} +void HP_clif_changechatstatus(struct chat_data *cd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_changechatstatus_pre ) { + void (*preHookFunc) (struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_changechatstatus_pre[hIndex].func; + preHookFunc(cd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changechatstatus(cd); + } + if( HPMHooks.count.HP_clif_changechatstatus_post ) { + void (*postHookFunc) (struct chat_data *cd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_changechatstatus_post[hIndex].func; + postHookFunc(cd); + } + } + return; +} +void HP_clif_wis_message(int fd, const char *nick, const char *mes, int mes_len) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_wis_message_pre ) { + void (*preHookFunc) (int *fd, const char *nick, const char *mes, int *mes_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_wis_message_pre[hIndex].func; + preHookFunc(&fd, nick, mes, &mes_len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.wis_message(fd, nick, mes, mes_len); + } + if( HPMHooks.count.HP_clif_wis_message_post ) { + void (*postHookFunc) (int *fd, const char *nick, const char *mes, int *mes_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_wis_message_post[hIndex].func; + postHookFunc(&fd, nick, mes, &mes_len); + } + } + return; +} +void HP_clif_wis_end(int fd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_wis_end_pre ) { + void (*preHookFunc) (int *fd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_wis_end_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.wis_end(fd, flag); + } + if( HPMHooks.count.HP_clif_wis_end_post ) { + void (*postHookFunc) (int *fd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_wis_end_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_disp_onlyself_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_onlyself_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_disp_onlyself_pre[hIndex].func; + preHookFunc(sd, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.disp_onlyself(sd, mes, len); + } + if( HPMHooks.count.HP_clif_disp_onlyself_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_onlyself_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_disp_onlyself_post[hIndex].func; + postHookFunc(sd, mes, &len); + } + } + return; +} +void HP_clif_disp_message(struct block_list *src, const char *mes, int len, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_disp_message_pre ) { + void (*preHookFunc) (struct block_list *src, const char *mes, int *len, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_disp_message_pre[hIndex].func; + preHookFunc(src, mes, &len, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.disp_message(src, mes, len, target); + } + if( HPMHooks.count.HP_clif_disp_message_post ) { + void (*postHookFunc) (struct block_list *src, const char *mes, int *len, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_disp_message_post[hIndex].func; + postHookFunc(src, mes, &len, &target); + } + } + return; +} +void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_broadcast_pre ) { + void (*preHookFunc) (struct block_list *bl, const char *mes, int *len, int *type, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_broadcast_pre[hIndex].func; + preHookFunc(bl, mes, &len, &type, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.broadcast(bl, mes, len, type, target); + } + if( HPMHooks.count.HP_clif_broadcast_post ) { + void (*postHookFunc) (struct block_list *bl, const char *mes, int *len, int *type, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_broadcast_post[hIndex].func; + postHookFunc(bl, mes, &len, &type, &target); + } + } + return; +} +void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_broadcast2_pre ) { + void (*preHookFunc) (struct block_list *bl, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_broadcast2_pre[hIndex].func; + preHookFunc(bl, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.broadcast2(bl, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, target); + } + if( HPMHooks.count.HP_clif_broadcast2_post ) { + void (*postHookFunc) (struct block_list *bl, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_broadcast2_post[hIndex].func; + postHookFunc(bl, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &target); + } + } + return; +} +void HP_clif_messagecolor(struct block_list *bl, unsigned long color, const char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_messagecolor_pre ) { + void (*preHookFunc) (struct block_list *bl, unsigned long *color, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_messagecolor_pre[hIndex].func; + preHookFunc(bl, &color, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.messagecolor(bl, color, msg); + } + if( HPMHooks.count.HP_clif_messagecolor_post ) { + void (*postHookFunc) (struct block_list *bl, unsigned long *color, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_messagecolor_post[hIndex].func; + postHookFunc(bl, &color, msg); + } + } + return; +} +void HP_clif_disp_overhead(struct block_list *bl, const char *mes) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_disp_overhead_pre ) { + void (*preHookFunc) (struct block_list *bl, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_overhead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_disp_overhead_pre[hIndex].func; + preHookFunc(bl, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.disp_overhead(bl, mes); + } + if( HPMHooks.count.HP_clif_disp_overhead_post ) { + void (*postHookFunc) (struct block_list *bl, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_overhead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_disp_overhead_post[hIndex].func; + postHookFunc(bl, mes); + } + } + return; +} +void HP_clif_msg(struct map_session_data *sd, unsigned short id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_msg_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_msg_pre[hIndex].func; + preHookFunc(sd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msg(sd, id); + } + if( HPMHooks.count.HP_clif_msg_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_msg_post[hIndex].func; + postHookFunc(sd, &id); + } + } + return; +} +void HP_clif_msg_value(struct map_session_data *sd, unsigned short id, int value) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_msg_value_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *id, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_msg_value_pre[hIndex].func; + preHookFunc(sd, &id, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msg_value(sd, id, value); + } + if( HPMHooks.count.HP_clif_msg_value_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *id, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_msg_value_post[hIndex].func; + postHookFunc(sd, &id, &value); + } + } + return; +} +void HP_clif_msg_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_msg_skill_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_msg_skill_pre[hIndex].func; + preHookFunc(sd, &skill_id, &msg_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msg_skill(sd, skill_id, msg_id); + } + if( HPMHooks.count.HP_clif_msg_skill_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_msg_skill_post[hIndex].func; + postHookFunc(sd, &skill_id, &msg_id); + } + } + return; +} +void HP_clif_msgtable(int fd, int line) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_msgtable_pre ) { + void (*preHookFunc) (int *fd, int *line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_pre[hIndex].func; + preHookFunc(&fd, &line); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable(fd, line); + } + if( HPMHooks.count.HP_clif_msgtable_post ) { + void (*postHookFunc) (int *fd, int *line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_post[hIndex].func; + postHookFunc(&fd, &line); + } + } + return; +} +void HP_clif_msgtable_num(int fd, int line, int num) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_msgtable_num_pre ) { + void (*preHookFunc) (int *fd, int *line, int *num); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_num_pre[hIndex].func; + preHookFunc(&fd, &line, &num); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable_num(fd, line, num); + } + if( HPMHooks.count.HP_clif_msgtable_num_post ) { + void (*postHookFunc) (int *fd, int *line, int *num); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_num_post[hIndex].func; + postHookFunc(&fd, &line, &num); + } + } + return; +} +void HP_clif_message(const int fd, const char *mes) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_message_pre ) { + void (*preHookFunc) (const int *fd, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_message_pre[hIndex].func; + preHookFunc(&fd, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.message(fd, mes); + } + if( HPMHooks.count.HP_clif_message_post ) { + void (*postHookFunc) (const int *fd, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_message_post[hIndex].func; + postHookFunc(&fd, mes); + } + } + return; +} +void HP_clif_messageln(const int fd, const char *mes) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_messageln_pre ) { + void (*preHookFunc) (const int *fd, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_messageln_pre[hIndex].func; + preHookFunc(&fd, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.messageln(fd, mes); + } + if( HPMHooks.count.HP_clif_messageln_post ) { + void (*postHookFunc) (const int *fd, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_messageln_post[hIndex].func; + postHookFunc(&fd, mes); + } + } + return; +} +int HP_clif_colormes(int fd, enum clif_colors color, const char *msg) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_colormes_pre ) { + int (*preHookFunc) (int *fd, enum clif_colors *color, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_colormes_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_colormes_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &color, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.colormes(fd, color, msg); + } + if( HPMHooks.count.HP_clif_colormes_post ) { + int (*postHookFunc) (int retVal___, int *fd, enum clif_colors *color, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_colormes_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_colormes_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, &color, msg); + } + } + return retVal___; +} +bool HP_clif_process_message(struct map_session_data *sd, int format, char **name_, int *namelen_, char **message_, int *messagelen_) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_clif_process_message_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *format, char **name_, int *namelen_, char **message_, int *messagelen_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_process_message_pre[hIndex].func; + retVal___ = preHookFunc(sd, &format, name_, namelen_, message_, messagelen_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.process_message(sd, format, name_, namelen_, message_, messagelen_); + } + if( HPMHooks.count.HP_clif_process_message_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *format, char **name_, int *namelen_, char **message_, int *messagelen_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_process_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &format, name_, namelen_, message_, messagelen_); + } + } + return retVal___; +} +void HP_clif_wisexin(struct map_session_data *sd, int type, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_wisexin_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_wisexin_pre[hIndex].func; + preHookFunc(sd, &type, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.wisexin(sd, type, flag); + } + if( HPMHooks.count.HP_clif_wisexin_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_wisexin_post[hIndex].func; + postHookFunc(sd, &type, &flag); + } + } + return; +} +void HP_clif_wisall(struct map_session_data *sd, int type, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_wisall_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_wisall_pre[hIndex].func; + preHookFunc(sd, &type, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.wisall(sd, type, flag); + } + if( HPMHooks.count.HP_clif_wisall_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_wisall_post[hIndex].func; + postHookFunc(sd, &type, &flag); + } + } + return; +} +void HP_clif_PMIgnoreList(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PMIgnoreList_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PMIgnoreList_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PMIgnoreList(sd); + } + if( HPMHooks.count.HP_clif_PMIgnoreList_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PMIgnoreList_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_traderequest(struct map_session_data *sd, const char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_traderequest_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_traderequest_pre[hIndex].func; + preHookFunc(sd, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.traderequest(sd, name); + } + if( HPMHooks.count.HP_clif_traderequest_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_traderequest_post[hIndex].func; + postHookFunc(sd, name); + } + } + return; +} +void HP_clif_tradestart(struct map_session_data *sd, uint8 type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_tradestart_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint8 *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_tradestart_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.tradestart(sd, type); + } + if( HPMHooks.count.HP_clif_tradestart_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint8 *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_tradestart_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_tradeadditem(struct map_session_data *sd, struct map_session_data *tsd, int index, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_tradeadditem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeadditem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_tradeadditem_pre[hIndex].func; + preHookFunc(sd, tsd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.tradeadditem(sd, tsd, index, amount); + } + if( HPMHooks.count.HP_clif_tradeadditem_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeadditem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_tradeadditem_post[hIndex].func; + postHookFunc(sd, tsd, &index, &amount); + } + } + return; +} +void HP_clif_tradeitemok(struct map_session_data *sd, int index, int fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_tradeitemok_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *index, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_tradeitemok_pre[hIndex].func; + preHookFunc(sd, &index, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.tradeitemok(sd, index, fail); + } + if( HPMHooks.count.HP_clif_tradeitemok_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *index, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_tradeitemok_post[hIndex].func; + postHookFunc(sd, &index, &fail); + } + } + return; +} +void HP_clif_tradedeal_lock(struct map_session_data *sd, int fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_tradedeal_lock_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradedeal_lock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_tradedeal_lock_pre[hIndex].func; + preHookFunc(sd, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.tradedeal_lock(sd, fail); + } + if( HPMHooks.count.HP_clif_tradedeal_lock_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradedeal_lock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_tradedeal_lock_post[hIndex].func; + postHookFunc(sd, &fail); + } + } + return; +} +void HP_clif_tradecancelled(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_tradecancelled_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_tradecancelled_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.tradecancelled(sd); + } + if( HPMHooks.count.HP_clif_tradecancelled_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_tradecancelled_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_tradecompleted(struct map_session_data *sd, int fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_tradecompleted_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_tradecompleted_pre[hIndex].func; + preHookFunc(sd, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.tradecompleted(sd, fail); + } + if( HPMHooks.count.HP_clif_tradecompleted_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_tradecompleted_post[hIndex].func; + postHookFunc(sd, &fail); + } + } + return; +} +void HP_clif_tradeundo(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_tradeundo_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_tradeundo_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.tradeundo(sd); + } + if( HPMHooks.count.HP_clif_tradeundo_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_tradeundo_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_openvendingreq(struct map_session_data *sd, int num) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_openvendingreq_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *num); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_openvendingreq_pre[hIndex].func; + preHookFunc(sd, &num); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.openvendingreq(sd, num); + } + if( HPMHooks.count.HP_clif_openvendingreq_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *num); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_openvendingreq_post[hIndex].func; + postHookFunc(sd, &num); + } + } + return; +} +void HP_clif_showvendingboard(struct block_list *bl, const char *message, int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_showvendingboard_pre ) { + void (*preHookFunc) (struct block_list *bl, const char *message, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_showvendingboard_pre[hIndex].func; + preHookFunc(bl, message, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.showvendingboard(bl, message, fd); + } + if( HPMHooks.count.HP_clif_showvendingboard_post ) { + void (*postHookFunc) (struct block_list *bl, const char *message, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_showvendingboard_post[hIndex].func; + postHookFunc(bl, message, &fd); + } + } + return; +} +void HP_clif_closevendingboard(struct block_list *bl, int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_closevendingboard_pre ) { + void (*preHookFunc) (struct block_list *bl, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_closevendingboard_pre[hIndex].func; + preHookFunc(bl, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.closevendingboard(bl, fd); + } + if( HPMHooks.count.HP_clif_closevendingboard_post ) { + void (*postHookFunc) (struct block_list *bl, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_closevendingboard_post[hIndex].func; + postHookFunc(bl, &fd); + } + } + return; +} +void HP_clif_vendinglist(struct map_session_data *sd, unsigned int id, struct s_vending *vending_list) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_vendinglist_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *id, struct s_vending *vending_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendinglist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_vendinglist_pre[hIndex].func; + preHookFunc(sd, &id, vending_list); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.vendinglist(sd, id, vending_list); + } + if( HPMHooks.count.HP_clif_vendinglist_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *id, struct s_vending *vending_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendinglist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_vendinglist_post[hIndex].func; + postHookFunc(sd, &id, vending_list); + } + } + return; +} +void HP_clif_buyvending(struct map_session_data *sd, int index, int amount, int fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyvending_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyvending_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyvending_pre[hIndex].func; + preHookFunc(sd, &index, &amount, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyvending(sd, index, amount, fail); + } + if( HPMHooks.count.HP_clif_buyvending_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *index, int *amount, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyvending_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyvending_post[hIndex].func; + postHookFunc(sd, &index, &amount, &fail); + } + } + return; +} +void HP_clif_openvending(struct map_session_data *sd, int id, struct s_vending *vending_list) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_openvending_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *id, struct s_vending *vending_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvending_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_openvending_pre[hIndex].func; + preHookFunc(sd, &id, vending_list); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.openvending(sd, id, vending_list); + } + if( HPMHooks.count.HP_clif_openvending_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *id, struct s_vending *vending_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvending_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_openvending_post[hIndex].func; + postHookFunc(sd, &id, vending_list); + } + } + return; +} +void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_vendingreport_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_vendingreport_pre[hIndex].func; + preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.vendingreport(sd, index, amount); + } + if( HPMHooks.count.HP_clif_vendingreport_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_vendingreport_post[hIndex].func; + postHookFunc(sd, &index, &amount); + } + } + return; +} +void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int items_length) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_storagelist_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item *items, int *items_length); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_storagelist_pre[hIndex].func; + preHookFunc(sd, items, &items_length); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storagelist(sd, items, items_length); + } + if( HPMHooks.count.HP_clif_storagelist_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item *items, int *items_length); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_storagelist_post[hIndex].func; + postHookFunc(sd, items, &items_length); + } + } + return; +} +void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int max_amount) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_updatestorageamount_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *amount, int *max_amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestorageamount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_updatestorageamount_pre[hIndex].func; + preHookFunc(sd, &amount, &max_amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.updatestorageamount(sd, amount, max_amount); + } + if( HPMHooks.count.HP_clif_updatestorageamount_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *amount, int *max_amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestorageamount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_updatestorageamount_post[hIndex].func; + postHookFunc(sd, &amount, &max_amount); + } + } + return; +} +void HP_clif_storageitemadded(struct map_session_data *sd, struct item *i, int index, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_storageitemadded_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item *i, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemadded_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_storageitemadded_pre[hIndex].func; + preHookFunc(sd, i, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storageitemadded(sd, i, index, amount); + } + if( HPMHooks.count.HP_clif_storageitemadded_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item *i, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemadded_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_storageitemadded_post[hIndex].func; + postHookFunc(sd, i, &index, &amount); + } + } + return; +} +void HP_clif_storageitemremoved(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_storageitemremoved_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_storageitemremoved_pre[hIndex].func; + preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storageitemremoved(sd, index, amount); + } + if( HPMHooks.count.HP_clif_storageitemremoved_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_storageitemremoved_post[hIndex].func; + postHookFunc(sd, &index, &amount); + } + } + return; +} +void HP_clif_storageclose(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_storageclose_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_storageclose_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storageclose(sd); + } + if( HPMHooks.count.HP_clif_storageclose_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_storageclose_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_skillinfoblock(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skillinfoblock_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skillinfoblock_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skillinfoblock(sd); + } + if( HPMHooks.count.HP_clif_skillinfoblock_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skillinfoblock_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skillup_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skillup_pre[hIndex].func; + preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skillup(sd, skill_id); + } + if( HPMHooks.count.HP_clif_skillup_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skillup_post[hIndex].func; + postHookFunc(sd, &skill_id); + } + } + return; +} +void HP_clif_skillinfo(struct map_session_data *sd, int skill_id, int inf) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_skillinfo_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *inf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_skillinfo_pre[hIndex].func; + preHookFunc(sd, &skill_id, &inf); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skillinfo(sd, skill_id, inf); + } + if( HPMHooks.count.HP_clif_skillinfo_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *skill_id, int *inf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_skillinfo_post[hIndex].func; + postHookFunc(sd, &skill_id, &inf); + } + } + return; +} +void HP_clif_addskill(struct map_session_data *sd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_addskill_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_addskill_pre[hIndex].func; + preHookFunc(sd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.addskill(sd, id); + } + if( HPMHooks.count.HP_clif_addskill_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_addskill_post[hIndex].func; + postHookFunc(sd, &id); + } + } + return; +} +void HP_clif_deleteskill(struct map_session_data *sd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_deleteskill_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_deleteskill_pre[hIndex].func; + preHookFunc(sd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.deleteskill(sd, id); + } + if( HPMHooks.count.HP_clif_deleteskill_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_deleteskill_post[hIndex].func; + postHookFunc(sd, &id); + } + } + return; +} +void HP_clif_party_created(struct map_session_data *sd, int result) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_created_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_created_pre[hIndex].func; + preHookFunc(sd, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_created(sd, result); + } + if( HPMHooks.count.HP_clif_party_created_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_created_post[hIndex].func; + postHookFunc(sd, &result); + } + } + return; +} +void HP_clif_party_member_info(struct party_data *p, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_member_info_pre ) { + void (*preHookFunc) (struct party_data *p, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_member_info_pre[hIndex].func; + preHookFunc(p, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_member_info(p, sd); + } + if( HPMHooks.count.HP_clif_party_member_info_post ) { + void (*postHookFunc) (struct party_data *p, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_member_info_post[hIndex].func; + postHookFunc(p, sd); + } + } + return; +} +void HP_clif_party_info(struct party_data *p, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_info_pre ) { + void (*preHookFunc) (struct party_data *p, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_info_pre[hIndex].func; + preHookFunc(p, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_info(p, sd); + } + if( HPMHooks.count.HP_clif_party_info_post ) { + void (*postHookFunc) (struct party_data *p, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_info_post[hIndex].func; + postHookFunc(p, sd); + } + } + return; +} +void HP_clif_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_invite_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_invite_pre[hIndex].func; + preHookFunc(sd, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_invite(sd, tsd); + } + if( HPMHooks.count.HP_clif_party_invite_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_invite_post[hIndex].func; + postHookFunc(sd, tsd); + } + } + return; +} +void HP_clif_party_inviteack(struct map_session_data *sd, const char *nick, int result) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_inviteack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *nick, int *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_inviteack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_inviteack_pre[hIndex].func; + preHookFunc(sd, nick, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_inviteack(sd, nick, result); + } + if( HPMHooks.count.HP_clif_party_inviteack_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *nick, int *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_inviteack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_inviteack_post[hIndex].func; + postHookFunc(sd, nick, &result); + } + } + return; +} +void HP_clif_party_option(struct party_data *p, struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_option_pre ) { + void (*preHookFunc) (struct party_data *p, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_option_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_option_pre[hIndex].func; + preHookFunc(p, sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_option(p, sd, flag); + } + if( HPMHooks.count.HP_clif_party_option_post ) { + void (*postHookFunc) (struct party_data *p, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_option_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_option_post[hIndex].func; + postHookFunc(p, sd, &flag); + } + } + return; +} +void HP_clif_party_withdraw(struct party_data *p, struct map_session_data *sd, int account_id, const char *name, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_withdraw_pre ) { + void (*preHookFunc) (struct party_data *p, struct map_session_data *sd, int *account_id, const char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_withdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_withdraw_pre[hIndex].func; + preHookFunc(p, sd, &account_id, name, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_withdraw(p, sd, account_id, name, flag); + } + if( HPMHooks.count.HP_clif_party_withdraw_post ) { + void (*postHookFunc) (struct party_data *p, struct map_session_data *sd, int *account_id, const char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_withdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_withdraw_post[hIndex].func; + postHookFunc(p, sd, &account_id, name, &flag); + } + } + return; +} +void HP_clif_party_message(struct party_data *p, int account_id, const char *mes, int len) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_message_pre ) { + void (*preHookFunc) (struct party_data *p, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_message_pre[hIndex].func; + preHookFunc(p, &account_id, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_message(p, account_id, mes, len); + } + if( HPMHooks.count.HP_clif_party_message_post ) { + void (*postHookFunc) (struct party_data *p, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_message_post[hIndex].func; + postHookFunc(p, &account_id, mes, &len); + } + } + return; +} +void HP_clif_party_xy(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_xy_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_xy_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_xy(sd); + } + if( HPMHooks.count.HP_clif_party_xy_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_xy_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_party_xy_single(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_xy_single_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_xy_single_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_xy_single(fd, sd); + } + if( HPMHooks.count.HP_clif_party_xy_single_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_xy_single_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_party_hp(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_hp_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_hp_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_hp(sd); + } + if( HPMHooks.count.HP_clif_party_hp_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_hp_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_party_xy_remove(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_xy_remove_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_xy_remove_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_xy_remove(sd); + } + if( HPMHooks.count.HP_clif_party_xy_remove_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_xy_remove_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_party_show_picker(struct map_session_data *sd, struct item *item_data) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_party_show_picker_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item *item_data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_party_show_picker_pre[hIndex].func; + preHookFunc(sd, item_data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_show_picker(sd, item_data); + } + if( HPMHooks.count.HP_clif_party_show_picker_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item *item_data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_party_show_picker_post[hIndex].func; + postHookFunc(sd, item_data); + } + } + return; +} +void HP_clif_partyinvitationstate(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_partyinvitationstate_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_partyinvitationstate_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.partyinvitationstate(sd); + } + if( HPMHooks.count.HP_clif_partyinvitationstate_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_partyinvitationstate_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_created(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_created_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_created_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_created(sd, flag); + } + if( HPMHooks.count.HP_clif_guild_created_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_created_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_belonginfo_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_belonginfo_pre[hIndex].func; + preHookFunc(sd, g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_belonginfo(sd, g); + } + if( HPMHooks.count.HP_clif_guild_belonginfo_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_belonginfo_post[hIndex].func; + postHookFunc(sd, g); + } + } + return; +} +void HP_clif_guild_masterormember(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_masterormember_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_masterormember_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_masterormember(sd); + } + if( HPMHooks.count.HP_clif_guild_masterormember_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_masterormember_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_basicinfo(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_basicinfo_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_basicinfo_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_basicinfo(sd); + } + if( HPMHooks.count.HP_clif_guild_basicinfo_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_basicinfo_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_allianceinfo(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_allianceinfo_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_allianceinfo_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_allianceinfo(sd); + } + if( HPMHooks.count.HP_clif_guild_allianceinfo_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_allianceinfo_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_memberlist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_memberlist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_memberlist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_memberlist(sd); + } + if( HPMHooks.count.HP_clif_guild_memberlist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_memberlist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_skillinfo(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_skillinfo_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_skillinfo_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_skillinfo(sd); + } + if( HPMHooks.count.HP_clif_guild_skillinfo_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_skillinfo_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_send_onlineinfo(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_send_onlineinfo_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_send_onlineinfo_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_send_onlineinfo(sd); + } + if( HPMHooks.count.HP_clif_guild_send_onlineinfo_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_send_onlineinfo_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_memberlogin_notice(struct guild *g, int idx, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_memberlogin_notice_pre ) { + void (*preHookFunc) (struct guild *g, int *idx, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlogin_notice_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_memberlogin_notice_pre[hIndex].func; + preHookFunc(g, &idx, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_memberlogin_notice(g, idx, flag); + } + if( HPMHooks.count.HP_clif_guild_memberlogin_notice_post ) { + void (*postHookFunc) (struct guild *g, int *idx, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlogin_notice_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_memberlogin_notice_post[hIndex].func; + postHookFunc(g, &idx, &flag); + } + } + return; +} +void HP_clif_guild_invite(struct map_session_data *sd, struct guild *g) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_invite_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_invite_pre[hIndex].func; + preHookFunc(sd, g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_invite(sd, g); + } + if( HPMHooks.count.HP_clif_guild_invite_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_invite_post[hIndex].func; + postHookFunc(sd, g); + } + } + return; +} +void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_inviteack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_inviteack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_inviteack_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_inviteack(sd, flag); + } + if( HPMHooks.count.HP_clif_guild_inviteack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_inviteack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_inviteack_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const char *mes) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_leave_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *name, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_leave_pre[hIndex].func; + preHookFunc(sd, name, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_leave(sd, name, mes); + } + if( HPMHooks.count.HP_clif_guild_leave_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *name, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_leave_post[hIndex].func; + postHookFunc(sd, name, mes); + } + } + return; +} +void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, const char *mes, int account_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_expulsion_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *name, const char *mes, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_expulsion_pre[hIndex].func; + preHookFunc(sd, name, mes, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_expulsion(sd, name, mes, account_id); + } + if( HPMHooks.count.HP_clif_guild_expulsion_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *name, const char *mes, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_expulsion_post[hIndex].func; + postHookFunc(sd, name, mes, &account_id); + } + } + return; +} +void HP_clif_guild_positionchanged(struct guild *g, int idx) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_positionchanged_pre ) { + void (*preHookFunc) (struct guild *g, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionchanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_positionchanged_pre[hIndex].func; + preHookFunc(g, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_positionchanged(g, idx); + } + if( HPMHooks.count.HP_clif_guild_positionchanged_post ) { + void (*postHookFunc) (struct guild *g, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionchanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_positionchanged_post[hIndex].func; + postHookFunc(g, &idx); + } + } + return; +} +void HP_clif_guild_memberpositionchanged(struct guild *g, int idx) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_memberpositionchanged_pre ) { + void (*preHookFunc) (struct guild *g, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberpositionchanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_memberpositionchanged_pre[hIndex].func; + preHookFunc(g, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_memberpositionchanged(g, idx); + } + if( HPMHooks.count.HP_clif_guild_memberpositionchanged_post ) { + void (*postHookFunc) (struct guild *g, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberpositionchanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_memberpositionchanged_post[hIndex].func; + postHookFunc(g, &idx); + } + } + return; +} +void HP_clif_guild_emblem(struct map_session_data *sd, struct guild *g) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_emblem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_emblem_pre[hIndex].func; + preHookFunc(sd, g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_emblem(sd, g); + } + if( HPMHooks.count.HP_clif_guild_emblem_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_emblem_post[hIndex].func; + postHookFunc(sd, g); + } + } + return; +} +void HP_clif_guild_emblem_area(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_emblem_area_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_emblem_area_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_emblem_area(bl); + } + if( HPMHooks.count.HP_clif_guild_emblem_area_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_emblem_area_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_clif_guild_notice(struct map_session_data *sd, struct guild *g) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_notice_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_notice_pre[hIndex].func; + preHookFunc(sd, g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_notice(sd, g); + } + if( HPMHooks.count.HP_clif_guild_notice_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_notice_post[hIndex].func; + postHookFunc(sd, g); + } + } + return; +} +void HP_clif_guild_message(struct guild *g, int account_id, const char *mes, int len) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_message_pre ) { + void (*preHookFunc) (struct guild *g, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_message_pre[hIndex].func; + preHookFunc(g, &account_id, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_message(g, account_id, mes, len); + } + if( HPMHooks.count.HP_clif_guild_message_post ) { + void (*postHookFunc) (struct guild *g, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_message_post[hIndex].func; + postHookFunc(g, &account_id, mes, &len); + } + } + return; +} +int HP_clif_guild_skillup(struct map_session_data *sd, uint16 skill_id, int lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_guild_skillup_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_skillup_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.guild_skillup(sd, skill_id, lv); + } + if( HPMHooks.count.HP_clif_guild_skillup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_skillup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &lv); + } + } + return retVal___; +} +void HP_clif_guild_reqalliance(struct map_session_data *sd, int account_id, const char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_reqalliance_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *account_id, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_reqalliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_reqalliance_pre[hIndex].func; + preHookFunc(sd, &account_id, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_reqalliance(sd, account_id, name); + } + if( HPMHooks.count.HP_clif_guild_reqalliance_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *account_id, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_reqalliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_reqalliance_post[hIndex].func; + postHookFunc(sd, &account_id, name); + } + } + return; +} +void HP_clif_guild_allianceack(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_allianceack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_allianceack_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_allianceack(sd, flag); + } + if( HPMHooks.count.HP_clif_guild_allianceack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_allianceack_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_delalliance_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_delalliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_delalliance_pre[hIndex].func; + preHookFunc(sd, &guild_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_delalliance(sd, guild_id, flag); + } + if( HPMHooks.count.HP_clif_guild_delalliance_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_delalliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_delalliance_post[hIndex].func; + postHookFunc(sd, &guild_id, &flag); + } + } + return; +} +void HP_clif_guild_oppositionack(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_oppositionack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_oppositionack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_oppositionack_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_oppositionack(sd, flag); + } + if( HPMHooks.count.HP_clif_guild_oppositionack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_oppositionack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_oppositionack_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_guild_broken(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_broken_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_broken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_broken_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_broken(sd, flag); + } + if( HPMHooks.count.HP_clif_guild_broken_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_broken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_broken_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_guild_xy(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_xy_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_xy_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_xy(sd); + } + if( HPMHooks.count.HP_clif_guild_xy_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_xy_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_xy_single(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_xy_single_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_xy_single_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_xy_single(fd, sd); + } + if( HPMHooks.count.HP_clif_guild_xy_single_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_xy_single_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_guild_xy_remove(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_xy_remove_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_xy_remove_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_xy_remove(sd); + } + if( HPMHooks.count.HP_clif_guild_xy_remove_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_xy_remove_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_positionnamelist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_positionnamelist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_positionnamelist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_positionnamelist(sd); + } + if( HPMHooks.count.HP_clif_guild_positionnamelist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_positionnamelist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_positioninfolist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_positioninfolist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_positioninfolist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_positioninfolist(sd); + } + if( HPMHooks.count.HP_clif_guild_positioninfolist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_positioninfolist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_expulsionlist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_guild_expulsionlist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_guild_expulsionlist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_expulsionlist(sd); + } + if( HPMHooks.count.HP_clif_guild_expulsionlist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_guild_expulsionlist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_clif_validate_emblem_pre ) { + bool (*preHookFunc) (const uint8 *emblem, unsigned long *emblem_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_validate_emblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_validate_emblem_pre[hIndex].func; + retVal___ = preHookFunc(emblem, &emblem_len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.validate_emblem(emblem, emblem_len); + } + if( HPMHooks.count.HP_clif_validate_emblem_post ) { + bool (*postHookFunc) (bool retVal___, const uint8 *emblem, unsigned long *emblem_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_validate_emblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_validate_emblem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, emblem, &emblem_len); + } + } + return retVal___; +} +void HP_clif_bg_hp(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bg_hp_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bg_hp_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bg_hp(sd); + } + if( HPMHooks.count.HP_clif_bg_hp_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bg_hp_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_bg_xy(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bg_xy_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bg_xy_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bg_xy(sd); + } + if( HPMHooks.count.HP_clif_bg_xy_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bg_xy_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_bg_xy_remove(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bg_xy_remove_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bg_xy_remove_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bg_xy_remove(sd); + } + if( HPMHooks.count.HP_clif_bg_xy_remove_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bg_xy_remove_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, int len) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bg_message_pre ) { + void (*preHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bg_message_pre[hIndex].func; + preHookFunc(bgd, &src_id, name, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bg_message(bgd, src_id, name, mes, len); + } + if( HPMHooks.count.HP_clif_bg_message_post ) { + void (*postHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bg_message_post[hIndex].func; + postHookFunc(bgd, &src_id, name, mes, &len); + } + } + return; +} +void HP_clif_bg_updatescore(int16 m) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bg_updatescore_pre ) { + void (*preHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bg_updatescore_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bg_updatescore(m); + } + if( HPMHooks.count.HP_clif_bg_updatescore_post ) { + void (*postHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bg_updatescore_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +void HP_clif_bg_updatescore_single(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bg_updatescore_single_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bg_updatescore_single_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bg_updatescore_single(sd); + } + if( HPMHooks.count.HP_clif_bg_updatescore_single_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bg_updatescore_single_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_sendbgemblem_area(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_sendbgemblem_area_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_sendbgemblem_area_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.sendbgemblem_area(sd); + } + if( HPMHooks.count.HP_clif_sendbgemblem_area_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_sendbgemblem_area_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_sendbgemblem_single(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_sendbgemblem_single_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_sendbgemblem_single_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.sendbgemblem_single(fd, sd); + } + if( HPMHooks.count.HP_clif_sendbgemblem_single_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_sendbgemblem_single_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +int HP_clif_instance(int instance_id, int type, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_instance_pre ) { + int (*preHookFunc) (int *instance_id, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_instance_pre[hIndex].func; + retVal___ = preHookFunc(&instance_id, &type, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.instance(instance_id, type, flag); + } + if( HPMHooks.count.HP_clif_instance_post ) { + int (*postHookFunc) (int retVal___, int *instance_id, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_instance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &instance_id, &type, &flag); + } + } + return retVal___; +} +void HP_clif_instance_join(int fd, int instance_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_instance_join_pre ) { + void (*preHookFunc) (int *fd, int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_join_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_instance_join_pre[hIndex].func; + preHookFunc(&fd, &instance_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.instance_join(fd, instance_id); + } + if( HPMHooks.count.HP_clif_instance_join_post ) { + void (*postHookFunc) (int *fd, int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_join_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_instance_join_post[hIndex].func; + postHookFunc(&fd, &instance_id); + } + } + return; +} +void HP_clif_instance_leave(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_instance_leave_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_instance_leave_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.instance_leave(fd); + } + if( HPMHooks.count.HP_clif_instance_leave_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_instance_leave_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_clif_catch_process(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_catch_process_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_catch_process_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.catch_process(sd); + } + if( HPMHooks.count.HP_clif_catch_process_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_catch_process_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_pet_roulette(struct map_session_data *sd, int data) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pet_roulette_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_roulette_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pet_roulette_pre[hIndex].func; + preHookFunc(sd, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pet_roulette(sd, data); + } + if( HPMHooks.count.HP_clif_pet_roulette_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_roulette_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pet_roulette_post[hIndex].func; + postHookFunc(sd, &data); + } + } + return; +} +void HP_clif_sendegg(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_sendegg_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_sendegg_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.sendegg(sd); + } + if( HPMHooks.count.HP_clif_sendegg_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_sendegg_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_send_petstatus(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_send_petstatus_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_send_petstatus_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.send_petstatus(sd); + } + if( HPMHooks.count.HP_clif_send_petstatus_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_send_petstatus_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_send_petdata(struct map_session_data *sd, struct pet_data *pd, int type, int param) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_send_petdata_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd, int *type, int *param); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_send_petdata_pre[hIndex].func; + preHookFunc(sd, pd, &type, ¶m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.send_petdata(sd, pd, type, param); + } + if( HPMHooks.count.HP_clif_send_petdata_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct pet_data *pd, int *type, int *param); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_send_petdata_post[hIndex].func; + postHookFunc(sd, pd, &type, ¶m); + } + } + return; +} +void HP_clif_pet_emotion(struct pet_data *pd, int param) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pet_emotion_pre ) { + void (*preHookFunc) (struct pet_data *pd, int *param); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pet_emotion_pre[hIndex].func; + preHookFunc(pd, ¶m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pet_emotion(pd, param); + } + if( HPMHooks.count.HP_clif_pet_emotion_post ) { + void (*postHookFunc) (struct pet_data *pd, int *param); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pet_emotion_post[hIndex].func; + postHookFunc(pd, ¶m); + } + } + return; +} +void HP_clif_pet_food(struct map_session_data *sd, int foodid, int fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pet_food_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_food_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pet_food_pre[hIndex].func; + preHookFunc(sd, &foodid, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pet_food(sd, foodid, fail); + } + if( HPMHooks.count.HP_clif_pet_food_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *foodid, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_food_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pet_food_post[hIndex].func; + postHookFunc(sd, &foodid, &fail); + } + } + return; +} +int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_friendslist_toggle_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.clif.friendslist_toggle_sub(sd, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_clif_friendslist_toggle_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_clif_friendslist_send(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_friendslist_send_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_friendslist_send_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.friendslist_send(sd); + } + if( HPMHooks.count.HP_clif_friendslist_send_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_friendslist_send_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_friendslist_reqack(struct map_session_data *sd, struct map_session_data *f_sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_friendslist_reqack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *f_sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_reqack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_friendslist_reqack_pre[hIndex].func; + preHookFunc(sd, f_sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.friendslist_reqack(sd, f_sd, type); + } + if( HPMHooks.count.HP_clif_friendslist_reqack_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *f_sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_reqack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_friendslist_reqack_post[hIndex].func; + postHookFunc(sd, f_sd, &type); + } + } + return; +} +void HP_clif_friendslist_toggle(struct map_session_data *sd, int account_id, int char_id, int online) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_friendslist_toggle_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *online); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_pre[hIndex].func; + preHookFunc(sd, &account_id, &char_id, &online); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.friendslist_toggle(sd, account_id, char_id, online); + } + if( HPMHooks.count.HP_clif_friendslist_toggle_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *online); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_post[hIndex].func; + postHookFunc(sd, &account_id, &char_id, &online); + } + } + return; +} +void HP_clif_friendlist_req(struct map_session_data *sd, int account_id, int char_id, const char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_friendlist_req_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendlist_req_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_friendlist_req_pre[hIndex].func; + preHookFunc(sd, &account_id, &char_id, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.friendlist_req(sd, account_id, char_id, name); + } + if( HPMHooks.count.HP_clif_friendlist_req_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendlist_req_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_friendlist_req_post[hIndex].func; + postHookFunc(sd, &account_id, &char_id, name); + } + } + return; +} +void HP_clif_GM_kickack(struct map_session_data *sd, int id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_GM_kickack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_GM_kickack_pre[hIndex].func; + preHookFunc(sd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.GM_kickack(sd, id); + } + if( HPMHooks.count.HP_clif_GM_kickack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_GM_kickack_post[hIndex].func; + postHookFunc(sd, &id); + } + } + return; +} +void HP_clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_GM_kick_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_GM_kick_pre[hIndex].func; + preHookFunc(sd, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.GM_kick(sd, tsd); + } + if( HPMHooks.count.HP_clif_GM_kick_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_GM_kick_post[hIndex].func; + postHookFunc(sd, tsd); + } + } + return; +} +void HP_clif_manner_message(struct map_session_data *sd, uint32 type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_manner_message_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint32 *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_manner_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_manner_message_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.manner_message(sd, type); + } + if( HPMHooks.count.HP_clif_manner_message_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint32 *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_manner_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_manner_message_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_GM_silence(struct map_session_data *sd, struct map_session_data *tsd, uint8 type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_GM_silence_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, uint8 *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_silence_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_GM_silence_pre[hIndex].func; + preHookFunc(sd, tsd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.GM_silence(sd, tsd, type); + } + if( HPMHooks.count.HP_clif_GM_silence_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, uint8 *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_silence_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_GM_silence_post[hIndex].func; + postHookFunc(sd, tsd, &type); + } + } + return; +} +void HP_clif_account_name(struct map_session_data *sd, int account_id, const char *accname) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_account_name_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *account_id, const char *accname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_account_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_account_name_pre[hIndex].func; + preHookFunc(sd, &account_id, accname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.account_name(sd, account_id, accname); + } + if( HPMHooks.count.HP_clif_account_name_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *account_id, const char *accname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_account_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_account_name_post[hIndex].func; + postHookFunc(sd, &account_id, accname); + } + } + return; +} +void HP_clif_check(int fd, struct map_session_data *pl_sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_check_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *pl_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_check_pre[hIndex].func; + preHookFunc(&fd, pl_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.check(fd, pl_sd); + } + if( HPMHooks.count.HP_clif_check_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *pl_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_check_post[hIndex].func; + postHookFunc(&fd, pl_sd); + } + } + return; +} +void HP_clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_hominfo_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct homun_data *hd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_hominfo_pre[hIndex].func; + preHookFunc(sd, hd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hominfo(sd, hd, flag); + } + if( HPMHooks.count.HP_clif_hominfo_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct homun_data *hd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_hominfo_post[hIndex].func; + postHookFunc(sd, hd, &flag); + } + } + return; +} +int HP_clif_homskillinfoblock(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_homskillinfoblock_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.homskillinfoblock(sd); + } + if( HPMHooks.count.HP_clif_homskillinfoblock_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_homskillup_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_homskillup_pre[hIndex].func; + preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.homskillup(sd, skill_id); + } + if( HPMHooks.count.HP_clif_homskillup_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_homskillup_post[hIndex].func; + postHookFunc(sd, &skill_id); + } + } + return; +} +int HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_hom_food_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_hom_food_pre[hIndex].func; + retVal___ = preHookFunc(sd, &foodid, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.hom_food(sd, foodid, fail); + } + if( HPMHooks.count.HP_clif_hom_food_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *foodid, int *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_hom_food_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &foodid, &fail); + } + } + return retVal___; +} +void HP_clif_send_homdata(struct map_session_data *sd, int state, int param) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_send_homdata_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *state, int *param); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_homdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_send_homdata_pre[hIndex].func; + preHookFunc(sd, &state, ¶m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.send_homdata(sd, state, param); + } + if( HPMHooks.count.HP_clif_send_homdata_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *state, int *param); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_homdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_send_homdata_post[hIndex].func; + postHookFunc(sd, &state, ¶m); + } + } + return; +} +void HP_clif_quest_send_list(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_quest_send_list_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_quest_send_list_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_send_list(sd); + } + if( HPMHooks.count.HP_clif_quest_send_list_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_quest_send_list_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_quest_send_mission(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_quest_send_mission_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_quest_send_mission_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_send_mission(sd); + } + if( HPMHooks.count.HP_clif_quest_send_mission_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_quest_send_mission_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd, int index) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_quest_add_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct quest *qd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_quest_add_pre[hIndex].func; + preHookFunc(sd, qd, &index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_add(sd, qd, index); + } + if( HPMHooks.count.HP_clif_quest_add_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct quest *qd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_quest_add_post[hIndex].func; + postHookFunc(sd, qd, &index); + } + } + return; +} +void HP_clif_quest_delete(struct map_session_data *sd, int quest_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_quest_delete_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_quest_delete_pre[hIndex].func; + preHookFunc(sd, &quest_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_delete(sd, quest_id); + } + if( HPMHooks.count.HP_clif_quest_delete_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_quest_delete_post[hIndex].func; + postHookFunc(sd, &quest_id); + } + } + return; +} +void HP_clif_quest_update_status(struct map_session_data *sd, int quest_id, bool active) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_quest_update_status_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *quest_id, bool *active); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_status_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_quest_update_status_pre[hIndex].func; + preHookFunc(sd, &quest_id, &active); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_update_status(sd, quest_id, active); + } + if( HPMHooks.count.HP_clif_quest_update_status_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *quest_id, bool *active); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_status_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_quest_update_status_post[hIndex].func; + postHookFunc(sd, &quest_id, &active); + } + } + return; +} +void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *qd, int index) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_quest_update_objective_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct quest *qd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_quest_update_objective_pre[hIndex].func; + preHookFunc(sd, qd, &index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_update_objective(sd, qd, index); + } + if( HPMHooks.count.HP_clif_quest_update_objective_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct quest *qd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_quest_update_objective_post[hIndex].func; + postHookFunc(sd, qd, &index); + } + } + return; +} +void HP_clif_quest_show_event(struct map_session_data *sd, struct block_list *bl, short state, short color) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_quest_show_event_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, short *state, short *color); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_show_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_quest_show_event_pre[hIndex].func; + preHookFunc(sd, bl, &state, &color); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_show_event(sd, bl, state, color); + } + if( HPMHooks.count.HP_clif_quest_show_event_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl, short *state, short *color); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_show_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_quest_show_event_post[hIndex].func; + postHookFunc(sd, bl, &state, &color); + } + } + return; +} +void HP_clif_mail_window(int fd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_window_pre ) { + void (*preHookFunc) (int *fd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_window_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_window_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_window(fd, flag); + } + if( HPMHooks.count.HP_clif_mail_window_post ) { + void (*postHookFunc) (int *fd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_window_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_window_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_clif_mail_read(struct map_session_data *sd, int mail_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_read_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_read_pre[hIndex].func; + preHookFunc(sd, &mail_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_read(sd, mail_id); + } + if( HPMHooks.count.HP_clif_mail_read_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_read_post[hIndex].func; + postHookFunc(sd, &mail_id); + } + } + return; +} +void HP_clif_mail_delete(int fd, int mail_id, short fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_delete_pre ) { + void (*preHookFunc) (int *fd, int *mail_id, short *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_delete_pre[hIndex].func; + preHookFunc(&fd, &mail_id, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_delete(fd, mail_id, fail); + } + if( HPMHooks.count.HP_clif_mail_delete_post ) { + void (*postHookFunc) (int *fd, int *mail_id, short *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_delete_post[hIndex].func; + postHookFunc(&fd, &mail_id, &fail); + } + } + return; +} +void HP_clif_mail_return(int fd, int mail_id, short fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_return_pre ) { + void (*preHookFunc) (int *fd, int *mail_id, short *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_return_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_return_pre[hIndex].func; + preHookFunc(&fd, &mail_id, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_return(fd, mail_id, fail); + } + if( HPMHooks.count.HP_clif_mail_return_post ) { + void (*postHookFunc) (int *fd, int *mail_id, short *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_return_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_return_post[hIndex].func; + postHookFunc(&fd, &mail_id, &fail); + } + } + return; +} +void HP_clif_mail_send(int fd, bool fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_send_pre ) { + void (*preHookFunc) (int *fd, bool *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_send_pre[hIndex].func; + preHookFunc(&fd, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_send(fd, fail); + } + if( HPMHooks.count.HP_clif_mail_send_post ) { + void (*postHookFunc) (int *fd, bool *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_send_post[hIndex].func; + postHookFunc(&fd, &fail); + } + } + return; +} +void HP_clif_mail_new(int fd, int mail_id, const char *sender, const char *title) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_new_pre ) { + void (*preHookFunc) (int *fd, int *mail_id, const char *sender, const char *title); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_new_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_new_pre[hIndex].func; + preHookFunc(&fd, &mail_id, sender, title); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_new(fd, mail_id, sender, title); + } + if( HPMHooks.count.HP_clif_mail_new_post ) { + void (*postHookFunc) (int *fd, int *mail_id, const char *sender, const char *title); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_new_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_new_post[hIndex].func; + postHookFunc(&fd, &mail_id, sender, title); + } + } + return; +} +void HP_clif_mail_refreshinbox(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_refreshinbox_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_refreshinbox_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_refreshinbox(sd); + } + if( HPMHooks.count.HP_clif_mail_refreshinbox_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_refreshinbox_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_mail_getattachment(int fd, uint8 flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_getattachment_pre ) { + void (*preHookFunc) (int *fd, uint8 *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_getattachment_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_getattachment_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_getattachment(fd, flag); + } + if( HPMHooks.count.HP_clif_mail_getattachment_post ) { + void (*postHookFunc) (int *fd, uint8 *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_getattachment_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_getattachment_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_clif_mail_setattachment(int fd, int index, uint8 flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mail_setattachment_pre ) { + void (*preHookFunc) (int *fd, int *index, uint8 *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_setattachment_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mail_setattachment_pre[hIndex].func; + preHookFunc(&fd, &index, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mail_setattachment(fd, index, flag); + } + if( HPMHooks.count.HP_clif_mail_setattachment_post ) { + void (*postHookFunc) (int *fd, int *index, uint8 *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_setattachment_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mail_setattachment_post[hIndex].func; + postHookFunc(&fd, &index, &flag); + } + } + return; +} +void HP_clif_auction_openwindow(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_auction_openwindow_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_auction_openwindow_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.auction_openwindow(sd); + } + if( HPMHooks.count.HP_clif_auction_openwindow_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_auction_openwindow_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_auction_results(struct map_session_data *sd, short count, short pages, uint8 *buf) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_auction_results_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *count, short *pages, uint8 *buf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_auction_results_pre[hIndex].func; + preHookFunc(sd, &count, &pages, buf); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.auction_results(sd, count, pages, buf); + } + if( HPMHooks.count.HP_clif_auction_results_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *count, short *pages, uint8 *buf); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_auction_results_post[hIndex].func; + postHookFunc(sd, &count, &pages, buf); + } + } + return; +} +void HP_clif_auction_message(int fd, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_auction_message_pre ) { + void (*preHookFunc) (int *fd, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_auction_message_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.auction_message(fd, flag); + } + if( HPMHooks.count.HP_clif_auction_message_post ) { + void (*postHookFunc) (int *fd, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_auction_message_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_clif_auction_close(int fd, unsigned char flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_auction_close_pre ) { + void (*preHookFunc) (int *fd, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_auction_close_pre[hIndex].func; + preHookFunc(&fd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.auction_close(fd, flag); + } + if( HPMHooks.count.HP_clif_auction_close_post ) { + void (*postHookFunc) (int *fd, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_auction_close_post[hIndex].func; + postHookFunc(&fd, &flag); + } + } + return; +} +void HP_clif_auction_setitem(int fd, int index, bool fail) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_auction_setitem_pre ) { + void (*preHookFunc) (int *fd, int *index, bool *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_setitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_auction_setitem_pre[hIndex].func; + preHookFunc(&fd, &index, &fail); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.auction_setitem(fd, index, fail); + } + if( HPMHooks.count.HP_clif_auction_setitem_post ) { + void (*postHookFunc) (int *fd, int *index, bool *fail); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_setitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_auction_setitem_post[hIndex].func; + postHookFunc(&fd, &index, &fail); + } + } + return; +} +void HP_clif_mercenary_info(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mercenary_info_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mercenary_info_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mercenary_info(sd); + } + if( HPMHooks.count.HP_clif_mercenary_info_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mercenary_info_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_mercenary_skillblock(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mercenary_skillblock_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mercenary_skillblock_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mercenary_skillblock(sd); + } + if( HPMHooks.count.HP_clif_mercenary_skillblock_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mercenary_skillblock_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_mercenary_message(struct map_session_data *sd, int message) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mercenary_message_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mercenary_message_pre[hIndex].func; + preHookFunc(sd, &message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mercenary_message(sd, message); + } + if( HPMHooks.count.HP_clif_mercenary_message_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mercenary_message_post[hIndex].func; + postHookFunc(sd, &message); + } + } + return; +} +void HP_clif_mercenary_updatestatus(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_mercenary_updatestatus_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_updatestatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_mercenary_updatestatus_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mercenary_updatestatus(sd, type); + } + if( HPMHooks.count.HP_clif_mercenary_updatestatus_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_updatestatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_mercenary_updatestatus_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_rental_time(int fd, int nameid, int seconds) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_rental_time_pre ) { + void (*preHookFunc) (int *fd, int *nameid, int *seconds); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_time_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_rental_time_pre[hIndex].func; + preHookFunc(&fd, &nameid, &seconds); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rental_time(fd, nameid, seconds); + } + if( HPMHooks.count.HP_clif_rental_time_post ) { + void (*postHookFunc) (int *fd, int *nameid, int *seconds); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_time_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_rental_time_post[hIndex].func; + postHookFunc(&fd, &nameid, &seconds); + } + } + return; +} +void HP_clif_rental_expired(int fd, int index, int nameid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_rental_expired_pre ) { + void (*preHookFunc) (int *fd, int *index, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_expired_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_rental_expired_pre[hIndex].func; + preHookFunc(&fd, &index, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rental_expired(fd, index, nameid); + } + if( HPMHooks.count.HP_clif_rental_expired_post ) { + void (*postHookFunc) (int *fd, int *index, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_expired_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_rental_expired_post[hIndex].func; + postHookFunc(&fd, &index, &nameid); + } + } + return; +} +void HP_clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingRegisterAck_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingRegisterAck(sd, flag); + } + if( HPMHooks.count.HP_clif_PartyBookingRegisterAck_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingRegisterAck_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_PartyBookingDeleteAck(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteAck_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingDeleteAck(sd, flag); + } + if( HPMHooks.count.HP_clif_PartyBookingDeleteAck_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteAck_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +void HP_clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info **results, int count, bool more_result) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingSearchAck_pre ) { + void (*preHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSearchAck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingSearchAck_pre[hIndex].func; + preHookFunc(&fd, results, &count, &more_result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingSearchAck(fd, results, count, more_result); + } + if( HPMHooks.count.HP_clif_PartyBookingSearchAck_post ) { + void (*postHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSearchAck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingSearchAck_post[hIndex].func; + postHookFunc(&fd, results, &count, &more_result); + } + } + return; +} +void HP_clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingUpdateNotify_pre[hIndex].func; + preHookFunc(sd, pb_ad); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingUpdateNotify(sd, pb_ad); + } + if( HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingUpdateNotify_post[hIndex].func; + postHookFunc(sd, pb_ad); + } + } + return; +} +void HP_clif_PartyBookingDeleteNotify(struct map_session_data *sd, int index) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteNotify_pre[hIndex].func; + preHookFunc(sd, &index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingDeleteNotify(sd, index); + } + if( HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteNotify_post[hIndex].func; + postHookFunc(sd, &index); + } + } + return; +} +void HP_clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingInsertNotify_pre[hIndex].func; + preHookFunc(sd, pb_ad); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingInsertNotify(sd, pb_ad); + } + if( HPMHooks.count.HP_clif_PartyBookingInsertNotify_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingInsertNotify_post[hIndex].func; + postHookFunc(sd, pb_ad); + } + } + return; +} +void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre ) { + void (*preHookFunc) (int *index, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingVolunteerInfo_pre[hIndex].func; + preHookFunc(&index, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingVolunteerInfo(index, sd); + } + if( HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post ) { + void (*postHookFunc) (int *index, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingVolunteerInfo_post[hIndex].func; + postHookFunc(&index, sd); + } + } + return; +} +void HP_clif_PartyBookingRefuseVolunteer(unsigned long aid, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre ) { + void (*preHookFunc) (unsigned long *aid, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_pre[hIndex].func; + preHookFunc(&aid, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingRefuseVolunteer(aid, sd); + } + if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post ) { + void (*postHookFunc) (unsigned long *aid, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_post[hIndex].func; + postHookFunc(&aid, sd); + } + } + return; +} +void HP_clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre ) { + void (*preHookFunc) (int *index, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingCancelVolunteer_pre[hIndex].func; + preHookFunc(&index, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingCancelVolunteer(index, sd); + } + if( HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post ) { + void (*postHookFunc) (int *index, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingCancelVolunteer_post[hIndex].func; + postHookFunc(&index, sd); + } + } + return; +} +void HP_clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre ) { + void (*preHookFunc) (int *index, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingAddFilteringList_pre[hIndex].func; + preHookFunc(&index, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingAddFilteringList(index, sd); + } + if( HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post ) { + void (*postHookFunc) (int *index, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingAddFilteringList_post[hIndex].func; + postHookFunc(&index, sd); + } + } + return; +} +void HP_clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre ) { + void (*preHookFunc) (int *gid, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_PartyBookingSubFilteringList_pre[hIndex].func; + preHookFunc(&gid, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PartyBookingSubFilteringList(gid, sd); + } + if( HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post ) { + void (*postHookFunc) (int *gid, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_PartyBookingSubFilteringList_post[hIndex].func; + postHookFunc(&gid, sd); + } + } + return; +} +void HP_clif_buyingstore_open(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_open_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_open_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_open(sd); + } + if( HPMHooks.count.HP_clif_buyingstore_open_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_open_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_buyingstore_open_failed(struct map_session_data *sd, unsigned short result, unsigned int weight) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_open_failed_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *result, unsigned int *weight); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_failed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_open_failed_pre[hIndex].func; + preHookFunc(sd, &result, &weight); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_open_failed(sd, result, weight); + } + if( HPMHooks.count.HP_clif_buyingstore_open_failed_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *result, unsigned int *weight); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_failed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_open_failed_post[hIndex].func; + postHookFunc(sd, &result, &weight); + } + } + return; +} +void HP_clif_buyingstore_myitemlist(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_myitemlist_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_myitemlist_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_myitemlist(sd); + } + if( HPMHooks.count.HP_clif_buyingstore_myitemlist_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_myitemlist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_buyingstore_entry(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_entry_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_entry(sd); + } + if( HPMHooks.count.HP_clif_buyingstore_entry_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_buyingstore_entry_single(struct map_session_data *sd, struct map_session_data *pl_sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_entry_single_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_single_pre[hIndex].func; + preHookFunc(sd, pl_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_entry_single(sd, pl_sd); + } + if( HPMHooks.count.HP_clif_buyingstore_entry_single_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_single_post[hIndex].func; + postHookFunc(sd, pl_sd); + } + } + return; +} +void HP_clif_buyingstore_disappear_entry(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_disappear_entry(sd); + } + if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_buyingstore_disappear_entry_single(struct map_session_data *sd, struct map_session_data *pl_sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_single_pre[hIndex].func; + preHookFunc(sd, pl_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_disappear_entry_single(sd, pl_sd); + } + if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_single_post[hIndex].func; + postHookFunc(sd, pl_sd); + } + } + return; +} +void HP_clif_buyingstore_itemlist(struct map_session_data *sd, struct map_session_data *pl_sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_itemlist_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_itemlist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_itemlist_pre[hIndex].func; + preHookFunc(sd, pl_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_itemlist(sd, pl_sd); + } + if( HPMHooks.count.HP_clif_buyingstore_itemlist_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_itemlist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_itemlist_post[hIndex].func; + postHookFunc(sd, pl_sd); + } + } + return; +} +void HP_clif_buyingstore_trade_failed_buyer(struct map_session_data *sd, short result) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_buyer_pre[hIndex].func; + preHookFunc(sd, &result); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_trade_failed_buyer(sd, result); + } + if( HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *result); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_buyer_post[hIndex].func; + postHookFunc(sd, &result); + } + } + return; +} +void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short nameid, unsigned short amount) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_update_item_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_update_item_pre[hIndex].func; + preHookFunc(sd, &nameid, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_update_item(sd, nameid, amount); + } + if( HPMHooks.count.HP_clif_buyingstore_update_item_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_update_item_post[hIndex].func; + postHookFunc(sd, &nameid, &amount); + } + } + return; +} +void HP_clif_buyingstore_delete_item(struct map_session_data *sd, short index, unsigned short amount, int price) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_delete_item_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *index, unsigned short *amount, int *price); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_delete_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_delete_item_pre[hIndex].func; + preHookFunc(sd, &index, &amount, &price); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_delete_item(sd, index, amount, price); + } + if( HPMHooks.count.HP_clif_buyingstore_delete_item_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *index, unsigned short *amount, int *price); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_delete_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_delete_item_post[hIndex].func; + postHookFunc(sd, &index, &amount, &price); + } + } + return; +} +void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short result, unsigned short nameid) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *result, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_seller_pre[hIndex].func; + preHookFunc(sd, &result, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.buyingstore_trade_failed_seller(sd, result, nameid); + } + if( HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *result, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_seller_post[hIndex].func; + postHookFunc(sd, &result, &nameid); + } + } + return; +} +void HP_clif_search_store_info_ack(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_search_store_info_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_search_store_info_ack_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.search_store_info_ack(sd); + } + if( HPMHooks.count.HP_clif_search_store_info_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_search_store_info_ack_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_search_store_info_failed(struct map_session_data *sd, unsigned char reason) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_search_store_info_failed_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *reason); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_failed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_search_store_info_failed_pre[hIndex].func; + preHookFunc(sd, &reason); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.search_store_info_failed(sd, reason); + } + if( HPMHooks.count.HP_clif_search_store_info_failed_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *reason); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_failed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_search_store_info_failed_post[hIndex].func; + postHookFunc(sd, &reason); + } + } + return; +} +void HP_clif_open_search_store_info(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_open_search_store_info_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_open_search_store_info_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.open_search_store_info(sd); + } + if( HPMHooks.count.HP_clif_open_search_store_info_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_open_search_store_info_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_search_store_info_click_ack(struct map_session_data *sd, short x, short y) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_search_store_info_click_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_click_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_search_store_info_click_ack_pre[hIndex].func; + preHookFunc(sd, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.search_store_info_click_ack(sd, x, y); + } + if( HPMHooks.count.HP_clif_search_store_info_click_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_click_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_search_store_info_click_ack_post[hIndex].func; + postHookFunc(sd, &x, &y); + } + } + return; +} +void HP_clif_elemental_info(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_elemental_info_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_elemental_info_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.elemental_info(sd); + } + if( HPMHooks.count.HP_clif_elemental_info_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_elemental_info_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_elemental_updatestatus(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_elemental_updatestatus_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_updatestatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_elemental_updatestatus_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.elemental_updatestatus(sd, type); + } + if( HPMHooks.count.HP_clif_elemental_updatestatus_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_updatestatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_elemental_updatestatus_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK response, unsigned char arena_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bgqueue_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK *response, unsigned char *arena_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bgqueue_ack_pre[hIndex].func; + preHookFunc(sd, &response, &arena_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bgqueue_ack(sd, response, arena_id); + } + if( HPMHooks.count.HP_clif_bgqueue_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK *response, unsigned char *arena_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bgqueue_ack_post[hIndex].func; + postHookFunc(sd, &response, &arena_id); + } + } + return; +} +void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bgqueue_notice_delete_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bgqueue_notice_delete_pre[hIndex].func; + preHookFunc(sd, &response, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bgqueue_notice_delete(sd, response, name); + } + if( HPMHooks.count.HP_clif_bgqueue_notice_delete_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bgqueue_notice_delete_post[hIndex].func; + postHookFunc(sd, &response, name); + } + } + return; +} +void HP_clif_bgqueue_update_info(struct map_session_data *sd, unsigned char arena_id, int position) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bgqueue_update_info_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *arena_id, int *position); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_update_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bgqueue_update_info_pre[hIndex].func; + preHookFunc(sd, &arena_id, &position); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bgqueue_update_info(sd, arena_id, position); + } + if( HPMHooks.count.HP_clif_bgqueue_update_info_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *arena_id, int *position); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_update_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bgqueue_update_info_post[hIndex].func; + postHookFunc(sd, &arena_id, &position); + } + } + return; +} +void HP_clif_bgqueue_joined(struct map_session_data *sd, int pos) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bgqueue_joined_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_joined_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bgqueue_joined_pre[hIndex].func; + preHookFunc(sd, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bgqueue_joined(sd, pos); + } + if( HPMHooks.count.HP_clif_bgqueue_joined_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_joined_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bgqueue_joined_post[hIndex].func; + postHookFunc(sd, &pos); + } + } + return; +} +void HP_clif_bgqueue_pcleft(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bgqueue_pcleft_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bgqueue_pcleft_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bgqueue_pcleft(sd); + } + if( HPMHooks.count.HP_clif_bgqueue_pcleft_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bgqueue_pcleft_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char arena_id, enum send_target target) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bgqueue_battlebegins_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *arena_id, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_battlebegins_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bgqueue_battlebegins_pre[hIndex].func; + preHookFunc(sd, &arena_id, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bgqueue_battlebegins(sd, arena_id, target); + } + if( HPMHooks.count.HP_clif_bgqueue_battlebegins_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *arena_id, enum send_target *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_battlebegins_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bgqueue_battlebegins_post[hIndex].func; + postHookFunc(sd, &arena_id, &target); + } + } + return; +} +void HP_clif_adopt_reply(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_adopt_reply_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_reply_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_adopt_reply_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.adopt_reply(sd, type); + } + if( HPMHooks.count.HP_clif_adopt_reply_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_reply_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_adopt_reply_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +void HP_clif_adopt_request(struct map_session_data *sd, struct map_session_data *src, int p_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_adopt_request_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *src, int *p_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_request_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_adopt_request_pre[hIndex].func; + preHookFunc(sd, src, &p_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.adopt_request(sd, src, p_id); + } + if( HPMHooks.count.HP_clif_adopt_request_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *src, int *p_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_request_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_adopt_request_post[hIndex].func; + postHookFunc(sd, src, &p_id); + } + } + return; +} +void HP_clif_readbook(int fd, int book_id, int page) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_readbook_pre ) { + void (*preHookFunc) (int *fd, int *book_id, int *page); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_readbook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_readbook_pre[hIndex].func; + preHookFunc(&fd, &book_id, &page); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.readbook(fd, book_id, page); + } + if( HPMHooks.count.HP_clif_readbook_post ) { + void (*postHookFunc) (int *fd, int *book_id, int *page); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_readbook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_readbook_post[hIndex].func; + postHookFunc(&fd, &book_id, &page); + } + } + return; +} +void HP_clif_notify_time(struct map_session_data *sd, unsigned long time) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_notify_time_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned long *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_notify_time_pre[hIndex].func; + preHookFunc(sd, &time); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.notify_time(sd, time); + } + if( HPMHooks.count.HP_clif_notify_time_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned long *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_notify_time_post[hIndex].func; + postHookFunc(sd, &time); + } + } + return; +} +void HP_clif_user_count(struct map_session_data *sd, int count) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_user_count_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_user_count_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_user_count_pre[hIndex].func; + preHookFunc(sd, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.user_count(sd, count); + } + if( HPMHooks.count.HP_clif_user_count_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_user_count_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_user_count_post[hIndex].func; + postHookFunc(sd, &count); + } + } + return; +} +void HP_clif_noask_sub(struct map_session_data *src, struct map_session_data *target, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_noask_sub_pre ) { + void (*preHookFunc) (struct map_session_data *src, struct map_session_data *target, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_noask_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_noask_sub_pre[hIndex].func; + preHookFunc(src, target, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.noask_sub(src, target, type); + } + if( HPMHooks.count.HP_clif_noask_sub_post ) { + void (*postHookFunc) (struct map_session_data *src, struct map_session_data *target, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_noask_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_noask_sub_post[hIndex].func; + postHookFunc(src, target, &type); + } + } + return; +} +void HP_clif_bc_ready(void) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_bc_ready_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bc_ready_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.bc_ready(); + } + if( HPMHooks.count.HP_clif_bc_ready_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bc_ready_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_clif_undisguise_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_clif_undisguise_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_undisguise_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.undisguise_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_clif_undisguise_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_undisguise_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_clif_chsys_create(struct hChSysCh *channel, char *name, char *pass, unsigned char color) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_create_pre ) { + void (*preHookFunc) (struct hChSysCh *channel, char *name, char *pass, unsigned char *color); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_create_pre[hIndex].func; + preHookFunc(channel, name, pass, &color); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_create(channel, name, pass, color); + } + if( HPMHooks.count.HP_clif_chsys_create_post ) { + void (*postHookFunc) (struct hChSysCh *channel, char *name, char *pass, unsigned char *color); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_create_post[hIndex].func; + postHookFunc(channel, name, pass, &color); + } + } + return; +} +void HP_clif_chsys_msg(struct hChSysCh *channel, struct map_session_data *sd, char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_msg_pre ) { + void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_msg_pre[hIndex].func; + preHookFunc(channel, sd, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_msg(channel, sd, msg); + } + if( HPMHooks.count.HP_clif_chsys_msg_post ) { + void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_msg_post[hIndex].func; + postHookFunc(channel, sd, msg); + } + } + return; +} +void HP_clif_chsys_msg2(struct hChSysCh *channel, char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_msg2_pre ) { + void (*preHookFunc) (struct hChSysCh *channel, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_msg2_pre[hIndex].func; + preHookFunc(channel, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_msg2(channel, msg); + } + if( HPMHooks.count.HP_clif_chsys_msg2_post ) { + void (*postHookFunc) (struct hChSysCh *channel, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_msg2_post[hIndex].func; + postHookFunc(channel, msg); + } + } + return; +} +void HP_clif_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_send_pre ) { + void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_send_pre[hIndex].func; + preHookFunc(channel, sd, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_send(channel, sd, msg); + } + if( HPMHooks.count.HP_clif_chsys_send_post ) { + void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_send_post[hIndex].func; + postHookFunc(channel, sd, msg); + } + } + return; +} +void HP_clif_chsys_join(struct hChSysCh *channel, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_join_pre ) { + void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_join_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_join_pre[hIndex].func; + preHookFunc(channel, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_join(channel, sd); + } + if( HPMHooks.count.HP_clif_chsys_join_post ) { + void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_join_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_join_post[hIndex].func; + postHookFunc(channel, sd); + } + } + return; +} +void HP_clif_chsys_left(struct hChSysCh *channel, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_left_pre ) { + void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_left_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_left_pre[hIndex].func; + preHookFunc(channel, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_left(channel, sd); + } + if( HPMHooks.count.HP_clif_chsys_left_post ) { + void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_left_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_left_post[hIndex].func; + postHookFunc(channel, sd); + } + } + return; +} +void HP_clif_chsys_delete(struct hChSysCh *channel) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_delete_pre ) { + void (*preHookFunc) (struct hChSysCh *channel); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_delete_pre[hIndex].func; + preHookFunc(channel); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_delete(channel); + } + if( HPMHooks.count.HP_clif_chsys_delete_post ) { + void (*postHookFunc) (struct hChSysCh *channel); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_delete_post[hIndex].func; + postHookFunc(channel); + } + } + return; +} +void HP_clif_chsys_mjoin(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_mjoin_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_mjoin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_mjoin_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_mjoin(sd); + } + if( HPMHooks.count.HP_clif_chsys_mjoin_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_mjoin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_mjoin_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_chsys_quit(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_quit_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_quit_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_quit(sd); + } + if( HPMHooks.count.HP_clif_chsys_quit_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_quit_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_chsys_quitg(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_quitg_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quitg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_quitg_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_quitg(sd); + } + if( HPMHooks.count.HP_clif_chsys_quitg_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quitg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_quitg_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_chsys_gjoin(struct guild *g1, struct guild *g2) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_gjoin_pre ) { + void (*preHookFunc) (struct guild *g1, struct guild *g2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gjoin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_gjoin_pre[hIndex].func; + preHookFunc(g1, g2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_gjoin(g1, g2); + } + if( HPMHooks.count.HP_clif_chsys_gjoin_post ) { + void (*postHookFunc) (struct guild *g1, struct guild *g2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gjoin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_gjoin_post[hIndex].func; + postHookFunc(g1, g2); + } + } + return; +} +void HP_clif_chsys_gleave(struct guild *g1, struct guild *g2) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chsys_gleave_pre ) { + void (*preHookFunc) (struct guild *g1, struct guild *g2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gleave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chsys_gleave_pre[hIndex].func; + preHookFunc(g1, g2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chsys_gleave(g1, g2); + } + if( HPMHooks.count.HP_clif_chsys_gleave_post ) { + void (*postHookFunc) (struct guild *g1, struct guild *g2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gleave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chsys_gleave_post[hIndex].func; + postHookFunc(g1, g2); + } + } + return; +} +void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pWantToConnection_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pWantToConnection_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pWantToConnection(fd, sd); + } + if( HPMHooks.count.HP_clif_pWantToConnection_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pWantToConnection_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pLoadEndAck(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pLoadEndAck_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pLoadEndAck_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pLoadEndAck(fd, sd); + } + if( HPMHooks.count.HP_clif_pLoadEndAck_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pLoadEndAck_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pTickSend(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTickSend_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTickSend_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTickSend(fd, sd); + } + if( HPMHooks.count.HP_clif_pTickSend_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTickSend_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pHotkey(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pHotkey_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pHotkey_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHotkey(fd, sd); + } + if( HPMHooks.count.HP_clif_pHotkey_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pHotkey_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pProgressbar(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pProgressbar_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pProgressbar_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pProgressbar(fd, sd); + } + if( HPMHooks.count.HP_clif_pProgressbar_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pProgressbar_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pWalkToXY(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pWalkToXY_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pWalkToXY_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pWalkToXY(fd, sd); + } + if( HPMHooks.count.HP_clif_pWalkToXY_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pWalkToXY_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pQuitGame(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pQuitGame_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pQuitGame_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pQuitGame(fd, sd); + } + if( HPMHooks.count.HP_clif_pQuitGame_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pQuitGame_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGetCharNameRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGetCharNameRequest_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGetCharNameRequest_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGetCharNameRequest(fd, sd); + } + if( HPMHooks.count.HP_clif_pGetCharNameRequest_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGetCharNameRequest_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGlobalMessage(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGlobalMessage_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGlobalMessage_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGlobalMessage(fd, sd); + } + if( HPMHooks.count.HP_clif_pGlobalMessage_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGlobalMessage_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMapMove(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMapMove_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMapMove_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMapMove(fd, sd); + } + if( HPMHooks.count.HP_clif_pMapMove_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMapMove_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pChangeDir(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pChangeDir_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pChangeDir_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChangeDir(fd, sd); + } + if( HPMHooks.count.HP_clif_pChangeDir_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pChangeDir_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pEmotion(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pEmotion_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pEmotion_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pEmotion(fd, sd); + } + if( HPMHooks.count.HP_clif_pEmotion_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pEmotion_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pHowManyConnections(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pHowManyConnections_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pHowManyConnections_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHowManyConnections(fd, sd); + } + if( HPMHooks.count.HP_clif_pHowManyConnections_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pHowManyConnections_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pActionRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pActionRequest_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pActionRequest_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pActionRequest(fd, sd); + } + if( HPMHooks.count.HP_clif_pActionRequest_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pActionRequest_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, unsigned int tick) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pActionRequest_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pActionRequest_sub_pre[hIndex].func; + preHookFunc(sd, &action_type, &target_id, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pActionRequest_sub(sd, action_type, target_id, tick); + } + if( HPMHooks.count.HP_clif_pActionRequest_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pActionRequest_sub_post[hIndex].func; + postHookFunc(sd, &action_type, &target_id, &tick); + } + } + return; +} +void HP_clif_pRestart(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRestart_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRestart_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRestart(fd, sd); + } + if( HPMHooks.count.HP_clif_pRestart_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRestart_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pWisMessage(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pWisMessage_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pWisMessage_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pWisMessage(fd, sd); + } + if( HPMHooks.count.HP_clif_pWisMessage_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pWisMessage_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pBroadcast(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pBroadcast_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pBroadcast_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pBroadcast(fd, sd); + } + if( HPMHooks.count.HP_clif_pBroadcast_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pBroadcast_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pTakeItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTakeItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTakeItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTakeItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pTakeItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTakeItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pDropItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pDropItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pDropItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pDropItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pDropItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pDropItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pUseItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pUseItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pEquipItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pEquipItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pEquipItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pEquipItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pEquipItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pEquipItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pUnequipItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUnequipItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUnequipItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUnequipItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pUnequipItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUnequipItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcClicked(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcClicked_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcClicked_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcClicked(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcClicked_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcClicked_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcBuySellSelected(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcBuySellSelected_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcBuySellSelected_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcBuySellSelected(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcBuySellSelected_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcBuySellSelected_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcBuyListSend(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcBuyListSend_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcBuyListSend_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcBuyListSend(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcBuyListSend_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcBuyListSend_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcSellListSend(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcSellListSend_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcSellListSend_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcSellListSend(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcSellListSend_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcSellListSend_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCreateChatRoom(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCreateChatRoom_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCreateChatRoom_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCreateChatRoom(fd, sd); + } + if( HPMHooks.count.HP_clif_pCreateChatRoom_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCreateChatRoom_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pChatAddMember(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pChatAddMember_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pChatAddMember_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChatAddMember(fd, sd); + } + if( HPMHooks.count.HP_clif_pChatAddMember_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pChatAddMember_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pChatRoomStatusChange(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pChatRoomStatusChange_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pChatRoomStatusChange_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChatRoomStatusChange(fd, sd); + } + if( HPMHooks.count.HP_clif_pChatRoomStatusChange_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pChatRoomStatusChange_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pChangeChatOwner(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pChangeChatOwner_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pChangeChatOwner_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChangeChatOwner(fd, sd); + } + if( HPMHooks.count.HP_clif_pChangeChatOwner_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pChangeChatOwner_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pKickFromChat(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pKickFromChat_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pKickFromChat_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pKickFromChat(fd, sd); + } + if( HPMHooks.count.HP_clif_pKickFromChat_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pKickFromChat_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pChatLeave(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pChatLeave_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pChatLeave_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChatLeave(fd, sd); + } + if( HPMHooks.count.HP_clif_pChatLeave_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pChatLeave_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pTradeRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTradeRequest_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTradeRequest_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTradeRequest(fd, sd); + } + if( HPMHooks.count.HP_clif_pTradeRequest_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTradeRequest_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_chann_config_read(void) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_chann_config_read_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chann_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_chann_config_read_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chann_config_read(); + } + if( HPMHooks.count.HP_clif_chann_config_read_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chann_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_chann_config_read_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_clif_pTradeAck(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTradeAck_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTradeAck_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTradeAck(fd, sd); + } + if( HPMHooks.count.HP_clif_pTradeAck_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTradeAck_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pTradeAddItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTradeAddItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTradeAddItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTradeAddItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pTradeAddItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTradeAddItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pTradeOk(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTradeOk_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTradeOk_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTradeOk(fd, sd); + } + if( HPMHooks.count.HP_clif_pTradeOk_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTradeOk_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pTradeCancel(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTradeCancel_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTradeCancel_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTradeCancel(fd, sd); + } + if( HPMHooks.count.HP_clif_pTradeCancel_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTradeCancel_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pTradeCommit(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTradeCommit_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTradeCommit_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTradeCommit(fd, sd); + } + if( HPMHooks.count.HP_clif_pTradeCommit_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTradeCommit_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pStopAttack(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pStopAttack_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pStopAttack_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pStopAttack(fd, sd); + } + if( HPMHooks.count.HP_clif_pStopAttack_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pStopAttack_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPutItemToCart(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPutItemToCart_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPutItemToCart_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPutItemToCart(fd, sd); + } + if( HPMHooks.count.HP_clif_pPutItemToCart_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPutItemToCart_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGetItemFromCart(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGetItemFromCart_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGetItemFromCart_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGetItemFromCart(fd, sd); + } + if( HPMHooks.count.HP_clif_pGetItemFromCart_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGetItemFromCart_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRemoveOption(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRemoveOption_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRemoveOption_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRemoveOption(fd, sd); + } + if( HPMHooks.count.HP_clif_pRemoveOption_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRemoveOption_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pChangeCart(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pChangeCart_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pChangeCart_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChangeCart(fd, sd); + } + if( HPMHooks.count.HP_clif_pChangeCart_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pChangeCart_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pStatusUp(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pStatusUp_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pStatusUp_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pStatusUp(fd, sd); + } + if( HPMHooks.count.HP_clif_pStatusUp_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pStatusUp_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSkillUp(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSkillUp_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSkillUp_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSkillUp(fd, sd); + } + if( HPMHooks.count.HP_clif_pSkillUp_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSkillUp_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillToId_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillToId(fd, sd); + } + if( HPMHooks.count.HP_clif_pUseSkillToId_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillToId_homun_pre ) { + void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_homun_pre[hIndex].func; + preHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &target_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillToId_homun(hd, sd, tick, skill_id, skill_lv, target_id); + } + if( HPMHooks.count.HP_clif_pUseSkillToId_homun_post ) { + void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_homun_post[hIndex].func; + postHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &target_id); + } + } + return; +} +void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre ) { + void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_mercenary_pre[hIndex].func; + preHookFunc(md, sd, &tick, &skill_id, &skill_lv, &target_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillToId_mercenary(md, sd, tick, skill_id, skill_lv, target_id); + } + if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post ) { + void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_mercenary_post[hIndex].func; + postHookFunc(md, sd, &tick, &skill_id, &skill_lv, &target_id); + } + } + return; +} +void HP_clif_pUseSkillToPos(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillToPos_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillToPos(fd, sd); + } + if( HPMHooks.count.HP_clif_pUseSkillToPos_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pUseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill_lv, uint16 skill_id, short x, short y, int skillmoreinfo) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillToPosSub_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv, uint16 *skill_id, short *x, short *y, int *skillmoreinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosSub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosSub_pre[hIndex].func; + preHookFunc(&fd, sd, &skill_lv, &skill_id, &x, &y, &skillmoreinfo); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillToPosSub(fd, sd, skill_lv, skill_id, x, y, skillmoreinfo); + } + if( HPMHooks.count.HP_clif_pUseSkillToPosSub_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv, uint16 *skill_id, short *x, short *y, int *skillmoreinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosSub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosSub_post[hIndex].func; + postHookFunc(&fd, sd, &skill_lv, &skill_id, &x, &y, &skillmoreinfo); + } + } + return; +} +void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre ) { + void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_homun_pre[hIndex].func; + preHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillToPos_homun(hd, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo); + } + if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_post ) { + void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_homun_post[hIndex].func; + postHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo); + } + } + return; +} +void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre ) { + void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_mercenary_pre[hIndex].func; + preHookFunc(md, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillToPos_mercenary(md, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo); + } + if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post ) { + void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_mercenary_post[hIndex].func; + postHookFunc(md, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo); + } + } + return; +} +void HP_clif_pUseSkillToPosMoreInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosMoreInfo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillToPosMoreInfo(fd, sd); + } + if( HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosMoreInfo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pUseSkillMap(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseSkillMap_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseSkillMap_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseSkillMap(fd, sd); + } + if( HPMHooks.count.HP_clif_pUseSkillMap_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseSkillMap_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRequestMemo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRequestMemo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRequestMemo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRequestMemo(fd, sd); + } + if( HPMHooks.count.HP_clif_pRequestMemo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRequestMemo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pProduceMix(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pProduceMix_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pProduceMix_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pProduceMix(fd, sd); + } + if( HPMHooks.count.HP_clif_pProduceMix_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pProduceMix_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCooking(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCooking_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCooking_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCooking(fd, sd); + } + if( HPMHooks.count.HP_clif_pCooking_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCooking_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRepairItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRepairItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRepairItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRepairItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pRepairItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRepairItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pWeaponRefine(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pWeaponRefine_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pWeaponRefine_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pWeaponRefine(fd, sd); + } + if( HPMHooks.count.HP_clif_pWeaponRefine_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pWeaponRefine_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcSelectMenu(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcSelectMenu_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcSelectMenu_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcSelectMenu(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcSelectMenu_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcSelectMenu_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcNextClicked(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcNextClicked_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcNextClicked_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcNextClicked(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcNextClicked_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcNextClicked_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcAmountInput(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcAmountInput_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcAmountInput_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcAmountInput(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcAmountInput_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcAmountInput_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcStringInput(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcStringInput_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcStringInput_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcStringInput(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcStringInput_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcStringInput_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNpcCloseClicked(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNpcCloseClicked_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNpcCloseClicked_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNpcCloseClicked(fd, sd); + } + if( HPMHooks.count.HP_clif_pNpcCloseClicked_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNpcCloseClicked_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pItemIdentify(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pItemIdentify_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pItemIdentify_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pItemIdentify(fd, sd); + } + if( HPMHooks.count.HP_clif_pItemIdentify_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pItemIdentify_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSelectArrow(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSelectArrow_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSelectArrow_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSelectArrow(fd, sd); + } + if( HPMHooks.count.HP_clif_pSelectArrow_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSelectArrow_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAutoSpell(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAutoSpell_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAutoSpell_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAutoSpell(fd, sd); + } + if( HPMHooks.count.HP_clif_pAutoSpell_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAutoSpell_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pUseCard(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pUseCard_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pUseCard_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pUseCard(fd, sd); + } + if( HPMHooks.count.HP_clif_pUseCard_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pUseCard_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pInsertCard(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pInsertCard_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pInsertCard_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pInsertCard(fd, sd); + } + if( HPMHooks.count.HP_clif_pInsertCard_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pInsertCard_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSolveCharName(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSolveCharName_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSolveCharName_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSolveCharName(fd, sd); + } + if( HPMHooks.count.HP_clif_pSolveCharName_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSolveCharName_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pResetChar(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pResetChar_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pResetChar_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pResetChar(fd, sd); + } + if( HPMHooks.count.HP_clif_pResetChar_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pResetChar_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pLocalBroadcast(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pLocalBroadcast_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pLocalBroadcast_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pLocalBroadcast(fd, sd); + } + if( HPMHooks.count.HP_clif_pLocalBroadcast_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pLocalBroadcast_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMoveToKafra(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMoveToKafra_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMoveToKafra_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMoveToKafra(fd, sd); + } + if( HPMHooks.count.HP_clif_pMoveToKafra_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMoveToKafra_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMoveFromKafra(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMoveFromKafra_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMoveFromKafra_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMoveFromKafra(fd, sd); + } + if( HPMHooks.count.HP_clif_pMoveFromKafra_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMoveFromKafra_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMoveToKafraFromCart(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMoveToKafraFromCart_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMoveToKafraFromCart(fd, sd); + } + if( HPMHooks.count.HP_clif_pMoveToKafraFromCart_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMoveToKafraFromCart_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMoveFromKafraToCart(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMoveFromKafraToCart_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMoveFromKafraToCart(fd, sd); + } + if( HPMHooks.count.HP_clif_pMoveFromKafraToCart_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMoveFromKafraToCart_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCloseKafra(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCloseKafra_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCloseKafra_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCloseKafra(fd, sd); + } + if( HPMHooks.count.HP_clif_pCloseKafra_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCloseKafra_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pStoragePassword(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pStoragePassword_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pStoragePassword_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pStoragePassword(fd, sd); + } + if( HPMHooks.count.HP_clif_pStoragePassword_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pStoragePassword_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCreateParty(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCreateParty_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCreateParty_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCreateParty(fd, sd); + } + if( HPMHooks.count.HP_clif_pCreateParty_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCreateParty_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCreateParty2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCreateParty2_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCreateParty2_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCreateParty2(fd, sd); + } + if( HPMHooks.count.HP_clif_pCreateParty2_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCreateParty2_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyInvite(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyInvite_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyInvite_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyInvite(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyInvite_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyInvite_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyInvite2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyInvite2_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyInvite2_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyInvite2(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyInvite2_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyInvite2_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pReplyPartyInvite(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pReplyPartyInvite_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReplyPartyInvite(fd, sd); + } + if( HPMHooks.count.HP_clif_pReplyPartyInvite_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pReplyPartyInvite2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pReplyPartyInvite2_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite2_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReplyPartyInvite2(fd, sd); + } + if( HPMHooks.count.HP_clif_pReplyPartyInvite2_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite2_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pLeaveParty(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pLeaveParty_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pLeaveParty_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pLeaveParty(fd, sd); + } + if( HPMHooks.count.HP_clif_pLeaveParty_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pLeaveParty_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRemovePartyMember(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRemovePartyMember_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRemovePartyMember_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRemovePartyMember(fd, sd); + } + if( HPMHooks.count.HP_clif_pRemovePartyMember_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRemovePartyMember_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyChangeOption(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyChangeOption_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyChangeOption_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyChangeOption(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyChangeOption_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyChangeOption_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyMessage(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyMessage_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyMessage_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyMessage(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyMessage_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyMessage_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyChangeLeader(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyChangeLeader_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyChangeLeader_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyChangeLeader(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyChangeLeader_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyChangeLeader_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingRegisterReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingRegisterReq_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingRegisterReq(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingRegisterReq_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingSearchReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingSearchReq_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingSearchReq(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingSearchReq_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingSearchReq_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingDeleteReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingDeleteReq_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingDeleteReq(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingDeleteReq_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingUpdateReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingUpdateReq_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingUpdateReq(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingUpdateReq_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCloseVending(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCloseVending_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCloseVending_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCloseVending(fd, sd); + } + if( HPMHooks.count.HP_clif_pCloseVending_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCloseVending_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pVendingListReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pVendingListReq_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pVendingListReq_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pVendingListReq(fd, sd); + } + if( HPMHooks.count.HP_clif_pVendingListReq_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pVendingListReq_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPurchaseReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPurchaseReq_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPurchaseReq_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPurchaseReq(fd, sd); + } + if( HPMHooks.count.HP_clif_pPurchaseReq_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPurchaseReq_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPurchaseReq2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPurchaseReq2_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPurchaseReq2_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPurchaseReq2(fd, sd); + } + if( HPMHooks.count.HP_clif_pPurchaseReq2_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPurchaseReq2_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pOpenVending(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pOpenVending_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pOpenVending_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pOpenVending(fd, sd); + } + if( HPMHooks.count.HP_clif_pOpenVending_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pOpenVending_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCreateGuild(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCreateGuild_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCreateGuild_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCreateGuild(fd, sd); + } + if( HPMHooks.count.HP_clif_pCreateGuild_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCreateGuild_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildCheckMaster(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildCheckMaster_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildCheckMaster_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildCheckMaster(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildCheckMaster_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildCheckMaster_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildRequestInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildRequestInfo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildRequestInfo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildRequestInfo(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildRequestInfo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildRequestInfo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildChangePositionInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildChangePositionInfo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildChangePositionInfo(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildChangePositionInfo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildChangePositionInfo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildChangeMemberPosition(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildChangeMemberPosition_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildChangeMemberPosition(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildChangeMemberPosition_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildRequestEmblem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildRequestEmblem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildRequestEmblem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildRequestEmblem(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildRequestEmblem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildRequestEmblem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildChangeEmblem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildChangeEmblem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildChangeEmblem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildChangeEmblem(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildChangeEmblem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildChangeEmblem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildChangeNotice(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildChangeNotice_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildChangeNotice_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildChangeNotice(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildChangeNotice_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildChangeNotice_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildInvite(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildInvite_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildInvite_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildInvite(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildInvite_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildInvite_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildReplyInvite(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildReplyInvite_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildReplyInvite_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildReplyInvite(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildReplyInvite_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildReplyInvite_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildLeave(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildLeave_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildLeave_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildLeave(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildLeave_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildLeave_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildExpulsion(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildExpulsion_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildExpulsion_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildExpulsion(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildExpulsion_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildExpulsion_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildMessage(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildMessage_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildMessage_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildMessage(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildMessage_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildMessage_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildRequestAlliance(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildRequestAlliance_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildRequestAlliance_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildRequestAlliance(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildRequestAlliance_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildRequestAlliance_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildReplyAlliance(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildReplyAlliance_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildReplyAlliance_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildReplyAlliance(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildReplyAlliance_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildReplyAlliance_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildDelAlliance(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildDelAlliance_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildDelAlliance_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildDelAlliance(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildDelAlliance_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildDelAlliance_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildOpposition(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildOpposition_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildOpposition_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildOpposition(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildOpposition_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildOpposition_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildBreak(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildBreak_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildBreak_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildBreak(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildBreak_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildBreak_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPetMenu(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPetMenu_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPetMenu_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPetMenu(fd, sd); + } + if( HPMHooks.count.HP_clif_pPetMenu_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPetMenu_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCatchPet(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCatchPet_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCatchPet_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCatchPet(fd, sd); + } + if( HPMHooks.count.HP_clif_pCatchPet_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCatchPet_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSelectEgg(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSelectEgg_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSelectEgg_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSelectEgg(fd, sd); + } + if( HPMHooks.count.HP_clif_pSelectEgg_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSelectEgg_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSendEmotion(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSendEmotion_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSendEmotion_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSendEmotion(fd, sd); + } + if( HPMHooks.count.HP_clif_pSendEmotion_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSendEmotion_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pChangePetName(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pChangePetName_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pChangePetName_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChangePetName(fd, sd); + } + if( HPMHooks.count.HP_clif_pChangePetName_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pChangePetName_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMKick(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMKick_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMKick_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMKick(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMKick_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMKick_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMKickAll(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMKickAll_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMKickAll_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMKickAll(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMKickAll_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMKickAll_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMShift(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMShift_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMShift_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMShift(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMShift_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMShift_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMRemove2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMRemove2_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMRemove2_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMRemove2(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMRemove2_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMRemove2_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMRecall(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMRecall_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMRecall_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMRecall(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMRecall_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMRecall_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMRecall2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMRecall2_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMRecall2_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMRecall2(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMRecall2_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMRecall2_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGM_Monster_Item(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGM_Monster_Item_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGM_Monster_Item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGM_Monster_Item_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGM_Monster_Item(fd, sd); + } + if( HPMHooks.count.HP_clif_pGM_Monster_Item_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGM_Monster_Item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGM_Monster_Item_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMHide(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMHide_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMHide_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMHide(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMHide_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMHide_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMReqNoChat(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMReqNoChat_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMReqNoChat_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMReqNoChat(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMReqNoChat_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMReqNoChat_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMRc(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMRc_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMRc_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMRc(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMRc_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMRc_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMReqAccountName(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMReqAccountName_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMReqAccountName_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMReqAccountName(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMReqAccountName_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMReqAccountName_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMChangeMapType_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMChangeMapType_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMChangeMapType(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMChangeMapType_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMChangeMapType_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPMIgnore_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPMIgnore_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPMIgnore(fd, sd); + } + if( HPMHooks.count.HP_clif_pPMIgnore_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPMIgnore_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPMIgnoreAll(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPMIgnoreAll_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPMIgnoreAll_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPMIgnoreAll(fd, sd); + } + if( HPMHooks.count.HP_clif_pPMIgnoreAll_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPMIgnoreAll_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPMIgnoreList(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPMIgnoreList_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPMIgnoreList_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPMIgnoreList(fd, sd); + } + if( HPMHooks.count.HP_clif_pPMIgnoreList_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPMIgnoreList_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNoviceDoriDori(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNoviceDoriDori_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNoviceDoriDori_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNoviceDoriDori(fd, sd); + } + if( HPMHooks.count.HP_clif_pNoviceDoriDori_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNoviceDoriDori_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pNoviceExplosionSpirits(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pNoviceExplosionSpirits_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNoviceExplosionSpirits(fd, sd); + } + if( HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pNoviceExplosionSpirits_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pFriendsListAdd(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pFriendsListAdd_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pFriendsListAdd_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pFriendsListAdd(fd, sd); + } + if( HPMHooks.count.HP_clif_pFriendsListAdd_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pFriendsListAdd_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pFriendsListReply(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pFriendsListReply_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pFriendsListReply_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pFriendsListReply(fd, sd); + } + if( HPMHooks.count.HP_clif_pFriendsListReply_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pFriendsListReply_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pFriendsListRemove(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pFriendsListRemove_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pFriendsListRemove_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pFriendsListRemove(fd, sd); + } + if( HPMHooks.count.HP_clif_pFriendsListRemove_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pFriendsListRemove_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPVPInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPVPInfo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPVPInfo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPVPInfo(fd, sd); + } + if( HPMHooks.count.HP_clif_pPVPInfo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPVPInfo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pBlacksmith(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pBlacksmith_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pBlacksmith_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pBlacksmith(fd, sd); + } + if( HPMHooks.count.HP_clif_pBlacksmith_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pBlacksmith_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAlchemist(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAlchemist_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAlchemist_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAlchemist(fd, sd); + } + if( HPMHooks.count.HP_clif_pAlchemist_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAlchemist_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pTaekwon(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pTaekwon_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pTaekwon_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pTaekwon(fd, sd); + } + if( HPMHooks.count.HP_clif_pTaekwon_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pTaekwon_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRankingPk(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRankingPk_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRankingPk_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRankingPk(fd, sd); + } + if( HPMHooks.count.HP_clif_pRankingPk_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRankingPk_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pFeelSaveOk(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pFeelSaveOk_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pFeelSaveOk_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pFeelSaveOk(fd, sd); + } + if( HPMHooks.count.HP_clif_pFeelSaveOk_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pFeelSaveOk_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pChangeHomunculusName(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pChangeHomunculusName_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pChangeHomunculusName_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChangeHomunculusName(fd, sd); + } + if( HPMHooks.count.HP_clif_pChangeHomunculusName_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pChangeHomunculusName_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pHomMoveToMaster(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pHomMoveToMaster_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pHomMoveToMaster_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHomMoveToMaster(fd, sd); + } + if( HPMHooks.count.HP_clif_pHomMoveToMaster_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pHomMoveToMaster_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pHomMoveTo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pHomMoveTo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pHomMoveTo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHomMoveTo(fd, sd); + } + if( HPMHooks.count.HP_clif_pHomMoveTo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pHomMoveTo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pHomAttack(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pHomAttack_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pHomAttack_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHomAttack(fd, sd); + } + if( HPMHooks.count.HP_clif_pHomAttack_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pHomAttack_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pHomMenu(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pHomMenu_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pHomMenu_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHomMenu(fd, sd); + } + if( HPMHooks.count.HP_clif_pHomMenu_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pHomMenu_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAutoRevive(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAutoRevive_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAutoRevive_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAutoRevive(fd, sd); + } + if( HPMHooks.count.HP_clif_pAutoRevive_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAutoRevive_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCheck(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCheck_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCheck_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCheck(fd, sd); + } + if( HPMHooks.count.HP_clif_pCheck_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCheck_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMail_refreshinbox(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMail_refreshinbox_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_refreshinbox_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMail_refreshinbox_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMail_refreshinbox(fd, sd); + } + if( HPMHooks.count.HP_clif_pMail_refreshinbox_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_refreshinbox_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMail_refreshinbox_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMail_read(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMail_read_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMail_read_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMail_read(fd, sd); + } + if( HPMHooks.count.HP_clif_pMail_read_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMail_read_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMail_getattach(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMail_getattach_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_getattach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMail_getattach_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMail_getattach(fd, sd); + } + if( HPMHooks.count.HP_clif_pMail_getattach_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_getattach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMail_getattach_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMail_delete(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMail_delete_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMail_delete_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMail_delete(fd, sd); + } + if( HPMHooks.count.HP_clif_pMail_delete_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMail_delete_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMail_return(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMail_return_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_return_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMail_return_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMail_return(fd, sd); + } + if( HPMHooks.count.HP_clif_pMail_return_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_return_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMail_return_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMail_setattach(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMail_setattach_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_setattach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMail_setattach_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMail_setattach(fd, sd); + } + if( HPMHooks.count.HP_clif_pMail_setattach_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_setattach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMail_setattach_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMail_winopen(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMail_winopen_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_winopen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMail_winopen_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMail_winopen(fd, sd); + } + if( HPMHooks.count.HP_clif_pMail_winopen_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_winopen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMail_winopen_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMail_send(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMail_send_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMail_send_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMail_send(fd, sd); + } + if( HPMHooks.count.HP_clif_pMail_send_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMail_send_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAuction_cancelreg(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAuction_cancelreg_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancelreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAuction_cancelreg_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAuction_cancelreg(fd, sd); + } + if( HPMHooks.count.HP_clif_pAuction_cancelreg_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancelreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAuction_cancelreg_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAuction_setitem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAuction_setitem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_setitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAuction_setitem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAuction_setitem(fd, sd); + } + if( HPMHooks.count.HP_clif_pAuction_setitem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_setitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAuction_setitem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAuction_register(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAuction_register_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_register_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAuction_register_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAuction_register(fd, sd); + } + if( HPMHooks.count.HP_clif_pAuction_register_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_register_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAuction_register_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAuction_cancel(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAuction_cancel_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAuction_cancel_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAuction_cancel(fd, sd); + } + if( HPMHooks.count.HP_clif_pAuction_cancel_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAuction_cancel_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAuction_close(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAuction_close_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAuction_close_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAuction_close(fd, sd); + } + if( HPMHooks.count.HP_clif_pAuction_close_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAuction_close_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAuction_bid(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAuction_bid_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_bid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAuction_bid_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAuction_bid(fd, sd); + } + if( HPMHooks.count.HP_clif_pAuction_bid_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_bid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAuction_bid_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAuction_search(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAuction_search_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAuction_search_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAuction_search(fd, sd); + } + if( HPMHooks.count.HP_clif_pAuction_search_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAuction_search_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAuction_buysell(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAuction_buysell_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_buysell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAuction_buysell_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAuction_buysell(fd, sd); + } + if( HPMHooks.count.HP_clif_pAuction_buysell_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_buysell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAuction_buysell_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pcashshop_buy(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pcashshop_buy_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcashshop_buy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pcashshop_buy_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pcashshop_buy(fd, sd); + } + if( HPMHooks.count.HP_clif_pcashshop_buy_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcashshop_buy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pcashshop_buy_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAdopt_request(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAdopt_request_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_request_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAdopt_request_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAdopt_request(fd, sd); + } + if( HPMHooks.count.HP_clif_pAdopt_request_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_request_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAdopt_request_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pAdopt_reply(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pAdopt_reply_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_reply_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pAdopt_reply_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAdopt_reply(fd, sd); + } + if( HPMHooks.count.HP_clif_pAdopt_reply_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_reply_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pAdopt_reply_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pViewPlayerEquip(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pViewPlayerEquip_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pViewPlayerEquip_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pViewPlayerEquip(fd, sd); + } + if( HPMHooks.count.HP_clif_pViewPlayerEquip_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pViewPlayerEquip_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pEquipTick(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pEquipTick_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pEquipTick_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pEquipTick(fd, sd); + } + if( HPMHooks.count.HP_clif_pEquipTick_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pEquipTick_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pquestStateAck(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pquestStateAck_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pquestStateAck_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pquestStateAck(fd, sd); + } + if( HPMHooks.count.HP_clif_pquestStateAck_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pquestStateAck_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pmercenary_action(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pmercenary_action_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pmercenary_action_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pmercenary_action_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pmercenary_action(fd, sd); + } + if( HPMHooks.count.HP_clif_pmercenary_action_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pmercenary_action_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pmercenary_action_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pBattleChat(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pBattleChat_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pBattleChat_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pBattleChat(fd, sd); + } + if( HPMHooks.count.HP_clif_pBattleChat_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pBattleChat_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pLessEffect(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pLessEffect_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pLessEffect_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pLessEffect(fd, sd); + } + if( HPMHooks.count.HP_clif_pLessEffect_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pLessEffect_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pItemListWindowSelected(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pItemListWindowSelected_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pItemListWindowSelected_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pItemListWindowSelected(fd, sd); + } + if( HPMHooks.count.HP_clif_pItemListWindowSelected_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pItemListWindowSelected_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pReqOpenBuyingStore(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pReqOpenBuyingStore_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqOpenBuyingStore(fd, sd); + } + if( HPMHooks.count.HP_clif_pReqOpenBuyingStore_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pReqOpenBuyingStore_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pReqCloseBuyingStore(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pReqCloseBuyingStore_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqCloseBuyingStore(fd, sd); + } + if( HPMHooks.count.HP_clif_pReqCloseBuyingStore_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pReqCloseBuyingStore_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pReqClickBuyingStore(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pReqClickBuyingStore_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pReqClickBuyingStore_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqClickBuyingStore(fd, sd); + } + if( HPMHooks.count.HP_clif_pReqClickBuyingStore_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pReqClickBuyingStore_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pReqTradeBuyingStore(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pReqTradeBuyingStore_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqTradeBuyingStore(fd, sd); + } + if( HPMHooks.count.HP_clif_pReqTradeBuyingStore_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pReqTradeBuyingStore_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSearchStoreInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSearchStoreInfo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSearchStoreInfo(fd, sd); + } + if( HPMHooks.count.HP_clif_pSearchStoreInfo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSearchStoreInfoNextPage(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoNextPage_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSearchStoreInfoNextPage(fd, sd); + } + if( HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoNextPage_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCloseSearchStoreInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCloseSearchStoreInfo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCloseSearchStoreInfo(fd, sd); + } + if( HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCloseSearchStoreInfo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSearchStoreInfoListItemClick(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoListItemClick_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSearchStoreInfoListItemClick(fd, sd); + } + if( HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoListItemClick_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pDebug(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pDebug_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pDebug_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pDebug(fd, sd); + } + if( HPMHooks.count.HP_clif_pDebug_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pDebug_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pSkillSelectMenu(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSkillSelectMenu_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSkillSelectMenu_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSkillSelectMenu(fd, sd); + } + if( HPMHooks.count.HP_clif_pSkillSelectMenu_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSkillSelectMenu_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pMoveItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pMoveItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pMoveItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMoveItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pMoveItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pMoveItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pDull(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pDull_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pDull_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pDull(fd, sd); + } + if( HPMHooks.count.HP_clif_pDull_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pDull_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pBGQueueRegister(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pBGQueueRegister_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pBGQueueRegister_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pBGQueueRegister(fd, sd); + } + if( HPMHooks.count.HP_clif_pBGQueueRegister_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pBGQueueRegister_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pBGQueueCheckState(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pBGQueueCheckState_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pBGQueueCheckState_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pBGQueueCheckState(fd, sd); + } + if( HPMHooks.count.HP_clif_pBGQueueCheckState_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pBGQueueCheckState_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pBGQueueRevokeReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pBGQueueRevokeReq_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pBGQueueRevokeReq(fd, sd); + } + if( HPMHooks.count.HP_clif_pBGQueueRevokeReq_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pBGQueueRevokeReq_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pBGQueueBattleBeginAck_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pBGQueueBattleBeginAck(fd, sd); + } + if( HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pBGQueueBattleBeginAck_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCashShopOpen_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopOpen(fd, sd); + } + if( HPMHooks.count.HP_clif_pCashShopOpen_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCashShopClose(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCashShopClose_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopClose_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopClose(fd, sd); + } + if( HPMHooks.count.HP_clif_pCashShopClose_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopClose_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCashShopReqTab(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCashShopReqTab_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopReqTab_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopReqTab(fd, sd); + } + if( HPMHooks.count.HP_clif_pCashShopReqTab_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopReqTab_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCashShopSchedule(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCashShopSchedule_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopSchedule_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopSchedule(fd, sd); + } + if( HPMHooks.count.HP_clif_pCashShopSchedule_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopSchedule_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pCashShopBuy(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pCashShopBuy_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopBuy_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopBuy(fd, sd); + } + if( HPMHooks.count.HP_clif_pCashShopBuy_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopBuy_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyTick(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyTick_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyTick_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyTick(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyTick_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyTick_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGuildInvite2_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGuildInvite2_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildInvite2(fd, sd); + } + if( HPMHooks.count.HP_clif_pGuildInvite2_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGuildInvite2_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingAddFilter_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingAddFilter(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingAddFilter_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingAddFilter_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingSubFilter(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingSubFilter_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingSubFilter(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingSubFilter_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingSubFilter_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingReqVolunteer(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingReqVolunteer_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingReqVolunteer(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingReqVolunteer_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingRefuseVolunteer_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingRefuseVolunteer(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingRefuseVolunteer_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pPartyBookingCancelVolunteer(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pPartyBookingCancelVolunteer_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPartyBookingCancelVolunteer(fd, sd); + } + if( HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pPartyBookingCancelVolunteer_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +/* duel */ +int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_duel_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const unsigned int *maxpl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, &maxpl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.duel.create(sd, maxpl); + } + if( HPMHooks.count.HP_duel_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const unsigned int *maxpl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &maxpl); + } + } + return retVal___; +} +void HP_duel_invite(const unsigned int did, struct map_session_data *sd, struct map_session_data *target_sd) { + int hIndex = 0; + if( HPMHooks.count.HP_duel_invite_pre ) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd, struct map_session_data *target_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_invite_pre[hIndex].func; + preHookFunc(&did, sd, target_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.duel.invite(did, sd, target_sd); + } + if( HPMHooks.count.HP_duel_invite_post ) { + void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd, struct map_session_data *target_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_invite_post[hIndex].func; + postHookFunc(&did, sd, target_sd); + } + } + return; +} +void HP_duel_accept(const unsigned int did, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_duel_accept_pre ) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_accept_pre[hIndex].func; + preHookFunc(&did, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.duel.accept(did, sd); + } + if( HPMHooks.count.HP_duel_accept_post ) { + void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_accept_post[hIndex].func; + postHookFunc(&did, sd); + } + } + return; +} +void HP_duel_reject(const unsigned int did, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_duel_reject_pre ) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_reject_pre[hIndex].func; + preHookFunc(&did, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.duel.reject(did, sd); + } + if( HPMHooks.count.HP_duel_reject_post ) { + void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_reject_post[hIndex].func; + postHookFunc(&did, sd); + } + } + return; +} +void HP_duel_leave(const unsigned int did, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_duel_leave_pre ) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_leave_pre[hIndex].func; + preHookFunc(&did, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.duel.leave(did, sd); + } + if( HPMHooks.count.HP_duel_leave_post ) { + void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_leave_post[hIndex].func; + postHookFunc(&did, sd); + } + } + return; +} +void HP_duel_showinfo(const unsigned int did, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_duel_showinfo_pre ) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_showinfo_pre[hIndex].func; + preHookFunc(&did, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.duel.showinfo(did, sd); + } + if( HPMHooks.count.HP_duel_showinfo_post ) { + void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_showinfo_post[hIndex].func; + postHookFunc(&did, sd); + } + } + return; +} +int HP_duel_checktime(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_duel_checktime_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_checktime_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.duel.checktime(sd); + } + if( HPMHooks.count.HP_duel_checktime_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_checktime_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_duel_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_duel_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.duel.init(); + } + if( HPMHooks.count.HP_duel_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_duel_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_duel_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_duel_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.duel.final(); + } + if( HPMHooks.count.HP_duel_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_duel_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* elemental */ +int HP_elemental_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.init(); + } + if( HPMHooks.count.HP_elemental_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_elemental_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_elemental_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.elemental.final(); + } + if( HPMHooks.count.HP_elemental_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_elemental_class(int class_) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_elemental_class_pre ) { + bool (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_class_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.class(class_); + } + if( HPMHooks.count.HP_elemental_class_post ) { + bool (*postHookFunc) (bool retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +struct view_data* HP_elemental_get_viewdata(int class_) { + int hIndex = 0; + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_elemental_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.get_viewdata(class_); + } + if( HPMHooks.count.HP_elemental_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int lifetime) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, &class_, &lifetime); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.create(sd, class_, lifetime); + } + if( HPMHooks.count.HP_elemental_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *class_, unsigned int *lifetime); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &class_, &lifetime); + } + } + return retVal___; +} +int HP_elemental_data_received(struct s_elemental *ele, bool flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_data_received_pre ) { + int (*preHookFunc) (struct s_elemental *ele, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_data_received_pre[hIndex].func; + retVal___ = preHookFunc(ele, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.data_received(ele, flag); + } + if( HPMHooks.count.HP_elemental_data_received_post ) { + int (*postHookFunc) (int retVal___, struct s_elemental *ele, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_data_received_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ele, &flag); + } + } + return retVal___; +} +int HP_elemental_save(struct elemental_data *ed) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_save_pre ) { + int (*preHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_save_pre[hIndex].func; + retVal___ = preHookFunc(ed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.save(ed); + } + if( HPMHooks.count.HP_elemental_save_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed); + } + } + return retVal___; +} +int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_change_mode_ack_pre ) { + int (*preHookFunc) (struct elemental_data *ed, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_change_mode_ack_pre[hIndex].func; + retVal___ = preHookFunc(ed, &mode); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.change_mode_ack(ed, mode); + } + if( HPMHooks.count.HP_elemental_change_mode_ack_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_change_mode_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed, &mode); + } + } + return retVal___; +} +int HP_elemental_change_mode(struct elemental_data *ed, int mode) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_change_mode_pre ) { + int (*preHookFunc) (struct elemental_data *ed, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_change_mode_pre[hIndex].func; + retVal___ = preHookFunc(ed, &mode); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.change_mode(ed, mode); + } + if( HPMHooks.count.HP_elemental_change_mode_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_change_mode_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed, &mode); + } + } + return retVal___; +} +void HP_elemental_heal(struct elemental_data *ed, int hp, int sp) { + int hIndex = 0; + if( HPMHooks.count.HP_elemental_heal_pre ) { + void (*preHookFunc) (struct elemental_data *ed, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_heal_pre[hIndex].func; + preHookFunc(ed, &hp, &sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.elemental.heal(ed, hp, sp); + } + if( HPMHooks.count.HP_elemental_heal_post ) { + void (*postHookFunc) (struct elemental_data *ed, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_heal_post[hIndex].func; + postHookFunc(ed, &hp, &sp); + } + } + return; +} +int HP_elemental_dead(struct elemental_data *ed) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_dead_pre ) { + int (*preHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_dead_pre[hIndex].func; + retVal___ = preHookFunc(ed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.dead(ed); + } + if( HPMHooks.count.HP_elemental_dead_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_dead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed); + } + } + return retVal___; +} +int HP_elemental_delete(struct elemental_data *ed, int reply) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_delete_pre ) { + int (*preHookFunc) (struct elemental_data *ed, int *reply); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_delete_pre[hIndex].func; + retVal___ = preHookFunc(ed, &reply); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.delete(ed, reply); + } + if( HPMHooks.count.HP_elemental_delete_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, int *reply); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed, &reply); + } + } + return retVal___; +} +void HP_elemental_summon_stop(struct elemental_data *ed) { + int hIndex = 0; + if( HPMHooks.count.HP_elemental_summon_stop_pre ) { + void (*preHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_summon_stop_pre[hIndex].func; + preHookFunc(ed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.elemental.summon_stop(ed); + } + if( HPMHooks.count.HP_elemental_summon_stop_post ) { + void (*postHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_summon_stop_post[hIndex].func; + postHookFunc(ed); + } + } + return; +} +int HP_elemental_get_lifetime(struct elemental_data *ed) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_get_lifetime_pre ) { + int (*preHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_get_lifetime_pre[hIndex].func; + retVal___ = preHookFunc(ed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.get_lifetime(ed); + } + if( HPMHooks.count.HP_elemental_get_lifetime_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_get_lifetime_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed); + } + } + return retVal___; +} +int HP_elemental_unlocktarget(struct elemental_data *ed) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_unlocktarget_pre ) { + int (*preHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_unlocktarget_pre[hIndex].func; + retVal___ = preHookFunc(ed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.unlocktarget(ed); + } + if( HPMHooks.count.HP_elemental_unlocktarget_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_unlocktarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed); + } + } + return retVal___; +} +int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_skillnotok_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skillnotok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_skillnotok_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, ed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.skillnotok(skill_id, ed); + } + if( HPMHooks.count.HP_elemental_skillnotok_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skillnotok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_skillnotok_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, ed); + } + } + return retVal___; +} +int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_set_target_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_set_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_set_target_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.set_target(sd, bl); + } + if( HPMHooks.count.HP_elemental_set_target_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_set_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_set_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl); + } + } + return retVal___; +} +int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_clean_single_effect_pre ) { + int (*preHookFunc) (struct elemental_data *ed, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_single_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_clean_single_effect_pre[hIndex].func; + retVal___ = preHookFunc(ed, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.clean_single_effect(ed, skill_id); + } + if( HPMHooks.count.HP_elemental_clean_single_effect_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_single_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_clean_single_effect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed, &skill_id); + } + } + return retVal___; +} +int HP_elemental_clean_effect(struct elemental_data *ed) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_clean_effect_pre ) { + int (*preHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_clean_effect_pre[hIndex].func; + retVal___ = preHookFunc(ed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.clean_effect(ed); + } + if( HPMHooks.count.HP_elemental_clean_effect_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_clean_effect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed); + } + } + return retVal___; +} +int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_action_pre ) { + int (*preHookFunc) (struct elemental_data *ed, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_action_pre[hIndex].func; + retVal___ = preHookFunc(ed, bl, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.action(ed, bl, tick); + } + if( HPMHooks.count.HP_elemental_action_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_action_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed, bl, &tick); + } + } + return retVal___; +} +struct skill_condition HP_elemental_skill_get_requirements(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + struct skill_condition retVal___; + memset(&retVal___, '\0', sizeof(struct skill_condition)); + if( HPMHooks.count.HP_elemental_skill_get_requirements_pre ) { + struct skill_condition (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skill_get_requirements_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_skill_get_requirements_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.skill_get_requirements(skill_id, skill_lv); + } + if( HPMHooks.count.HP_elemental_skill_get_requirements_post ) { + struct skill_condition (*postHookFunc) (struct skill_condition retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skill_get_requirements_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_skill_get_requirements_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_elemental_read_skilldb(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_read_skilldb_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_read_skilldb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.read_skilldb(); + } + if( HPMHooks.count.HP_elemental_read_skilldb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_read_skilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_elemental_reload_db(void) { + int hIndex = 0; + if( HPMHooks.count.HP_elemental_reload_db_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_reload_db_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.elemental.reload_db(); + } + if( HPMHooks.count.HP_elemental_reload_db_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_reload_db_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_elemental_reload_skilldb(void) { + int hIndex = 0; + if( HPMHooks.count.HP_elemental_reload_skilldb_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_reload_skilldb_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.elemental.reload_skilldb(); + } + if( HPMHooks.count.HP_elemental_reload_skilldb_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_reload_skilldb_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_elemental_search_index(int class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_search_index_pre ) { + int (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_search_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_search_index_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.search_index(class_); + } + if( HPMHooks.count.HP_elemental_search_index_post ) { + int (*postHookFunc) (int retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_search_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_search_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +void HP_elemental_summon_init(struct elemental_data *ed) { + int hIndex = 0; + if( HPMHooks.count.HP_elemental_summon_init_pre ) { + void (*preHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_summon_init_pre[hIndex].func; + preHookFunc(ed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.elemental.summon_init(ed); + } + if( HPMHooks.count.HP_elemental_summon_init_post ) { + void (*postHookFunc) (struct elemental_data *ed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_summon_init_post[hIndex].func; + postHookFunc(ed); + } + } + return; +} +int HP_elemental_summon_end_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_summon_end_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_summon_end_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.summon_end_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_elemental_summon_end_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_summon_end_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_activesearch_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.elemental.ai_sub_timer_activesearch(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_activesearch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_ai_sub_timer_pre ) { + int (*preHookFunc) (struct elemental_data *ed, struct map_session_data *sd, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_pre[hIndex].func; + retVal___ = preHookFunc(ed, sd, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.ai_sub_timer(ed, sd, tick); + } + if( HPMHooks.count.HP_elemental_ai_sub_timer_post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct map_session_data *sd, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed, sd, &tick); + } + } + return retVal___; +} +int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_elemental_ai_sub_foreachclient_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.elemental.ai_sub_foreachclient(sd, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_foreachclient_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_elemental_ai_sub_foreachclient_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_ai_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_ai_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.ai_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_elemental_ai_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_ai_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_elemental_read_db(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_elemental_read_db_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_elemental_read_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.elemental.read_db(); + } + if( HPMHooks.count.HP_elemental_read_db_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_elemental_read_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +/* guild */ +void HP_guild_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.init(); + } + if( HPMHooks.count.HP_guild_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_guild_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.final(); + } + if( HPMHooks.count.HP_guild_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_guild_skill_get_max(int id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_skill_get_max_pre ) { + int (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skill_get_max_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_skill_get_max_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.skill_get_max(id); + } + if( HPMHooks.count.HP_guild_skill_get_max_post ) { + int (*postHookFunc) (int retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skill_get_max_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_skill_get_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +int HP_guild_checkskill(struct guild *g, int id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_checkskill_pre ) { + int (*preHookFunc) (struct guild *g, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_checkskill_pre[hIndex].func; + retVal___ = preHookFunc(g, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.checkskill(g, id); + } + if( HPMHooks.count.HP_guild_checkskill_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_checkskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &id); + } + } + return retVal___; +} +int HP_guild_check_skill_require(struct guild *g, int id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_check_skill_require_pre ) { + int (*preHookFunc) (struct guild *g, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_skill_require_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_check_skill_require_pre[hIndex].func; + retVal___ = preHookFunc(g, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.check_skill_require(g, id); + } + if( HPMHooks.count.HP_guild_check_skill_require_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_skill_require_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_check_skill_require_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &id); + } + } + return retVal___; +} +int HP_guild_checkcastles(struct guild *g) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_checkcastles_pre ) { + int (*preHookFunc) (struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_checkcastles_pre[hIndex].func; + retVal___ = preHookFunc(g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.checkcastles(g); + } + if( HPMHooks.count.HP_guild_checkcastles_post ) { + int (*postHookFunc) (int retVal___, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_checkcastles_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g); + } + } + return retVal___; +} +bool HP_guild_isallied(int guild_id, int guild_id2) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_guild_isallied_pre ) { + bool (*preHookFunc) (int *guild_id, int *guild_id2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_isallied_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_isallied_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &guild_id2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.isallied(guild_id, guild_id2); + } + if( HPMHooks.count.HP_guild_isallied_post ) { + bool (*postHookFunc) (bool retVal___, int *guild_id, int *guild_id2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_isallied_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_isallied_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &guild_id2); + } + } + return retVal___; +} +struct guild* HP_guild_search(int guild_id) { + int hIndex = 0; + struct guild* retVal___ = NULL; + if( HPMHooks.count.HP_guild_search_pre ) { + struct guild* (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_search_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.search(guild_id); + } + if( HPMHooks.count.HP_guild_search_post ) { + struct guild* (*postHookFunc) (struct guild* retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +struct guild* HP_guild_searchname(char *str) { + int hIndex = 0; + struct guild* retVal___ = NULL; + if( HPMHooks.count.HP_guild_searchname_pre ) { + struct guild* (*preHookFunc) (char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_searchname_pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.searchname(str); + } + if( HPMHooks.count.HP_guild_searchname_post ) { + struct guild* (*postHookFunc) (struct guild* retVal___, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_searchname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); + } + } + return retVal___; +} +struct guild_castle* HP_guild_castle_search(int gcid) { + int hIndex = 0; + struct guild_castle* retVal___ = NULL; + if( HPMHooks.count.HP_guild_castle_search_pre ) { + struct guild_castle* (*preHookFunc) (int *gcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_castle_search_pre[hIndex].func; + retVal___ = preHookFunc(&gcid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.castle_search(gcid); + } + if( HPMHooks.count.HP_guild_castle_search_post ) { + struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, int *gcid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_castle_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &gcid); + } + } + return retVal___; +} +struct guild_castle* HP_guild_mapname2gc(const char *mapname) { + int hIndex = 0; + struct guild_castle* retVal___ = NULL; + if( HPMHooks.count.HP_guild_mapname2gc_pre ) { + struct guild_castle* (*preHookFunc) (const char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_mapname2gc_pre[hIndex].func; + retVal___ = preHookFunc(mapname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.mapname2gc(mapname); + } + if( HPMHooks.count.HP_guild_mapname2gc_post ) { + struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, const char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_mapname2gc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname); + } + } + return retVal___; +} +struct guild_castle* HP_guild_mapindex2gc(short mapindex) { + int hIndex = 0; + struct guild_castle* retVal___ = NULL; + if( HPMHooks.count.HP_guild_mapindex2gc_pre ) { + struct guild_castle* (*preHookFunc) (short *mapindex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_mapindex2gc_pre[hIndex].func; + retVal___ = preHookFunc(&mapindex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.mapindex2gc(mapindex); + } + if( HPMHooks.count.HP_guild_mapindex2gc_post ) { + struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short *mapindex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_mapindex2gc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mapindex); + } + } + return retVal___; +} +struct map_session_data* HP_guild_getavailablesd(struct guild *g) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_guild_getavailablesd_pre ) { + struct map_session_data* (*preHookFunc) (struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_getavailablesd_pre[hIndex].func; + retVal___ = preHookFunc(g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.getavailablesd(g); + } + if( HPMHooks.count.HP_guild_getavailablesd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_getavailablesd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g); + } + } + return retVal___; +} +int HP_guild_getindex(struct guild *g, int account_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_getindex_pre ) { + int (*preHookFunc) (struct guild *g, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_getindex_pre[hIndex].func; + retVal___ = preHookFunc(g, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.getindex(g, account_id, char_id); + } + if( HPMHooks.count.HP_guild_getindex_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_getindex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &account_id, &char_id); + } + } + return retVal___; +} +int HP_guild_getposition(struct guild *g, struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_getposition_pre ) { + int (*preHookFunc) (struct guild *g, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_getposition_pre[hIndex].func; + retVal___ = preHookFunc(g, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.getposition(g, sd); + } + if( HPMHooks.count.HP_guild_getposition_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_getposition_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, sd); + } + } + return retVal___; +} +unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_guild_payexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd, unsigned int *exp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_payexp_pre[hIndex].func; + retVal___ = preHookFunc(sd, &exp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.payexp(sd, exp); + } + if( HPMHooks.count.HP_guild_payexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, unsigned int *exp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_payexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &exp); + } + } + return retVal___; +} +int HP_guild_getexp(struct map_session_data *sd, int exp) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_getexp_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *exp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_getexp_pre[hIndex].func; + retVal___ = preHookFunc(sd, &exp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.getexp(sd, exp); + } + if( HPMHooks.count.HP_guild_getexp_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *exp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_getexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &exp); + } + } + return retVal___; +} +int HP_guild_create(struct map_session_data *sd, const char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.create(sd, name); + } + if( HPMHooks.count.HP_guild_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); + } + } + return retVal___; +} +int HP_guild_created(int account_id, int guild_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_created_pre ) { + int (*preHookFunc) (int *account_id, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_created_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.created(account_id, guild_id); + } + if( HPMHooks.count.HP_guild_created_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_created_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &guild_id); + } + } + return retVal___; +} +int HP_guild_request_info(int guild_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_request_info_pre ) { + int (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_request_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_request_info_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.request_info(guild_id); + } + if( HPMHooks.count.HP_guild_request_info_post ) { + int (*postHookFunc) (int retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_request_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_request_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +int HP_guild_recv_noinfo(int guild_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_recv_noinfo_pre ) { + int (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_noinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_recv_noinfo_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.recv_noinfo(guild_id); + } + if( HPMHooks.count.HP_guild_recv_noinfo_post ) { + int (*postHookFunc) (int retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_noinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_recv_noinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +int HP_guild_recv_info(struct guild *sg) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_recv_info_pre ) { + int (*preHookFunc) (struct guild *sg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_recv_info_pre[hIndex].func; + retVal___ = preHookFunc(sg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.recv_info(sg); + } + if( HPMHooks.count.HP_guild_recv_info_post ) { + int (*postHookFunc) (int retVal___, struct guild *sg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_recv_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sg); + } + } + return retVal___; +} +int HP_guild_npc_request_info(int guild_id, const char *ev) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_npc_request_info_pre ) { + int (*preHookFunc) (int *guild_id, const char *ev); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_npc_request_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_npc_request_info_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, ev); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.npc_request_info(guild_id, ev); + } + if( HPMHooks.count.HP_guild_npc_request_info_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, const char *ev); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_npc_request_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_npc_request_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, ev); + } + } + return retVal___; +} +int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_invite_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_invite_pre[hIndex].func; + retVal___ = preHookFunc(sd, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.invite(sd, tsd); + } + if( HPMHooks.count.HP_guild_invite_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_invite_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, tsd); + } + } + return retVal___; +} +int HP_guild_reply_invite(struct map_session_data *sd, int guild_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_reply_invite_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_reply_invite_pre[hIndex].func; + retVal___ = preHookFunc(sd, &guild_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.reply_invite(sd, guild_id, flag); + } + if( HPMHooks.count.HP_guild_reply_invite_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_reply_invite_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &guild_id, &flag); + } + } + return retVal___; +} +void HP_guild_member_joined(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_member_joined_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_member_joined_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.member_joined(sd); + } + if( HPMHooks.count.HP_guild_member_joined_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_member_joined_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_member_added_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_added_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_member_added_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.member_added(guild_id, account_id, char_id, flag); + } + if( HPMHooks.count.HP_guild_member_added_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_added_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_member_added_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag); + } + } + return retVal___; +} +int HP_guild_leave(struct map_session_data *sd, int guild_id, int account_id, int char_id, const char *mes) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_leave_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_leave_pre[hIndex].func; + retVal___ = preHookFunc(sd, &guild_id, &account_id, &char_id, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.leave(sd, guild_id, account_id, char_id, mes); + } + if( HPMHooks.count.HP_guild_leave_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &guild_id, &account_id, &char_id, mes); + } + } + return retVal___; +} +int HP_guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_member_withdraw_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_withdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_member_withdraw_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, name, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.member_withdraw(guild_id, account_id, char_id, flag, name, mes); + } + if( HPMHooks.count.HP_guild_member_withdraw_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_withdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_member_withdraw_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag, name, mes); + } + } + return retVal___; +} +int HP_guild_expulsion(struct map_session_data *sd, int guild_id, int account_id, int char_id, const char *mes) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_expulsion_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expulsion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_expulsion_pre[hIndex].func; + retVal___ = preHookFunc(sd, &guild_id, &account_id, &char_id, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.expulsion(sd, guild_id, account_id, char_id, mes); + } + if( HPMHooks.count.HP_guild_expulsion_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expulsion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_expulsion_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &guild_id, &account_id, &char_id, mes); + } + } + return retVal___; +} +int HP_guild_skillup(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_skillup_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_skillup_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.skillup(sd, skill_id); + } + if( HPMHooks.count.HP_guild_skillup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_skillup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); + } + } + return retVal___; +} +void HP_guild_block_skill(struct map_session_data *sd, int time) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_block_skill_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_block_skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_block_skill_pre[hIndex].func; + preHookFunc(sd, &time); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.block_skill(sd, time); + } + if( HPMHooks.count.HP_guild_block_skill_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_block_skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_block_skill_post[hIndex].func; + postHookFunc(sd, &time); + } + } + return; +} +int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *tsd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_reqalliance_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reqalliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_reqalliance_pre[hIndex].func; + retVal___ = preHookFunc(sd, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.reqalliance(sd, tsd); + } + if( HPMHooks.count.HP_guild_reqalliance_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reqalliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_reqalliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, tsd); + } + } + return retVal___; +} +int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_reply_reqalliance_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_reqalliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_reply_reqalliance_pre[hIndex].func; + retVal___ = preHookFunc(sd, &account_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.reply_reqalliance(sd, account_id, flag); + } + if( HPMHooks.count.HP_guild_reply_reqalliance_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_reqalliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_reply_reqalliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &account_id, &flag); + } + } + return retVal___; +} +int HP_guild_allianceack(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag, const char *name1, const char *name2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_allianceack_pre ) { + int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_allianceack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_allianceack_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.allianceack(guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); + } + if( HPMHooks.count.HP_guild_allianceack_post ) { + int (*postHookFunc) (int retVal___, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_allianceack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_allianceack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2); + } + } + return retVal___; +} +int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_delalliance_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_delalliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_delalliance_pre[hIndex].func; + retVal___ = preHookFunc(sd, &guild_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.delalliance(sd, guild_id, flag); + } + if( HPMHooks.count.HP_guild_delalliance_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_delalliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_delalliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &guild_id, &flag); + } + } + return retVal___; +} +int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *tsd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_opposition_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_opposition_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_opposition_pre[hIndex].func; + retVal___ = preHookFunc(sd, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.opposition(sd, tsd); + } + if( HPMHooks.count.HP_guild_opposition_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_opposition_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_opposition_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, tsd); + } + } + return retVal___; +} +int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_check_alliance_pre ) { + int (*preHookFunc) (int *guild_id1, int *guild_id2, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_alliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_check_alliance_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id1, &guild_id2, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.check_alliance(guild_id1, guild_id2, flag); + } + if( HPMHooks.count.HP_guild_check_alliance_post ) { + int (*postHookFunc) (int retVal___, int *guild_id1, int *guild_id2, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_alliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_check_alliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &flag); + } + } + return retVal___; +} +int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_send_memberinfoshort_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *online); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_memberinfoshort_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_send_memberinfoshort_pre[hIndex].func; + retVal___ = preHookFunc(sd, &online); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.send_memberinfoshort(sd, online); + } + if( HPMHooks.count.HP_guild_send_memberinfoshort_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *online); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_memberinfoshort_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_send_memberinfoshort_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &online); + } + } + return retVal___; +} +int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_recv_memberinfoshort_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class_); + } + if( HPMHooks.count.HP_guild_recv_memberinfoshort_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &online, &lv, &class_); + } + } + return retVal___; +} +int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, short idx) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_change_memberposition_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_memberposition_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_change_memberposition_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.change_memberposition(guild_id, account_id, char_id, idx); + } + if( HPMHooks.count.HP_guild_change_memberposition_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, short *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_memberposition_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_change_memberposition_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &idx); + } + } + return retVal___; +} +int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_memberposition_changed_pre ) { + int (*preHookFunc) (struct guild *g, int *idx, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_memberposition_changed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_memberposition_changed_pre[hIndex].func; + retVal___ = preHookFunc(g, &idx, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.memberposition_changed(g, idx, pos); + } + if( HPMHooks.count.HP_guild_memberposition_changed_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *idx, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_memberposition_changed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_memberposition_changed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &idx, &pos); + } + } + return retVal___; +} +int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, const char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_change_position_pre ) { + int (*preHookFunc) (int *guild_id, int *idx, int *mode, int *exp_mode, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_position_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_change_position_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &idx, &mode, &exp_mode, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.change_position(guild_id, idx, mode, exp_mode, name); + } + if( HPMHooks.count.HP_guild_change_position_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *idx, int *mode, int *exp_mode, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_position_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_change_position_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &idx, &mode, &exp_mode, name); + } + } + return retVal___; +} +int HP_guild_position_changed(int guild_id, int idx, struct guild_position *p) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_position_changed_pre ) { + int (*preHookFunc) (int *guild_id, int *idx, struct guild_position *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_position_changed_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &idx, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.position_changed(guild_id, idx, p); + } + if( HPMHooks.count.HP_guild_position_changed_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *idx, struct guild_position *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_position_changed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &idx, p); + } + } + return retVal___; +} +int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char *mes1, const char *mes2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_change_notice_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *guild_id, const char *mes1, const char *mes2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_notice_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_change_notice_pre[hIndex].func; + retVal___ = preHookFunc(sd, &guild_id, mes1, mes2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.change_notice(sd, guild_id, mes1, mes2); + } + if( HPMHooks.count.HP_guild_change_notice_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, const char *mes1, const char *mes2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_notice_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_change_notice_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &guild_id, mes1, mes2); + } + } + return retVal___; +} +int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_notice_changed_pre ) { + int (*preHookFunc) (int *guild_id, const char *mes1, const char *mes2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_notice_changed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_notice_changed_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, mes1, mes2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.notice_changed(guild_id, mes1, mes2); + } + if( HPMHooks.count.HP_guild_notice_changed_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, const char *mes1, const char *mes2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_notice_changed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_notice_changed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, mes1, mes2); + } + } + return retVal___; +} +int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_change_emblem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *len, const char *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_emblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_change_emblem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &len, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.change_emblem(sd, len, data); + } + if( HPMHooks.count.HP_guild_change_emblem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *len, const char *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_emblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_change_emblem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &len, data); + } + } + return retVal___; +} +int HP_guild_emblem_changed(int len, int guild_id, int emblem_id, const char *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_emblem_changed_pre ) { + int (*preHookFunc) (int *len, int *guild_id, int *emblem_id, const char *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_emblem_changed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_emblem_changed_pre[hIndex].func; + retVal___ = preHookFunc(&len, &guild_id, &emblem_id, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.emblem_changed(len, guild_id, emblem_id, data); + } + if( HPMHooks.count.HP_guild_emblem_changed_post ) { + int (*postHookFunc) (int retVal___, int *len, int *guild_id, int *emblem_id, const char *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_emblem_changed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_emblem_changed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &len, &guild_id, &emblem_id, data); + } + } + return retVal___; +} +int HP_guild_send_message(struct map_session_data *sd, const char *mes, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_send_message_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_send_message_pre[hIndex].func; + retVal___ = preHookFunc(sd, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.send_message(sd, mes, len); + } + if( HPMHooks.count.HP_guild_send_message_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_send_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, mes, &len); + } + } + return retVal___; +} +int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_recv_message_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_recv_message_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.recv_message(guild_id, account_id, mes, len); + } + if( HPMHooks.count.HP_guild_recv_message_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_recv_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, mes, &len); + } + } + return retVal___; +} +int HP_guild_send_dot_remove(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_send_dot_remove_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_send_dot_remove_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.send_dot_remove(sd); + } + if( HPMHooks.count.HP_guild_send_dot_remove_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_send_dot_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_skillupack_pre ) { + int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillupack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_skillupack_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &skill_id, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.skillupack(guild_id, skill_id, account_id); + } + if( HPMHooks.count.HP_guild_skillupack_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, uint16 *skill_id, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillupack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_skillupack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &skill_id, &account_id); + } + } + return retVal___; +} +int HP_guild_dobreak(struct map_session_data *sd, char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_dobreak_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_dobreak_pre[hIndex].func; + retVal___ = preHookFunc(sd, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.dobreak(sd, name); + } + if( HPMHooks.count.HP_guild_dobreak_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_dobreak_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); + } + } + return retVal___; +} +int HP_guild_broken(int guild_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_broken_pre ) { + int (*preHookFunc) (int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_broken_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.broken(guild_id, flag); + } + if( HPMHooks.count.HP_guild_broken_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_broken_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &flag); + } + } + return retVal___; +} +int HP_guild_gm_change(int guild_id, struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_gm_change_pre ) { + int (*preHookFunc) (int *guild_id, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_gm_change_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.gm_change(guild_id, sd); + } + if( HPMHooks.count.HP_guild_gm_change_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_gm_change_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, sd); + } + } + return retVal___; +} +int HP_guild_gm_changed(int guild_id, int account_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_gm_changed_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_changed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_gm_changed_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.gm_changed(guild_id, account_id, char_id); + } + if( HPMHooks.count.HP_guild_gm_changed_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_changed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_gm_changed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id); + } + } + return retVal___; +} +void HP_guild_castle_map_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_castle_map_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_castle_map_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.castle_map_init(); + } + if( HPMHooks.count.HP_guild_castle_map_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_castle_map_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_guild_castledatasave(int castle_id, int index, int value) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_castledatasave_pre ) { + int (*preHookFunc) (int *castle_id, int *index, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledatasave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_castledatasave_pre[hIndex].func; + retVal___ = preHookFunc(&castle_id, &index, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.castledatasave(castle_id, index, value); + } + if( HPMHooks.count.HP_guild_castledatasave_post ) { + int (*postHookFunc) (int retVal___, int *castle_id, int *index, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledatasave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_castledatasave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &castle_id, &index, &value); + } + } + return retVal___; +} +int HP_guild_castledataloadack(int len, struct guild_castle *gc) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_castledataloadack_pre ) { + int (*preHookFunc) (int *len, struct guild_castle *gc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_castledataloadack_pre[hIndex].func; + retVal___ = preHookFunc(&len, gc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.castledataloadack(len, gc); + } + if( HPMHooks.count.HP_guild_castledataloadack_post ) { + int (*postHookFunc) (int retVal___, int *len, struct guild_castle *gc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_castledataloadack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &len, gc); + } + } + return retVal___; +} +void HP_guild_castle_reconnect(int castle_id, int index, int value) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_castle_reconnect_pre ) { + void (*preHookFunc) (int *castle_id, int *index, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_castle_reconnect_pre[hIndex].func; + preHookFunc(&castle_id, &index, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.castle_reconnect(castle_id, index, value); + } + if( HPMHooks.count.HP_guild_castle_reconnect_post ) { + void (*postHookFunc) (int *castle_id, int *index, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_castle_reconnect_post[hIndex].func; + postHookFunc(&castle_id, &index, &value); + } + } + return; +} +void HP_guild_agit_start(void) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_agit_start_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_agit_start_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.agit_start(); + } + if( HPMHooks.count.HP_guild_agit_start_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_agit_start_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_guild_agit_end(void) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_agit_end_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_agit_end_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.agit_end(); + } + if( HPMHooks.count.HP_guild_agit_end_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_agit_end_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_guild_agit2_start(void) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_agit2_start_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_agit2_start_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.agit2_start(); + } + if( HPMHooks.count.HP_guild_agit2_start_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_agit2_start_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_guild_agit2_end(void) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_agit2_end_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_agit2_end_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.agit2_end(); + } + if( HPMHooks.count.HP_guild_agit2_end_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_agit2_end_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_guild_flag_add(struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_flag_add_pre ) { + void (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_flag_add_pre[hIndex].func; + preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.flag_add(nd); + } + if( HPMHooks.count.HP_guild_flag_add_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_flag_add_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +void HP_guild_flag_remove(struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_flag_remove_pre ) { + void (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_flag_remove_pre[hIndex].func; + preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.flag_remove(nd); + } + if( HPMHooks.count.HP_guild_flag_remove_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_flag_remove_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +void HP_guild_flags_clear(void) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_flags_clear_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_flags_clear_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.flags_clear(); + } + if( HPMHooks.count.HP_guild_flags_clear_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_flags_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_guild_aura_refresh(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_aura_refresh_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_aura_refresh_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_aura_refresh_pre[hIndex].func; + preHookFunc(sd, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.aura_refresh(sd, skill_id, skill_lv); + } + if( HPMHooks.count.HP_guild_aura_refresh_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_aura_refresh_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_aura_refresh_post[hIndex].func; + postHookFunc(sd, &skill_id, &skill_lv); + } + } + return; +} +int HP_guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_payexp_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_payexp_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.payexp_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_guild_payexp_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_payexp_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +TBL_PC* HP_guild_sd_check(int guild_id, int account_id, int char_id) { + int hIndex = 0; + TBL_PC* retVal___ = NULL; + if( HPMHooks.count.HP_guild_sd_check_pre ) { + TBL_PC* (*preHookFunc) (int *guild_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_sd_check_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.sd_check(guild_id, account_id, char_id); + } + if( HPMHooks.count.HP_guild_sd_check_post ) { + TBL_PC* (*postHookFunc) (TBL_PC* retVal___, int *guild_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_sd_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id); + } + } + return retVal___; +} +bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_guild_read_guildskill_tree_db_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_guildskill_tree_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_read_guildskill_tree_db_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.read_guildskill_tree_db(split, columns, current); + } + if( HPMHooks.count.HP_guild_read_guildskill_tree_db_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_guildskill_tree_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_read_guildskill_tree_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_guild_read_castledb(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_guild_read_castledb_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_read_castledb_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.read_castledb(str, columns, current); + } + if( HPMHooks.count.HP_guild_read_castledb_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_read_castledb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +int HP_guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_payexp_timer_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_guild_payexp_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.guild.payexp_timer_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_guild_payexp_timer_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_guild_payexp_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_guild_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_send_xy_timer_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_guild_send_xy_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.guild.send_xy_timer_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_guild_send_xy_timer_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_guild_send_xy_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_send_xy_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_send_xy_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.send_xy_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_guild_send_xy_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_send_xy_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +DBData HP_guild_create_expcache(DBKey key, va_list args) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_guild_create_expcache_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_guild_create_expcache_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.guild.create_expcache(key, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_guild_create_expcache_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_guild_create_expcache_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_guild_eventlist_db_final(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_eventlist_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_guild_eventlist_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.guild.eventlist_db_final(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_guild_eventlist_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_guild_eventlist_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_guild_expcache_db_final(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_expcache_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_guild_expcache_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.guild.expcache_db_final(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_guild_expcache_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_guild_expcache_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_guild_castle_db_final(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_castle_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_guild_castle_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.guild.castle_db_final(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_guild_castle_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_guild_castle_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_guild_broken_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_broken_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_guild_broken_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.guild.broken_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_guild_broken_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_guild_broken_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_guild_castle_broken_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_castle_broken_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_guild_castle_broken_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.guild.castle_broken_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_guild_castle_broken_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_guild_castle_broken_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_makemember_pre ) { + void (*preHookFunc) (struct guild_member *m, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_makemember_pre[hIndex].func; + preHookFunc(m, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.makemember(m, sd); + } + if( HPMHooks.count.HP_guild_makemember_post ) { + void (*postHookFunc) (struct guild_member *m, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_makemember_post[hIndex].func; + postHookFunc(m, sd); + } + } + return; +} +int HP_guild_check_member(struct guild *g) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_check_member_pre ) { + int (*preHookFunc) (struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_check_member_pre[hIndex].func; + retVal___ = preHookFunc(g); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.check_member(g); + } + if( HPMHooks.count.HP_guild_check_member_post ) { + int (*postHookFunc) (int retVal___, struct guild *g); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_check_member_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g); + } + } + return retVal___; +} +int HP_guild_get_alliance_count(struct guild *g, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_guild_get_alliance_count_pre ) { + int (*preHookFunc) (struct guild *g, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_get_alliance_count_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_get_alliance_count_pre[hIndex].func; + retVal___ = preHookFunc(g, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.get_alliance_count(g, flag); + } + if( HPMHooks.count.HP_guild_get_alliance_count_post ) { + int (*postHookFunc) (int retVal___, struct guild *g, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_get_alliance_count_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_get_alliance_count_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, &flag); + } + } + return retVal___; +} +void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_castle_reconnect_sub_pre ) { + void (*preHookFunc) (void *key, void *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_guild_castle_reconnect_sub_pre[hIndex].func; + preHookFunc(key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + HPMHooks.source.guild.castle_reconnect_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_guild_castle_reconnect_sub_post ) { + void (*postHookFunc) (void *key, void *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_guild_castle_reconnect_sub_post[hIndex].func; + postHookFunc(key, data, ap___copy); + va_end(ap___copy); + } + } + return; +} +/* gstorage */ +struct guild_storage* HP_gstorage_id2storage(int guild_id) { + int hIndex = 0; + struct guild_storage* retVal___ = NULL; + if( HPMHooks.count.HP_gstorage_id2storage_pre ) { + struct guild_storage* (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_id2storage_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.id2storage(guild_id); + } + if( HPMHooks.count.HP_gstorage_id2storage_post ) { + struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_id2storage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +struct guild_storage* HP_gstorage_id2storage2(int guild_id) { + int hIndex = 0; + struct guild_storage* retVal___ = NULL; + if( HPMHooks.count.HP_gstorage_id2storage2_pre ) { + struct guild_storage* (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_id2storage2_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.id2storage2(guild_id); + } + if( HPMHooks.count.HP_gstorage_id2storage2_post ) { + struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_id2storage2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +void HP_gstorage_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_gstorage_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.gstorage.init(); + } + if( HPMHooks.count.HP_gstorage_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_gstorage_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_gstorage_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.gstorage.final(); + } + if( HPMHooks.count.HP_gstorage_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_gstorage_delete(int guild_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_delete_pre ) { + int (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_delete_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.delete(guild_id); + } + if( HPMHooks.count.HP_gstorage_delete_post ) { + int (*postHookFunc) (int retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +int HP_gstorage_open(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_open_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_open_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.open(sd); + } + if( HPMHooks.count.HP_gstorage_open_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_additem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_additem_pre[hIndex].func; + retVal___ = preHookFunc(sd, stor, item_data, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.additem(sd, stor, item_data, amount); + } + if( HPMHooks.count.HP_gstorage_additem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_additem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, stor, item_data, &amount); + } + } + return retVal___; +} +int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor, int n, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_delitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct guild_storage *stor, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_delitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, stor, &n, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.delitem(sd, stor, n, amount); + } + if( HPMHooks.count.HP_gstorage_delitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct guild_storage *stor, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_delitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, stor, &n, &amount); + } + } + return retVal___; +} +int HP_gstorage_add(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_add_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_add_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.add(sd, index, amount); + } + if( HPMHooks.count.HP_gstorage_add_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); + } + } + return retVal___; +} +int HP_gstorage_get(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_get_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_get_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_get_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.get(sd, index, amount); + } + if( HPMHooks.count.HP_gstorage_get_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_get_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); + } + } + return retVal___; +} +int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_addfromcart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_addfromcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_addfromcart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.addfromcart(sd, index, amount); + } + if( HPMHooks.count.HP_gstorage_addfromcart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_addfromcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_addfromcart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); + } + } + return retVal___; +} +int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_gettocart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_gettocart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_gettocart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.gettocart(sd, index, amount); + } + if( HPMHooks.count.HP_gstorage_gettocart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_gettocart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_gettocart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); + } + } + return retVal___; +} +int HP_gstorage_close(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_close_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_close_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.close(sd); + } + if( HPMHooks.count.HP_gstorage_close_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_close_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_pc_quit_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_pc_quit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_pc_quit_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.pc_quit(sd, flag); + } + if( HPMHooks.count.HP_gstorage_pc_quit_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_pc_quit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_pc_quit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_gstorage_save(int account_id, int guild_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_save_pre ) { + int (*preHookFunc) (int *account_id, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_save_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &guild_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.save(account_id, guild_id, flag); + } + if( HPMHooks.count.HP_gstorage_save_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *guild_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &guild_id, &flag); + } + } + return retVal___; +} +int HP_gstorage_saved(int guild_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_gstorage_saved_pre ) { + int (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_saved_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_saved_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.gstorage.saved(guild_id); + } + if( HPMHooks.count.HP_gstorage_saved_post ) { + int (*postHookFunc) (int retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_saved_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_saved_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +DBData HP_gstorage_create(DBKey key, va_list args) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_gstorage_create_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_gstorage_create_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.gstorage.create(key, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_gstorage_create_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_gstorage_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +/* homun */ +void HP_homun_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.init(); + } + if( HPMHooks.count.HP_homun_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_homun_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.final(); + } + if( HPMHooks.count.HP_homun_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_homun_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_reload_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_reload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.reload(); + } + if( HPMHooks.count.HP_homun_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_homun_reload_skill(void) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_reload_skill_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_reload_skill_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.reload_skill(); + } + if( HPMHooks.count.HP_homun_reload_skill_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_reload_skill_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct view_data* HP_homun_get_viewdata(int class_) { + int hIndex = 0; + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_homun_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.get_viewdata(class_); + } + if( HPMHooks.count.HP_homun_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +enum homun_type HP_homun_class2type(int class_) { + int hIndex = 0; + enum homun_type retVal___; + memset(&retVal___, '\0', sizeof(enum homun_type)); + if( HPMHooks.count.HP_homun_class2type_pre ) { + enum homun_type (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_class2type_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.class2type(class_); + } + if( HPMHooks.count.HP_homun_class2type_post ) { + enum homun_type (*postHookFunc) (enum homun_type retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_class2type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +void HP_homun_damaged(struct homun_data *hd) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_damaged_pre ) { + void (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_damaged_pre[hIndex].func; + preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.damaged(hd); + } + if( HPMHooks.count.HP_homun_damaged_post ) { + void (*postHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_damaged_post[hIndex].func; + postHookFunc(hd); + } + } + return; +} +int HP_homun_dead(struct homun_data *hd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_dead_pre ) { + int (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_dead_pre[hIndex].func; + retVal___ = preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.dead(hd); + } + if( HPMHooks.count.HP_homun_dead_post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_dead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd); + } + } + return retVal___; +} +int HP_homun_vaporize(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_vaporize_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_vaporize_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.vaporize(sd, flag); + } + if( HPMHooks.count.HP_homun_vaporize_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_vaporize_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_homun_delete(struct homun_data *hd, int emote) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_delete_pre ) { + int (*preHookFunc) (struct homun_data *hd, int *emote); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_delete_pre[hIndex].func; + retVal___ = preHookFunc(hd, &emote); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.delete(hd, emote); + } + if( HPMHooks.count.HP_homun_delete_post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, int *emote); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &emote); + } + } + return retVal___; +} +int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_checkskill_pre ) { + int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_checkskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_checkskill_pre[hIndex].func; + retVal___ = preHookFunc(hd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.checkskill(hd, skill_id); + } + if( HPMHooks.count.HP_homun_checkskill_post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_checkskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_checkskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &skill_id); + } + } + return retVal___; +} +int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_calc_skilltree_pre ) { + int (*preHookFunc) (struct homun_data *hd, int *flag_evolve); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_calc_skilltree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_calc_skilltree_pre[hIndex].func; + retVal___ = preHookFunc(hd, &flag_evolve); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.calc_skilltree(hd, flag_evolve); + } + if( HPMHooks.count.HP_homun_calc_skilltree_post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, int *flag_evolve); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_calc_skilltree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_calc_skilltree_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &flag_evolve); + } + } + return retVal___; +} +int HP_homun_skill_tree_get_max(int id, int b_class) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_skill_tree_get_max_pre ) { + int (*preHookFunc) (int *id, int *b_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_tree_get_max_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_skill_tree_get_max_pre[hIndex].func; + retVal___ = preHookFunc(&id, &b_class); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.skill_tree_get_max(id, b_class); + } + if( HPMHooks.count.HP_homun_skill_tree_get_max_post ) { + int (*postHookFunc) (int retVal___, int *id, int *b_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_tree_get_max_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_skill_tree_get_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id, &b_class); + } + } + return retVal___; +} +void HP_homun_skillup(struct homun_data *hd, uint16 skill_id) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_skillup_pre ) { + void (*preHookFunc) (struct homun_data *hd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_skillup_pre[hIndex].func; + preHookFunc(hd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.skillup(hd, skill_id); + } + if( HPMHooks.count.HP_homun_skillup_post ) { + void (*postHookFunc) (struct homun_data *hd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_skillup_post[hIndex].func; + postHookFunc(hd, &skill_id); + } + } + return; +} +bool HP_homun_levelup(struct homun_data *hd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_levelup_pre ) { + bool (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_levelup_pre[hIndex].func; + retVal___ = preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.levelup(hd); + } + if( HPMHooks.count.HP_homun_levelup_post ) { + bool (*postHookFunc) (bool retVal___, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_levelup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd); + } + } + return retVal___; +} +int HP_homun_change_class(struct homun_data *hd, short class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_change_class_pre ) { + int (*preHookFunc) (struct homun_data *hd, short *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_change_class_pre[hIndex].func; + retVal___ = preHookFunc(hd, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.change_class(hd, class_); + } + if( HPMHooks.count.HP_homun_change_class_post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, short *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_change_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &class_); + } + } + return retVal___; +} +bool HP_homun_evolve(struct homun_data *hd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_evolve_pre ) { + bool (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_evolve_pre[hIndex].func; + retVal___ = preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.evolve(hd); + } + if( HPMHooks.count.HP_homun_evolve_post ) { + bool (*postHookFunc) (bool retVal___, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_evolve_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd); + } + } + return retVal___; +} +bool HP_homun_mutate(struct homun_data *hd, int homun_id) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_mutate_pre ) { + bool (*preHookFunc) (struct homun_data *hd, int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_mutate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_mutate_pre[hIndex].func; + retVal___ = preHookFunc(hd, &homun_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.mutate(hd, homun_id); + } + if( HPMHooks.count.HP_homun_mutate_post ) { + bool (*postHookFunc) (bool retVal___, struct homun_data *hd, int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_mutate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_mutate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &homun_id); + } + } + return retVal___; +} +int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_gainexp_pre ) { + int (*preHookFunc) (struct homun_data *hd, unsigned int *exp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_gainexp_pre[hIndex].func; + retVal___ = preHookFunc(hd, &exp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.gainexp(hd, exp); + } + if( HPMHooks.count.HP_homun_gainexp_post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, unsigned int *exp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_gainexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &exp); + } + } + return retVal___; +} +unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_homun_add_intimacy_pre ) { + unsigned int (*preHookFunc) (struct homun_data *hd, unsigned int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_add_intimacy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_add_intimacy_pre[hIndex].func; + retVal___ = preHookFunc(hd, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.add_intimacy(hd, value); + } + if( HPMHooks.count.HP_homun_add_intimacy_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct homun_data *hd, unsigned int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_add_intimacy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_add_intimacy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &value); + } + } + return retVal___; +} +unsigned int HP_homun_consume_intimacy(struct homun_data *hd, unsigned int value) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_homun_consume_intimacy_pre ) { + unsigned int (*preHookFunc) (struct homun_data *hd, unsigned int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_consume_intimacy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_consume_intimacy_pre[hIndex].func; + retVal___ = preHookFunc(hd, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.consume_intimacy(hd, value); + } + if( HPMHooks.count.HP_homun_consume_intimacy_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct homun_data *hd, unsigned int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_consume_intimacy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_consume_intimacy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &value); + } + } + return retVal___; +} +void HP_homun_healed(struct homun_data *hd) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_healed_pre ) { + void (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_healed_pre[hIndex].func; + preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.healed(hd); + } + if( HPMHooks.count.HP_homun_healed_post ) { + void (*postHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_healed_post[hIndex].func; + postHookFunc(hd); + } + } + return; +} +void HP_homun_save(struct homun_data *hd) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_save_pre ) { + void (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_save_pre[hIndex].func; + preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.save(hd); + } + if( HPMHooks.count.HP_homun_save_post ) { + void (*postHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_save_post[hIndex].func; + postHookFunc(hd); + } + } + return; +} +unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num) { + int hIndex = 0; + unsigned char retVal___; + memset(&retVal___, '\0', sizeof(unsigned char)); + if( HPMHooks.count.HP_homun_menu_pre ) { + unsigned char (*preHookFunc) (struct map_session_data *sd, unsigned char *menu_num); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_menu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_menu_pre[hIndex].func; + retVal___ = preHookFunc(sd, &menu_num); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.menu(sd, menu_num); + } + if( HPMHooks.count.HP_homun_menu_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct map_session_data *sd, unsigned char *menu_num); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_menu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_menu_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &menu_num); + } + } + return retVal___; +} +bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_feed_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_feed_pre[hIndex].func; + retVal___ = preHookFunc(sd, hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.feed(sd, hd); + } + if( HPMHooks.count.HP_homun_feed_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_feed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, hd); + } + } + return retVal___; +} +int HP_homun_hunger_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_hunger_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_hunger_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.hunger_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_homun_hunger_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_hunger_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_homun_hunger_timer_delete(struct homun_data *hd) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_hunger_timer_delete_pre ) { + void (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_hunger_timer_delete_pre[hIndex].func; + preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.hunger_timer_delete(hd); + } + if( HPMHooks.count.HP_homun_hunger_timer_delete_post ) { + void (*postHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_hunger_timer_delete_post[hIndex].func; + postHookFunc(hd); + } + } + return; +} +int HP_homun_change_name(struct map_session_data *sd, char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_change_name_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_change_name_pre[hIndex].func; + retVal___ = preHookFunc(sd, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.change_name(sd, name); + } + if( HPMHooks.count.HP_homun_change_name_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_change_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); + } + } + return retVal___; +} +bool HP_homun_change_name_ack(struct map_session_data *sd, char *name, int flag) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_change_name_ack_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_change_name_ack_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.change_name_ack(sd, name, flag); + } + if( HPMHooks.count.HP_homun_change_name_ack_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_change_name_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, &flag); + } + } + return retVal___; +} +int HP_homun_db_search(int key, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_homun_db_search_pre ) { + int (*preHookFunc) (int *key, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_db_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_db_search_pre[hIndex].func; + retVal___ = preHookFunc(&key, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.db_search(key, type); + } + if( HPMHooks.count.HP_homun_db_search_post ) { + int (*postHookFunc) (int retVal___, int *key, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_db_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_db_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, &type); + } + } + return retVal___; +} +bool HP_homun_create(struct map_session_data *sd, struct s_homunculus *hom) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_create_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct s_homunculus *hom); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, hom); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.create(sd, hom); + } + if( HPMHooks.count.HP_homun_create_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct s_homunculus *hom); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, hom); + } + } + return retVal___; +} +void HP_homun_init_timers(struct homun_data *hd) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_init_timers_pre ) { + void (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_init_timers_pre[hIndex].func; + preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.init_timers(hd); + } + if( HPMHooks.count.HP_homun_init_timers_post ) { + void (*postHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_init_timers_post[hIndex].func; + postHookFunc(hd); + } + } + return; +} +bool HP_homun_call(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_call_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_call_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.call(sd); + } + if( HPMHooks.count.HP_homun_call_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_call_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +bool HP_homun_recv_data(int account_id, struct s_homunculus *sh, int flag) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_recv_data_pre ) { + bool (*preHookFunc) (int *account_id, struct s_homunculus *sh, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_recv_data_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, sh, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.recv_data(account_id, sh, flag); + } + if( HPMHooks.count.HP_homun_recv_data_post ) { + bool (*postHookFunc) (bool retVal___, int *account_id, struct s_homunculus *sh, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_recv_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, sh, &flag); + } + } + return retVal___; +} +bool HP_homun_creation_request(struct map_session_data *sd, int class_) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_creation_request_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_creation_request_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_creation_request_pre[hIndex].func; + retVal___ = preHookFunc(sd, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.creation_request(sd, class_); + } + if( HPMHooks.count.HP_homun_creation_request_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_creation_request_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_creation_request_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &class_); + } + } + return retVal___; +} +bool HP_homun_ressurect(struct map_session_data *sd, unsigned char per, short x, short y) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_ressurect_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, unsigned char *per, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_ressurect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_ressurect_pre[hIndex].func; + retVal___ = preHookFunc(sd, &per, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.ressurect(sd, per, x, y); + } + if( HPMHooks.count.HP_homun_ressurect_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned char *per, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_ressurect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_ressurect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &per, &x, &y); + } + } + return retVal___; +} +void HP_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_revive_pre ) { + void (*preHookFunc) (struct homun_data *hd, unsigned int *hp, unsigned int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_revive_pre[hIndex].func; + preHookFunc(hd, &hp, &sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.revive(hd, hp, sp); + } + if( HPMHooks.count.HP_homun_revive_post ) { + void (*postHookFunc) (struct homun_data *hd, unsigned int *hp, unsigned int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_revive_post[hIndex].func; + postHookFunc(hd, &hp, &sp); + } + } + return; +} +void HP_homun_stat_reset(struct homun_data *hd) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_stat_reset_pre ) { + void (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_stat_reset_pre[hIndex].func; + preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.stat_reset(hd); + } + if( HPMHooks.count.HP_homun_stat_reset_post ) { + void (*postHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_stat_reset_post[hIndex].func; + postHookFunc(hd); + } + } + return; +} +bool HP_homun_shuffle(struct homun_data *hd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_shuffle_pre ) { + bool (*preHookFunc) (struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_shuffle_pre[hIndex].func; + retVal___ = preHookFunc(hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.shuffle(hd); + } + if( HPMHooks.count.HP_homun_shuffle_post ) { + bool (*postHookFunc) (bool retVal___, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_shuffle_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd); + } + } + return retVal___; +} +bool HP_homun_read_db_sub(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_read_db_sub_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_read_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.read_db_sub(str, columns, current); + } + if( HPMHooks.count.HP_homun_read_db_sub_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_read_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +void HP_homun_read_db(void) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_read_db_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_read_db_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.read_db(); + } + if( HPMHooks.count.HP_homun_read_db_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_read_db_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_homun_read_skill_db_sub(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_homun_read_skill_db_sub_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_skill_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_read_skill_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.read_skill_db_sub(split, columns, current); + } + if( HPMHooks.count.HP_homun_read_skill_db_sub_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_skill_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_read_skill_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +void HP_homun_skill_db_read(void) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_skill_db_read_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_skill_db_read_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.skill_db_read(); + } + if( HPMHooks.count.HP_homun_skill_db_read_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_skill_db_read_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_homun_exp_db_read(void) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_exp_db_read_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_exp_db_read_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.exp_db_read(); + } + if( HPMHooks.count.HP_homun_exp_db_read_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_exp_db_read_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_homun_addspiritball(struct homun_data *hd, int max) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_addspiritball_pre ) { + void (*preHookFunc) (struct homun_data *hd, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_addspiritball_pre[hIndex].func; + preHookFunc(hd, &max); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.addspiritball(hd, max); + } + if( HPMHooks.count.HP_homun_addspiritball_post ) { + void (*postHookFunc) (struct homun_data *hd, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_addspiritball_post[hIndex].func; + postHookFunc(hd, &max); + } + } + return; +} +void HP_homun_delspiritball(struct homun_data *hd, int count, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_homun_delspiritball_pre ) { + void (*preHookFunc) (struct homun_data *hd, int *count, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_homun_delspiritball_pre[hIndex].func; + preHookFunc(hd, &count, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.homun.delspiritball(hd, count, type); + } + if( HPMHooks.count.HP_homun_delspiritball_post ) { + void (*postHookFunc) (struct homun_data *hd, int *count, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_homun_delspiritball_post[hIndex].func; + postHookFunc(hd, &count, &type); + } + } + return; +} +/* instance */ +void HP_instance_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.init(); + } + if( HPMHooks.count.HP_instance_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_instance_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.final(); + } + if( HPMHooks.count.HP_instance_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_instance_create(int party_id, const char *name, enum instance_owner_type type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_instance_create_pre ) { + int (*preHookFunc) (int *party_id, const char *name, enum instance_owner_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_create_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, name, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.instance.create(party_id, name, type); + } + if( HPMHooks.count.HP_instance_create_post ) { + int (*postHookFunc) (int retVal___, int *party_id, const char *name, enum instance_owner_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, name, &type); + } + } + return retVal___; +} +int HP_instance_add_map(const char *name, int instance_id, bool usebasename, const char *map_name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_instance_add_map_pre ) { + int (*preHookFunc) (const char *name, int *instance_id, bool *usebasename, const char *map_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_add_map_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_add_map_pre[hIndex].func; + retVal___ = preHookFunc(name, &instance_id, &usebasename, map_name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.instance.add_map(name, instance_id, usebasename, map_name); + } + if( HPMHooks.count.HP_instance_add_map_post ) { + int (*postHookFunc) (int retVal___, const char *name, int *instance_id, bool *usebasename, const char *map_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_add_map_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_add_map_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, &instance_id, &usebasename, map_name); + } + } + return retVal___; +} +void HP_instance_del_map(int16 m) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_del_map_pre ) { + void (*preHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_del_map_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.del_map(m); + } + if( HPMHooks.count.HP_instance_del_map_post ) { + void (*postHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_del_map_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +int HP_instance_map2imap(int16 m, int instance_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_instance_map2imap_pre ) { + int (*preHookFunc) (int16 *m, int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map2imap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_map2imap_pre[hIndex].func; + retVal___ = preHookFunc(&m, &instance_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.instance.map2imap(m, instance_id); + } + if( HPMHooks.count.HP_instance_map2imap_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map2imap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_map2imap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &instance_id); + } + } + return retVal___; +} +int HP_instance_mapid2imapid(int16 m, int instance_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_instance_mapid2imapid_pre ) { + int (*preHookFunc) (int16 *m, int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapid2imapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_mapid2imapid_pre[hIndex].func; + retVal___ = preHookFunc(&m, &instance_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.instance.mapid2imapid(m, instance_id); + } + if( HPMHooks.count.HP_instance_mapid2imapid_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapid2imapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_mapid2imapid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &instance_id); + } + } + return retVal___; +} +void HP_instance_destroy(int instance_id) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_destroy_pre ) { + void (*preHookFunc) (int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_destroy_pre[hIndex].func; + preHookFunc(&instance_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.destroy(instance_id); + } + if( HPMHooks.count.HP_instance_destroy_post ) { + void (*postHookFunc) (int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_destroy_post[hIndex].func; + postHookFunc(&instance_id); + } + } + return; +} +void HP_instance_start(int instance_id) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_start_pre ) { + void (*preHookFunc) (int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_start_pre[hIndex].func; + preHookFunc(&instance_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.start(instance_id); + } + if( HPMHooks.count.HP_instance_start_post ) { + void (*postHookFunc) (int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_start_post[hIndex].func; + postHookFunc(&instance_id); + } + } + return; +} +void HP_instance_check_idle(int instance_id) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_check_idle_pre ) { + void (*preHookFunc) (int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_idle_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_check_idle_pre[hIndex].func; + preHookFunc(&instance_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.check_idle(instance_id); + } + if( HPMHooks.count.HP_instance_check_idle_post ) { + void (*postHookFunc) (int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_idle_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_check_idle_post[hIndex].func; + postHookFunc(&instance_id); + } + } + return; +} +void HP_instance_check_kick(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_check_kick_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_check_kick_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.check_kick(sd); + } + if( HPMHooks.count.HP_instance_check_kick_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_check_kick_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_instance_set_timeout(int instance_id, unsigned int progress_timeout, unsigned int idle_timeout) { + int hIndex = 0; + if( HPMHooks.count.HP_instance_set_timeout_pre ) { + void (*preHookFunc) (int *instance_id, unsigned int *progress_timeout, unsigned int *idle_timeout); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_set_timeout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_set_timeout_pre[hIndex].func; + preHookFunc(&instance_id, &progress_timeout, &idle_timeout); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.set_timeout(instance_id, progress_timeout, idle_timeout); + } + if( HPMHooks.count.HP_instance_set_timeout_post ) { + void (*postHookFunc) (int *instance_id, unsigned int *progress_timeout, unsigned int *idle_timeout); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_set_timeout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_set_timeout_post[hIndex].func; + postHookFunc(&instance_id, &progress_timeout, &idle_timeout); + } + } + return; +} +bool HP_instance_valid(int instance_id) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_instance_valid_pre ) { + bool (*preHookFunc) (int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_valid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_valid_pre[hIndex].func; + retVal___ = preHookFunc(&instance_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.instance.valid(instance_id); + } + if( HPMHooks.count.HP_instance_valid_post ) { + bool (*postHookFunc) (bool retVal___, int *instance_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_valid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_valid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &instance_id); + } + } + return retVal___; +} +int HP_instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_instance_destroy_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_instance_destroy_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.instance.destroy_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_instance_destroy_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_instance_destroy_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +/* intif */ +int HP_intif_parse(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_parse_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_parse_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.parse(fd); + } + if( HPMHooks.count.HP_intif_parse_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_create_pet_pre ) { + int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incuvate, char *pet_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_create_pet_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id, &pet_type, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incuvate, pet_name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incuvate, pet_name); + } + if( HPMHooks.count.HP_intif_create_pet_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *char_id, short *pet_type, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incuvate, char *pet_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_create_pet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &char_id, &pet_type, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incuvate, pet_name); + } + } + return retVal___; +} +int HP_intif_broadcast(const char *mes, int len, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_broadcast_pre ) { + int (*preHookFunc) (const char *mes, int *len, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_broadcast_pre[hIndex].func; + retVal___ = preHookFunc(mes, &len, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.broadcast(mes, len, type); + } + if( HPMHooks.count.HP_intif_broadcast_post ) { + int (*postHookFunc) (int retVal___, const char *mes, int *len, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_broadcast_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mes, &len, &type); + } + } + return retVal___; +} +int HP_intif_broadcast2(const char *mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_broadcast2_pre ) { + int (*preHookFunc) (const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_broadcast2_pre[hIndex].func; + retVal___ = preHookFunc(mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.broadcast2(mes, len, fontColor, fontType, fontSize, fontAlign, fontY); + } + if( HPMHooks.count.HP_intif_broadcast2_post ) { + int (*postHookFunc) (int retVal___, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_broadcast2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY); + } + } + return retVal___; +} +int HP_intif_main_message(struct map_session_data *sd, const char *message) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_main_message_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_main_message_pre[hIndex].func; + retVal___ = preHookFunc(sd, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.main_message(sd, message); + } + if( HPMHooks.count.HP_intif_main_message_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_main_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, message); + } + } + return retVal___; +} +int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_wis_message_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *nick, char *mes, int *mes_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_wis_message_pre[hIndex].func; + retVal___ = preHookFunc(sd, nick, mes, &mes_len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.wis_message(sd, nick, mes, mes_len); + } + if( HPMHooks.count.HP_intif_wis_message_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *nick, char *mes, int *mes_len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_wis_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nick, mes, &mes_len); + } + } + return retVal___; +} +int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_wis_message_to_gm_pre ) { + int (*preHookFunc) (char *Wisp_name, int *permission, char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_pre[hIndex].func; + retVal___ = preHookFunc(Wisp_name, &permission, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.wis_message_to_gm(Wisp_name, permission, mes); + } + if( HPMHooks.count.HP_intif_wis_message_to_gm_post ) { + int (*postHookFunc) (int retVal___, char *Wisp_name, int *permission, char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_post[hIndex].func; + retVal___ = postHookFunc(retVal___, Wisp_name, &permission, mes); + } + } + return retVal___; +} +int HP_intif_saveregistry(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_saveregistry_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_saveregistry_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.saveregistry(sd, type); + } + if( HPMHooks.count.HP_intif_saveregistry_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_saveregistry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_intif_request_registry(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_request_registry_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_registry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_request_registry_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.request_registry(sd, flag); + } + if( HPMHooks.count.HP_intif_request_registry_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_registry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_request_registry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_intif_request_guild_storage(int account_id, int guild_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_request_guild_storage_pre ) { + int (*preHookFunc) (int *account_id, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_guild_storage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_request_guild_storage_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.request_guild_storage(account_id, guild_id); + } + if( HPMHooks.count.HP_intif_request_guild_storage_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_guild_storage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_request_guild_storage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &guild_id); + } + } + return retVal___; +} +int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_send_guild_storage_pre ) { + int (*preHookFunc) (int *account_id, struct guild_storage *gstor); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_guild_storage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_send_guild_storage_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, gstor); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.send_guild_storage(account_id, gstor); + } + if( HPMHooks.count.HP_intif_send_guild_storage_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct guild_storage *gstor); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_guild_storage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_send_guild_storage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, gstor); + } + } + return retVal___; +} +int HP_intif_create_party(struct party_member *member, char *name, int item, int item2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_create_party_pre ) { + int (*preHookFunc) (struct party_member *member, char *name, int *item, int *item2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_create_party_pre[hIndex].func; + retVal___ = preHookFunc(member, name, &item, &item2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.create_party(member, name, item, item2); + } + if( HPMHooks.count.HP_intif_create_party_post ) { + int (*postHookFunc) (int retVal___, struct party_member *member, char *name, int *item, int *item2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_create_party_post[hIndex].func; + retVal___ = postHookFunc(retVal___, member, name, &item, &item2); + } + } + return retVal___; +} +int HP_intif_request_partyinfo(int party_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_request_partyinfo_pre ) { + int (*preHookFunc) (int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_partyinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_request_partyinfo_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.request_partyinfo(party_id, char_id); + } + if( HPMHooks.count.HP_intif_request_partyinfo_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_partyinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_request_partyinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &char_id); + } + } + return retVal___; +} +int HP_intif_party_addmember(int party_id, struct party_member *member) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_party_addmember_pre ) { + int (*preHookFunc) (int *party_id, struct party_member *member); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_addmember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_party_addmember_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, member); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.party_addmember(party_id, member); + } + if( HPMHooks.count.HP_intif_party_addmember_post ) { + int (*postHookFunc) (int retVal___, int *party_id, struct party_member *member); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_addmember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_party_addmember_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, member); + } + } + return retVal___; +} +int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_party_changeoption_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changeoption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_party_changeoption_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &exp, &item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.party_changeoption(party_id, account_id, exp, item); + } + if( HPMHooks.count.HP_intif_party_changeoption_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *exp, int *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changeoption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_party_changeoption_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &exp, &item); + } + } + return retVal___; +} +int HP_intif_party_leave(int party_id, int account_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_party_leave_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_party_leave_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.party_leave(party_id, account_id, char_id); + } + if( HPMHooks.count.HP_intif_party_leave_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_party_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + } + } + return retVal___; +} +int HP_intif_party_changemap(struct map_session_data *sd, int online) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_party_changemap_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *online); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_party_changemap_pre[hIndex].func; + retVal___ = preHookFunc(sd, &online); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.party_changemap(sd, online); + } + if( HPMHooks.count.HP_intif_party_changemap_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *online); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_party_changemap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &online); + } + } + return retVal___; +} +int HP_intif_break_party(int party_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_break_party_pre ) { + int (*preHookFunc) (int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_break_party_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_break_party_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.break_party(party_id); + } + if( HPMHooks.count.HP_intif_break_party_post ) { + int (*postHookFunc) (int retVal___, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_break_party_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_break_party_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id); + } + } + return retVal___; +} +int HP_intif_party_message(int party_id, int account_id, const char *mes, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_party_message_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_party_message_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.party_message(party_id, account_id, mes, len); + } + if( HPMHooks.count.HP_intif_party_message_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_party_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len); + } + } + return retVal___; +} +int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_party_leaderchange_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leaderchange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_party_leaderchange_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.party_leaderchange(party_id, account_id, char_id); + } + if( HPMHooks.count.HP_intif_party_leaderchange_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leaderchange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_party_leaderchange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + } + } + return retVal___; +} +int HP_intif_guild_create(const char *name, const struct guild_member *master) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_create_pre ) { + int (*preHookFunc) (const char *name, const struct guild_member *master); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_create_pre[hIndex].func; + retVal___ = preHookFunc(name, master); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_create(name, master); + } + if( HPMHooks.count.HP_intif_guild_create_post ) { + int (*postHookFunc) (int retVal___, const char *name, const struct guild_member *master); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, master); + } + } + return retVal___; +} +int HP_intif_guild_request_info(int guild_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_request_info_pre ) { + int (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_request_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_request_info_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_request_info(guild_id); + } + if( HPMHooks.count.HP_intif_guild_request_info_post ) { + int (*postHookFunc) (int retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_request_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_request_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +int HP_intif_guild_addmember(int guild_id, struct guild_member *m) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_addmember_pre ) { + int (*preHookFunc) (int *guild_id, struct guild_member *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_addmember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_addmember_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_addmember(guild_id, m); + } + if( HPMHooks.count.HP_intif_guild_addmember_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, struct guild_member *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_addmember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_addmember_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, m); + } + } + return retVal___; +} +int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, const char *mes) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_leave_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_leave_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_leave(guild_id, account_id, char_id, flag, mes); + } + if( HPMHooks.count.HP_intif_guild_leave_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag, mes); + } + } + return retVal___; +} +int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_memberinfoshort_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class_); + } + if( HPMHooks.count.HP_intif_guild_memberinfoshort_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &online, &lv, &class_); + } + } + return retVal___; +} +int HP_intif_guild_break(int guild_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_break_pre ) { + int (*preHookFunc) (int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_break_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_break_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_break(guild_id); + } + if( HPMHooks.count.HP_intif_guild_break_post ) { + int (*postHookFunc) (int retVal___, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_break_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_break_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id); + } + } + return retVal___; +} +int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_message_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_message_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_message(guild_id, account_id, mes, len); + } + if( HPMHooks.count.HP_intif_guild_message_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, mes, &len); + } + } + return retVal___; +} +int HP_intif_guild_change_gm(int guild_id, const char *name, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_change_gm_pre ) { + int (*preHookFunc) (int *guild_id, const char *name, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_change_gm_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, name, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_change_gm(guild_id, name, len); + } + if( HPMHooks.count.HP_intif_guild_change_gm_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, const char *name, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_change_gm_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, name, &len); + } + } + return retVal___; +} +int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_change_basicinfo_pre ) { + int (*preHookFunc) (int *guild_id, int *type, const void *data, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_basicinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_change_basicinfo_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &type, data, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_change_basicinfo(guild_id, type, data, len); + } + if( HPMHooks.count.HP_intif_guild_change_basicinfo_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *type, const void *data, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_basicinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_change_basicinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &type, data, &len); + } + } + return retVal___; +} +int HP_intif_guild_change_memberinfo(int guild_id, int account_id, int char_id, int type, const void *data, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_change_memberinfo_pre ) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_memberinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_change_memberinfo_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, data, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_change_memberinfo(guild_id, account_id, char_id, type, data, len); + } + if( HPMHooks.count.HP_intif_guild_change_memberinfo_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_memberinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_change_memberinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &type, data, &len); + } + } + return retVal___; +} +int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_position_pre ) { + int (*preHookFunc) (int *guild_id, int *idx, struct guild_position *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_position_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_position_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &idx, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_position(guild_id, idx, p); + } + if( HPMHooks.count.HP_intif_guild_position_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *idx, struct guild_position *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_position_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_position_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &idx, p); + } + } + return retVal___; +} +int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int max) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_skillup_pre ) { + int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_skillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_skillup_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &skill_id, &account_id, &max); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_skillup(guild_id, skill_id, account_id, max); + } + if( HPMHooks.count.HP_intif_guild_skillup_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, uint16 *skill_id, int *account_id, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_skillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_skillup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &skill_id, &account_id, &max); + } + } + return retVal___; +} +int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_alliance_pre ) { + int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_alliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_alliance_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_alliance(guild_id1, guild_id2, account_id1, account_id2, flag); + } + if( HPMHooks.count.HP_intif_guild_alliance_post ) { + int (*postHookFunc) (int retVal___, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_alliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_alliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag); + } + } + return retVal___; +} +int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_notice_pre ) { + int (*preHookFunc) (int *guild_id, const char *mes1, const char *mes2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_notice_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_notice_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, mes1, mes2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_notice(guild_id, mes1, mes2); + } + if( HPMHooks.count.HP_intif_guild_notice_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, const char *mes1, const char *mes2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_notice_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_notice_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, mes1, mes2); + } + } + return retVal___; +} +int HP_intif_guild_emblem(int guild_id, int len, const char *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_emblem_pre ) { + int (*preHookFunc) (int *guild_id, int *len, const char *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_emblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_emblem_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &len, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_emblem(guild_id, len, data); + } + if( HPMHooks.count.HP_intif_guild_emblem_post ) { + int (*postHookFunc) (int retVal___, int *guild_id, int *len, const char *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_emblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_emblem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &guild_id, &len, data); + } + } + return retVal___; +} +int HP_intif_guild_castle_dataload(int num, int *castle_ids) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_castle_dataload_pre ) { + int (*preHookFunc) (int *num, int *castle_ids); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_dataload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_castle_dataload_pre[hIndex].func; + retVal___ = preHookFunc(&num, castle_ids); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_castle_dataload(num, castle_ids); + } + if( HPMHooks.count.HP_intif_guild_castle_dataload_post ) { + int (*postHookFunc) (int retVal___, int *num, int *castle_ids); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_dataload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_castle_dataload_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &num, castle_ids); + } + } + return retVal___; +} +int HP_intif_guild_castle_datasave(int castle_id, int index, int value) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_guild_castle_datasave_pre ) { + int (*preHookFunc) (int *castle_id, int *index, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_datasave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_guild_castle_datasave_pre[hIndex].func; + retVal___ = preHookFunc(&castle_id, &index, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.guild_castle_datasave(castle_id, index, value); + } + if( HPMHooks.count.HP_intif_guild_castle_datasave_post ) { + int (*postHookFunc) (int retVal___, int *castle_id, int *index, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_datasave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_guild_castle_datasave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &castle_id, &index, &value); + } + } + return retVal___; +} +int HP_intif_request_petdata(int account_id, int char_id, int pet_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_request_petdata_pre ) { + int (*preHookFunc) (int *account_id, int *char_id, int *pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_petdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_request_petdata_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id, &pet_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.request_petdata(account_id, char_id, pet_id); + } + if( HPMHooks.count.HP_intif_request_petdata_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *char_id, int *pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_petdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_request_petdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &char_id, &pet_id); + } + } + return retVal___; +} +int HP_intif_save_petdata(int account_id, struct s_pet *p) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_save_petdata_pre ) { + int (*preHookFunc) (int *account_id, struct s_pet *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_save_petdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_save_petdata_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.save_petdata(account_id, p); + } + if( HPMHooks.count.HP_intif_save_petdata_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct s_pet *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_save_petdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_save_petdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, p); + } + } + return retVal___; +} +int HP_intif_delete_petdata(int pet_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_delete_petdata_pre ) { + int (*preHookFunc) (int *pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_delete_petdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_delete_petdata_pre[hIndex].func; + retVal___ = preHookFunc(&pet_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.delete_petdata(pet_id); + } + if( HPMHooks.count.HP_intif_delete_petdata_post ) { + int (*postHookFunc) (int retVal___, int *pet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_delete_petdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_delete_petdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &pet_id); + } + } + return retVal___; +} +int HP_intif_rename(struct map_session_data *sd, int type, char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_rename_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_rename_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rename(sd, type, name); + } + if( HPMHooks.count.HP_intif_rename_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_rename_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, name); + } + } + return retVal___; +} +int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_homunculus_create_pre ) { + int (*preHookFunc) (int *account_id, struct s_homunculus *sh); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_homunculus_create_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, sh); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.homunculus_create(account_id, sh); + } + if( HPMHooks.count.HP_intif_homunculus_create_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct s_homunculus *sh); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_homunculus_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, sh); + } + } + return retVal___; +} +bool HP_intif_homunculus_requestload(int account_id, int homun_id) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_intif_homunculus_requestload_pre ) { + bool (*preHookFunc) (int *account_id, int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_homunculus_requestload_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &homun_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.homunculus_requestload(account_id, homun_id); + } + if( HPMHooks.count.HP_intif_homunculus_requestload_post ) { + bool (*postHookFunc) (bool retVal___, int *account_id, int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_homunculus_requestload_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &homun_id); + } + } + return retVal___; +} +int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_homunculus_requestsave_pre ) { + int (*preHookFunc) (int *account_id, struct s_homunculus *sh); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestsave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_homunculus_requestsave_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, sh); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.homunculus_requestsave(account_id, sh); + } + if( HPMHooks.count.HP_intif_homunculus_requestsave_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct s_homunculus *sh); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestsave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_homunculus_requestsave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, sh); + } + } + return retVal___; +} +int HP_intif_homunculus_requestdelete(int homun_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_homunculus_requestdelete_pre ) { + int (*preHookFunc) (int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestdelete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_homunculus_requestdelete_pre[hIndex].func; + retVal___ = preHookFunc(&homun_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.homunculus_requestdelete(homun_id); + } + if( HPMHooks.count.HP_intif_homunculus_requestdelete_post ) { + int (*postHookFunc) (int retVal___, int *homun_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestdelete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_homunculus_requestdelete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &homun_id); + } + } + return retVal___; +} +int HP_intif_request_questlog(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_request_questlog_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_request_questlog_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.request_questlog(sd); + } + if( HPMHooks.count.HP_intif_request_questlog_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_request_questlog_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_intif_quest_save(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_quest_save_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_quest_save_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.quest_save(sd); + } + if( HPMHooks.count.HP_intif_quest_save_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_quest_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_intif_mercenary_create(struct s_mercenary *merc) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_mercenary_create_pre ) { + int (*preHookFunc) (struct s_mercenary *merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_mercenary_create_pre[hIndex].func; + retVal___ = preHookFunc(merc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.mercenary_create(merc); + } + if( HPMHooks.count.HP_intif_mercenary_create_post ) { + int (*postHookFunc) (int retVal___, struct s_mercenary *merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_mercenary_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc); + } + } + return retVal___; +} +int HP_intif_mercenary_request(int merc_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_mercenary_request_pre ) { + int (*preHookFunc) (int *merc_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_request_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_mercenary_request_pre[hIndex].func; + retVal___ = preHookFunc(&merc_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.mercenary_request(merc_id, char_id); + } + if( HPMHooks.count.HP_intif_mercenary_request_post ) { + int (*postHookFunc) (int retVal___, int *merc_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_request_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_mercenary_request_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &merc_id, &char_id); + } + } + return retVal___; +} +int HP_intif_mercenary_delete(int merc_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_mercenary_delete_pre ) { + int (*preHookFunc) (int *merc_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_mercenary_delete_pre[hIndex].func; + retVal___ = preHookFunc(&merc_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.mercenary_delete(merc_id); + } + if( HPMHooks.count.HP_intif_mercenary_delete_post ) { + int (*postHookFunc) (int retVal___, int *merc_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_mercenary_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &merc_id); + } + } + return retVal___; +} +int HP_intif_mercenary_save(struct s_mercenary *merc) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_mercenary_save_pre ) { + int (*preHookFunc) (struct s_mercenary *merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_mercenary_save_pre[hIndex].func; + retVal___ = preHookFunc(merc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.mercenary_save(merc); + } + if( HPMHooks.count.HP_intif_mercenary_save_post ) { + int (*postHookFunc) (int retVal___, struct s_mercenary *merc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_mercenary_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc); + } + } + return retVal___; +} +int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Mail_requestinbox_pre ) { + int (*preHookFunc) (int *char_id, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_requestinbox_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Mail_requestinbox_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Mail_requestinbox(char_id, flag); + } + if( HPMHooks.count.HP_intif_Mail_requestinbox_post ) { + int (*postHookFunc) (int retVal___, int *char_id, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_requestinbox_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Mail_requestinbox_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &flag); + } + } + return retVal___; +} +int HP_intif_Mail_read(int mail_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Mail_read_pre ) { + int (*preHookFunc) (int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Mail_read_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Mail_read(mail_id); + } + if( HPMHooks.count.HP_intif_Mail_read_post ) { + int (*postHookFunc) (int retVal___, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Mail_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mail_id); + } + } + return retVal___; +} +int HP_intif_Mail_getattach(int char_id, int mail_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Mail_getattach_pre ) { + int (*preHookFunc) (int *char_id, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_getattach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Mail_getattach_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &mail_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Mail_getattach(char_id, mail_id); + } + if( HPMHooks.count.HP_intif_Mail_getattach_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_getattach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Mail_getattach_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &mail_id); + } + } + return retVal___; +} +int HP_intif_Mail_delete(int char_id, int mail_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Mail_delete_pre ) { + int (*preHookFunc) (int *char_id, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Mail_delete_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &mail_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Mail_delete(char_id, mail_id); + } + if( HPMHooks.count.HP_intif_Mail_delete_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Mail_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &mail_id); + } + } + return retVal___; +} +int HP_intif_Mail_return(int char_id, int mail_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Mail_return_pre ) { + int (*preHookFunc) (int *char_id, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_return_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Mail_return_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &mail_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Mail_return(char_id, mail_id); + } + if( HPMHooks.count.HP_intif_Mail_return_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *mail_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_return_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Mail_return_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &mail_id); + } + } + return retVal___; +} +int HP_intif_Mail_send(int account_id, struct mail_message *msg) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Mail_send_pre ) { + int (*preHookFunc) (int *account_id, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Mail_send_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Mail_send(account_id, msg); + } + if( HPMHooks.count.HP_intif_Mail_send_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Mail_send_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, msg); + } + } + return retVal___; +} +int HP_intif_Auction_requestlist(int char_id, short type, int price, const char *searchtext, short page) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Auction_requestlist_pre ) { + int (*preHookFunc) (int *char_id, short *type, int *price, const char *searchtext, short *page); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_requestlist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Auction_requestlist_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &type, &price, searchtext, &page); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Auction_requestlist(char_id, type, price, searchtext, page); + } + if( HPMHooks.count.HP_intif_Auction_requestlist_post ) { + int (*postHookFunc) (int retVal___, int *char_id, short *type, int *price, const char *searchtext, short *page); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_requestlist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Auction_requestlist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &type, &price, searchtext, &page); + } + } + return retVal___; +} +int HP_intif_Auction_register(struct auction_data *auction) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Auction_register_pre ) { + int (*preHookFunc) (struct auction_data *auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Auction_register_pre[hIndex].func; + retVal___ = preHookFunc(auction); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Auction_register(auction); + } + if( HPMHooks.count.HP_intif_Auction_register_post ) { + int (*postHookFunc) (int retVal___, struct auction_data *auction); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Auction_register_post[hIndex].func; + retVal___ = postHookFunc(retVal___, auction); + } + } + return retVal___; +} +int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Auction_cancel_pre ) { + int (*preHookFunc) (int *char_id, unsigned int *auction_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_cancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Auction_cancel_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &auction_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Auction_cancel(char_id, auction_id); + } + if( HPMHooks.count.HP_intif_Auction_cancel_post ) { + int (*postHookFunc) (int retVal___, int *char_id, unsigned int *auction_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_cancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Auction_cancel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &auction_id); + } + } + return retVal___; +} +int HP_intif_Auction_close(int char_id, unsigned int auction_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Auction_close_pre ) { + int (*preHookFunc) (int *char_id, unsigned int *auction_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Auction_close_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &auction_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Auction_close(char_id, auction_id); + } + if( HPMHooks.count.HP_intif_Auction_close_post ) { + int (*postHookFunc) (int retVal___, int *char_id, unsigned int *auction_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Auction_close_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &auction_id); + } + } + return retVal___; +} +int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id, int bid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_Auction_bid_pre ) { + int (*preHookFunc) (int *char_id, const char *name, unsigned int *auction_id, int *bid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_bid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_Auction_bid_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, name, &auction_id, &bid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.Auction_bid(char_id, name, auction_id, bid); + } + if( HPMHooks.count.HP_intif_Auction_bid_post ) { + int (*postHookFunc) (int retVal___, int *char_id, const char *name, unsigned int *auction_id, int *bid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_bid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_Auction_bid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, name, &auction_id, &bid); + } + } + return retVal___; +} +int HP_intif_elemental_create(struct s_elemental *ele) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_elemental_create_pre ) { + int (*preHookFunc) (struct s_elemental *ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_elemental_create_pre[hIndex].func; + retVal___ = preHookFunc(ele); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.elemental_create(ele); + } + if( HPMHooks.count.HP_intif_elemental_create_post ) { + int (*postHookFunc) (int retVal___, struct s_elemental *ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_elemental_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ele); + } + } + return retVal___; +} +int HP_intif_elemental_request(int ele_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_elemental_request_pre ) { + int (*preHookFunc) (int *ele_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_request_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_elemental_request_pre[hIndex].func; + retVal___ = preHookFunc(&ele_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.elemental_request(ele_id, char_id); + } + if( HPMHooks.count.HP_intif_elemental_request_post ) { + int (*postHookFunc) (int retVal___, int *ele_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_request_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_elemental_request_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ele_id, &char_id); + } + } + return retVal___; +} +int HP_intif_elemental_delete(int ele_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_elemental_delete_pre ) { + int (*preHookFunc) (int *ele_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_elemental_delete_pre[hIndex].func; + retVal___ = preHookFunc(&ele_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.elemental_delete(ele_id); + } + if( HPMHooks.count.HP_intif_elemental_delete_post ) { + int (*postHookFunc) (int retVal___, int *ele_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_elemental_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &ele_id); + } + } + return retVal___; +} +int HP_intif_elemental_save(struct s_elemental *ele) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_elemental_save_pre ) { + int (*preHookFunc) (struct s_elemental *ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_elemental_save_pre[hIndex].func; + retVal___ = preHookFunc(ele); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.elemental_save(ele); + } + if( HPMHooks.count.HP_intif_elemental_save_post ) { + int (*postHookFunc) (int retVal___, struct s_elemental *ele); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_elemental_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ele); + } + } + return retVal___; +} +void HP_intif_request_accinfo(int u_fd, int aid, int group_lv, char *query) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_request_accinfo_pre ) { + void (*preHookFunc) (int *u_fd, int *aid, int *group_lv, char *query); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_accinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_request_accinfo_pre[hIndex].func; + preHookFunc(&u_fd, &aid, &group_lv, query); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.request_accinfo(u_fd, aid, group_lv, query); + } + if( HPMHooks.count.HP_intif_request_accinfo_post ) { + void (*postHookFunc) (int *u_fd, int *aid, int *group_lv, char *query); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_accinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_request_accinfo_post[hIndex].func; + postHookFunc(&u_fd, &aid, &group_lv, query); + } + } + return; +} +int HP_intif_CheckForCharServer(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_CheckForCharServer_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_CheckForCharServer_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.CheckForCharServer(); + } + if( HPMHooks.count.HP_intif_CheckForCharServer_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_CheckForCharServer_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_intif_pWisMessage(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pWisMessage_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pWisMessage_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pWisMessage(fd); + } + if( HPMHooks.count.HP_intif_pWisMessage_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pWisMessage_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pWisEnd(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pWisEnd_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pWisEnd_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pWisEnd(fd); + } + if( HPMHooks.count.HP_intif_pWisEnd_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pWisEnd_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_intif_pWisToGM_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list va); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_pre; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + preHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, va___copy); + va_end(va___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list va___copy; va_copy(va___copy, va); + retVal___ = HPMHooks.source.intif.pWisToGM_sub(sd, va___copy); + va_end(va___copy); + } + if( HPMHooks.count.HP_intif_pWisToGM_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_post; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + postHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, va___copy); + va_end(va___copy); + } + } + return retVal___; +} +void HP_intif_pWisToGM(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pWisToGM_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pWisToGM_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pWisToGM(fd); + } + if( HPMHooks.count.HP_intif_pWisToGM_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pWisToGM_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pRegisters(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pRegisters_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRegisters_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pRegisters_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRegisters(fd); + } + if( HPMHooks.count.HP_intif_pRegisters_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRegisters_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pRegisters_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pChangeNameOk(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pChangeNameOk_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pChangeNameOk_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pChangeNameOk(fd); + } + if( HPMHooks.count.HP_intif_pChangeNameOk_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pChangeNameOk_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMessageToFD(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMessageToFD_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMessageToFD_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMessageToFD_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMessageToFD(fd); + } + if( HPMHooks.count.HP_intif_pMessageToFD_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMessageToFD_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMessageToFD_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pLoadGuildStorage(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pLoadGuildStorage_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pLoadGuildStorage_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pLoadGuildStorage(fd); + } + if( HPMHooks.count.HP_intif_pLoadGuildStorage_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pLoadGuildStorage_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pSaveGuildStorage(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pSaveGuildStorage_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pSaveGuildStorage_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pSaveGuildStorage(fd); + } + if( HPMHooks.count.HP_intif_pSaveGuildStorage_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pSaveGuildStorage_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pPartyCreated(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pPartyCreated_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pPartyCreated_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pPartyCreated(fd); + } + if( HPMHooks.count.HP_intif_pPartyCreated_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pPartyCreated_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pPartyInfo(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pPartyInfo_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pPartyInfo_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pPartyInfo(fd); + } + if( HPMHooks.count.HP_intif_pPartyInfo_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pPartyInfo_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pPartyMemberAdded(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pPartyMemberAdded_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pPartyMemberAdded_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pPartyMemberAdded(fd); + } + if( HPMHooks.count.HP_intif_pPartyMemberAdded_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pPartyMemberAdded_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pPartyOptionChanged(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pPartyOptionChanged_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pPartyOptionChanged_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pPartyOptionChanged(fd); + } + if( HPMHooks.count.HP_intif_pPartyOptionChanged_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pPartyOptionChanged_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pPartyMemberWithdraw(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pPartyMemberWithdraw_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pPartyMemberWithdraw(fd); + } + if( HPMHooks.count.HP_intif_pPartyMemberWithdraw_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pPartyMemberWithdraw_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pPartyMove(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pPartyMove_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pPartyMove_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pPartyMove(fd); + } + if( HPMHooks.count.HP_intif_pPartyMove_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pPartyMove_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pPartyBroken(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pPartyBroken_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pPartyBroken_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pPartyBroken(fd); + } + if( HPMHooks.count.HP_intif_pPartyBroken_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pPartyBroken_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pPartyMessage(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pPartyMessage_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pPartyMessage_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pPartyMessage(fd); + } + if( HPMHooks.count.HP_intif_pPartyMessage_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pPartyMessage_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildCreated(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildCreated_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildCreated_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildCreated(fd); + } + if( HPMHooks.count.HP_intif_pGuildCreated_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildCreated_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildInfo(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildInfo_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildInfo_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildInfo(fd); + } + if( HPMHooks.count.HP_intif_pGuildInfo_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildInfo_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildMemberAdded(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildMemberAdded_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildMemberAdded_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildMemberAdded(fd); + } + if( HPMHooks.count.HP_intif_pGuildMemberAdded_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildMemberAdded_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildMemberWithdraw(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildMemberWithdraw_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildMemberWithdraw(fd); + } + if( HPMHooks.count.HP_intif_pGuildMemberWithdraw_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildMemberWithdraw_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildMemberInfoShort(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoShort_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildMemberInfoShort(fd); + } + if( HPMHooks.count.HP_intif_pGuildMemberInfoShort_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoShort_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildBroken(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildBroken_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildBroken_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildBroken(fd); + } + if( HPMHooks.count.HP_intif_pGuildBroken_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildBroken_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildMessage(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildMessage_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildMessage_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildMessage(fd); + } + if( HPMHooks.count.HP_intif_pGuildMessage_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildMessage_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildBasicInfoChanged(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildBasicInfoChanged_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildBasicInfoChanged(fd); + } + if( HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildBasicInfoChanged_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildMemberInfoChanged(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoChanged_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildMemberInfoChanged(fd); + } + if( HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoChanged_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildPosition(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildPosition_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildPosition_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildPosition(fd); + } + if( HPMHooks.count.HP_intif_pGuildPosition_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildPosition_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildSkillUp(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildSkillUp_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildSkillUp_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildSkillUp(fd); + } + if( HPMHooks.count.HP_intif_pGuildSkillUp_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildSkillUp_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildAlliance(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildAlliance_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildAlliance_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildAlliance(fd); + } + if( HPMHooks.count.HP_intif_pGuildAlliance_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildAlliance_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildNotice(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildNotice_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildNotice_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildNotice(fd); + } + if( HPMHooks.count.HP_intif_pGuildNotice_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildNotice_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildEmblem(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildEmblem_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildEmblem_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildEmblem(fd); + } + if( HPMHooks.count.HP_intif_pGuildEmblem_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildEmblem_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildCastleDataLoad(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildCastleDataLoad_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildCastleDataLoad(fd); + } + if( HPMHooks.count.HP_intif_pGuildCastleDataLoad_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildCastleDataLoad_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pGuildMasterChanged(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pGuildMasterChanged_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pGuildMasterChanged_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGuildMasterChanged(fd); + } + if( HPMHooks.count.HP_intif_pGuildMasterChanged_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pGuildMasterChanged_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pQuestLog(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pQuestLog_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pQuestLog_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pQuestLog(fd); + } + if( HPMHooks.count.HP_intif_pQuestLog_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pQuestLog_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pQuestSave(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pQuestSave_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pQuestSave_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pQuestSave(fd); + } + if( HPMHooks.count.HP_intif_pQuestSave_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pQuestSave_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMailInboxReceived(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMailInboxReceived_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMailInboxReceived_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMailInboxReceived(fd); + } + if( HPMHooks.count.HP_intif_pMailInboxReceived_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMailInboxReceived_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMailNew(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMailNew_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMailNew_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMailNew(fd); + } + if( HPMHooks.count.HP_intif_pMailNew_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMailNew_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMailGetAttach(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMailGetAttach_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMailGetAttach_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMailGetAttach(fd); + } + if( HPMHooks.count.HP_intif_pMailGetAttach_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMailGetAttach_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMailDelete(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMailDelete_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMailDelete_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMailDelete(fd); + } + if( HPMHooks.count.HP_intif_pMailDelete_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMailDelete_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMailReturn(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMailReturn_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMailReturn_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMailReturn(fd); + } + if( HPMHooks.count.HP_intif_pMailReturn_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMailReturn_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMailSend(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMailSend_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMailSend_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMailSend(fd); + } + if( HPMHooks.count.HP_intif_pMailSend_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMailSend_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pAuctionResults(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pAuctionResults_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pAuctionResults_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAuctionResults(fd); + } + if( HPMHooks.count.HP_intif_pAuctionResults_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pAuctionResults_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pAuctionRegister(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pAuctionRegister_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pAuctionRegister_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAuctionRegister(fd); + } + if( HPMHooks.count.HP_intif_pAuctionRegister_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pAuctionRegister_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pAuctionCancel(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pAuctionCancel_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pAuctionCancel_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAuctionCancel(fd); + } + if( HPMHooks.count.HP_intif_pAuctionCancel_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pAuctionCancel_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pAuctionClose(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pAuctionClose_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pAuctionClose_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAuctionClose(fd); + } + if( HPMHooks.count.HP_intif_pAuctionClose_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pAuctionClose_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pAuctionMessage(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pAuctionMessage_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pAuctionMessage_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAuctionMessage(fd); + } + if( HPMHooks.count.HP_intif_pAuctionMessage_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pAuctionMessage_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pAuctionBid(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pAuctionBid_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pAuctionBid_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAuctionBid(fd); + } + if( HPMHooks.count.HP_intif_pAuctionBid_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pAuctionBid_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMercenaryReceived(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMercenaryReceived_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMercenaryReceived_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMercenaryReceived(fd); + } + if( HPMHooks.count.HP_intif_pMercenaryReceived_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMercenaryReceived_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMercenaryDeleted(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMercenaryDeleted_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMercenaryDeleted_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMercenaryDeleted(fd); + } + if( HPMHooks.count.HP_intif_pMercenaryDeleted_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMercenaryDeleted_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pMercenarySaved(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pMercenarySaved_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pMercenarySaved_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pMercenarySaved(fd); + } + if( HPMHooks.count.HP_intif_pMercenarySaved_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pMercenarySaved_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pElementalReceived(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pElementalReceived_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pElementalReceived_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pElementalReceived(fd); + } + if( HPMHooks.count.HP_intif_pElementalReceived_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pElementalReceived_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pElementalDeleted(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pElementalDeleted_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pElementalDeleted_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pElementalDeleted(fd); + } + if( HPMHooks.count.HP_intif_pElementalDeleted_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pElementalDeleted_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pElementalSaved(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pElementalSaved_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pElementalSaved_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pElementalSaved(fd); + } + if( HPMHooks.count.HP_intif_pElementalSaved_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pElementalSaved_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pCreatePet(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pCreatePet_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pCreatePet_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pCreatePet(fd); + } + if( HPMHooks.count.HP_intif_pCreatePet_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pCreatePet_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pRecvPetData(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pRecvPetData_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pRecvPetData_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRecvPetData(fd); + } + if( HPMHooks.count.HP_intif_pRecvPetData_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pRecvPetData_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pSavePetOk(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pSavePetOk_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pSavePetOk_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pSavePetOk(fd); + } + if( HPMHooks.count.HP_intif_pSavePetOk_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pSavePetOk_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pDeletePetOk(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pDeletePetOk_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pDeletePetOk_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pDeletePetOk(fd); + } + if( HPMHooks.count.HP_intif_pDeletePetOk_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pDeletePetOk_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pCreateHomunculus(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pCreateHomunculus_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pCreateHomunculus_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pCreateHomunculus(fd); + } + if( HPMHooks.count.HP_intif_pCreateHomunculus_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pCreateHomunculus_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pRecvHomunculusData(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pRecvHomunculusData_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pRecvHomunculusData_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRecvHomunculusData(fd); + } + if( HPMHooks.count.HP_intif_pRecvHomunculusData_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pRecvHomunculusData_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pSaveHomunculusOk(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pSaveHomunculusOk_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pSaveHomunculusOk_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pSaveHomunculusOk(fd); + } + if( HPMHooks.count.HP_intif_pSaveHomunculusOk_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pSaveHomunculusOk_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +void HP_intif_pDeleteHomunculusOk(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pDeleteHomunculusOk_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pDeleteHomunculusOk(fd); + } + if( HPMHooks.count.HP_intif_pDeleteHomunculusOk_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pDeleteHomunculusOk_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} +/* ircbot */ +void HP_ircbot_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.init(); + } + if( HPMHooks.count.HP_ircbot_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_ircbot_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.final(); + } + if( HPMHooks.count.HP_ircbot_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_ircbot_parse(int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_ircbot_parse_pre ) { + int (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_parse_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ircbot.parse(fd); + } + if( HPMHooks.count.HP_ircbot_parse_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +void HP_ircbot_parse_sub(int fd, char *str) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_parse_sub_pre ) { + void (*preHookFunc) (int *fd, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_parse_sub_pre[hIndex].func; + preHookFunc(&fd, str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.parse_sub(fd, str); + } + if( HPMHooks.count.HP_ircbot_parse_sub_post ) { + void (*postHookFunc) (int *fd, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_parse_sub_post[hIndex].func; + postHookFunc(&fd, str); + } + } + return; +} +void HP_ircbot_parse_source(char *source, char *nick, char *ident, char *host) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_parse_source_pre ) { + void (*preHookFunc) (char *source, char *nick, char *ident, char *host); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_parse_source_pre[hIndex].func; + preHookFunc(source, nick, ident, host); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.parse_source(source, nick, ident, host); + } + if( HPMHooks.count.HP_ircbot_parse_source_post ) { + void (*postHookFunc) (char *source, char *nick, char *ident, char *host); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_parse_source_post[hIndex].func; + postHookFunc(source, nick, ident, host); + } + } + return; +} +struct irc_func* HP_ircbot_func_search(char *function_name) { + int hIndex = 0; + struct irc_func* retVal___ = NULL; + if( HPMHooks.count.HP_ircbot_func_search_pre ) { + struct irc_func* (*preHookFunc) (char *function_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_func_search_pre[hIndex].func; + retVal___ = preHookFunc(function_name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ircbot.func_search(function_name); + } + if( HPMHooks.count.HP_ircbot_func_search_post ) { + struct irc_func* (*postHookFunc) (struct irc_func* retVal___, char *function_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_func_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, function_name); + } + } + return retVal___; +} +int HP_ircbot_connect_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_ircbot_connect_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_connect_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ircbot.connect_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_ircbot_connect_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_connect_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_ircbot_identify_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_ircbot_identify_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_identify_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ircbot.identify_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_ircbot_identify_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_identify_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_ircbot_join_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_ircbot_join_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_join_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ircbot.join_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_ircbot_join_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_join_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_ircbot_send(char *str) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_send_pre ) { + void (*preHookFunc) (char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_send_pre[hIndex].func; + preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.send(str); + } + if( HPMHooks.count.HP_ircbot_send_post ) { + void (*postHookFunc) (char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_send_post[hIndex].func; + postHookFunc(str); + } + } + return; +} +void HP_ircbot_relay(char *name, const char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_relay_pre ) { + void (*preHookFunc) (char *name, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_relay_pre[hIndex].func; + preHookFunc(name, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.relay(name, msg); + } + if( HPMHooks.count.HP_ircbot_relay_post ) { + void (*postHookFunc) (char *name, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_relay_post[hIndex].func; + postHookFunc(name, msg); + } + } + return; +} +void HP_ircbot_pong(int fd, char *cmd, char *source, char *target, char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_pong_pre ) { + void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_pong_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_pong_pre[hIndex].func; + preHookFunc(&fd, cmd, source, target, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.pong(fd, cmd, source, target, msg); + } + if( HPMHooks.count.HP_ircbot_pong_post ) { + void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_pong_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_pong_post[hIndex].func; + postHookFunc(&fd, cmd, source, target, msg); + } + } + return; +} +void HP_ircbot_privmsg(int fd, char *cmd, char *source, char *target, char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_privmsg_pre ) { + void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_privmsg_pre[hIndex].func; + preHookFunc(&fd, cmd, source, target, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.privmsg(fd, cmd, source, target, msg); + } + if( HPMHooks.count.HP_ircbot_privmsg_post ) { + void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_privmsg_post[hIndex].func; + postHookFunc(&fd, cmd, source, target, msg); + } + } + return; +} +void HP_ircbot_userjoin(int fd, char *cmd, char *source, char *target, char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_userjoin_pre ) { + void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userjoin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_userjoin_pre[hIndex].func; + preHookFunc(&fd, cmd, source, target, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.userjoin(fd, cmd, source, target, msg); + } + if( HPMHooks.count.HP_ircbot_userjoin_post ) { + void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userjoin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_userjoin_post[hIndex].func; + postHookFunc(&fd, cmd, source, target, msg); + } + } + return; +} +void HP_ircbot_userleave(int fd, char *cmd, char *source, char *target, char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_userleave_pre ) { + void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userleave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_userleave_pre[hIndex].func; + preHookFunc(&fd, cmd, source, target, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.userleave(fd, cmd, source, target, msg); + } + if( HPMHooks.count.HP_ircbot_userleave_post ) { + void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userleave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_userleave_post[hIndex].func; + postHookFunc(&fd, cmd, source, target, msg); + } + } + return; +} +void HP_ircbot_usernick(int fd, char *cmd, char *source, char *target, char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_ircbot_usernick_pre ) { + void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_usernick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_ircbot_usernick_pre[hIndex].func; + preHookFunc(&fd, cmd, source, target, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.usernick(fd, cmd, source, target, msg); + } + if( HPMHooks.count.HP_ircbot_usernick_post ) { + void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_usernick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_ircbot_usernick_post[hIndex].func; + postHookFunc(&fd, cmd, source, target, msg); + } + } + return; +} +/* itemdb */ +void HP_itemdb_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.init(); + } + if( HPMHooks.count.HP_itemdb_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.final(); + } + if( HPMHooks.count.HP_itemdb_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_reload_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_reload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.reload(); + } + if( HPMHooks.count.HP_itemdb_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_name_constants(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_name_constants_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_name_constants_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.name_constants(); + } + if( HPMHooks.count.HP_itemdb_name_constants_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_name_constants_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_force_name_constants(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_force_name_constants_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_force_name_constants_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_force_name_constants_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.force_name_constants(); + } + if( HPMHooks.count.HP_itemdb_force_name_constants_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_force_name_constants_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_force_name_constants_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_read_groups(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_read_groups_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_groups_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.read_groups(); + } + if( HPMHooks.count.HP_itemdb_read_groups_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_groups_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_read_chains(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_read_chains_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_chains_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.read_chains(); + } + if( HPMHooks.count.HP_itemdb_read_chains_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_chains_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_read_packages(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_read_packages_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_packages_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.read_packages(); + } + if( HPMHooks.count.HP_itemdb_read_packages_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_packages_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_write_cached_packages(const char *config_filename) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_write_cached_packages_pre ) { + void (*preHookFunc) (const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_write_cached_packages_pre[hIndex].func; + preHookFunc(config_filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.write_cached_packages(config_filename); + } + if( HPMHooks.count.HP_itemdb_write_cached_packages_post ) { + void (*postHookFunc) (const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_write_cached_packages_post[hIndex].func; + postHookFunc(config_filename); + } + } + return; +} +bool HP_itemdb_read_cached_packages(const char *config_filename) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_itemdb_read_cached_packages_pre ) { + bool (*preHookFunc) (const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_cached_packages_pre[hIndex].func; + retVal___ = preHookFunc(config_filename); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_cached_packages(config_filename); + } + if( HPMHooks.count.HP_itemdb_read_cached_packages_post ) { + bool (*postHookFunc) (bool retVal___, const char *config_filename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_cached_packages_post[hIndex].func; + retVal___ = postHookFunc(retVal___, config_filename); + } + } + return retVal___; +} +struct item_data* HP_itemdb_name2id(const char *str) { + int hIndex = 0; + struct item_data* retVal___ = NULL; + if( HPMHooks.count.HP_itemdb_name2id_pre ) { + struct item_data* (*preHookFunc) (const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_name2id_pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.name2id(str); + } + if( HPMHooks.count.HP_itemdb_name2id_post ) { + struct item_data* (*postHookFunc) (struct item_data* retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_name2id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); + } + } + return retVal___; +} +struct item_data* HP_itemdb_search_name(const char *name) { + int hIndex = 0; + struct item_data* retVal___ = NULL; + if( HPMHooks.count.HP_itemdb_search_name_pre ) { + struct item_data* (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_search_name_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.search_name(name); + } + if( HPMHooks.count.HP_itemdb_search_name_post ) { + struct item_data* (*postHookFunc) (struct item_data* retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_search_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +int HP_itemdb_search_name_array(struct item_data **data, int size, const char *str, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_search_name_array_pre ) { + int (*preHookFunc) (struct item_data **data, int *size, const char *str, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_search_name_array_pre[hIndex].func; + retVal___ = preHookFunc(data, &size, str, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.search_name_array(data, size, str, flag); + } + if( HPMHooks.count.HP_itemdb_search_name_array_post ) { + int (*postHookFunc) (int retVal___, struct item_data **data, int *size, const char *str, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_search_name_array_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data, &size, str, &flag); + } + } + return retVal___; +} +struct item_data* HP_itemdb_load(int nameid) { + int hIndex = 0; + struct item_data* retVal___ = NULL; + if( HPMHooks.count.HP_itemdb_load_pre ) { + struct item_data* (*preHookFunc) (int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_load_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.load(nameid); + } + if( HPMHooks.count.HP_itemdb_load_post ) { + struct item_data* (*postHookFunc) (struct item_data* retVal___, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid); + } + } + return retVal___; +} +struct item_data* HP_itemdb_search(int nameid) { + int hIndex = 0; + struct item_data* retVal___ = NULL; + if( HPMHooks.count.HP_itemdb_search_pre ) { + struct item_data* (*preHookFunc) (int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_search_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.search(nameid); + } + if( HPMHooks.count.HP_itemdb_search_post ) { + struct item_data* (*postHookFunc) (struct item_data* retVal___, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid); + } + } + return retVal___; +} +int HP_itemdb_parse_dbrow(char **str, const char *source, int line, int scriptopt) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_parse_dbrow_pre ) { + int (*preHookFunc) (char **str, const char *source, int *line, int *scriptopt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_parse_dbrow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_parse_dbrow_pre[hIndex].func; + retVal___ = preHookFunc(str, source, &line, &scriptopt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.parse_dbrow(str, source, line, scriptopt); + } + if( HPMHooks.count.HP_itemdb_parse_dbrow_post ) { + int (*postHookFunc) (int retVal___, char **str, const char *source, int *line, int *scriptopt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_parse_dbrow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_parse_dbrow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, source, &line, &scriptopt); + } + } + return retVal___; +} +struct item_data* HP_itemdb_exists(int nameid) { + int hIndex = 0; + struct item_data* retVal___ = NULL; + if( HPMHooks.count.HP_itemdb_exists_pre ) { + struct item_data* (*preHookFunc) (int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_exists_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_exists_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.exists(nameid); + } + if( HPMHooks.count.HP_itemdb_exists_post ) { + struct item_data* (*postHookFunc) (struct item_data* retVal___, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_exists_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid); + } + } + return retVal___; +} +bool HP_itemdb_in_group(struct item_group *group, int nameid) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_itemdb_in_group_pre ) { + bool (*preHookFunc) (struct item_group *group, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_in_group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_in_group_pre[hIndex].func; + retVal___ = preHookFunc(group, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.in_group(group, nameid); + } + if( HPMHooks.count.HP_itemdb_in_group_post ) { + bool (*postHookFunc) (bool retVal___, struct item_group *group, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_in_group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_in_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, &nameid); + } + } + return retVal___; +} +int HP_itemdb_group_item(struct item_group *group) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_group_item_pre ) { + int (*preHookFunc) (struct item_group *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_group_item_pre[hIndex].func; + retVal___ = preHookFunc(group); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.group_item(group); + } + if( HPMHooks.count.HP_itemdb_group_item_post ) { + int (*postHookFunc) (int retVal___, struct item_group *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_group_item_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group); + } + } + return retVal___; +} +int HP_itemdb_chain_item(unsigned short chain_id, int *rate) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_chain_item_pre ) { + int (*preHookFunc) (unsigned short *chain_id, int *rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_chain_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_chain_item_pre[hIndex].func; + retVal___ = preHookFunc(&chain_id, rate); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.chain_item(chain_id, rate); + } + if( HPMHooks.count.HP_itemdb_chain_item_post ) { + int (*postHookFunc) (int retVal___, unsigned short *chain_id, int *rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_chain_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_chain_item_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &chain_id, rate); + } + } + return retVal___; +} +void HP_itemdb_package_item(struct map_session_data *sd, struct item_package *package) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_package_item_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct item_package *package); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_package_item_pre[hIndex].func; + preHookFunc(sd, package); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.package_item(sd, package); + } + if( HPMHooks.count.HP_itemdb_package_item_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct item_package *package); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_package_item_post[hIndex].func; + postHookFunc(sd, package); + } + } + return; +} +int HP_itemdb_searchname_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_searchname_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_searchname_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.itemdb.searchname_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_itemdb_searchname_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_searchname_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_searchname_array_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_searchname_array_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, &data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.itemdb.searchname_array_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_itemdb_searchname_array_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_searchname_array_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, &data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_itemdb_searchrandomid(struct item_group *group) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_searchrandomid_pre ) { + int (*preHookFunc) (struct item_group *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_searchrandomid_pre[hIndex].func; + retVal___ = preHookFunc(group); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.searchrandomid(group); + } + if( HPMHooks.count.HP_itemdb_searchrandomid_post ) { + int (*postHookFunc) (int retVal___, struct item_group *group); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_searchrandomid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group); + } + } + return retVal___; +} +const char* HP_itemdb_typename(int type) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_itemdb_typename_pre ) { + const char* (*preHookFunc) (int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_typename_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.typename(type); + } + if( HPMHooks.count.HP_itemdb_typename_post ) { + const char* (*postHookFunc) (const char* retVal___, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_typename_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); + } + } + return retVal___; +} +void HP_itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_jobid2mapid_pre ) { + void (*preHookFunc) (unsigned int *bclass, unsigned int *jobmask); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_pre[hIndex].func; + preHookFunc(bclass, &jobmask); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.jobid2mapid(bclass, jobmask); + } + if( HPMHooks.count.HP_itemdb_jobid2mapid_post ) { + void (*postHookFunc) (unsigned int *bclass, unsigned int *jobmask); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_post[hIndex].func; + postHookFunc(bclass, &jobmask); + } + } + return; +} +void HP_itemdb_create_dummy_data(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_create_dummy_data_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_create_dummy_data_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.create_dummy_data(); + } + if( HPMHooks.count.HP_itemdb_create_dummy_data_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_create_dummy_data_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct item_data* HP_itemdb_create_item_data(int nameid) { + int hIndex = 0; + struct item_data* retVal___ = NULL; + if( HPMHooks.count.HP_itemdb_create_item_data_pre ) { + struct item_data* (*preHookFunc) (int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_item_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_create_item_data_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.create_item_data(nameid); + } + if( HPMHooks.count.HP_itemdb_create_item_data_post ) { + struct item_data* (*postHookFunc) (struct item_data* retVal___, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_item_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_create_item_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid); + } + } + return retVal___; +} +int HP_itemdb_isequip(int nameid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_isequip_pre ) { + int (*preHookFunc) (int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_isequip_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.isequip(nameid); + } + if( HPMHooks.count.HP_itemdb_isequip_post ) { + int (*postHookFunc) (int retVal___, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_isequip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid); + } + } + return retVal___; +} +int HP_itemdb_isequip2(struct item_data *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_isequip2_pre ) { + int (*preHookFunc) (struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_isequip2_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.isequip2(data); + } + if( HPMHooks.count.HP_itemdb_isequip2_post ) { + int (*postHookFunc) (int retVal___, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_isequip2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +int HP_itemdb_isstackable(int nameid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_isstackable_pre ) { + int (*preHookFunc) (int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_isstackable_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.isstackable(nameid); + } + if( HPMHooks.count.HP_itemdb_isstackable_post ) { + int (*postHookFunc) (int retVal___, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_isstackable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid); + } + } + return retVal___; +} +int HP_itemdb_isstackable2(struct item_data *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_isstackable2_pre ) { + int (*preHookFunc) (struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_isstackable2_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.isstackable2(data); + } + if( HPMHooks.count.HP_itemdb_isstackable2_post ) { + int (*postHookFunc) (int retVal___, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_isstackable2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_isdropable_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isdropable_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_isdropable_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &unused); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.isdropable_sub(item, gmlv, unused); + } + if( HPMHooks.count.HP_itemdb_isdropable_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isdropable_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_isdropable_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &unused); + } + } + return retVal___; +} +int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_cantrade_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *gmlv2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cantrade_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_cantrade_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &gmlv2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.cantrade_sub(item, gmlv, gmlv2); + } + if( HPMHooks.count.HP_itemdb_cantrade_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *gmlv2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cantrade_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_cantrade_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &gmlv2); + } + } + return retVal___; +} +int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *gmlv2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_canpartnertrade_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &gmlv2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.canpartnertrade_sub(item, gmlv, gmlv2); + } + if( HPMHooks.count.HP_itemdb_canpartnertrade_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *gmlv2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canpartnertrade_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_canpartnertrade_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &gmlv2); + } + } + return retVal___; +} +int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_cansell_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cansell_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_cansell_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &unused); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.cansell_sub(item, gmlv, unused); + } + if( HPMHooks.count.HP_itemdb_cansell_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cansell_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_cansell_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &unused); + } + } + return retVal___; +} +int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_cancartstore_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cancartstore_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_cancartstore_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &unused); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.cancartstore_sub(item, gmlv, unused); + } + if( HPMHooks.count.HP_itemdb_cancartstore_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cancartstore_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_cancartstore_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &unused); + } + } + return retVal___; +} +int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_canstore_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canstore_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_canstore_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &unused); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.canstore_sub(item, gmlv, unused); + } + if( HPMHooks.count.HP_itemdb_canstore_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canstore_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_canstore_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &unused); + } + } + return retVal___; +} +int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_canguildstore_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canguildstore_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_canguildstore_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &unused); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.canguildstore_sub(item, gmlv, unused); + } + if( HPMHooks.count.HP_itemdb_canguildstore_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canguildstore_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_canguildstore_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &unused); + } + } + return retVal___; +} +int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_canmail_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canmail_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_canmail_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &unused); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.canmail_sub(item, gmlv, unused); + } + if( HPMHooks.count.HP_itemdb_canmail_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canmail_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_canmail_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &unused); + } + } + return retVal___; +} +int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_canauction_sub_pre ) { + int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canauction_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_canauction_sub_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &unused); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.canauction_sub(item, gmlv, unused); + } + if( HPMHooks.count.HP_itemdb_canauction_sub_post ) { + int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canauction_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_canauction_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &unused); + } + } + return retVal___; +} +int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func ) (struct item_data *, int, int)) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_isrestricted_pre ) { + int (*preHookFunc) (struct item *item, int *gmlv, int *gmlv2, int ( *func ) (struct item_data *, int, int)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isrestricted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_isrestricted_pre[hIndex].func; + retVal___ = preHookFunc(item, &gmlv, &gmlv2, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.isrestricted(item, gmlv, gmlv2, func); + } + if( HPMHooks.count.HP_itemdb_isrestricted_post ) { + int (*postHookFunc) (int retVal___, struct item *item, int *gmlv, int *gmlv2, int ( *func ) (struct item_data *, int, int)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isrestricted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_isrestricted_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item, &gmlv, &gmlv2, func); + } + } + return retVal___; +} +int HP_itemdb_isidentified(int nameid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_isidentified_pre ) { + int (*preHookFunc) (int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_isidentified_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.isidentified(nameid); + } + if( HPMHooks.count.HP_itemdb_isidentified_post ) { + int (*postHookFunc) (int retVal___, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_isidentified_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid); + } + } + return retVal___; +} +int HP_itemdb_isidentified2(struct item_data *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_isidentified2_pre ) { + int (*preHookFunc) (struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_isidentified2_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.isidentified2(data); + } + if( HPMHooks.count.HP_itemdb_isidentified2_post ) { + int (*postHookFunc) (int retVal___, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_isidentified2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +bool HP_itemdb_read_itemavail(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_itemdb_read_itemavail_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemavail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_itemavail_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_itemavail(str, columns, current); + } + if( HPMHooks.count.HP_itemdb_read_itemavail_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemavail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_itemavail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +bool HP_itemdb_read_itemtrade(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_itemdb_read_itemtrade_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemtrade_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_itemtrade_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_itemtrade(str, columns, current); + } + if( HPMHooks.count.HP_itemdb_read_itemtrade_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemtrade_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_itemtrade_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +bool HP_itemdb_read_itemdelay(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_itemdb_read_itemdelay_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemdelay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_itemdelay_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_itemdelay(str, columns, current); + } + if( HPMHooks.count.HP_itemdb_read_itemdelay_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemdelay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_itemdelay_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +bool HP_itemdb_read_stack(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_itemdb_read_stack_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_stack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_stack_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_stack(fields, columns, current); + } + if( HPMHooks.count.HP_itemdb_read_stack_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_stack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_stack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +bool HP_itemdb_read_buyingstore(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_itemdb_read_buyingstore_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_buyingstore_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_buyingstore_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_buyingstore(fields, columns, current); + } + if( HPMHooks.count.HP_itemdb_read_buyingstore_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_buyingstore_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_buyingstore_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +bool HP_itemdb_read_nouse(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_itemdb_read_nouse_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_nouse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_nouse_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_nouse(fields, columns, current); + } + if( HPMHooks.count.HP_itemdb_read_nouse_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_nouse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_nouse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +int HP_itemdb_combo_split_atoi(char *str, int *val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_combo_split_atoi_pre ) { + int (*preHookFunc) (char *str, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_combo_split_atoi_pre[hIndex].func; + retVal___ = preHookFunc(str, val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.combo_split_atoi(str, val); + } + if( HPMHooks.count.HP_itemdb_combo_split_atoi_post ) { + int (*postHookFunc) (int retVal___, char *str, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_combo_split_atoi_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, val); + } + } + return retVal___; +} +void HP_itemdb_read_combos(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_read_combos_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_combos_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.read_combos(); + } + if( HPMHooks.count.HP_itemdb_read_combos_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_combos_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_itemdb_gendercheck(struct item_data *id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_gendercheck_pre ) { + int (*preHookFunc) (struct item_data *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_gendercheck_pre[hIndex].func; + retVal___ = preHookFunc(id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.gendercheck(id); + } + if( HPMHooks.count.HP_itemdb_gendercheck_post ) { + int (*postHookFunc) (int retVal___, struct item_data *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_gendercheck_post[hIndex].func; + retVal___ = postHookFunc(retVal___, id); + } + } + return retVal___; +} +void HP_itemdb_re_split_atoi(char *str, int *atk, int *matk) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_re_split_atoi_pre ) { + void (*preHookFunc) (char *str, int *atk, int *matk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_re_split_atoi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_re_split_atoi_pre[hIndex].func; + preHookFunc(str, atk, matk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.re_split_atoi(str, atk, matk); + } + if( HPMHooks.count.HP_itemdb_re_split_atoi_post ) { + void (*postHookFunc) (char *str, int *atk, int *matk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_re_split_atoi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_re_split_atoi_post[hIndex].func; + postHookFunc(str, atk, matk); + } + } + return; +} +int HP_itemdb_readdb(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_readdb_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_readdb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.readdb(); + } + if( HPMHooks.count.HP_itemdb_readdb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_readdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_itemdb_read_sqldb(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_read_sqldb_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_sqldb(); + } + if( HPMHooks.count.HP_itemdb_read_sqldb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +uint64 HP_itemdb_unique_id(int8 flag, int64 value) { + int hIndex = 0; + uint64 retVal___; + memset(&retVal___, '\0', sizeof(uint64)); + if( HPMHooks.count.HP_itemdb_unique_id_pre ) { + uint64 (*preHookFunc) (int8 *flag, int64 *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_unique_id_pre[hIndex].func; + retVal___ = preHookFunc(&flag, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.unique_id(flag, value); + } + if( HPMHooks.count.HP_itemdb_unique_id_post ) { + uint64 (*postHookFunc) (uint64 retVal___, int8 *flag, int64 *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_unique_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &flag, &value); + } + } + return retVal___; +} +int HP_itemdb_uid_load(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_uid_load_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_uid_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_uid_load_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.uid_load(); + } + if( HPMHooks.count.HP_itemdb_uid_load_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_uid_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_uid_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_itemdb_read(void) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_read_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_read_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.read(); + } + if( HPMHooks.count.HP_itemdb_read_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_read_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_itemdb_destroy_item_data(struct item_data *self, int free_self) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_destroy_item_data_pre ) { + void (*preHookFunc) (struct item_data *self, int *free_self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_destroy_item_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_destroy_item_data_pre[hIndex].func; + preHookFunc(self, &free_self); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.destroy_item_data(self, free_self); + } + if( HPMHooks.count.HP_itemdb_destroy_item_data_post ) { + void (*postHookFunc) (struct item_data *self, int *free_self); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_destroy_item_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_destroy_item_data_post[hIndex].func; + postHookFunc(self, &free_self); + } + } + return; +} +int HP_itemdb_final_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_itemdb_final_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_final_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.itemdb.final_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_itemdb_final_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_final_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +/* logs */ +void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_pick_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_pick_pc_pre[hIndex].func; + preHookFunc(sd, &type, &amount, itm, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.pick_pc(sd, type, amount, itm, data); + } + if( HPMHooks.count.HP_logs_pick_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_pick_pc_post[hIndex].func; + postHookFunc(sd, &type, &amount, itm, data); + } + } + return; +} +void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_pick_mob_pre ) { + void (*preHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_pick_mob_pre[hIndex].func; + preHookFunc(md, &type, &amount, itm, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.pick_mob(md, type, amount, itm, data); + } + if( HPMHooks.count.HP_logs_pick_mob_post ) { + void (*postHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_pick_mob_post[hIndex].func; + postHookFunc(md, &type, &amount, itm, data); + } + } + return; +} +void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_zeny_pre ) { + void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_zeny_pre[hIndex].func; + preHookFunc(sd, &type, src_sd, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.zeny(sd, type, src_sd, amount); + } + if( HPMHooks.count.HP_logs_zeny_post ) { + void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_zeny_post[hIndex].func; + postHookFunc(sd, &type, src_sd, &amount); + } + } + return; +} +void HP_logs_npc(struct map_session_data *sd, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_npc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_npc_pre[hIndex].func; + preHookFunc(sd, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.npc(sd, message); + } + if( HPMHooks.count.HP_logs_npc_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_npc_post[hIndex].func; + postHookFunc(sd, message); + } + } + return; +} +void HP_logs_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char *dst_charname, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_chat_pre ) { + void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_chat_pre[hIndex].func; + preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.chat(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message); + } + if( HPMHooks.count.HP_logs_chat_post ) { + void (*postHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_chat_post[hIndex].func; + postHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + } + } + return; +} +void HP_logs_atcommand(struct map_session_data *sd, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_atcommand_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_atcommand_pre[hIndex].func; + preHookFunc(sd, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.atcommand(sd, message); + } + if( HPMHooks.count.HP_logs_atcommand_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_atcommand_post[hIndex].func; + postHookFunc(sd, message); + } + } + return; +} +void HP_logs_branch(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_branch_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_branch_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.branch(sd); + } + if( HPMHooks.count.HP_logs_branch_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_branch_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_mvpdrop_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_mvpdrop_pre[hIndex].func; + preHookFunc(sd, &monster_id, log_mvp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.mvpdrop(sd, monster_id, log_mvp); + } + if( HPMHooks.count.HP_logs_mvpdrop_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_mvpdrop_post[hIndex].func; + postHookFunc(sd, &monster_id, log_mvp); + } + } + return; +} +void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_pick_sub_pre ) { + void (*preHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_pick_sub_pre[hIndex].func; + preHookFunc(&id, &m, &type, &amount, itm, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.pick_sub(id, m, type, amount, itm, data); + } + if( HPMHooks.count.HP_logs_pick_sub_post ) { + void (*postHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_pick_sub_post[hIndex].func; + postHookFunc(&id, &m, &type, &amount, itm, data); + } + } + return; +} +void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_zeny_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_zeny_sub_pre[hIndex].func; + preHookFunc(sd, &type, src_sd, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.zeny_sub(sd, type, src_sd, amount); + } + if( HPMHooks.count.HP_logs_zeny_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_zeny_sub_post[hIndex].func; + postHookFunc(sd, &type, src_sd, &amount); + } + } + return; +} +void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_npc_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_npc_sub_pre[hIndex].func; + preHookFunc(sd, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.npc_sub(sd, message); + } + if( HPMHooks.count.HP_logs_npc_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_npc_sub_post[hIndex].func; + postHookFunc(sd, message); + } + } + return; +} +void HP_logs_chat_sub(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char *dst_charname, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_chat_sub_pre ) { + void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_chat_sub_pre[hIndex].func; + preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.chat_sub(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message); + } + if( HPMHooks.count.HP_logs_chat_sub_post ) { + void (*postHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_chat_sub_post[hIndex].func; + postHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message); + } + } + return; +} +void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_atcommand_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_atcommand_sub_pre[hIndex].func; + preHookFunc(sd, message); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.atcommand_sub(sd, message); + } + if( HPMHooks.count.HP_logs_atcommand_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_atcommand_sub_post[hIndex].func; + postHookFunc(sd, message); + } + } + return; +} +void HP_logs_branch_sub(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_branch_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_branch_sub_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.branch_sub(sd); + } + if( HPMHooks.count.HP_logs_branch_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_branch_sub_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_mvp) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_mvpdrop_sub_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_pre[hIndex].func; + preHookFunc(sd, &monster_id, log_mvp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.mvpdrop_sub(sd, monster_id, log_mvp); + } + if( HPMHooks.count.HP_logs_mvpdrop_sub_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_post[hIndex].func; + postHookFunc(sd, &monster_id, log_mvp); + } + } + return; +} +int HP_logs_config_read(const char *cfgName) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_logs_config_read_pre ) { + int (*preHookFunc) (const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.logs.config_read(cfgName); + } + if( HPMHooks.count.HP_logs_config_read_post ) { + int (*postHookFunc) (int retVal___, const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +void HP_logs_config_done(void) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_config_done_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_config_done_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.config_done(); + } + if( HPMHooks.count.HP_logs_config_done_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_config_done_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_logs_sql_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_sql_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_sql_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.sql_init(); + } + if( HPMHooks.count.HP_logs_sql_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_sql_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_logs_sql_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_logs_sql_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_sql_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.logs.sql_final(); + } + if( HPMHooks.count.HP_logs_sql_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_sql_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +char HP_logs_picktype2char(e_log_pick_type type) { + int hIndex = 0; + char retVal___; + memset(&retVal___, '\0', sizeof(char)); + if( HPMHooks.count.HP_logs_picktype2char_pre ) { + char (*preHookFunc) (e_log_pick_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_picktype2char_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.logs.picktype2char(type); + } + if( HPMHooks.count.HP_logs_picktype2char_post ) { + char (*postHookFunc) (char retVal___, e_log_pick_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_picktype2char_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); + } + } + return retVal___; +} +char HP_logs_chattype2char(e_log_chat_type type) { + int hIndex = 0; + char retVal___; + memset(&retVal___, '\0', sizeof(char)); + if( HPMHooks.count.HP_logs_chattype2char_pre ) { + char (*preHookFunc) (e_log_chat_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_chattype2char_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.logs.chattype2char(type); + } + if( HPMHooks.count.HP_logs_chattype2char_post ) { + char (*postHookFunc) (char retVal___, e_log_chat_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_chattype2char_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); + } + } + return retVal___; +} +bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_logs_should_log_item_pre ) { + bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_logs_should_log_item_pre[hIndex].func; + retVal___ = preHookFunc(&nameid, &amount, &refine, id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id); + } + if( HPMHooks.count.HP_logs_should_log_item_post ) { + bool (*postHookFunc) (bool retVal___, int *nameid, int *amount, int *refine, struct item_data *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_logs_should_log_item_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid, &amount, &refine, id); + } + } + return retVal___; +} +/* mail */ +void HP_mail_clear(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_mail_clear_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_clear_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mail.clear(sd); + } + if( HPMHooks.count.HP_mail_clear_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_clear_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_mail_removeitem(struct map_session_data *sd, short flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mail_removeitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_removeitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.removeitem(sd, flag); + } + if( HPMHooks.count.HP_mail_removeitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_removeitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_mail_removezeny(struct map_session_data *sd, short flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mail_removezeny_pre ) { + int (*preHookFunc) (struct map_session_data *sd, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_removezeny_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.removezeny(sd, flag); + } + if( HPMHooks.count.HP_mail_removezeny_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_removezeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) { + int hIndex = 0; + unsigned char retVal___; + memset(&retVal___, '\0', sizeof(unsigned char)); + if( HPMHooks.count.HP_mail_setitem_pre ) { + unsigned char (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_setitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.setitem(sd, idx, amount); + } + if( HPMHooks.count.HP_mail_setitem_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_setitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + } + } + return retVal___; +} +bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mail_setattachment_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_setattachment_pre[hIndex].func; + retVal___ = preHookFunc(sd, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.setattachment(sd, msg); + } + if( HPMHooks.count.HP_mail_setattachment_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_setattachment_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, msg); + } + } + return retVal___; +} +void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *item) { + int hIndex = 0; + if( HPMHooks.count.HP_mail_getattachment_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *zeny, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_getattachment_pre[hIndex].func; + preHookFunc(sd, &zeny, item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mail.getattachment(sd, zeny, item); + } + if( HPMHooks.count.HP_mail_getattachment_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *zeny, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_getattachment_post[hIndex].func; + postHookFunc(sd, &zeny, item); + } + } + return; +} +int HP_mail_openmail(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mail_openmail_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_openmail_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.openmail(sd); + } + if( HPMHooks.count.HP_mail_openmail_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_openmail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_mail_deliveryfail_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_deliveryfail_pre[hIndex].func; + preHookFunc(sd, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mail.deliveryfail(sd, msg); + } + if( HPMHooks.count.HP_mail_deliveryfail_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct mail_message *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_deliveryfail_post[hIndex].func; + postHookFunc(sd, msg); + } + } + return; +} +bool HP_mail_invalid_operation(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mail_invalid_operation_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mail_invalid_operation_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mail.invalid_operation(sd); + } + if( HPMHooks.count.HP_mail_invalid_operation_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mail_invalid_operation_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +/* map */ +void HP_map_zone_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_init(); + } + if( HPMHooks.count.HP_map_zone_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_map_zone_remove(int m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_remove_pre ) { + void (*preHookFunc) (int *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_remove_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_remove(m); + } + if( HPMHooks.count.HP_map_zone_remove_post ) { + void (*postHookFunc) (int *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_remove_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_apply_pre ) { + void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_apply_pre[hIndex].func; + preHookFunc(&m, zone, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_apply(m, zone, start, buffer, filepath); + } + if( HPMHooks.count.HP_map_zone_apply_post ) { + void (*postHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_apply_post[hIndex].func; + postHookFunc(&m, zone, start, buffer, filepath); + } + } + return; +} +void HP_map_zone_change(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_change_pre ) { + void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_change_pre[hIndex].func; + preHookFunc(&m, zone, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_change(m, zone, start, buffer, filepath); + } + if( HPMHooks.count.HP_map_zone_change_post ) { + void (*postHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_change_post[hIndex].func; + postHookFunc(&m, zone, start, buffer, filepath); + } + } + return; +} +void HP_map_zone_change2(int m, struct map_zone_data *zone) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_change2_pre ) { + void (*preHookFunc) (int *m, struct map_zone_data *zone); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_change2_pre[hIndex].func; + preHookFunc(&m, zone); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_change2(m, zone); + } + if( HPMHooks.count.HP_map_zone_change2_post ) { + void (*postHookFunc) (int *m, struct map_zone_data *zone); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_change2_post[hIndex].func; + postHookFunc(&m, zone); + } + } + return; +} +int HP_map_getcell(int16 m, int16 x, int16 y, cell_chk cellchk) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_getcell_pre ) { + int (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_getcell_pre[hIndex].func; + retVal___ = preHookFunc(&m, &x, &y, &cellchk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.getcell(m, x, y, cellchk); + } + if( HPMHooks.count.HP_map_getcell_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_getcell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &x, &y, &cellchk); + } + } + return retVal___; +} +void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) { + int hIndex = 0; + if( HPMHooks.count.HP_map_setgatcell_pre ) { + void (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *gat); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_setgatcell_pre[hIndex].func; + preHookFunc(&m, &x, &y, &gat); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.setgatcell(m, x, y, gat); + } + if( HPMHooks.count.HP_map_setgatcell_post ) { + void (*postHookFunc) (int16 *m, int16 *x, int16 *y, int *gat); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_setgatcell_post[hIndex].func; + postHookFunc(&m, &x, &y, &gat); + } + } + return; +} +void HP_map_cellfromcache(struct map_data *m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_cellfromcache_pre ) { + void (*preHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_cellfromcache_pre[hIndex].func; + preHookFunc(m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.cellfromcache(m); + } + if( HPMHooks.count.HP_map_cellfromcache_post ) { + void (*postHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_cellfromcache_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +void HP_map_setusers(int p1) { + int hIndex = 0; + if( HPMHooks.count.HP_map_setusers_pre ) { + void (*preHookFunc) (int *p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_setusers_pre[hIndex].func; + preHookFunc(&p1); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.setusers(p1); + } + if( HPMHooks.count.HP_map_setusers_post ) { + void (*postHookFunc) (int *p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_setusers_post[hIndex].func; + postHookFunc(&p1); + } + } + return; +} +int HP_map_getusers(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_getusers_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_getusers_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.getusers(); + } + if( HPMHooks.count.HP_map_getusers_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_getusers_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_usercount(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_usercount_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_usercount_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.usercount(); + } + if( HPMHooks.count.HP_map_usercount_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_usercount_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_freeblock(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_freeblock_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_freeblock_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.freeblock(bl); + } + if( HPMHooks.count.HP_map_freeblock_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_freeblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_map_freeblock_lock(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_freeblock_lock_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_freeblock_lock_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.freeblock_lock(); + } + if( HPMHooks.count.HP_map_freeblock_lock_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_freeblock_lock_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_freeblock_unlock(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_freeblock_unlock_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_freeblock_unlock_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.freeblock_unlock(); + } + if( HPMHooks.count.HP_map_freeblock_unlock_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_freeblock_unlock_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_addblock(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_addblock_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addblock_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addblock(bl); + } + if( HPMHooks.count.HP_map_addblock_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_map_delblock(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_delblock_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delblock_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.delblock(bl); + } + if( HPMHooks.count.HP_map_delblock_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_moveblock_pre ) { + int (*preHookFunc) (struct block_list *bl, int *x1, int *y1, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_moveblock_pre[hIndex].func; + retVal___ = preHookFunc(bl, &x1, &y1, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.moveblock(bl, x1, y1, tick); + } + if( HPMHooks.count.HP_map_moveblock_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *x1, int *y1, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_moveblock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &x1, &y1, &tick); + } + } + return retVal___; +} +int HP_map_count_oncell(int16 m, int16 x, int16 y, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_count_oncell_pre ) { + int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_count_oncell_pre[hIndex].func; + retVal___ = preHookFunc(&m, &x, &y, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.count_oncell(m, x, y, type); + } + if( HPMHooks.count.HP_map_count_oncell_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_count_oncell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &x, &y, &type); + } + } + return retVal___; +} +struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int16 x, int16 y, uint16 skill_id, struct skill_unit *out_unit, int flag) { + int hIndex = 0; + struct skill_unit* retVal___ = NULL; + if( HPMHooks.count.HP_map_find_skill_unit_oncell_pre ) { + struct skill_unit* (*preHookFunc) (struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_pre[hIndex].func; + retVal___ = preHookFunc(target, &x, &y, &skill_id, out_unit, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.find_skill_unit_oncell(target, x, y, skill_id, out_unit, flag); + } + if( HPMHooks.count.HP_map_find_skill_unit_oncell_post ) { + struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, target, &x, &y, &skill_id, out_unit, &flag); + } + } + return retVal___; +} +int HP_map_get_new_object_id(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_get_new_object_id_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_get_new_object_id_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.get_new_object_id(); + } + if( HPMHooks.count.HP_map_get_new_object_id_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_get_new_object_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, int16 rx, int16 ry, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_search_freecell_pre ) { + int (*preHookFunc) (struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_search_freecell_pre[hIndex].func; + retVal___ = preHookFunc(src, &m, x, y, &rx, &ry, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.search_freecell(src, m, x, y, rx, ry, flag); + } + if( HPMHooks.count.HP_map_search_freecell_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_search_freecell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &m, x, y, &rx, &ry, &flag); + } + } + return retVal___; +} +int HP_map_quit(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_quit_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_quit_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.quit(sd); + } + if( HPMHooks.count.HP_map_quit_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_quit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +bool HP_map_addnpc(int16 m, struct npc_data *nd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_map_addnpc_pre ) { + bool (*preHookFunc) (int16 *m, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addnpc_pre[hIndex].func; + retVal___ = preHookFunc(&m, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addnpc(m, nd); + } + if( HPMHooks.count.HP_map_addnpc_post ) { + bool (*postHookFunc) (bool retVal___, int16 *m, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addnpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, nd); + } + } + return retVal___; +} +int HP_map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_clearflooritem_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.clearflooritem_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_map_clearflooritem_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_removemobs_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_removemobs_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.removemobs_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_map_removemobs_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_removemobs_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_map_clearflooritem(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_map_clearflooritem_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_clearflooritem_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.clearflooritem(bl); + } + if( HPMHooks.count.HP_map_clearflooritem_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_clearflooritem_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +int HP_map_addflooritem(struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_addflooritem_pre ) { + int (*preHookFunc) (struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addflooritem_pre[hIndex].func; + retVal___ = preHookFunc(item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addflooritem(item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags); + } + if( HPMHooks.count.HP_map_addflooritem_post ) { + int (*postHookFunc) (int retVal___, struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addflooritem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); + } + } + return retVal___; +} +void HP_map_addnickdb(int charid, const char *nick) { + int hIndex = 0; + if( HPMHooks.count.HP_map_addnickdb_pre ) { + void (*preHookFunc) (int *charid, const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addnickdb_pre[hIndex].func; + preHookFunc(&charid, nick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.addnickdb(charid, nick); + } + if( HPMHooks.count.HP_map_addnickdb_post ) { + void (*postHookFunc) (int *charid, const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addnickdb_post[hIndex].func; + postHookFunc(&charid, nick); + } + } + return; +} +void HP_map_delnickdb(int charid, const char *nick) { + int hIndex = 0; + if( HPMHooks.count.HP_map_delnickdb_pre ) { + void (*preHookFunc) (int *charid, const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delnickdb_pre[hIndex].func; + preHookFunc(&charid, nick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.delnickdb(charid, nick); + } + if( HPMHooks.count.HP_map_delnickdb_post ) { + void (*postHookFunc) (int *charid, const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delnickdb_post[hIndex].func; + postHookFunc(&charid, nick); + } + } + return; +} +void HP_map_reqnickdb(struct map_session_data *sd, int charid) { + int hIndex = 0; + if( HPMHooks.count.HP_map_reqnickdb_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_reqnickdb_pre[hIndex].func; + preHookFunc(sd, &charid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.reqnickdb(sd, charid); + } + if( HPMHooks.count.HP_map_reqnickdb_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_reqnickdb_post[hIndex].func; + postHookFunc(sd, &charid); + } + } + return; +} +const char* HP_map_charid2nick(int charid) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_map_charid2nick_pre ) { + const char* (*preHookFunc) (int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_charid2nick_pre[hIndex].func; + retVal___ = preHookFunc(&charid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.charid2nick(charid); + } + if( HPMHooks.count.HP_map_charid2nick_post ) { + const char* (*postHookFunc) (const char* retVal___, int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_charid2nick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &charid); + } + } + return retVal___; +} +struct map_session_data* HP_map_charid2sd(int charid) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_charid2sd_pre ) { + struct map_session_data* (*preHookFunc) (int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_charid2sd_pre[hIndex].func; + retVal___ = preHookFunc(&charid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.charid2sd(charid); + } + if( HPMHooks.count.HP_map_charid2sd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_charid2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &charid); + } + } + return retVal___; +} +void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachpc_pre ) { + void (*preHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachpc_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachpc(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachpc_post ) { + void (*postHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachpc_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachmob_pre ) { + void (*preHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachmob_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachmob(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachmob_post ) { + void (*postHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachmob_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachnpc_pre ) { + void (*preHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachnpc_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachnpc(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachnpc_post ) { + void (*postHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachnpc_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachregen_pre ) { + void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachregen_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachregen(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachregen_post ) { + void (*postHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachregen_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va_list args) { + int hIndex = 0; + if( HPMHooks.count.HP_map_vforeachiddb_pre ) { + void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachiddb_pre[hIndex].func; + preHookFunc(func, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list args___copy; va_copy(args___copy, args); + HPMHooks.source.map.vforeachiddb(func, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachiddb_post ) { + void (*postHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachiddb_post[hIndex].func; + postHookFunc(func, args___copy); + va_end(args___copy); + } + } + return; +} +int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforeachinrange_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinrange_pre[hIndex].func; + retVal___ = preHookFunc(func, center, &range, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforeachinrange(func, center, range, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinrange_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinrange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, center, &range, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforeachinshootrange_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_pre[hIndex].func; + retVal___ = preHookFunc(func, center, &range, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforeachinshootrange(func, center, range, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinshootrange_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, center, &range, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforeachinarea_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinarea_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforeachinarea(func, m, x0, y0, x1, y1, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinarea_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinarea_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int count, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforcountinrange_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforcountinrange_pre[hIndex].func; + retVal___ = preHookFunc(func, center, &range, &count, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforcountinrange(func, center, range, count, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforcountinrange_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforcountinrange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, center, &range, &count, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforcountinarea_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforcountinarea_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &count, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforcountinarea(func, m, x0, y0, x1, y1, count, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforcountinarea_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforcountinarea_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &count, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int16 dx, int16 dy, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforeachinmovearea_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_pre[hIndex].func; + retVal___ = preHookFunc(func, center, &range, &dx, &dy, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforeachinmovearea(func, center, range, dx, dy, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinmovearea_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, center, &range, &dx, &dy, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, int16 x, int16 y, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforeachincell_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachincell_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &x, &y, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforeachincell(func, m, x, y, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachincell_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachincell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &x, &y, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforeachinpath_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachinpath_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforeachinpath(func, m, x0, y0, x1, y1, range, length, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachinpath_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachinpath_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, int type, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforeachinmap_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_vforeachinmap_pre[hIndex].func; + retVal___ = preHookFunc(func, &m, &type, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.map.vforeachinmap(func, m, type, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_vforeachinmap_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_vforeachinmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &m, &type, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int16 instance_id, int type, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_vforeachininstance_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_vforeachininstance_pre[hIndex].func; + retVal___ = preHookFunc(func, &instance_id, &type, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.vforeachininstance(func, instance_id, type, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_vforeachininstance_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_vforeachininstance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, &instance_id, &type, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +struct map_session_data* HP_map_id2sd(int id) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2sd_pre ) { + struct map_session_data* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2sd_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2sd(id); + } + if( HPMHooks.count.HP_map_id2sd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct mob_data* HP_map_id2md(int id) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2md_pre ) { + struct mob_data* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2md_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2md(id); + } + if( HPMHooks.count.HP_map_id2md_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2md_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct npc_data* HP_map_id2nd(int id) { + int hIndex = 0; + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2nd_pre ) { + struct npc_data* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2nd_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2nd(id); + } + if( HPMHooks.count.HP_map_id2nd_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2nd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct homun_data* HP_map_id2hd(int id) { + int hIndex = 0; + struct homun_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2hd_pre ) { + struct homun_data* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2hd_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2hd(id); + } + if( HPMHooks.count.HP_map_id2hd_post ) { + struct homun_data* (*postHookFunc) (struct homun_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2hd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct mercenary_data* HP_map_id2mc(int id) { + int hIndex = 0; + struct mercenary_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2mc_pre ) { + struct mercenary_data* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2mc_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2mc(id); + } + if( HPMHooks.count.HP_map_id2mc_post ) { + struct mercenary_data* (*postHookFunc) (struct mercenary_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2mc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct chat_data* HP_map_id2cd(int id) { + int hIndex = 0; + struct chat_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2cd_pre ) { + struct chat_data* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2cd_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2cd(id); + } + if( HPMHooks.count.HP_map_id2cd_post ) { + struct chat_data* (*postHookFunc) (struct chat_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2cd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct block_list* HP_map_id2bl(int id) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2bl_pre ) { + struct block_list* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2bl_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2bl(id); + } + if( HPMHooks.count.HP_map_id2bl_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2bl_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +bool HP_map_blid_exists(int id) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_map_blid_exists_pre ) { + bool (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_blid_exists_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.blid_exists(id); + } + if( HPMHooks.count.HP_map_blid_exists_post ) { + bool (*postHookFunc) (bool retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_blid_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +int16 HP_map_mapindex2mapid(unsigned short mapindex) { + int hIndex = 0; + int16 retVal___; + memset(&retVal___, '\0', sizeof(int16)); + if( HPMHooks.count.HP_map_mapindex2mapid_pre ) { + int16 (*preHookFunc) (unsigned short *mapindex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func; + retVal___ = preHookFunc(&mapindex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.mapindex2mapid(mapindex); + } + if( HPMHooks.count.HP_map_mapindex2mapid_post ) { + int16 (*postHookFunc) (int16 retVal___, unsigned short *mapindex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_mapindex2mapid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mapindex); + } + } + return retVal___; +} +int16 HP_map_mapname2mapid(const char *name) { + int hIndex = 0; + int16 retVal___; + memset(&retVal___, '\0', sizeof(int16)); + if( HPMHooks.count.HP_map_mapname2mapid_pre ) { + int16 (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_mapname2mapid_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.mapname2mapid(name); + } + if( HPMHooks.count.HP_map_mapname2mapid_post ) { + int16 (*postHookFunc) (int16 retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_mapname2mapid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_mapname2ipport_pre ) { + int (*preHookFunc) (unsigned short *name, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_mapname2ipport_pre[hIndex].func; + retVal___ = preHookFunc(&name, ip, port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.mapname2ipport(name, ip, port); + } + if( HPMHooks.count.HP_map_mapname2ipport_post ) { + int (*postHookFunc) (int retVal___, unsigned short *name, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_mapname2ipport_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &name, ip, port); + } + } + return retVal___; +} +int HP_map_setipport(unsigned short mapindex, uint32 ip, uint16 port) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_setipport_pre ) { + int (*preHookFunc) (unsigned short *mapindex, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_setipport_pre[hIndex].func; + retVal___ = preHookFunc(&mapindex, &ip, &port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.setipport(mapindex, ip, port); + } + if( HPMHooks.count.HP_map_setipport_post ) { + int (*postHookFunc) (int retVal___, unsigned short *mapindex, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_setipport_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mapindex, &ip, &port); + } + } + return retVal___; +} +int HP_map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_eraseipport_pre ) { + int (*preHookFunc) (unsigned short *mapindex, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_eraseipport_pre[hIndex].func; + retVal___ = preHookFunc(&mapindex, &ip, &port); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.eraseipport(mapindex, ip, port); + } + if( HPMHooks.count.HP_map_eraseipport_post ) { + int (*postHookFunc) (int retVal___, unsigned short *mapindex, uint32 *ip, uint16 *port); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_eraseipport_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &mapindex, &ip, &port); + } + } + return retVal___; +} +int HP_map_eraseallipport(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_eraseallipport_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_eraseallipport_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.eraseallipport(); + } + if( HPMHooks.count.HP_map_eraseallipport_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_eraseallipport_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_map_addiddb(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_map_addiddb_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addiddb_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.addiddb(bl); + } + if( HPMHooks.count.HP_map_addiddb_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addiddb_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +void HP_map_deliddb(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_map_deliddb_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_deliddb_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.deliddb(bl); + } + if( HPMHooks.count.HP_map_deliddb_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_deliddb_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +struct map_session_data* HP_map_nick2sd(const char *nick) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_nick2sd_pre ) { + struct map_session_data* (*preHookFunc) (const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_nick2sd_pre[hIndex].func; + retVal___ = preHookFunc(nick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.nick2sd(nick); + } + if( HPMHooks.count.HP_map_nick2sd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, const char *nick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_nick2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nick); + } + } + return retVal___; +} +struct mob_data* HP_map_getmob_boss(int16 m) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_getmob_boss_pre ) { + struct mob_data* (*preHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_getmob_boss_pre[hIndex].func; + retVal___ = preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.getmob_boss(m); + } + if( HPMHooks.count.HP_map_getmob_boss_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_getmob_boss_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m); + } + } + return retVal___; +} +struct mob_data* HP_map_id2boss(int id) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_map_id2boss_pre ) { + struct mob_data* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_id2boss_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.id2boss(id); + } + if( HPMHooks.count.HP_map_id2boss_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_id2boss_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +void HP_map_reloadnpc(bool clear) { + int hIndex = 0; + if( HPMHooks.count.HP_map_reloadnpc_pre ) { + void (*preHookFunc) (bool *clear); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_reloadnpc_pre[hIndex].func; + preHookFunc(&clear); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.reloadnpc(clear); + } + if( HPMHooks.count.HP_map_reloadnpc_post ) { + void (*postHookFunc) (bool *clear); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_reloadnpc_post[hIndex].func; + postHookFunc(&clear); + } + } + return; +} +int HP_map_check_dir(int s_dir, int t_dir) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_check_dir_pre ) { + int (*preHookFunc) (int *s_dir, int *t_dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_check_dir_pre[hIndex].func; + retVal___ = preHookFunc(&s_dir, &t_dir); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.check_dir(s_dir, t_dir); + } + if( HPMHooks.count.HP_map_check_dir_post ) { + int (*postHookFunc) (int retVal___, int *s_dir, int *t_dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_check_dir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &s_dir, &t_dir); + } + } + return retVal___; +} +uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { + int hIndex = 0; + uint8 retVal___; + memset(&retVal___, '\0', sizeof(uint8)); + if( HPMHooks.count.HP_map_calc_dir_pre ) { + uint8 (*preHookFunc) (struct block_list *src, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_calc_dir_pre[hIndex].func; + retVal___ = preHookFunc(src, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.calc_dir(src, x, y); + } + if( HPMHooks.count.HP_map_calc_dir_post ) { + uint8 (*postHookFunc) (uint8 retVal___, struct block_list *src, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_calc_dir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &x, &y); + } + } + return retVal___; +} +int HP_map_random_dir(struct block_list *bl, short *x, short *y) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_random_dir_pre ) { + int (*preHookFunc) (struct block_list *bl, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_random_dir_pre[hIndex].func; + retVal___ = preHookFunc(bl, x, y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.random_dir(bl, x, y); + } + if( HPMHooks.count.HP_map_random_dir_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_random_dir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, x, y); + } + } + return retVal___; +} +int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_cleanup_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_cleanup_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.cleanup_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_cleanup_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_cleanup_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_delmap(char *mapname) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_delmap_pre ) { + int (*preHookFunc) (char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delmap_pre[hIndex].func; + retVal___ = preHookFunc(mapname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.delmap(mapname); + } + if( HPMHooks.count.HP_map_delmap_post ) { + int (*postHookFunc) (int retVal___, char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname); + } + } + return retVal___; +} +void HP_map_flags_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_flags_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_flags_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.flags_init(); + } + if( HPMHooks.count.HP_map_flags_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_flags_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable, const char *wall_name) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_map_iwall_set_pre ) { + bool (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_iwall_set_pre[hIndex].func; + retVal___ = preHookFunc(&m, &x, &y, &size, &dir, &shootable, wall_name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.iwall_set(m, x, y, size, dir, shootable, wall_name); + } + if( HPMHooks.count.HP_map_iwall_set_post ) { + bool (*postHookFunc) (bool retVal___, int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_iwall_set_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &x, &y, &size, &dir, &shootable, wall_name); + } + } + return retVal___; +} +void HP_map_iwall_get(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_map_iwall_get_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_iwall_get_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.iwall_get(sd); + } + if( HPMHooks.count.HP_map_iwall_get_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_iwall_get_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_map_iwall_remove(const char *wall_name) { + int hIndex = 0; + if( HPMHooks.count.HP_map_iwall_remove_pre ) { + void (*preHookFunc) (const char *wall_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_iwall_remove_pre[hIndex].func; + preHookFunc(wall_name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.iwall_remove(wall_name); + } + if( HPMHooks.count.HP_map_iwall_remove_post ) { + void (*postHookFunc) (const char *wall_name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_iwall_remove_post[hIndex].func; + postHookFunc(wall_name); + } + } + return; +} +int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_addmobtolist_pre ) { + int (*preHookFunc) (unsigned short *m, struct spawn_data *spawn); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addmobtolist_pre[hIndex].func; + retVal___ = preHookFunc(&m, spawn); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addmobtolist(m, spawn); + } + if( HPMHooks.count.HP_map_addmobtolist_post ) { + int (*postHookFunc) (int retVal___, unsigned short *m, struct spawn_data *spawn); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addmobtolist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, spawn); + } + } + return retVal___; +} +void HP_map_spawnmobs(int16 m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_spawnmobs_pre ) { + void (*preHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_spawnmobs_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.spawnmobs(m); + } + if( HPMHooks.count.HP_map_spawnmobs_post ) { + void (*postHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_spawnmobs_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +void HP_map_removemobs(int16 m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_removemobs_pre ) { + void (*preHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_removemobs_pre[hIndex].func; + preHookFunc(&m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.removemobs(m); + } + if( HPMHooks.count.HP_map_removemobs_post ) { + void (*postHookFunc) (int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_removemobs_post[hIndex].func; + postHookFunc(&m); + } + } + return; +} +void HP_map_addmap2db(struct map_data *m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_addmap2db_pre ) { + void (*preHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addmap2db_pre[hIndex].func; + preHookFunc(m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.addmap2db(m); + } + if( HPMHooks.count.HP_map_addmap2db_post ) { + void (*postHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addmap2db_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +void HP_map_removemapdb(struct map_data *m) { + int hIndex = 0; + if( HPMHooks.count.HP_map_removemapdb_pre ) { + void (*preHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_removemapdb_pre[hIndex].func; + preHookFunc(m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.removemapdb(m); + } + if( HPMHooks.count.HP_map_removemapdb_post ) { + void (*postHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_removemapdb_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +void HP_map_clean(int i) { + int hIndex = 0; + if( HPMHooks.count.HP_map_clean_pre ) { + void (*preHookFunc) (int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_clean_pre[hIndex].func; + preHookFunc(&i); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.clean(i); + } + if( HPMHooks.count.HP_map_clean_post ) { + void (*postHookFunc) (int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_clean_post[hIndex].func; + postHookFunc(&i); + } + } + return; +} +void HP_map_do_shutdown(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_do_shutdown_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_do_shutdown_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.do_shutdown(); + } + if( HPMHooks.count.HP_map_do_shutdown_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_do_shutdown_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_freeblock_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_freeblock_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.freeblock_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_map_freeblock_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_freeblock_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_map_searchrandfreecell(int16 m, int16 *x, int16 *y, int stack) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_searchrandfreecell_pre ) { + int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *stack); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_searchrandfreecell_pre[hIndex].func; + retVal___ = preHookFunc(&m, x, y, &stack); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.searchrandfreecell(m, x, y, stack); + } + if( HPMHooks.count.HP_map_searchrandfreecell_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *stack); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_searchrandfreecell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, x, y, &stack); + } + } + return retVal___; +} +int HP_map_count_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_count_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_count_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.count_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_count_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_count_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +DBData HP_map_create_charid2nick(DBKey key, va_list args) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_map_create_charid2nick_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_create_charid2nick_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.map.create_charid2nick(key, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_create_charid2nick_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_create_charid2nick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_removemobs_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_removemobs_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.removemobs_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_removemobs_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_removemobs_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +struct mapcell HP_map_gat2cell(int gat) { + int hIndex = 0; + struct mapcell retVal___; + memset(&retVal___, '\0', sizeof(struct mapcell)); + if( HPMHooks.count.HP_map_gat2cell_pre ) { + struct mapcell (*preHookFunc) (int *gat); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_gat2cell_pre[hIndex].func; + retVal___ = preHookFunc(&gat); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.gat2cell(gat); + } + if( HPMHooks.count.HP_map_gat2cell_post ) { + struct mapcell (*postHookFunc) (struct mapcell retVal___, int *gat); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_gat2cell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &gat); + } + } + return retVal___; +} +int HP_map_cell2gat(struct mapcell cell) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_cell2gat_pre ) { + int (*preHookFunc) (struct mapcell *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_cell2gat_pre[hIndex].func; + retVal___ = preHookFunc(&cell); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.cell2gat(cell); + } + if( HPMHooks.count.HP_map_cell2gat_post ) { + int (*postHookFunc) (int retVal___, struct mapcell *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_cell2gat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &cell); + } + } + return retVal___; +} +int HP_map_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_getcellp_pre ) { + int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_getcellp_pre[hIndex].func; + retVal___ = preHookFunc(m, &x, &y, &cellchk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.getcellp(m, x, y, cellchk); + } + if( HPMHooks.count.HP_map_getcellp_post ) { + int (*postHookFunc) (int retVal___, struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_getcellp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m, &x, &y, &cellchk); + } + } + return retVal___; +} +void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_map_setcell_pre ) { + void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_setcell_pre[hIndex].func; + preHookFunc(&m, &x, &y, &cell, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.setcell(m, x, y, cell, flag); + } + if( HPMHooks.count.HP_map_setcell_post ) { + void (*postHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_setcell_post[hIndex].func; + postHookFunc(&m, &x, &y, &cell, &flag); + } + } + return; +} +int HP_map_sub_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_sub_getcellp_pre ) { + int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_sub_getcellp_pre[hIndex].func; + retVal___ = preHookFunc(m, &x, &y, &cellchk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.sub_getcellp(m, x, y, cellchk); + } + if( HPMHooks.count.HP_map_sub_getcellp_post ) { + int (*postHookFunc) (int retVal___, struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_sub_getcellp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m, &x, &y, &cellchk); + } + } + return retVal___; +} +void HP_map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_map_sub_setcell_pre ) { + void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_sub_setcell_pre[hIndex].func; + preHookFunc(&m, &x, &y, &cell, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.sub_setcell(m, x, y, cell, flag); + } + if( HPMHooks.count.HP_map_sub_setcell_post ) { + void (*postHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_sub_setcell_post[hIndex].func; + postHookFunc(&m, &x, &y, &cell, &flag); + } + } + return; +} +void HP_map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *y1) { + int hIndex = 0; + if( HPMHooks.count.HP_map_iwall_nextxy_pre ) { + void (*preHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_iwall_nextxy_pre[hIndex].func; + preHookFunc(&x, &y, &dir, &pos, x1, y1); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.iwall_nextxy(x, y, dir, pos, x1, y1); + } + if( HPMHooks.count.HP_map_iwall_nextxy_post ) { + void (*postHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_iwall_nextxy_post[hIndex].func; + postHookFunc(&x, &y, &dir, &pos, x1, y1); + } + } + return; +} +DBData HP_map_create_map_data_other_server(DBKey key, va_list args) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_map_create_map_data_other_server_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.map.create_map_data_other_server(key, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_create_map_data_other_server_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_map_eraseallipport_sub(DBKey key, DBData *data, va_list va) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_eraseallipport_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list va); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_pre; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + preHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, va___copy); + va_end(va___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list va___copy; va_copy(va___copy, va); + retVal___ = HPMHooks.source.map.eraseallipport_sub(key, data, va___copy); + va_end(va___copy); + } + if( HPMHooks.count.HP_map_eraseallipport_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list va); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_post; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + postHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, va___copy); + va_end(va___copy); + } + } + return retVal___; +} +char* HP_map_init_mapcache(FILE *fp) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_map_init_mapcache_pre ) { + char* (*preHookFunc) (FILE *fp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_init_mapcache_pre[hIndex].func; + retVal___ = preHookFunc(fp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.init_mapcache(fp); + } + if( HPMHooks.count.HP_map_init_mapcache_post ) { + char* (*postHookFunc) (char* retVal___, FILE *fp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_init_mapcache_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fp); + } + } + return retVal___; +} +int HP_map_readfromcache(struct map_data *m, char *buffer) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_readfromcache_pre ) { + int (*preHookFunc) (struct map_data *m, char *buffer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_readfromcache_pre[hIndex].func; + retVal___ = preHookFunc(m, buffer); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.readfromcache(m, buffer); + } + if( HPMHooks.count.HP_map_readfromcache_post ) { + int (*postHookFunc) (int retVal___, struct map_data *m, char *buffer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_readfromcache_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m, buffer); + } + } + return retVal___; +} +int HP_map_addmap(char *mapname) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_addmap_pre ) { + int (*preHookFunc) (char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_addmap_pre[hIndex].func; + retVal___ = preHookFunc(mapname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.addmap(mapname); + } + if( HPMHooks.count.HP_map_addmap_post ) { + int (*postHookFunc) (int retVal___, char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_addmap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname); + } + } + return retVal___; +} +void HP_map_delmapid(int id) { + int hIndex = 0; + if( HPMHooks.count.HP_map_delmapid_pre ) { + void (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_delmapid_pre[hIndex].func; + preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.delmapid(id); + } + if( HPMHooks.count.HP_map_delmapid_post ) { + void (*postHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_delmapid_post[hIndex].func; + postHookFunc(&id); + } + } + return; +} +void HP_map_zone_db_clear(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_zone_db_clear_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_db_clear_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_db_clear(); + } + if( HPMHooks.count.HP_map_zone_db_clear_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_db_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_map_list_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_list_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_list_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.list_final(); + } + if( HPMHooks.count.HP_map_list_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_list_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_map_waterheight(char *mapname) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_waterheight_pre ) { + int (*preHookFunc) (char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_waterheight_pre[hIndex].func; + retVal___ = preHookFunc(mapname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.waterheight(mapname); + } + if( HPMHooks.count.HP_map_waterheight_post ) { + int (*postHookFunc) (int retVal___, char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_waterheight_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname); + } + } + return retVal___; +} +int HP_map_readgat(struct map_data *m) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_readgat_pre ) { + int (*preHookFunc) (struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_readgat_pre[hIndex].func; + retVal___ = preHookFunc(m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.readgat(m); + } + if( HPMHooks.count.HP_map_readgat_post ) { + int (*postHookFunc) (int retVal___, struct map_data *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_readgat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m); + } + } + return retVal___; +} +int HP_map_readallmaps(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_readallmaps_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_readallmaps_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.readallmaps(); + } + if( HPMHooks.count.HP_map_readallmaps_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_readallmaps_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_config_read(char *cfgName) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_config_read_pre ) { + int (*preHookFunc) (char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.config_read(cfgName); + } + if( HPMHooks.count.HP_map_config_read_post ) { + int (*postHookFunc) (int retVal___, char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +int HP_map_config_read_sub(char *cfgName) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_config_read_sub_pre ) { + int (*preHookFunc) (char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_config_read_sub_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.config_read_sub(cfgName); + } + if( HPMHooks.count.HP_map_config_read_sub_post ) { + int (*postHookFunc) (int retVal___, char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_config_read_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +void HP_map_reloadnpc_sub(char *cfgName) { + int hIndex = 0; + if( HPMHooks.count.HP_map_reloadnpc_sub_pre ) { + void (*preHookFunc) (char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_pre[hIndex].func; + preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.reloadnpc_sub(cfgName); + } + if( HPMHooks.count.HP_map_reloadnpc_sub_post ) { + void (*postHookFunc) (char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_post[hIndex].func; + postHookFunc(cfgName); + } + } + return; +} +int HP_map_inter_config_read(char *cfgName) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_inter_config_read_pre ) { + int (*preHookFunc) (char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_inter_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.inter_config_read(cfgName); + } + if( HPMHooks.count.HP_map_inter_config_read_post ) { + int (*postHookFunc) (int retVal___, char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_inter_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +int HP_map_sql_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_sql_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.sql_init(); + } + if( HPMHooks.count.HP_map_sql_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_map_sql_close(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_sql_close_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_sql_close_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.sql_close(); + } + if( HPMHooks.count.HP_map_sql_close_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_sql_close_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_map_zone_mf_cache(int m, char *flag, char *params) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_map_zone_mf_cache_pre ) { + bool (*preHookFunc) (int *m, char *flag, char *params); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_mf_cache_pre[hIndex].func; + retVal___ = preHookFunc(&m, flag, params); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.zone_mf_cache(m, flag, params); + } + if( HPMHooks.count.HP_map_zone_mf_cache_post ) { + bool (*postHookFunc) (bool retVal___, int *m, char *flag, char *params); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_mf_cache_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, flag, params); + } + } + return retVal___; +} +unsigned short HP_map_zone_str2itemid(const char *name) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_map_zone_str2itemid_pre ) { + unsigned short (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_str2itemid_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.zone_str2itemid(name); + } + if( HPMHooks.count.HP_map_zone_str2itemid_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_str2itemid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +unsigned short HP_map_zone_str2skillid(const char *name) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_map_zone_str2skillid_pre ) { + unsigned short (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_str2skillid_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.zone_str2skillid(name); + } + if( HPMHooks.count.HP_map_zone_str2skillid_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_str2skillid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype *subtype) { + int hIndex = 0; + enum bl_type retVal___; + memset(&retVal___, '\0', sizeof(enum bl_type)); + if( HPMHooks.count.HP_map_zone_bl_type_pre ) { + enum bl_type (*preHookFunc) (const char *entry, enum map_zone_skill_subtype *subtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_zone_bl_type_pre[hIndex].func; + retVal___ = preHookFunc(entry, subtype); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.zone_bl_type(entry, subtype); + } + if( HPMHooks.count.HP_map_zone_bl_type_post ) { + enum bl_type (*postHookFunc) (enum bl_type retVal___, const char *entry, enum map_zone_skill_subtype *subtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_zone_bl_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry, subtype); + } + } + return retVal___; +} +void HP_map_read_zone_db(void) { + int hIndex = 0; + if( HPMHooks.count.HP_map_read_zone_db_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_read_zone_db_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.read_zone_db(); + } + if( HPMHooks.count.HP_map_read_zone_db_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_read_zone_db_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_map_db_final(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.db_final(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_map_nick_db_final(DBKey key, DBData *data, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_nick_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_map_nick_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.map.nick_db_final(key, data, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_map_nick_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_map_nick_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_map_cleanup_db_sub(DBKey key, DBData *data, va_list va) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_cleanup_db_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list va); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_pre; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + preHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, va___copy); + va_end(va___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list va___copy; va_copy(va___copy, va); + retVal___ = HPMHooks.source.map.cleanup_db_sub(key, data, va___copy); + va_end(va___copy); + } + if( HPMHooks.count.HP_map_cleanup_db_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list va); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_post; hIndex++ ) { + va_list va___copy; va_copy(va___copy, va); + postHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, va___copy); + va_end(va___copy); + } + } + return retVal___; +} +int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_map_abort_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_map_abort_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.map.abort_sub(sd, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_map_abort_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_map_abort_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_map_helpscreen(bool do_exit) { + int hIndex = 0; + if( HPMHooks.count.HP_map_helpscreen_pre ) { + void (*preHookFunc) (bool *do_exit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_helpscreen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_helpscreen_pre[hIndex].func; + preHookFunc(&do_exit); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.helpscreen(do_exit); + } + if( HPMHooks.count.HP_map_helpscreen_post ) { + void (*postHookFunc) (bool *do_exit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_helpscreen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_helpscreen_post[hIndex].func; + postHookFunc(&do_exit); + } + } + return; +} +void HP_map_versionscreen(bool do_exit) { + int hIndex = 0; + if( HPMHooks.count.HP_map_versionscreen_pre ) { + void (*preHookFunc) (bool *do_exit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_versionscreen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_versionscreen_pre[hIndex].func; + preHookFunc(&do_exit); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.versionscreen(do_exit); + } + if( HPMHooks.count.HP_map_versionscreen_post ) { + void (*postHookFunc) (bool *do_exit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_versionscreen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_versionscreen_post[hIndex].func; + postHookFunc(&do_exit); + } + } + return; +} +bool HP_map_arg_next_value(const char *option, int i, int argc) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_map_arg_next_value_pre ) { + bool (*preHookFunc) (const char *option, int *i, int *argc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_arg_next_value_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_map_arg_next_value_pre[hIndex].func; + retVal___ = preHookFunc(option, &i, &argc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.arg_next_value(option, i, argc); + } + if( HPMHooks.count.HP_map_arg_next_value_post ) { + bool (*postHookFunc) (bool retVal___, const char *option, int *i, int *argc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_map_arg_next_value_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_map_arg_next_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, option, &i, &argc); + } + } + return retVal___; +} +/* mapit */ +struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) { + int hIndex = 0; + struct s_mapiterator* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_alloc_pre ) { + struct s_mapiterator* (*preHookFunc) (enum e_mapitflags *flags, enum bl_type *types); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_alloc_pre[hIndex].func; + retVal___ = preHookFunc(&flags, &types); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.alloc(flags, types); + } + if( HPMHooks.count.HP_mapit_alloc_post ) { + struct s_mapiterator* (*postHookFunc) (struct s_mapiterator* retVal___, enum e_mapitflags *flags, enum bl_type *types); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_alloc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &flags, &types); + } + } + return retVal___; +} +void HP_mapit_free(struct s_mapiterator *iter) { + int hIndex = 0; + if( HPMHooks.count.HP_mapit_free_pre ) { + void (*preHookFunc) (struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_free_pre[hIndex].func; + preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapit.free(iter); + } + if( HPMHooks.count.HP_mapit_free_post ) { + void (*postHookFunc) (struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_free_post[hIndex].func; + postHookFunc(iter); + } + } + return; +} +struct block_list* HP_mapit_first(struct s_mapiterator *iter) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_first_pre ) { + struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_first_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.first(iter); + } + if( HPMHooks.count.HP_mapit_first_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_first_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +struct block_list* HP_mapit_last(struct s_mapiterator *iter) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_last_pre ) { + struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_last_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.last(iter); + } + if( HPMHooks.count.HP_mapit_last_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_last_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +struct block_list* HP_mapit_next(struct s_mapiterator *iter) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_next_pre ) { + struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_next_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.next(iter); + } + if( HPMHooks.count.HP_mapit_next_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_next_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +struct block_list* HP_mapit_prev(struct s_mapiterator *iter) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mapit_prev_pre ) { + struct block_list* (*preHookFunc) (struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_prev_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.prev(iter); + } + if( HPMHooks.count.HP_mapit_prev_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_prev_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +bool HP_mapit_exists(struct s_mapiterator *iter) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mapit_exists_pre ) { + bool (*preHookFunc) (struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapit_exists_pre[hIndex].func; + retVal___ = preHookFunc(iter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapit.exists(iter); + } + if( HPMHooks.count.HP_mapit_exists_post ) { + bool (*postHookFunc) (bool retVal___, struct s_mapiterator *iter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapit_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, iter); + } + } + return retVal___; +} +/* mapreg */ +void HP_mapreg_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.init(); + } + if( HPMHooks.count.HP_mapreg_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_mapreg_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.final(); + } + if( HPMHooks.count.HP_mapreg_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_mapreg_readreg(int uid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mapreg_readreg_pre ) { + int (*preHookFunc) (int *uid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_readreg_pre[hIndex].func; + retVal___ = preHookFunc(&uid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.readreg(uid); + } + if( HPMHooks.count.HP_mapreg_readreg_post ) { + int (*postHookFunc) (int retVal___, int *uid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_readreg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &uid); + } + } + return retVal___; +} +char* HP_mapreg_readregstr(int uid) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_mapreg_readregstr_pre ) { + char* (*preHookFunc) (int *uid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_readregstr_pre[hIndex].func; + retVal___ = preHookFunc(&uid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.readregstr(uid); + } + if( HPMHooks.count.HP_mapreg_readregstr_post ) { + char* (*postHookFunc) (char* retVal___, int *uid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_readregstr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &uid); + } + } + return retVal___; +} +bool HP_mapreg_setreg(int uid, int val) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mapreg_setreg_pre ) { + bool (*preHookFunc) (int *uid, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_setreg_pre[hIndex].func; + retVal___ = preHookFunc(&uid, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.setreg(uid, val); + } + if( HPMHooks.count.HP_mapreg_setreg_post ) { + bool (*postHookFunc) (bool retVal___, int *uid, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_setreg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &uid, &val); + } + } + return retVal___; +} +bool HP_mapreg_setregstr(int uid, const char *str) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mapreg_setregstr_pre ) { + bool (*preHookFunc) (int *uid, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_setregstr_pre[hIndex].func; + retVal___ = preHookFunc(&uid, str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.setregstr(uid, str); + } + if( HPMHooks.count.HP_mapreg_setregstr_post ) { + bool (*postHookFunc) (bool retVal___, int *uid, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_setregstr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &uid, str); + } + } + return retVal___; +} +void HP_mapreg_load(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_load_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_load_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.load(); + } + if( HPMHooks.count.HP_mapreg_load_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_load_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_mapreg_save(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_save_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_save_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.save(); + } + if( HPMHooks.count.HP_mapreg_save_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_save_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_mapreg_save_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mapreg_save_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_save_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.save_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_mapreg_save_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_save_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_mapreg_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mapreg_reload_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_reload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapreg.reload(); + } + if( HPMHooks.count.HP_mapreg_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_mapreg_config_read(const char *w1, const char *w2) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mapreg_config_read_pre ) { + bool (*preHookFunc) (const char *w1, const char *w2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mapreg_config_read_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapreg.config_read(w1, w2); + } + if( HPMHooks.count.HP_mapreg_config_read_post ) { + bool (*postHookFunc) (bool retVal___, const char *w1, const char *w2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mapreg_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2); + } + } + return retVal___; +} +/* mercenary */ +void HP_mercenary_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mercenary_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mercenary.init(); + } + if( HPMHooks.count.HP_mercenary_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_mercenary_class(int class_) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mercenary_class_pre ) { + bool (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_class_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.class(class_); + } + if( HPMHooks.count.HP_mercenary_class_post ) { + bool (*postHookFunc) (bool retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +struct view_data* HP_mercenary_get_viewdata(int class_) { + int hIndex = 0; + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_mercenary_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.get_viewdata(class_); + } + if( HPMHooks.count.HP_mercenary_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int lifetime) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, &class_, &lifetime); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.create(sd, class_, lifetime); + } + if( HPMHooks.count.HP_mercenary_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *class_, unsigned int *lifetime); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &class_, &lifetime); + } + } + return retVal___; +} +int HP_mercenary_data_received(struct s_mercenary *merc, bool flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_data_received_pre ) { + int (*preHookFunc) (struct s_mercenary *merc, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_data_received_pre[hIndex].func; + retVal___ = preHookFunc(merc, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.data_received(merc, flag); + } + if( HPMHooks.count.HP_mercenary_data_received_post ) { + int (*postHookFunc) (int retVal___, struct s_mercenary *merc, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_data_received_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc, &flag); + } + } + return retVal___; +} +int HP_mercenary_save(struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_save_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_save_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.save(md); + } + if( HPMHooks.count.HP_mercenary_save_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) { + int hIndex = 0; + if( HPMHooks.count.HP_mercenary_heal_pre ) { + void (*preHookFunc) (struct mercenary_data *md, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_heal_pre[hIndex].func; + preHookFunc(md, &hp, &sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mercenary.heal(md, hp, sp); + } + if( HPMHooks.count.HP_mercenary_heal_post ) { + void (*postHookFunc) (struct mercenary_data *md, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_heal_post[hIndex].func; + postHookFunc(md, &hp, &sp); + } + } + return; +} +int HP_mercenary_dead(struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_dead_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_dead_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.dead(md); + } + if( HPMHooks.count.HP_mercenary_dead_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_dead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_delete(struct mercenary_data *md, int reply) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_delete_pre ) { + int (*preHookFunc) (struct mercenary_data *md, int *reply); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_delete_pre[hIndex].func; + retVal___ = preHookFunc(md, &reply); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.delete(md, reply); + } + if( HPMHooks.count.HP_mercenary_delete_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *reply); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &reply); + } + } + return retVal___; +} +void HP_mercenary_contract_stop(struct mercenary_data *md) { + int hIndex = 0; + if( HPMHooks.count.HP_mercenary_contract_stop_pre ) { + void (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_contract_stop_pre[hIndex].func; + preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mercenary.contract_stop(md); + } + if( HPMHooks.count.HP_mercenary_contract_stop_post ) { + void (*postHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_contract_stop_post[hIndex].func; + postHookFunc(md); + } + } + return; +} +int HP_mercenary_get_lifetime(struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_get_lifetime_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.get_lifetime(md); + } + if( HPMHooks.count.HP_mercenary_get_lifetime_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_get_guild(struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_get_guild_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_guild_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.get_guild(md); + } + if( HPMHooks.count.HP_mercenary_get_guild_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_guild_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_get_faith(struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_get_faith_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_faith_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.get_faith(md); + } + if( HPMHooks.count.HP_mercenary_get_faith_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_faith_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_set_faith(struct mercenary_data *md, int value) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_set_faith_pre ) { + int (*preHookFunc) (struct mercenary_data *md, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_set_faith_pre[hIndex].func; + retVal___ = preHookFunc(md, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.set_faith(md, value); + } + if( HPMHooks.count.HP_mercenary_set_faith_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_set_faith_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &value); + } + } + return retVal___; +} +int HP_mercenary_get_calls(struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_get_calls_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_get_calls_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.get_calls(md); + } + if( HPMHooks.count.HP_mercenary_get_calls_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_get_calls_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_set_calls(struct mercenary_data *md, int value) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_set_calls_pre ) { + int (*preHookFunc) (struct mercenary_data *md, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_set_calls_pre[hIndex].func; + retVal___ = preHookFunc(md, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.set_calls(md, value); + } + if( HPMHooks.count.HP_mercenary_set_calls_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_set_calls_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &value); + } + } + return retVal___; +} +int HP_mercenary_kills(struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_kills_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_kills_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.kills(md); + } + if( HPMHooks.count.HP_mercenary_kills_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_kills_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_checkskill_pre ) { + int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_checkskill_pre[hIndex].func; + retVal___ = preHookFunc(md, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.checkskill(md, skill_id); + } + if( HPMHooks.count.HP_mercenary_checkskill_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_checkskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &skill_id); + } + } + return retVal___; +} +int HP_mercenary_read_db(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_read_db_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_read_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.read_db(); + } + if( HPMHooks.count.HP_mercenary_read_db_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_read_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_mercenary_read_skilldb(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_read_skilldb_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.read_skilldb(); + } + if( HPMHooks.count.HP_mercenary_read_skilldb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_mercenary_killbonus(struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_killbonus_pre ) { + int (*preHookFunc) (struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_killbonus_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.killbonus(md); + } + if( HPMHooks.count.HP_mercenary_killbonus_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_killbonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mercenary_search_index(int class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_search_index_pre ) { + int (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_search_index_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.search_index(class_); + } + if( HPMHooks.count.HP_mercenary_search_index_post ) { + int (*postHookFunc) (int retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_search_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_mercenary_contract_end_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mercenary_contract_end_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.contract_end_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_mercenary_contract_end_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mercenary_read_db_sub_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.read_db_sub(str, columns, current); + } + if( HPMHooks.count.HP_mercenary_read_db_sub_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mercenary_read_skill_db_sub_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mercenary.read_skill_db_sub(str, columns, current); + } + if( HPMHooks.count.HP_mercenary_read_skill_db_sub_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +/* mob */ +int HP_mob_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.init(); + } + if( HPMHooks.count.HP_mob_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_mob_final(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_final_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_final_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.final(); + } + if( HPMHooks.count.HP_mob_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_mob_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_reload_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_reload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.reload(); + } + if( HPMHooks.count.HP_mob_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct mob_db* HP_mob_db(int index) { + int hIndex = 0; + struct mob_db* retVal___ = NULL; + if( HPMHooks.count.HP_mob_db_pre ) { + struct mob_db* (*preHookFunc) (int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_pre[hIndex].func; + retVal___ = preHookFunc(&index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.db(index); + } + if( HPMHooks.count.HP_mob_db_post ) { + struct mob_db* (*postHookFunc) (struct mob_db* retVal___, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &index); + } + } + return retVal___; +} +struct mob_chat* HP_mob_chat(short id) { + int hIndex = 0; + struct mob_chat* retVal___ = NULL; + if( HPMHooks.count.HP_mob_chat_pre ) { + struct mob_chat* (*preHookFunc) (short *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_chat_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.chat(id); + } + if( HPMHooks.count.HP_mob_chat_post ) { + struct mob_chat* (*postHookFunc) (struct mob_chat* retVal___, short *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_chat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +int HP_mob_makedummymobdb(int p1) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_makedummymobdb_pre ) { + int (*preHookFunc) (int *p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_makedummymobdb_pre[hIndex].func; + retVal___ = preHookFunc(&p1); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.makedummymobdb(p1); + } + if( HPMHooks.count.HP_mob_makedummymobdb_post ) { + int (*postHookFunc) (int retVal___, int *p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_makedummymobdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &p1); + } + } + return retVal___; +} +int HP_mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_spawn_guardian_sub_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.spawn_guardian_sub(tid, tick, id, data); + } + if( HPMHooks.count.HP_mob_spawn_guardian_sub_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_skill_id2skill_idx_pre ) { + int (*preHookFunc) (int *class_, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_pre[hIndex].func; + retVal___ = preHookFunc(&class_, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.skill_id2skill_idx(class_, skill_id); + } + if( HPMHooks.count.HP_mob_skill_id2skill_idx_post ) { + int (*postHookFunc) (int retVal___, int *class_, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_, &skill_id); + } + } + return retVal___; +} +int HP_mob_db_searchname(const char *str) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_db_searchname_pre ) { + int (*preHookFunc) (const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_searchname_pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.db_searchname(str); + } + if( HPMHooks.count.HP_mob_db_searchname_post ) { + int (*postHookFunc) (int retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_searchname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); + } + } + return retVal___; +} +int HP_mob_db_searchname_array_sub(struct mob_db *mob, const char *str, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) { + int (*preHookFunc) (struct mob_db *mob, const char *str, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_pre[hIndex].func; + retVal___ = preHookFunc(mob, str, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.db_searchname_array_sub(mob, str, flag); + } + if( HPMHooks.count.HP_mob_db_searchname_array_sub_post ) { + int (*postHookFunc) (int retVal___, struct mob_db *mob, const char *str, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mob, str, &flag); + } + } + return retVal___; +} +void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_mvptomb_create_pre ) { + void (*preHookFunc) (struct mob_data *md, char *killer, time_t *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_mvptomb_create_pre[hIndex].func; + preHookFunc(md, killer, &time); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.mvptomb_create(md, killer, time); + } + if( HPMHooks.count.HP_mob_mvptomb_create_post ) { + void (*postHookFunc) (struct mob_data *md, char *killer, time_t *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_mvptomb_create_post[hIndex].func; + postHookFunc(md, killer, &time); + } + } + return; +} +void HP_mob_mvptomb_destroy(struct mob_data *md) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_mvptomb_destroy_pre ) { + void (*preHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_pre[hIndex].func; + preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.mvptomb_destroy(md); + } + if( HPMHooks.count.HP_mob_mvptomb_destroy_post ) { + void (*postHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_post[hIndex].func; + postHookFunc(md); + } + } + return; +} +int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_db_searchname_array_pre ) { + int (*preHookFunc) (struct mob_db **data, int *size, const char *str, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_pre[hIndex].func; + retVal___ = preHookFunc(data, &size, str, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.db_searchname_array(data, size, str, flag); + } + if( HPMHooks.count.HP_mob_db_searchname_array_post ) { + int (*postHookFunc) (int retVal___, struct mob_db **data, int *size, const char *str, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data, &size, str, &flag); + } + } + return retVal___; +} +int HP_mob_db_checkid(const int id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_db_checkid_pre ) { + int (*preHookFunc) (const int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_db_checkid_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.db_checkid(id); + } + if( HPMHooks.count.HP_mob_db_checkid_post ) { + int (*postHookFunc) (int retVal___, const int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_db_checkid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +struct view_data* HP_mob_get_viewdata(int class_) { + int hIndex = 0; + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_mob_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.get_viewdata(class_); + } + if( HPMHooks.count.HP_mob_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_mob_parse_dataset(struct spawn_data *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_parse_dataset_pre ) { + int (*preHookFunc) (struct spawn_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_parse_dataset_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.parse_dataset(data); + } + if( HPMHooks.count.HP_mob_parse_dataset_post ) { + int (*postHookFunc) (int retVal___, struct spawn_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_parse_dataset_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_mob_spawn_dataset_pre ) { + struct mob_data* (*preHookFunc) (struct spawn_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_dataset_pre[hIndex].func; + retVal___ = preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.spawn_dataset(data); + } + if( HPMHooks.count.HP_mob_spawn_dataset_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct spawn_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_dataset_post[hIndex].func; + retVal___ = postHookFunc(retVal___, data); + } + } + return retVal___; +} +int HP_mob_get_random_id(int type, int flag, int lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_get_random_id_pre ) { + int (*preHookFunc) (int *type, int *flag, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_get_random_id_pre[hIndex].func; + retVal___ = preHookFunc(&type, &flag, &lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.get_random_id(type, flag, lv); + } + if( HPMHooks.count.HP_mob_get_random_id_post ) { + int (*postHookFunc) (int retVal___, int *type, int *flag, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_get_random_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type, &flag, &lv); + } + } + return retVal___; +} +bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_ksprotected_pre ) { + bool (*preHookFunc) (struct block_list *src, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ksprotected_pre[hIndex].func; + retVal___ = preHookFunc(src, target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.ksprotected(src, target); + } + if( HPMHooks.count.HP_mob_ksprotected_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ksprotected_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target); + } + } + return retVal___; +} +struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_mob_once_spawn_sub_pre ) { + struct mob_data* (*preHookFunc) (struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, &m, &x, &y, mobname, &class_, event, &size, &ai); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.once_spawn_sub(bl, m, x, y, mobname, class_, event, size, ai); + } + if( HPMHooks.count.HP_mob_once_spawn_sub_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &m, &x, &y, mobname, &class_, event, &size, &ai); + } + } + return retVal___; +} +int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_once_spawn_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_once_spawn_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.once_spawn(sd, m, x, y, mobname, class_, amount, event, size, ai); + } + if( HPMHooks.count.HP_mob_once_spawn_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_once_spawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai); + } + } + return retVal___; +} +int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_once_spawn_area_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_once_spawn_area_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.once_spawn_area(sd, m, x0, y0, x1, y1, mobname, class_, amount, event, size, ai); + } + if( HPMHooks.count.HP_mob_once_spawn_area_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_once_spawn_area_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai); + } + } + return retVal___; +} +int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_spawn_guardian_pre ) { + int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_pre[hIndex].func; + retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &guardian, &has_index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index); + } + if( HPMHooks.count.HP_mob_spawn_guardian_post ) { + int (*postHookFunc) (int retVal___, const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname, &x, &y, mobname, &class_, event, &guardian, &has_index); + } + } + return retVal___; +} +int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_spawn_bg_pre ) { + int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_bg_pre[hIndex].func; + retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &bg_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id); + } + if( HPMHooks.count.HP_mob_spawn_bg_post ) { + int (*postHookFunc) (int retVal___, const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_bg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mapname, &x, &y, mobname, &class_, event, &bg_id); + } + } + return retVal___; +} +int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int state) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_can_reach_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *range, int *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_can_reach_pre[hIndex].func; + retVal___ = preHookFunc(md, bl, &range, &state); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.can_reach(md, bl, range, state); + } + if( HPMHooks.count.HP_mob_can_reach_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *bl, int *range, int *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_can_reach_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, bl, &range, &state); + } + } + return retVal___; +} +int HP_mob_linksearch(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_linksearch_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_linksearch_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.linksearch(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_linksearch_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_linksearch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_delayspawn_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_delayspawn_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.delayspawn(tid, tick, id, data); + } + if( HPMHooks.count.HP_mob_delayspawn_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_delayspawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_mob_setdelayspawn(struct mob_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_setdelayspawn_pre ) { + int (*preHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_setdelayspawn_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.setdelayspawn(md); + } + if( HPMHooks.count.HP_mob_setdelayspawn_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_setdelayspawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mob_count_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_count_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_count_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.count_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_count_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_count_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_spawn(struct mob_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_spawn_pre ) { + int (*preHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_spawn_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.spawn(md); + } + if( HPMHooks.count.HP_mob_spawn_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_spawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mob_can_changetarget(struct mob_data *md, struct block_list *target, int mode) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_can_changetarget_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *target, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_can_changetarget_pre[hIndex].func; + retVal___ = preHookFunc(md, target, &mode); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.can_changetarget(md, target, mode); + } + if( HPMHooks.count.HP_mob_can_changetarget_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_can_changetarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, target, &mode); + } + } + return retVal___; +} +int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_target_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *dist); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_target_pre[hIndex].func; + retVal___ = preHookFunc(md, bl, &dist); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.target(md, bl, dist); + } + if( HPMHooks.count.HP_mob_target_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *bl, int *dist); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, bl, &dist); + } + } + return retVal___; +} +int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_activesearch(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_changechase(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_bg_ally(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_lootsearch(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_warpchase_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_warpchase_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.warpchase_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_warpchase_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_warpchase_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre ) { + int (*preHookFunc) (struct mob_data *md, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.ai_sub_hard_slavemob(md, tick); + } + if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick); + } + } + return retVal___; +} +int HP_mob_unlocktarget(struct mob_data *md, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_unlocktarget_pre ) { + int (*preHookFunc) (struct mob_data *md, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_unlocktarget_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.unlocktarget(md, tick); + } + if( HPMHooks.count.HP_mob_unlocktarget_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_unlocktarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick); + } + } + return retVal___; +} +int HP_mob_randomwalk(struct mob_data *md, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_randomwalk_pre ) { + int (*preHookFunc) (struct mob_data *md, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_randomwalk_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.randomwalk(md, tick); + } + if( HPMHooks.count.HP_mob_randomwalk_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_randomwalk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick); + } + } + return retVal___; +} +int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_warpchase_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_warpchase_pre[hIndex].func; + retVal___ = preHookFunc(md, target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.warpchase(md, target); + } + if( HPMHooks.count.HP_mob_warpchase_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_warpchase_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, target); + } + } + return retVal___; +} +bool HP_mob_ai_sub_hard(struct mob_data *md, unsigned int tick) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_ai_sub_hard_pre ) { + bool (*preHookFunc) (struct mob_data *md, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.ai_sub_hard(md, tick); + } + if( HPMHooks.count.HP_mob_ai_sub_hard_post ) { + bool (*postHookFunc) (bool retVal___, struct mob_data *md, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick); + } + } + return retVal___; +} +int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_sub_hard_timer_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_hard_timer(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_ai_sub_hard_timer_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_sub_foreachclient_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.ai_sub_foreachclient(sd, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_ai_sub_foreachclient_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_sub_lazy_pre ) { + int (*preHookFunc) (struct mob_data *md, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_pre[hIndex].func; + retVal___ = preHookFunc(md, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.mob.ai_sub_lazy(md, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_mob_ai_sub_lazy_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_lazy_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ai_lazy_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.ai_lazy(tid, tick, id, data); + } + if( HPMHooks.count.HP_mob_ai_lazy_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ai_lazy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_ai_hard_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_ai_hard_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.ai_hard(tid, tick, id, data); + } + if( HPMHooks.count.HP_mob_ai_hard_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_ai_hard_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) { + int hIndex = 0; + struct item_drop* retVal___ = NULL; + if( HPMHooks.count.HP_mob_setdropitem_pre ) { + struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func; + retVal___ = preHookFunc(&nameid, &qty, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data); + } + if( HPMHooks.count.HP_mob_setdropitem_post ) { + struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int *nameid, int *qty, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &nameid, &qty, data); + } + } + return retVal___; +} +struct item_drop* HP_mob_setlootitem(struct item *item) { + int hIndex = 0; + struct item_drop* retVal___ = NULL; + if( HPMHooks.count.HP_mob_setlootitem_pre ) { + struct item_drop* (*preHookFunc) (struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_setlootitem_pre[hIndex].func; + retVal___ = preHookFunc(item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.setlootitem(item); + } + if( HPMHooks.count.HP_mob_setlootitem_post ) { + struct item_drop* (*postHookFunc) (struct item_drop* retVal___, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_setlootitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item); + } + } + return retVal___; +} +int HP_mob_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_delay_item_drop_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_delay_item_drop_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.delay_item_drop(tid, tick, id, data); + } + if( HPMHooks.count.HP_mob_delay_item_drop_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_delay_item_drop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate, unsigned short flag) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_item_drop_pre ) { + void (*preHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_item_drop_pre[hIndex].func; + preHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.item_drop(md, dlist, ditem, loot, drop_rate, flag); + } + if( HPMHooks.count.HP_mob_item_drop_post ) { + void (*postHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_item_drop_post[hIndex].func; + postHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag); + } + } + return; +} +int HP_mob_timer_delete(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_timer_delete_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_timer_delete_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.timer_delete(tid, tick, id, data); + } + if( HPMHooks.count.HP_mob_timer_delete_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_timer_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_deleteslave_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.deleteslave_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_deleteslave_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_deleteslave(struct mob_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_deleteslave_pre ) { + int (*preHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_deleteslave_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.deleteslave(md); + } + if( HPMHooks.count.HP_mob_deleteslave_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_deleteslave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mob_respawn(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_respawn_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_respawn_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.respawn(tid, tick, id, data); + } + if( HPMHooks.count.HP_mob_respawn_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_respawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_mob_log_damage(struct mob_data *md, struct block_list *src, int damage) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_log_damage_pre ) { + void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_log_damage_pre[hIndex].func; + preHookFunc(md, src, &damage); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.log_damage(md, src, damage); + } + if( HPMHooks.count.HP_mob_log_damage_post ) { + void (*postHookFunc) (struct mob_data *md, struct block_list *src, int *damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_log_damage_post[hIndex].func; + postHookFunc(md, src, &damage); + } + } + return; +} +void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_damage_pre ) { + void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_damage_pre[hIndex].func; + preHookFunc(md, src, &damage); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.damage(md, src, damage); + } + if( HPMHooks.count.HP_mob_damage_post ) { + void (*postHookFunc) (struct mob_data *md, struct block_list *src, int *damage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_damage_post[hIndex].func; + postHookFunc(md, src, &damage); + } + } + return; +} +int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_dead_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *src, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_dead_pre[hIndex].func; + retVal___ = preHookFunc(md, src, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.dead(md, src, type); + } + if( HPMHooks.count.HP_mob_dead_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_dead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, src, &type); + } + } + return retVal___; +} +void HP_mob_revive(struct mob_data *md, unsigned int hp) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_revive_pre ) { + void (*preHookFunc) (struct mob_data *md, unsigned int *hp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_revive_pre[hIndex].func; + preHookFunc(md, &hp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.revive(md, hp); + } + if( HPMHooks.count.HP_mob_revive_post ) { + void (*postHookFunc) (struct mob_data *md, unsigned int *hp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_revive_post[hIndex].func; + postHookFunc(md, &hp); + } + } + return; +} +int HP_mob_guardian_guildchange(struct mob_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_guardian_guildchange_pre ) { + int (*preHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.guardian_guildchange(md); + } + if( HPMHooks.count.HP_mob_guardian_guildchange_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_mob_random_class(int *value, size_t count) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_random_class_pre ) { + int (*preHookFunc) (int *value, size_t *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_random_class_pre[hIndex].func; + retVal___ = preHookFunc(value, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.random_class(value, count); + } + if( HPMHooks.count.HP_mob_random_class_post ) { + int (*postHookFunc) (int retVal___, int *value, size_t *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_random_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, value, &count); + } + } + return retVal___; +} +int HP_mob_class_change(struct mob_data *md, int class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_class_change_pre ) { + int (*preHookFunc) (struct mob_data *md, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_class_change_pre[hIndex].func; + retVal___ = preHookFunc(md, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.class_change(md, class_); + } + if( HPMHooks.count.HP_mob_class_change_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_class_change_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &class_); + } + } + return retVal___; +} +void HP_mob_heal(struct mob_data *md, unsigned int heal) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_heal_pre ) { + void (*preHookFunc) (struct mob_data *md, unsigned int *heal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_heal_pre[hIndex].func; + preHookFunc(md, &heal); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.heal(md, heal); + } + if( HPMHooks.count.HP_mob_heal_post ) { + void (*postHookFunc) (struct mob_data *md, unsigned int *heal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_heal_post[hIndex].func; + postHookFunc(md, &heal); + } + } + return; +} +int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_warpslave_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_warpslave_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.warpslave_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_warpslave_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_warpslave_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_warpslave(struct block_list *bl, int range) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_warpslave_pre ) { + int (*preHookFunc) (struct block_list *bl, int *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_warpslave_pre[hIndex].func; + retVal___ = preHookFunc(bl, &range); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.warpslave(bl, range); + } + if( HPMHooks.count.HP_mob_warpslave_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_warpslave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &range); + } + } + return retVal___; +} +int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_countslave_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_countslave_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.countslave_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_countslave_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_countslave_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_mob_countslave(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_countslave_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_countslave_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.countslave(bl); + } + if( HPMHooks.count.HP_mob_countslave_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_countslave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_summonslave_pre ) { + int (*preHookFunc) (struct mob_data *md2, int *value, int *amount, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_summonslave_pre[hIndex].func; + retVal___ = preHookFunc(md2, value, &amount, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.summonslave(md2, value, amount, skill_id); + } + if( HPMHooks.count.HP_mob_summonslave_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md2, int *value, int *amount, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_summonslave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md2, value, &amount, &skill_id); + } + } + return retVal___; +} +int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_getfriendhprate_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.getfriendhprate_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_getfriendhprate_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int max_rate) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mob_getfriendhprate_pre ) { + struct block_list* (*preHookFunc) (struct mob_data *md, int *min_rate, int *max_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_pre[hIndex].func; + retVal___ = preHookFunc(md, &min_rate, &max_rate); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.getfriendhprate(md, min_rate, max_rate); + } + if( HPMHooks.count.HP_mob_getfriendhprate_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int *min_rate, int *max_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_getfriendhprate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &min_rate, &max_rate); + } + } + return retVal___; +} +struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) { + int hIndex = 0; + struct block_list* retVal___ = NULL; + if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre ) { + struct block_list* (*preHookFunc) (struct mob_data *md, int *rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_pre[hIndex].func; + retVal___ = preHookFunc(md, &rate); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.getmasterhpltmaxrate(md, rate); + } + if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_post ) { + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int *rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &rate); + } + } + return retVal___; +} +int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_getfriendstatus_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.mob.getfriendstatus_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_mob_getfriendstatus_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond2) { + int hIndex = 0; + struct mob_data* retVal___ = NULL; + if( HPMHooks.count.HP_mob_getfriendstatus_pre ) { + struct mob_data* (*preHookFunc) (struct mob_data *md, int *cond1, int *cond2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_pre[hIndex].func; + retVal___ = preHookFunc(md, &cond1, &cond2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.getfriendstatus(md, cond1, cond2); + } + if( HPMHooks.count.HP_mob_getfriendstatus_post ) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct mob_data *md, int *cond1, int *cond2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &cond1, &cond2); + } + } + return retVal___; +} +int HP_mob_skill_use(struct mob_data *md, unsigned int tick, int event) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_skill_use_pre ) { + int (*preHookFunc) (struct mob_data *md, unsigned int *tick, int *event); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_skill_use_pre[hIndex].func; + retVal___ = preHookFunc(md, &tick, &event); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.skill_use(md, tick, event); + } + if( HPMHooks.count.HP_mob_skill_use_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick, int *event); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_skill_use_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &tick, &event); + } + } + return retVal___; +} +int HP_mob_skill_event(struct mob_data *md, struct block_list *src, unsigned int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_skill_event_pre ) { + int (*preHookFunc) (struct mob_data *md, struct block_list *src, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_skill_event_pre[hIndex].func; + retVal___ = preHookFunc(md, src, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.skill_event(md, src, tick, flag); + } + if( HPMHooks.count.HP_mob_skill_event_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_skill_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, src, &tick, &flag); + } + } + return retVal___; +} +int HP_mob_is_clone(int class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_is_clone_pre ) { + int (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_is_clone_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.is_clone(class_); + } + if( HPMHooks.count.HP_mob_is_clone_post ) { + int (*postHookFunc) (int retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_is_clone_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, int mode, int flag, unsigned int duration) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_clone_spawn_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_clone_spawn_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.clone_spawn(sd, m, x, y, event, master_id, mode, flag, duration); + } + if( HPMHooks.count.HP_mob_clone_spawn_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_clone_spawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration); + } + } + return retVal___; +} +int HP_mob_clone_delete(struct mob_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_clone_delete_pre ) { + int (*preHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_clone_delete_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.clone_delete(md); + } + if( HPMHooks.count.HP_mob_clone_delete_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_clone_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_mob_drop_adjust_pre ) { + unsigned int (*preHookFunc) (int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_drop_adjust_pre[hIndex].func; + retVal___ = preHookFunc(&baserate, &rate_adjust, &rate_min, &rate_max); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.drop_adjust(baserate, rate_adjust, rate_min, rate_max); + } + if( HPMHooks.count.HP_mob_drop_adjust_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_drop_adjust_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &baserate, &rate_adjust, &rate_min, &rate_max); + } + } + return retVal___; +} +void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_item_dropratio_adjust_pre ) { + void (*preHookFunc) (int *nameid, int *mob_id, int *rate_adjust); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_pre[hIndex].func; + preHookFunc(&nameid, &mob_id, rate_adjust); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.item_dropratio_adjust(nameid, mob_id, rate_adjust); + } + if( HPMHooks.count.HP_mob_item_dropratio_adjust_post ) { + void (*postHookFunc) (int *nameid, int *mob_id, int *rate_adjust); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_post[hIndex].func; + postHookFunc(&nameid, &mob_id, rate_adjust); + } + } + return; +} +bool HP_mob_parse_dbrow(char **str) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_parse_dbrow_pre ) { + bool (*preHookFunc) (char **str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_parse_dbrow_pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.parse_dbrow(str); + } + if( HPMHooks.count.HP_mob_parse_dbrow_post ) { + bool (*postHookFunc) (bool retVal___, char **str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_parse_dbrow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); + } + } + return retVal___; +} +bool HP_mob_readdb_sub(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_readdb_sub_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_sub_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.readdb_sub(fields, columns, current); + } + if( HPMHooks.count.HP_mob_readdb_sub_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +void HP_mob_readdb(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_readdb_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.readdb(); + } + if( HPMHooks.count.HP_mob_readdb_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_mob_read_sqldb(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_read_sqldb_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_read_sqldb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_sqldb(); + } + if( HPMHooks.count.HP_mob_read_sqldb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_read_sqldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_readdb_mobavail_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.readdb_mobavail(str, columns, current); + } + if( HPMHooks.count.HP_mob_readdb_mobavail_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +int HP_mob_read_randommonster(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_read_randommonster_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_read_randommonster_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_randommonster(); + } + if( HPMHooks.count.HP_mob_read_randommonster_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_read_randommonster_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last_msg_id) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_parse_row_chatdb_pre ) { + bool (*preHookFunc) (char **str, const char *source, int *line, int *last_msg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_pre[hIndex].func; + retVal___ = preHookFunc(str, source, &line, last_msg_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.parse_row_chatdb(str, source, line, last_msg_id); + } + if( HPMHooks.count.HP_mob_parse_row_chatdb_post ) { + bool (*postHookFunc) (bool retVal___, char **str, const char *source, int *line, int *last_msg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, source, &line, last_msg_id); + } + } + return retVal___; +} +void HP_mob_readchatdb(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_readchatdb_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readchatdb_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.readchatdb(); + } + if( HPMHooks.count.HP_mob_readchatdb_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readchatdb_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_parse_row_mobskilldb_pre ) { + bool (*preHookFunc) (char **str, int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.parse_row_mobskilldb(str, columns, current); + } + if( HPMHooks.count.HP_mob_parse_row_mobskilldb_post ) { + bool (*postHookFunc) (bool retVal___, char **str, int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +void HP_mob_readskilldb(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_readskilldb_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readskilldb_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.readskilldb(); + } + if( HPMHooks.count.HP_mob_readskilldb_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readskilldb_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_mob_read_sqlskilldb(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_mob_read_sqlskilldb_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_sqlskilldb(); + } + if( HPMHooks.count.HP_mob_read_sqlskilldb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_mob_readdb_race2(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_readdb_race2_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_race2_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.readdb_race2(fields, columns, current); + } + if( HPMHooks.count.HP_mob_readdb_race2_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_race2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_mob_readdb_itemratio_pre ) { + bool (*preHookFunc) (char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_pre[hIndex].func; + retVal___ = preHookFunc(str, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.readdb_itemratio(str, columns, current); + } + if( HPMHooks.count.HP_mob_readdb_itemratio_post ) { + bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &columns, ¤t); + } + } + return retVal___; +} +void HP_mob_load(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_load_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_load_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.load(); + } + if( HPMHooks.count.HP_mob_load_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_load_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_mob_clear_spawninfo(void) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_clear_spawninfo_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.clear_spawninfo(); + } + if( HPMHooks.count.HP_mob_clear_spawninfo_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* npc */ +int HP_npc_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.init(); + } + if( HPMHooks.count.HP_npc_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_npc_final(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_final_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_final_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.final(); + } + if( HPMHooks.count.HP_npc_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_npc_get_new_npc_id(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_get_new_npc_id_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.get_new_npc_id(); + } + if( HPMHooks.count.HP_npc_get_new_npc_id_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +struct view_data* HP_npc_get_viewdata(int class_) { + int hIndex = 0; + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.get_viewdata(class_); + } + if( HPMHooks.count.HP_npc_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_npc_isnear_sub(struct block_list *bl, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_isnear_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_isnear_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.isnear_sub(bl, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_npc_isnear_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_isnear_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +bool HP_npc_isnear(struct block_list *bl) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_npc_isnear_pre ) { + bool (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_isnear_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.isnear(bl); + } + if( HPMHooks.count.HP_npc_isnear_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_isnear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_ontouch_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_ontouch_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.ontouch_event(sd, nd); + } + if( HPMHooks.count.HP_npc_ontouch_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_ontouch_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); + } + } + return retVal___; +} +int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_ontouch2_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_ontouch2_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.ontouch2_event(sd, nd); + } + if( HPMHooks.count.HP_npc_ontouch2_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_ontouch2_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); + } + } + return retVal___; +} +int HP_npc_enable_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_enable_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_enable_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.enable_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_npc_enable_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_enable_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_npc_enable(const char *name, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_enable_pre ) { + int (*preHookFunc) (const char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_enable_pre[hIndex].func; + retVal___ = preHookFunc(name, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.enable(name, flag); + } + if( HPMHooks.count.HP_npc_enable_post ) { + int (*postHookFunc) (int retVal___, const char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_enable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, &flag); + } + } + return retVal___; +} +struct npc_data* HP_npc_name2id(const char *name) { + int hIndex = 0; + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_name2id_pre ) { + struct npc_data* (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_name2id_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.name2id(name); + } + if( HPMHooks.count.HP_npc_name2id_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_name2id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +int HP_npc_event_dequeue(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_event_dequeue_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_dequeue_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.event_dequeue(sd); + } + if( HPMHooks.count.HP_npc_event_dequeue_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_dequeue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +DBData HP_npc_event_export_create(DBKey key, va_list args) { + int hIndex = 0; + DBData retVal___; + memset(&retVal___, '\0', sizeof(DBData)); + if( HPMHooks.count.HP_npc_event_export_create_pre ) { + DBData (*preHookFunc) (DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_event_export_create_pre[hIndex].func; + retVal___ = preHookFunc(&key, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.event_export_create(key, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_npc_event_export_create_post ) { + DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_event_export_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_npc_event_export(struct npc_data *nd, int i) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_event_export_pre ) { + int (*preHookFunc) (struct npc_data *nd, int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_export_pre[hIndex].func; + retVal___ = preHookFunc(nd, &i); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.event_export(nd, i); + } + if( HPMHooks.count.HP_npc_event_export_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_export_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &i); + } + } + return retVal___; +} +int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const char *eventname) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_event_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct event_data *ev, const char *eventname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, ev, eventname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.event_sub(sd, ev, eventname); + } + if( HPMHooks.count.HP_npc_event_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct event_data *ev, const char *eventname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ev, eventname); + } + } + return retVal___; +} +void HP_npc_event_doall_sub(void *key, void *data, va_list ap) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_event_doall_sub_pre ) { + void (*preHookFunc) (void *key, void *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_event_doall_sub_pre[hIndex].func; + preHookFunc(key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + HPMHooks.source.npc.event_doall_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_npc_event_doall_sub_post ) { + void (*postHookFunc) (void *key, void *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_event_doall_sub_post[hIndex].func; + postHookFunc(key, data, ap___copy); + va_end(ap___copy); + } + } + return; +} +int HP_npc_event_do(const char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_event_do_pre ) { + int (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_do_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.event_do(name); + } + if( HPMHooks.count.HP_npc_event_do_post ) { + int (*postHookFunc) (int retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_do_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +int HP_npc_event_doall_id(const char *name, int rid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_event_doall_id_pre ) { + int (*preHookFunc) (const char *name, int *rid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_doall_id_pre[hIndex].func; + retVal___ = preHookFunc(name, &rid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.event_doall_id(name, rid); + } + if( HPMHooks.count.HP_npc_event_doall_id_post ) { + int (*postHookFunc) (int retVal___, const char *name, int *rid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_doall_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, &rid); + } + } + return retVal___; +} +int HP_npc_event_doall(const char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_event_doall_pre ) { + int (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_doall_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.event_doall(name); + } + if( HPMHooks.count.HP_npc_event_doall_post ) { + int (*postHookFunc) (int retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_doall_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +int HP_npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_event_do_clock_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_do_clock_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.event_do_clock(tid, tick, id, data); + } + if( HPMHooks.count.HP_npc_event_do_clock_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_do_clock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_npc_event_do_oninit(void) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_event_do_oninit_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_do_oninit_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.event_do_oninit(); + } + if( HPMHooks.count.HP_npc_event_do_oninit_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_do_oninit_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_npc_timerevent_export(struct npc_data *nd, int i) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_timerevent_export_pre ) { + int (*preHookFunc) (struct npc_data *nd, int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_export_pre[hIndex].func; + retVal___ = preHookFunc(nd, &i); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.timerevent_export(nd, i); + } + if( HPMHooks.count.HP_npc_timerevent_export_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, int *i); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_export_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &i); + } + } + return retVal___; +} +int HP_npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_timerevent_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.timerevent(tid, tick, id, data); + } + if( HPMHooks.count.HP_npc_timerevent_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_npc_timerevent_start(struct npc_data *nd, int rid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_timerevent_start_pre ) { + int (*preHookFunc) (struct npc_data *nd, int *rid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_start_pre[hIndex].func; + retVal___ = preHookFunc(nd, &rid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.timerevent_start(nd, rid); + } + if( HPMHooks.count.HP_npc_timerevent_start_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, int *rid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &rid); + } + } + return retVal___; +} +int HP_npc_timerevent_stop(struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_timerevent_stop_pre ) { + int (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_stop_pre[hIndex].func; + retVal___ = preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.timerevent_stop(nd); + } + if( HPMHooks.count.HP_npc_timerevent_stop_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_stop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd); + } + } + return retVal___; +} +void HP_npc_timerevent_quit(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_timerevent_quit_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_timerevent_quit_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.timerevent_quit(sd); + } + if( HPMHooks.count.HP_npc_timerevent_quit_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_timerevent_quit_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_npc_gettimerevent_tick(struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_gettimerevent_tick_pre ) { + int (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_pre[hIndex].func; + retVal___ = preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.gettimerevent_tick(nd); + } + if( HPMHooks.count.HP_npc_gettimerevent_tick_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd); + } + } + return retVal___; +} +int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_settimerevent_tick_pre ) { + int (*preHookFunc) (struct npc_data *nd, int *newtimer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_pre[hIndex].func; + retVal___ = preHookFunc(nd, &newtimer); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.settimerevent_tick(nd, newtimer); + } + if( HPMHooks.count.HP_npc_settimerevent_tick_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, int *newtimer); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &newtimer); + } + } + return retVal___; +} +int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *eventname, int *ontouch); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, eventname, &ontouch); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.event(sd, eventname, ontouch); + } + if( HPMHooks.count.HP_npc_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *eventname, int *ontouch); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, eventname, &ontouch); + } + } + return retVal___; +} +int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_touch_areanpc_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.touch_areanpc_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_npc_touch_areanpc_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_touchnext_areanpc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, bool *leavemap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_pre[hIndex].func; + retVal___ = preHookFunc(sd, &leavemap); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.touchnext_areanpc(sd, leavemap); + } + if( HPMHooks.count.HP_npc_touchnext_areanpc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool *leavemap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &leavemap); + } + } + return retVal___; +} +int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_touch_areanpc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.touch_areanpc(sd, m, x, y); + } + if( HPMHooks.count.HP_npc_touch_areanpc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_touch_areanpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x, &y); + } + } + return retVal___; +} +int HP_npc_touch_areanpc2(struct mob_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_touch_areanpc2_pre ) { + int (*preHookFunc) (struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_pre[hIndex].func; + retVal___ = preHookFunc(md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.touch_areanpc2(md); + } + if( HPMHooks.count.HP_npc_touch_areanpc2_post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} +int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_check_areanpc_pre ) { + int (*preHookFunc) (int *flag, int16 *m, int16 *x, int16 *y, int16 *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_check_areanpc_pre[hIndex].func; + retVal___ = preHookFunc(&flag, &m, &x, &y, &range); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.check_areanpc(flag, m, x, y, range); + } + if( HPMHooks.count.HP_npc_check_areanpc_post ) { + int (*postHookFunc) (int retVal___, int *flag, int16 *m, int16 *x, int16 *y, int16 *range); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_check_areanpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &flag, &m, &x, &y, &range); + } + } + return retVal___; +} +struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list *bl) { + int hIndex = 0; + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_checknear_pre ) { + struct npc_data* (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_checknear_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.checknear(sd, bl); + } + if( HPMHooks.count.HP_npc_checknear_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_checknear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl); + } + } + return retVal___; +} +int HP_npc_globalmessage(const char *name, const char *mes) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_globalmessage_pre ) { + int (*preHookFunc) (const char *name, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_globalmessage_pre[hIndex].func; + retVal___ = preHookFunc(name, mes); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.globalmessage(name, mes); + } + if( HPMHooks.count.HP_npc_globalmessage_post ) { + int (*postHookFunc) (int retVal___, const char *name, const char *mes); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_globalmessage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, mes); + } + } + return retVal___; +} +void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_run_tomb_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_run_tomb_pre[hIndex].func; + preHookFunc(sd, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.run_tomb(sd, nd); + } + if( HPMHooks.count.HP_npc_run_tomb_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_run_tomb_post[hIndex].func; + postHookFunc(sd, nd); + } + } + return; +} +int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_click_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_click_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.click(sd, nd); + } + if( HPMHooks.count.HP_npc_click_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_click_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); + } + } + return retVal___; +} +int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_scriptcont_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *id, bool *closing); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_scriptcont_pre[hIndex].func; + retVal___ = preHookFunc(sd, &id, &closing); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.scriptcont(sd, id, closing); + } + if( HPMHooks.count.HP_npc_scriptcont_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, bool *closing); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_scriptcont_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &id, &closing); + } + } + return retVal___; +} +int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_buysellsel_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *id, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_buysellsel_pre[hIndex].func; + retVal___ = preHookFunc(sd, &id, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.buysellsel(sd, id, type); + } + if( HPMHooks.count.HP_npc_buysellsel_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_buysellsel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &id, &type); + } + } + return retVal___; +} +int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short *item_list) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_cashshop_buylist_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *points, int *count, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_pre[hIndex].func; + retVal___ = preHookFunc(sd, &points, &count, item_list); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.cashshop_buylist(sd, points, count, item_list); + } + if( HPMHooks.count.HP_npc_cashshop_buylist_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *points, int *count, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &points, &count, item_list); + } + } + return retVal___; +} +int HP_npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_buylist_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_buylist_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.buylist_sub(sd, n, item_list, nd); + } + if( HPMHooks.count.HP_npc_buylist_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_buylist_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd); + } + } + return retVal___; +} +int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_cashshop_buy_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_cashshop_buy_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid, &amount, &points); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.cashshop_buy(sd, nameid, amount, points); + } + if( HPMHooks.count.HP_npc_cashshop_buy_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *amount, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_cashshop_buy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid, &amount, &points); + } + } + return retVal___; +} +int HP_npc_buylist(struct map_session_data *sd, int n, unsigned short *item_list) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_buylist_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_buylist_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.buylist(sd, n, item_list); + } + if( HPMHooks.count.HP_npc_buylist_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list); + } + } + return retVal___; +} +int HP_npc_selllist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_selllist_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_selllist_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.selllist_sub(sd, n, item_list, nd); + } + if( HPMHooks.count.HP_npc_selllist_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_selllist_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd); + } + } + return retVal___; +} +int HP_npc_selllist(struct map_session_data *sd, int n, unsigned short *item_list) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_selllist_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_selllist_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.selllist(sd, n, item_list); + } + if( HPMHooks.count.HP_npc_selllist_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_selllist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list); + } + } + return retVal___; +} +int HP_npc_remove_map(struct npc_data *nd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_remove_map_pre ) { + int (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_remove_map_pre[hIndex].func; + retVal___ = preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.remove_map(nd); + } + if( HPMHooks.count.HP_npc_remove_map_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_remove_map_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd); + } + } + return retVal___; +} +int HP_npc_unload_ev(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_unload_ev_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_unload_ev_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.unload_ev(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_npc_unload_ev_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_unload_ev_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_npc_unload_ev_label(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_unload_ev_label_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_unload_ev_label_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.unload_ev_label(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_npc_unload_ev_label_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_unload_ev_label_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_unload_dup_sub_pre ) { + int (*preHookFunc) (struct npc_data *nd, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_pre[hIndex].func; + retVal___ = preHookFunc(nd, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.unload_dup_sub(nd, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_npc_unload_dup_sub_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +void HP_npc_unload_duplicates(struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_unload_duplicates_pre ) { + void (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_unload_duplicates_pre[hIndex].func; + preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.unload_duplicates(nd); + } + if( HPMHooks.count.HP_npc_unload_duplicates_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_unload_duplicates_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +int HP_npc_unload(struct npc_data *nd, bool single) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_unload_pre ) { + int (*preHookFunc) (struct npc_data *nd, bool *single); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_unload_pre[hIndex].func; + retVal___ = preHookFunc(nd, &single); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.unload(nd, single); + } + if( HPMHooks.count.HP_npc_unload_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, bool *single); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_unload_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &single); + } + } + return retVal___; +} +void HP_npc_clearsrcfile(void) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_clearsrcfile_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_clearsrcfile_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.clearsrcfile(); + } + if( HPMHooks.count.HP_npc_clearsrcfile_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_clearsrcfile_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_npc_addsrcfile(const char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_addsrcfile_pre ) { + void (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_addsrcfile_pre[hIndex].func; + preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.addsrcfile(name); + } + if( HPMHooks.count.HP_npc_addsrcfile_post ) { + void (*postHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_addsrcfile_post[hIndex].func; + postHookFunc(name); + } + } + return; +} +void HP_npc_delsrcfile(const char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_delsrcfile_pre ) { + void (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_delsrcfile_pre[hIndex].func; + preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.delsrcfile(name); + } + if( HPMHooks.count.HP_npc_delsrcfile_post ) { + void (*postHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_delsrcfile_post[hIndex].func; + postHookFunc(name); + } + } + return; +} +void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_parsename_pre ) { + void (*preHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parsename_pre[hIndex].func; + preHookFunc(nd, name, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.parsename(nd, name, start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_parsename_post ) { + void (*postHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parsename_post[hIndex].func; + postHookFunc(nd, name, start, buffer, filepath); + } + } + return; +} +struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y) { + int hIndex = 0; + struct npc_data* retVal___ = NULL; + if( HPMHooks.count.HP_npc_add_warp_pre ) { + struct npc_data* (*preHookFunc) (char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_add_warp_pre[hIndex].func; + retVal___ = preHookFunc(name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.add_warp(name, from_mapid, from_x, from_y, xs, ys, to_mapindex, to_x, to_y); + } + if( HPMHooks.count.HP_npc_add_warp_post ) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_add_warp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y); + } + } + return retVal___; +} +const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_warp_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_warp_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_parse_warp_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_warp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath); + } + } + return retVal___; +} +const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_shop_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_shop_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_parse_shop_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_shop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath); + } + } + return retVal___; +} +void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filepath) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_convertlabel_db_pre ) { + void (*preHookFunc) (struct npc_label_list *label_list, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_convertlabel_db_pre[hIndex].func; + preHookFunc(label_list, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.convertlabel_db(label_list, filepath); + } + if( HPMHooks.count.HP_npc_convertlabel_db_post ) { + void (*postHookFunc) (struct npc_label_list *label_list, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_convertlabel_db_post[hIndex].func; + postHookFunc(label_list, filepath); + } + } + return; +} +const char* HP_npc_skip_script(const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_skip_script_pre ) { + const char* (*preHookFunc) (const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_skip_script_pre[hIndex].func; + retVal___ = preHookFunc(start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.skip_script(start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_skip_script_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_skip_script_post[hIndex].func; + retVal___ = postHookFunc(retVal___, start, buffer, filepath); + } + } + return retVal___; +} +const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, bool runOnInit) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_script_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, bool *runOnInit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_script_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &runOnInit); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, runOnInit); + } + if( HPMHooks.count.HP_npc_parse_script_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, bool *runOnInit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_script_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &runOnInit); + } + } + return retVal___; +} +const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_duplicate_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_duplicate_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_parse_duplicate_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_duplicate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath); + } + } + return retVal___; +} +int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_duplicate4instance_pre ) { + int (*preHookFunc) (struct npc_data *snd, int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_duplicate4instance_pre[hIndex].func; + retVal___ = preHookFunc(snd, &m); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.duplicate4instance(snd, m); + } + if( HPMHooks.count.HP_npc_duplicate4instance_post ) { + int (*postHookFunc) (int retVal___, struct npc_data *snd, int16 *m); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_duplicate4instance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, snd, &m); + } + } + return retVal___; +} +void HP_npc_setcells(struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_setcells_pre ) { + void (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_setcells_pre[hIndex].func; + preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.setcells(nd); + } + if( HPMHooks.count.HP_npc_setcells_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_setcells_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_unsetcells_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.npc.unsetcells_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_npc_unsetcells_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_npc_unsetcells(struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_unsetcells_pre ) { + void (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_unsetcells_pre[hIndex].func; + preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.unsetcells(nd); + } + if( HPMHooks.count.HP_npc_unsetcells_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_unsetcells_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_movenpc_pre ) { + void (*preHookFunc) (struct npc_data *nd, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_movenpc_pre[hIndex].func; + preHookFunc(nd, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.movenpc(nd, x, y); + } + if( HPMHooks.count.HP_npc_movenpc_post ) { + void (*postHookFunc) (struct npc_data *nd, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_movenpc_post[hIndex].func; + postHookFunc(nd, &x, &y); + } + } + return; +} +void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_setdisplayname_pre ) { + void (*preHookFunc) (struct npc_data *nd, const char *newname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_setdisplayname_pre[hIndex].func; + preHookFunc(nd, newname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.setdisplayname(nd, newname); + } + if( HPMHooks.count.HP_npc_setdisplayname_post ) { + void (*postHookFunc) (struct npc_data *nd, const char *newname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_setdisplayname_post[hIndex].func; + postHookFunc(nd, newname); + } + } + return; +} +void HP_npc_setclass(struct npc_data *nd, short class_) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_setclass_pre ) { + void (*preHookFunc) (struct npc_data *nd, short *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func; + preHookFunc(nd, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.setclass(nd, class_); + } + if( HPMHooks.count.HP_npc_setclass_post ) { + void (*postHookFunc) (struct npc_data *nd, short *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func; + postHookFunc(nd, &class_); + } + } + return; +} +int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, const char *message, const char *eventname) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_do_atcmd_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *command, const char *message, const char *eventname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, command, message, eventname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.do_atcmd_event(sd, command, message, eventname); + } + if( HPMHooks.count.HP_npc_do_atcmd_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, command, message, eventname); + } + } + return retVal___; +} +const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_function_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_function_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_parse_function_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_function_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath); + } + } + return retVal___; +} +void HP_npc_parse_mob2(struct spawn_data *mobspawn) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_parse_mob2_pre ) { + void (*preHookFunc) (struct spawn_data *mobspawn); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_mob2_pre[hIndex].func; + preHookFunc(mobspawn); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.parse_mob2(mobspawn); + } + if( HPMHooks.count.HP_npc_parse_mob2_post ) { + void (*postHookFunc) (struct spawn_data *mobspawn); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_mob2_post[hIndex].func; + postHookFunc(mobspawn); + } + } + return; +} +const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_mob_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_mob_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_parse_mob_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath); + } + } + return retVal___; +} +const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_mapflag_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_mapflag_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_parse_mapflag_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_mapflag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath); + } + } + return retVal___; +} +void HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_parsesrcfile_pre ) { + void (*preHookFunc) (const char *filepath, bool *runOnInit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parsesrcfile_pre[hIndex].func; + preHookFunc(filepath, &runOnInit); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.parsesrcfile(filepath, runOnInit); + } + if( HPMHooks.count.HP_npc_parsesrcfile_post ) { + void (*postHookFunc) (const char *filepath, bool *runOnInit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parsesrcfile_post[hIndex].func; + postHookFunc(filepath, &runOnInit); + } + } + return; +} +int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_script_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, enum npce_event *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_script_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.script_event(sd, type); + } + if( HPMHooks.count.HP_npc_script_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum npce_event *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_script_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +void HP_npc_read_event_script(void) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_read_event_script_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_read_event_script_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.read_event_script(); + } + if( HPMHooks.count.HP_npc_read_event_script_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_read_event_script_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_path_db_clear_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.path_db_clear_sub(key, data, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_npc_path_db_clear_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_npc_ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.ev_label_db_clear_sub(key, data, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_npc_reload(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_npc_reload_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_reload_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.reload(); + } + if( HPMHooks.count.HP_npc_reload_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_reload_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_npc_unloadfile(const char *filepath) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_npc_unloadfile_pre ) { + bool (*preHookFunc) (const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_unloadfile_pre[hIndex].func; + retVal___ = preHookFunc(filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.unloadfile(filepath); + } + if( HPMHooks.count.HP_npc_unloadfile_post ) { + bool (*postHookFunc) (bool retVal___, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_unloadfile_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filepath); + } + } + return retVal___; +} +void HP_npc_do_clear_npc(void) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_do_clear_npc_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_do_clear_npc_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.do_clear_npc(); + } + if( HPMHooks.count.HP_npc_do_clear_npc_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_do_clear_npc_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_npc_debug_warps_sub(struct npc_data *nd) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_debug_warps_sub_pre ) { + void (*preHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_pre[hIndex].func; + preHookFunc(nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.debug_warps_sub(nd); + } + if( HPMHooks.count.HP_npc_debug_warps_sub_post ) { + void (*postHookFunc) (struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +void HP_npc_debug_warps(void) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_debug_warps_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_debug_warps_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.debug_warps(); + } + if( HPMHooks.count.HP_npc_debug_warps_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_debug_warps_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* party */ +void HP_party_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_party_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.init(); + } + if( HPMHooks.count.HP_party_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_party_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_party_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.final(); + } + if( HPMHooks.count.HP_party_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct party_data* HP_party_search(int party_id) { + int hIndex = 0; + struct party_data* retVal___ = NULL; + if( HPMHooks.count.HP_party_search_pre ) { + struct party_data* (*preHookFunc) (int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_search_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.search(party_id); + } + if( HPMHooks.count.HP_party_search_post ) { + struct party_data* (*postHookFunc) (struct party_data* retVal___, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id); + } + } + return retVal___; +} +struct party_data* HP_party_searchname(const char *str) { + int hIndex = 0; + struct party_data* retVal___ = NULL; + if( HPMHooks.count.HP_party_searchname_pre ) { + struct party_data* (*preHookFunc) (const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_searchname_pre[hIndex].func; + retVal___ = preHookFunc(str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.searchname(str); + } + if( HPMHooks.count.HP_party_searchname_post ) { + struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_searchname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str); + } + } + return retVal___; +} +int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_getmemberid_pre ) { + int (*preHookFunc) (struct party_data *p, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_getmemberid_pre[hIndex].func; + retVal___ = preHookFunc(p, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.getmemberid(p, sd); + } + if( HPMHooks.count.HP_party_getmemberid_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_getmemberid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, sd); + } + } + return retVal___; +} +struct map_session_data* HP_party_getavailablesd(struct party_data *p) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_party_getavailablesd_pre ) { + struct map_session_data* (*preHookFunc) (struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_getavailablesd_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.getavailablesd(p); + } + if( HPMHooks.count.HP_party_getavailablesd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_getavailablesd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +int HP_party_create(struct map_session_data *sd, char *name, int item, int item2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name, int *item, int *item2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, &item, &item2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.create(sd, name, item, item2); + } + if( HPMHooks.count.HP_party_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *item, int *item2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, &item, &item2); + } + } + return retVal___; +} +void HP_party_created(int account_id, int char_id, int fail, int party_id, char *name) { + int hIndex = 0; + if( HPMHooks.count.HP_party_created_pre ) { + void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_created_pre[hIndex].func; + preHookFunc(&account_id, &char_id, &fail, &party_id, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.created(account_id, char_id, fail, party_id, name); + } + if( HPMHooks.count.HP_party_created_post ) { + void (*postHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_created_post[hIndex].func; + postHookFunc(&account_id, &char_id, &fail, &party_id, name); + } + } + return; +} +int HP_party_request_info(int party_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_request_info_pre ) { + int (*preHookFunc) (int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_request_info_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.request_info(party_id, char_id); + } + if( HPMHooks.count.HP_party_request_info_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_request_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &char_id); + } + } + return retVal___; +} +int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_invite_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_invite_pre[hIndex].func; + retVal___ = preHookFunc(sd, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.invite(sd, tsd); + } + if( HPMHooks.count.HP_party_invite_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_invite_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, tsd); + } + } + return retVal___; +} +void HP_party_member_joined(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_party_member_joined_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_member_joined_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.member_joined(sd); + } + if( HPMHooks.count.HP_party_member_joined_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_member_joined_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_member_added_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_member_added_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.member_added(party_id, account_id, char_id, flag); + } + if( HPMHooks.count.HP_party_member_added_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_member_added_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id, &flag); + } + } + return retVal___; +} +int HP_party_leave(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_leave_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_leave_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.leave(sd); + } + if( HPMHooks.count.HP_party_leave_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_party_removemember(struct map_session_data *sd, int account_id, char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_removemember_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *account_id, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_removemember_pre[hIndex].func; + retVal___ = preHookFunc(sd, &account_id, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.removemember(sd, account_id, name); + } + if( HPMHooks.count.HP_party_removemember_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_removemember_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &account_id, name); + } + } + return retVal___; +} +int HP_party_member_withdraw(int party_id, int account_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_member_withdraw_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_member_withdraw_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.member_withdraw(party_id, account_id, char_id); + } + if( HPMHooks.count.HP_party_member_withdraw_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_member_withdraw_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + } + } + return retVal___; +} +void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_party_reply_invite_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *party_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_reply_invite_pre[hIndex].func; + preHookFunc(sd, &party_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.reply_invite(sd, party_id, flag); + } + if( HPMHooks.count.HP_party_reply_invite_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *party_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_reply_invite_post[hIndex].func; + postHookFunc(sd, &party_id, &flag); + } + } + return; +} +int HP_party_recv_noinfo(int party_id, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_recv_noinfo_pre ) { + int (*preHookFunc) (int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recv_noinfo_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.recv_noinfo(party_id, char_id); + } + if( HPMHooks.count.HP_party_recv_noinfo_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recv_noinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &char_id); + } + } + return retVal___; +} +int HP_party_recv_info(struct party *sp, int char_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_recv_info_pre ) { + int (*preHookFunc) (struct party *sp, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recv_info_pre[hIndex].func; + retVal___ = preHookFunc(sp, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.recv_info(sp, char_id); + } + if( HPMHooks.count.HP_party_recv_info_post ) { + int (*postHookFunc) (int retVal___, struct party *sp, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recv_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sp, &char_id); + } + } + return retVal___; +} +int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned short mapid, int online, int lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_recv_movemap_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recv_movemap_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id, &mapid, &online, &lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.recv_movemap(party_id, account_id, char_id, mapid, online, lv); + } + if( HPMHooks.count.HP_party_recv_movemap_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recv_movemap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id, &mapid, &online, &lv); + } + } + return retVal___; +} +int HP_party_broken(int party_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_broken_pre ) { + int (*preHookFunc) (int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_broken_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.broken(party_id); + } + if( HPMHooks.count.HP_party_broken_post ) { + int (*postHookFunc) (int retVal___, int *party_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_broken_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id); + } + } + return retVal___; +} +int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_optionchanged_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_optionchanged_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &exp, &item, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.optionchanged(party_id, account_id, exp, item, flag); + } + if( HPMHooks.count.HP_party_optionchanged_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *exp, int *item, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_optionchanged_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &exp, &item, &flag); + } + } + return retVal___; +} +int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_changeoption_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *exp, int *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_changeoption_pre[hIndex].func; + retVal___ = preHookFunc(sd, &exp, &item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.changeoption(sd, exp, item); + } + if( HPMHooks.count.HP_party_changeoption_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *exp, int *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_changeoption_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &exp, &item); + } + } + return retVal___; +} +bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data *t_sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_party_changeleader_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct map_session_data *t_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_changeleader_pre[hIndex].func; + retVal___ = preHookFunc(sd, t_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.changeleader(sd, t_sd); + } + if( HPMHooks.count.HP_party_changeleader_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct map_session_data *t_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_changeleader_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, t_sd); + } + } + return retVal___; +} +void HP_party_send_movemap(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_party_send_movemap_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_movemap_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.send_movemap(sd); + } + if( HPMHooks.count.HP_party_send_movemap_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_movemap_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_party_send_levelup(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_party_send_levelup_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_levelup_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.send_levelup(sd); + } + if( HPMHooks.count.HP_party_send_levelup_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_levelup_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_party_send_logout(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_send_logout_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_logout_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.send_logout(sd); + } + if( HPMHooks.count.HP_party_send_logout_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_logout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_party_send_message(struct map_session_data *sd, const char *mes, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_send_message_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_message_pre[hIndex].func; + retVal___ = preHookFunc(sd, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.send_message(sd, mes, len); + } + if( HPMHooks.count.HP_party_send_message_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, mes, &len); + } + } + return retVal___; +} +int HP_party_recv_message(int party_id, int account_id, const char *mes, int len) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_recv_message_pre ) { + int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_recv_message_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, mes, &len); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.recv_message(party_id, account_id, mes, len); + } + if( HPMHooks.count.HP_party_recv_message_post ) { + int (*postHookFunc) (int retVal___, int *party_id, int *account_id, const char *mes, int *len); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_recv_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len); + } + } + return retVal___; +} +int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_skill_check_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_skill_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, &party_id, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.skill_check(sd, party_id, skill_id, skill_lv); + } + if( HPMHooks.count.HP_party_skill_check_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_skill_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &party_id, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_party_send_xy_clear(struct party_data *p) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_send_xy_clear_pre ) { + int (*preHookFunc) (struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_xy_clear_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.send_xy_clear(p); + } + if( HPMHooks.count.HP_party_send_xy_clear_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_xy_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned int base_exp, unsigned int job_exp, int zeny) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_exp_share_pre ) { + int (*preHookFunc) (struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_exp_share_pre[hIndex].func; + retVal___ = preHookFunc(p, src, &base_exp, &job_exp, &zeny); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.exp_share(p, src, base_exp, job_exp, zeny); + } + if( HPMHooks.count.HP_party_exp_share_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_exp_share_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, src, &base_exp, &job_exp, &zeny); + } + } + return retVal___; +} +int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struct item *item_data, int first_charid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_share_loot_pre ) { + int (*preHookFunc) (struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_share_loot_pre[hIndex].func; + retVal___ = preHookFunc(p, sd, item_data, &first_charid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.share_loot(p, sd, item_data, first_charid); + } + if( HPMHooks.count.HP_party_share_loot_post ) { + int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_share_loot_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, sd, item_data, &first_charid); + } + } + return retVal___; +} +int HP_party_send_dot_remove(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_send_dot_remove_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_dot_remove_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.send_dot_remove(sd); + } + if( HPMHooks.count.HP_party_send_dot_remove_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_dot_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_party_sub_count(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_sub_count_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_party_sub_count_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.party.sub_count(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_party_sub_count_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_party_sub_count_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_party_booking_register(struct map_session_data *sd, short level, const char *notice) { + int hIndex = 0; + if( HPMHooks.count.HP_party_booking_register_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *level, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_booking_register_pre[hIndex].func; + preHookFunc(sd, &level, notice); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.booking_register(sd, level, notice); + } + if( HPMHooks.count.HP_party_booking_register_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *level, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_booking_register_post[hIndex].func; + postHookFunc(sd, &level, notice); + } + } + return; +} +void HP_party_booking_update(struct map_session_data *sd, const char *notice) { + int hIndex = 0; + if( HPMHooks.count.HP_party_booking_update_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_booking_update_pre[hIndex].func; + preHookFunc(sd, notice); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.booking_update(sd, notice); + } + if( HPMHooks.count.HP_party_booking_update_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *notice); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_booking_update_post[hIndex].func; + postHookFunc(sd, notice); + } + } + return; +} +void HP_party_booking_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) { + int hIndex = 0; + if( HPMHooks.count.HP_party_booking_search_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_booking_search_pre[hIndex].func; + preHookFunc(sd, &level, &mapid, &lastindex, &resultcount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.booking_search(sd, level, mapid, lastindex, resultcount); + } + if( HPMHooks.count.HP_party_booking_search_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_booking_search_post[hIndex].func; + postHookFunc(sd, &level, &mapid, &lastindex, &resultcount); + } + } + return; +} +bool HP_party_booking_delete(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_party_booking_delete_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_booking_delete_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.booking_delete(sd); + } + if( HPMHooks.count.HP_party_booking_delete_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_booking_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int range, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_vforeachsamemap_pre ) { + int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_party_vforeachsamemap_pre[hIndex].func; + retVal___ = preHookFunc(func, sd, &range, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.party.vforeachsamemap(func, sd, range, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_party_vforeachsamemap_post ) { + int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_party_vforeachsamemap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, func, sd, &range, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_send_xy_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_send_xy_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.send_xy_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_party_send_xy_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_send_xy_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_party_fill_member(struct party_member *member, struct map_session_data *sd, unsigned int leader) { + int hIndex = 0; + if( HPMHooks.count.HP_party_fill_member_pre ) { + void (*preHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_fill_member_pre[hIndex].func; + preHookFunc(member, sd, &leader); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.fill_member(member, sd, leader); + } + if( HPMHooks.count.HP_party_fill_member_post ) { + void (*postHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_fill_member_post[hIndex].func; + postHookFunc(member, sd, &leader); + } + } + return; +} +TBL_PC* HP_party_sd_check(int party_id, int account_id, int char_id) { + int hIndex = 0; + TBL_PC* retVal___ = NULL; + if( HPMHooks.count.HP_party_sd_check_pre ) { + TBL_PC* (*preHookFunc) (int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_sd_check_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.sd_check(party_id, account_id, char_id); + } + if( HPMHooks.count.HP_party_sd_check_post ) { + TBL_PC* (*postHookFunc) (TBL_PC* retVal___, int *party_id, int *account_id, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_sd_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + } + } + return retVal___; +} +void HP_party_check_state(struct party_data *p) { + int hIndex = 0; + if( HPMHooks.count.HP_party_check_state_pre ) { + void (*preHookFunc) (struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_check_state_pre[hIndex].func; + preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.party.check_state(p); + } + if( HPMHooks.count.HP_party_check_state_post ) { + void (*postHookFunc) (struct party_data *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_check_state_post[hIndex].func; + postHookFunc(p); + } + } + return; +} +struct party_booking_ad_info* HP_party_create_booking_data(void) { + int hIndex = 0; + struct party_booking_ad_info* retVal___ = NULL; + if( HPMHooks.count.HP_party_create_booking_data_pre ) { + struct party_booking_ad_info* (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_party_create_booking_data_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.party.create_booking_data(); + } + if( HPMHooks.count.HP_party_create_booking_data_post ) { + struct party_booking_ad_info* (*postHookFunc) (struct party_booking_ad_info* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_party_create_booking_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_party_db_final(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_party_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_party_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.party.db_final(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_party_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_party_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +/* path */ +int HP_path_blownpos(int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_path_blownpos_pre ) { + int (*preHookFunc) (int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_blownpos_pre[hIndex].func; + retVal___ = preHookFunc(&m, &x0, &y0, &dx, &dy, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.path.blownpos(m, x0, y0, dx, dy, count); + } + if( HPMHooks.count.HP_path_blownpos_post ) { + int (*postHookFunc) (int retVal___, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_blownpos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &m, &x0, &y0, &dx, &dy, &count); + } + } + return retVal___; +} +bool HP_path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_path_search_pre ) { + bool (*preHookFunc) (struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_search_pre[hIndex].func; + retVal___ = preHookFunc(wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.path.search(wpd, m, x0, y0, x1, y1, flag, cell); + } + if( HPMHooks.count.HP_path_search_post ) { + bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell); + } + } + return retVal___; +} +bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_path_search_long_pre ) { + bool (*preHookFunc) (struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_search_long_pre[hIndex].func; + retVal___ = preHookFunc(spd, &m, &x0, &y0, &x1, &y1, &cell); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.path.search_long(spd, m, x0, y0, x1, y1, cell); + } + if( HPMHooks.count.HP_path_search_long_post ) { + bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_search_long_post[hIndex].func; + retVal___ = postHookFunc(retVal___, spd, &m, &x0, &y0, &x1, &y1, &cell); + } + } + return retVal___; +} +int HP_path_check_distance(int dx, int dy, int distance) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_path_check_distance_pre ) { + int (*preHookFunc) (int *dx, int *dy, int *distance); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_check_distance_pre[hIndex].func; + retVal___ = preHookFunc(&dx, &dy, &distance); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.path.check_distance(dx, dy, distance); + } + if( HPMHooks.count.HP_path_check_distance_post ) { + int (*postHookFunc) (int retVal___, int *dx, int *dy, int *distance); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_check_distance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &dx, &dy, &distance); + } + } + return retVal___; +} +unsigned int HP_path_distance(int dx, int dy) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_path_distance_pre ) { + unsigned int (*preHookFunc) (int *dx, int *dy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_path_distance_pre[hIndex].func; + retVal___ = preHookFunc(&dx, &dy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.path.distance(dx, dy); + } + if( HPMHooks.count.HP_path_distance_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, int *dx, int *dy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_path_distance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &dx, &dy); + } + } + return retVal___; +} +/* pc */ +void HP_pc_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.init(); + } + if( HPMHooks.count.HP_pc_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_pc_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.final(); + } + if( HPMHooks.count.HP_pc_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct map_session_data* HP_pc_get_dummy_sd(void) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_dummy_sd_pre ) { + struct map_session_data* (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.get_dummy_sd(); + } + if( HPMHooks.count.HP_pc_get_dummy_sd_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_pc_class2idx(int class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_class2idx_pre ) { + int (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_class2idx_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.class2idx(class_); + } + if( HPMHooks.count.HP_pc_class2idx_post ) { + int (*postHookFunc) (int retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_class2idx_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +int HP_pc_get_group_level(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_get_group_level_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_group_level_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_group_level_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.get_group_level(sd); + } + if( HPMHooks.count.HP_pc_get_group_level_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_group_level_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_group_level_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +bool HP_pc_can_give_items(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_can_give_items_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_give_items_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_give_items_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.can_give_items(sd); + } + if( HPMHooks.count.HP_pc_can_give_items_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_give_items_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_give_items_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_can_use_command_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, const char *command); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_use_command_pre[hIndex].func; + retVal___ = preHookFunc(sd, command); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.can_use_command(sd, command); + } + if( HPMHooks.count.HP_pc_can_use_command_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_use_command_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, command); + } + } + return retVal___; +} +bool HP_pc_has_permission(struct map_session_data *sd, enum e_pc_permission permission) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_has_permission_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, enum e_pc_permission *permission); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_permission_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_has_permission_pre[hIndex].func; + retVal___ = preHookFunc(sd, &permission); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.has_permission(sd, permission); + } + if( HPMHooks.count.HP_pc_has_permission_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum e_pc_permission *permission); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_permission_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_has_permission_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &permission); + } + } + return retVal___; +} +int HP_pc_set_group(struct map_session_data *sd, int group_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_set_group_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_set_group_pre[hIndex].func; + retVal___ = preHookFunc(sd, &group_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.set_group(sd, group_id); + } + if( HPMHooks.count.HP_pc_set_group_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_set_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &group_id); + } + } + return retVal___; +} +bool HP_pc_should_log_commands(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_should_log_commands_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_should_log_commands_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.should_log_commands(sd); + } + if( HPMHooks.count.HP_pc_should_log_commands_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_should_log_commands_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setrestartvalue_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setrestartvalue_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setrestartvalue(sd, type); + } + if( HPMHooks.count.HP_pc_setrestartvalue_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setrestartvalue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pc_makesavestatus(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_makesavestatus_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_makesavestatus_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.makesavestatus(sd); + } + if( HPMHooks.count.HP_pc_makesavestatus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_makesavestatus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_respawn_pre ) { + void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_respawn_pre[hIndex].func; + preHookFunc(sd, &clrtype); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.respawn(sd, clrtype); + } + if( HPMHooks.count.HP_pc_respawn_post ) { + void (*postHookFunc) (struct map_session_data *sd, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_respawn_post[hIndex].func; + postHookFunc(sd, &clrtype); + } + } + return; +} +int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setnewpc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setnewpc_pre[hIndex].func; + retVal___ = preHookFunc(sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd); + } + if( HPMHooks.count.HP_pc_setnewpc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setnewpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd); + } + } + return retVal___; +} +bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_authok_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_authok_pre[hIndex].func; + retVal___ = preHookFunc(sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.authok(sd, login_id2, expiration_time, group_id, st, changing_mapservers); + } + if( HPMHooks.count.HP_pc_authok_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_authok_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers); + } + } + return retVal___; +} +void HP_pc_authfail(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_authfail_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_authfail_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.authfail(sd); + } + if( HPMHooks.count.HP_pc_authfail_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_authfail_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_pc_reg_received(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_reg_received_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_reg_received_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.reg_received(sd); + } + if( HPMHooks.count.HP_pc_reg_received_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_reg_received_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_isequip(struct map_session_data *sd, int n) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_isequip_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_isequip_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.isequip(sd, n); + } + if( HPMHooks.count.HP_pc_isequip_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_isequip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n); + } + } + return retVal___; +} +int HP_pc_equippoint(struct map_session_data *sd, int n) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_equippoint_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_equippoint_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.equippoint(sd, n); + } + if( HPMHooks.count.HP_pc_equippoint_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_equippoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n); + } + } + return retVal___; +} +int HP_pc_setinventorydata(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setinventorydata_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setinventorydata_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setinventorydata(sd); + } + if( HPMHooks.count.HP_pc_setinventorydata_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setinventorydata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkskill_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkskill_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkskill(sd, skill_id); + } + if( HPMHooks.count.HP_pc_checkskill_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); + } + } + return retVal___; +} +int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkskill2_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkskill2_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkskill2(sd, index); + } + if( HPMHooks.count.HP_pc_checkskill2_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkskill2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index); + } + } + return retVal___; +} +int HP_pc_checkallowskill(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkallowskill_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkallowskill_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkallowskill(sd); + } + if( HPMHooks.count.HP_pc_checkallowskill_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkallowskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_checkequip(struct map_session_data *sd, int pos) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkequip_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkequip_pre[hIndex].func; + retVal___ = preHookFunc(sd, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkequip(sd, pos); + } + if( HPMHooks.count.HP_pc_checkequip_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkequip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &pos); + } + } + return retVal___; +} +int HP_pc_calc_skilltree(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_calc_skilltree_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.calc_skilltree(sd); + } + if( HPMHooks.count.HP_pc_calc_skilltree_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.calc_skilltree_normalize_job(sd); + } + if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_clean_skilltree(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_clean_skilltree_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_clean_skilltree_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.clean_skilltree(sd); + } + if( HPMHooks.count.HP_pc_clean_skilltree_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_clean_skilltree_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_setpos(struct map_session_data *sd, unsigned short mapindex, int x, int y, clr_type clrtype) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setpos_pre ) { + int (*preHookFunc) (struct map_session_data *sd, unsigned short *mapindex, int *x, int *y, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func; + retVal___ = preHookFunc(sd, &mapindex, &x, &y, &clrtype); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setpos(sd, mapindex, x, y, clrtype); + } + if( HPMHooks.count.HP_pc_setpos_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *mapindex, int *x, int *y, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setpos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &mapindex, &x, &y, &clrtype); + } + } + return retVal___; +} +int HP_pc_setsavepoint(struct map_session_data *sd, short mapindex, int x, int y) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setsavepoint_pre ) { + int (*preHookFunc) (struct map_session_data *sd, short *mapindex, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setsavepoint_pre[hIndex].func; + retVal___ = preHookFunc(sd, &mapindex, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setsavepoint(sd, mapindex, x, y); + } + if( HPMHooks.count.HP_pc_setsavepoint_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *mapindex, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setsavepoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &mapindex, &x, &y); + } + } + return retVal___; +} +int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_randomwarp_pre ) { + int (*preHookFunc) (struct map_session_data *sd, clr_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_randomwarp_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.randomwarp(sd, type); + } + if( HPMHooks.count.HP_pc_randomwarp_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, clr_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_randomwarp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pc_memo(struct map_session_data *sd, int pos) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_memo_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_memo_pre[hIndex].func; + retVal___ = preHookFunc(sd, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.memo(sd, pos); + } + if( HPMHooks.count.HP_pc_memo_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_memo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &pos); + } + } + return retVal___; +} +int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkadditem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkadditem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkadditem(sd, nameid, amount); + } + if( HPMHooks.count.HP_pc_checkadditem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkadditem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid, &amount); + } + } + return retVal___; +} +int HP_pc_inventoryblank(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_inventoryblank_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventoryblank_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.inventoryblank(sd); + } + if( HPMHooks.count.HP_pc_inventoryblank_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventoryblank_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_search_inventory_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_search_inventory_pre[hIndex].func; + retVal___ = preHookFunc(sd, &item_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.search_inventory(sd, item_id); + } + if( HPMHooks.count.HP_pc_search_inventory_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_search_inventory_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &item_id); + } + } + return retVal___; +} +int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_payzeny_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_payzeny_pre[hIndex].func; + retVal___ = preHookFunc(sd, &zeny, &type, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.payzeny(sd, zeny, type, tsd); + } + if( HPMHooks.count.HP_pc_payzeny_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_payzeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &zeny, &type, tsd); + } + } + return retVal___; +} +int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_additem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_additem_pre[hIndex].func; + retVal___ = preHookFunc(sd, item_data, &amount, &log_type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.additem(sd, item_data, amount, log_type); + } + if( HPMHooks.count.HP_pc_additem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_additem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_data, &amount, &log_type); + } + } + return retVal___; +} +int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_getzeny_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getzeny_pre[hIndex].func; + retVal___ = preHookFunc(sd, &zeny, &type, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.getzeny(sd, zeny, type, tsd); + } + if( HPMHooks.count.HP_pc_getzeny_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getzeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &zeny, &type, tsd); + } + } + return retVal___; +} +int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, short reason, e_log_pick_type log_type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_delitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_delitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &amount, &type, &reason, &log_type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.delitem(sd, n, amount, type, reason, log_type); + } + if( HPMHooks.count.HP_pc_delitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_delitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &amount, &type, &reason, &log_type); + } + } + return retVal___; +} +int HP_pc_paycash(struct map_session_data *sd, int price, int points) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_paycash_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *price, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_paycash_pre[hIndex].func; + retVal___ = preHookFunc(sd, &price, &points); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.paycash(sd, price, points); + } + if( HPMHooks.count.HP_pc_paycash_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *price, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_paycash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &price, &points); + } + } + return retVal___; +} +int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_getcash_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *cash, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getcash_pre[hIndex].func; + retVal___ = preHookFunc(sd, &cash, &points); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.getcash(sd, cash, points); + } + if( HPMHooks.count.HP_pc_getcash_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *cash, int *points); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getcash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &cash, &points); + } + } + return retVal___; +} +int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_cart_additem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_cart_additem_pre[hIndex].func; + retVal___ = preHookFunc(sd, item_data, &amount, &log_type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.cart_additem(sd, item_data, amount, log_type); + } + if( HPMHooks.count.HP_pc_cart_additem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_cart_additem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_data, &amount, &log_type); + } + } + return retVal___; +} +int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type, e_log_pick_type log_type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_cart_delitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_cart_delitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &amount, &type, &log_type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.cart_delitem(sd, n, amount, type, log_type); + } + if( HPMHooks.count.HP_pc_cart_delitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_cart_delitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &amount, &type, &log_type); + } + } + return retVal___; +} +int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_putitemtocart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_putitemtocart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.putitemtocart(sd, idx, amount); + } + if( HPMHooks.count.HP_pc_putitemtocart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_putitemtocart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + } + } + return retVal___; +} +int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_getitemfromcart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getitemfromcart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.getitemfromcart(sd, idx, amount); + } + if( HPMHooks.count.HP_pc_getitemfromcart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getitemfromcart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + } + } + return retVal___; +} +int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_cartitem_amount_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_cartitem_amount_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.cartitem_amount(sd, idx, amount); + } + if( HPMHooks.count.HP_pc_cartitem_amount_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_cartitem_amount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx, &amount); + } + } + return retVal___; +} +int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_takeitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_takeitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, fitem); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.takeitem(sd, fitem); + } + if( HPMHooks.count.HP_pc_takeitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct flooritem_data *fitem); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_takeitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, fitem); + } + } + return retVal___; +} +int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_dropitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_dropitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.dropitem(sd, n, amount); + } + if( HPMHooks.count.HP_pc_dropitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_dropitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &amount); + } + } + return retVal___; +} +bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_isequipped_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_isequipped_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.isequipped(sd, nameid); + } + if( HPMHooks.count.HP_pc_isequipped_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_isequipped_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); + } + } + return retVal___; +} +bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_can_Adopt_pre ) { + bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_Adopt_pre[hIndex].func; + retVal___ = preHookFunc(p1_sd, p2_sd, b_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.can_Adopt(p1_sd, p2_sd, b_sd); + } + if( HPMHooks.count.HP_pc_can_Adopt_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_Adopt_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p1_sd, p2_sd, b_sd); + } + } + return retVal___; +} +bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_adoption_pre ) { + bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_adoption_pre[hIndex].func; + retVal___ = preHookFunc(p1_sd, p2_sd, b_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.adoption(p1_sd, p2_sd, b_sd); + } + if( HPMHooks.count.HP_pc_adoption_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_adoption_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p1_sd, p2_sd, b_sd); + } + } + return retVal___; +} +int HP_pc_updateweightstatus(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_updateweightstatus_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_updateweightstatus_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.updateweightstatus(sd); + } + if( HPMHooks.count.HP_pc_updateweightstatus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_updateweightstatus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_addautobonus_pre ) { + int (*preHookFunc) (struct s_autobonus *bonus, char *max, const char *bonus_script, short *rate, unsigned int *dur, short *atk_type, const char *o_script, unsigned short *pos, bool *onskill); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addautobonus_pre[hIndex].func; + retVal___ = preHookFunc(bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.addautobonus(bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill); + } + if( HPMHooks.count.HP_pc_addautobonus_post ) { + int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char *max, const char *bonus_script, short *rate, unsigned int *dur, short *atk_type, const char *o_script, unsigned short *pos, bool *onskill); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addautobonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill); + } + } + return retVal___; +} +int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_exeautobonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_exeautobonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, bonus); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.exeautobonus(sd, bonus); + } + if( HPMHooks.count.HP_pc_exeautobonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_exeautobonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bonus); + } + } + return retVal___; +} +int HP_pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_endautobonus_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_endautobonus_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.endautobonus(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_endautobonus_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_endautobonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, char max, bool restore) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_delautobonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_delautobonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, bonus, &max, &restore); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.delautobonus(sd, bonus, max, restore); + } + if( HPMHooks.count.HP_pc_delautobonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_delautobonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bonus, &max, &restore); + } + } + return retVal___; +} +int HP_pc_bonus(struct map_session_data *sd, int type, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus(sd, type, val); + } + if( HPMHooks.count.HP_pc_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); + } + } + return retVal___; +} +int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus2_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus2_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &type2, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus2(sd, type, type2, val); + } + if( HPMHooks.count.HP_pc_bonus2_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &type2, &val); + } + } + return retVal___; +} +int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus3_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus3_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &type2, &type3, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus3(sd, type, type2, type3, val); + } + if( HPMHooks.count.HP_pc_bonus3_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus3_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &val); + } + } + return retVal___; +} +int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, int type4, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus4_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus4_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus4(sd, type, type2, type3, type4, val); + } + if( HPMHooks.count.HP_pc_bonus4_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus4_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &type4, &val); + } + } + return retVal___; +} +int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, int type4, int type5, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus5_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus5_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &type5, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus5(sd, type, type2, type3, type4, type5, val); + } + if( HPMHooks.count.HP_pc_bonus5_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus5_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &type4, &type5, &val); + } + } + return retVal___; +} +int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_skill_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *id, int *level, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skill_pre[hIndex].func; + retVal___ = preHookFunc(sd, &id, &level, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.skill(sd, id, level, flag); + } + if( HPMHooks.count.HP_pc_skill_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, int *level, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &id, &level, &flag); + } + } + return retVal___; +} +int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_insert_card_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_insert_card_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx_card, &idx_equip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.insert_card(sd, idx_card, idx_equip); + } + if( HPMHooks.count.HP_pc_insert_card_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx_card, int *idx_equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_insert_card_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx_card, &idx_equip); + } + } + return retVal___; +} +int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_steal_item_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_steal_item_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.steal_item(sd, bl, skill_lv); + } + if( HPMHooks.count.HP_pc_steal_item_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_steal_item_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl, &skill_lv); + } + } + return retVal___; +} +int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_steal_coin_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_steal_coin_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.steal_coin(sd, bl); + } + if( HPMHooks.count.HP_pc_steal_coin_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_steal_coin_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl); + } + } + return retVal___; +} +int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_modifybuyvalue_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *orig_value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_pre[hIndex].func; + retVal___ = preHookFunc(sd, &orig_value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.modifybuyvalue(sd, orig_value); + } + if( HPMHooks.count.HP_pc_modifybuyvalue_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *orig_value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &orig_value); + } + } + return retVal___; +} +int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_modifysellvalue_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *orig_value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_modifysellvalue_pre[hIndex].func; + retVal___ = preHookFunc(sd, &orig_value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.modifysellvalue(sd, orig_value); + } + if( HPMHooks.count.HP_pc_modifysellvalue_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *orig_value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_modifysellvalue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &orig_value); + } + } + return retVal___; +} +int HP_pc_follow(struct map_session_data *sd, int target_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_follow_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_follow_pre[hIndex].func; + retVal___ = preHookFunc(sd, &target_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.follow(sd, target_id); + } + if( HPMHooks.count.HP_pc_follow_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_follow_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &target_id); + } + } + return retVal___; +} +int HP_pc_stop_following(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_stop_following_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_stop_following_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.stop_following(sd); + } + if( HPMHooks.count.HP_pc_stop_following_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_stop_following_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +unsigned int HP_pc_maxbaselv(struct map_session_data *sd) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_pc_maxbaselv_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_maxbaselv_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.maxbaselv(sd); + } + if( HPMHooks.count.HP_pc_maxbaselv_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_maxbaselv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +unsigned int HP_pc_maxjoblv(struct map_session_data *sd) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_pc_maxjoblv_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_maxjoblv_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.maxjoblv(sd); + } + if( HPMHooks.count.HP_pc_maxjoblv_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_maxjoblv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_checkbaselevelup(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkbaselevelup_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkbaselevelup(sd); + } + if( HPMHooks.count.HP_pc_checkbaselevelup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_checkjoblevelup(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkjoblevelup_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkjoblevelup(sd); + } + if( HPMHooks.count.HP_pc_checkjoblevelup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_gainexp_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func; + retVal___ = preHookFunc(sd, src, &base_exp, &job_exp, &is_quest); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest); + } + if( HPMHooks.count.HP_pc_gainexp_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, src, &base_exp, &job_exp, &is_quest); + } + } + return retVal___; +} +unsigned int HP_pc_nextbaseexp(struct map_session_data *sd) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_pc_nextbaseexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.nextbaseexp(sd); + } + if( HPMHooks.count.HP_pc_nextbaseexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_nextbaseexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +unsigned int HP_pc_thisbaseexp(struct map_session_data *sd) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_pc_thisbaseexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.thisbaseexp(sd); + } + if( HPMHooks.count.HP_pc_thisbaseexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_thisbaseexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +unsigned int HP_pc_nextjobexp(struct map_session_data *sd) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_pc_nextjobexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.nextjobexp(sd); + } + if( HPMHooks.count.HP_pc_nextjobexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_nextjobexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +unsigned int HP_pc_thisjobexp(struct map_session_data *sd) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_pc_thisjobexp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.thisjobexp(sd); + } + if( HPMHooks.count.HP_pc_thisjobexp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_thisjobexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_gets_status_point(int level) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_gets_status_point_pre ) { + int (*preHookFunc) (int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_gets_status_point_pre[hIndex].func; + retVal___ = preHookFunc(&level); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.gets_status_point(level); + } + if( HPMHooks.count.HP_pc_gets_status_point_post ) { + int (*postHookFunc) (int retVal___, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_gets_status_point_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &level); + } + } + return retVal___; +} +int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_need_status_point_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_need_status_point_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.need_status_point(sd, type, val); + } + if( HPMHooks.count.HP_pc_need_status_point_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_need_status_point_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); + } + } + return retVal___; +} +int HP_pc_statusup(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_statusup_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_statusup_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.statusup(sd, type); + } + if( HPMHooks.count.HP_pc_statusup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_statusup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_statusup2_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_statusup2_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.statusup2(sd, type, val); + } + if( HPMHooks.count.HP_pc_statusup2_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_statusup2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); + } + } + return retVal___; +} +int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_skillup_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skillup_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.skillup(sd, skill_id); + } + if( HPMHooks.count.HP_pc_skillup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skillup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); + } + } + return retVal___; +} +int HP_pc_allskillup(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_allskillup_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_allskillup_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.allskillup(sd); + } + if( HPMHooks.count.HP_pc_allskillup_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_allskillup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_resetlvl(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_resetlvl_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resetlvl_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.resetlvl(sd, type); + } + if( HPMHooks.count.HP_pc_resetlvl_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resetlvl_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pc_resetstate(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_resetstate_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resetstate_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.resetstate(sd); + } + if( HPMHooks.count.HP_pc_resetstate_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resetstate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_resetskill(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_resetskill_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resetskill_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.resetskill(sd, flag); + } + if( HPMHooks.count.HP_pc_resetskill_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resetskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_pc_resetfeel(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_resetfeel_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resetfeel_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.resetfeel(sd); + } + if( HPMHooks.count.HP_pc_resetfeel_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resetfeel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_resethate(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_resethate_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_resethate_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.resethate(sd); + } + if( HPMHooks.count.HP_pc_resethate_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_resethate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_equipitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *req_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_equipitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &req_pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.equipitem(sd, n, req_pos); + } + if( HPMHooks.count.HP_pc_equipitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *req_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_equipitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &req_pos); + } + } + return retVal___; +} +int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_unequipitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_unequipitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.unequipitem(sd, n, flag); + } + if( HPMHooks.count.HP_pc_unequipitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_unequipitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &flag); + } + } + return retVal___; +} +int HP_pc_checkitem(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkitem_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkitem(sd); + } + if( HPMHooks.count.HP_pc_checkitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_useitem(struct map_session_data *sd, int n) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_useitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_useitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.useitem(sd, n); + } + if( HPMHooks.count.HP_pc_useitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_useitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n); + } + } + return retVal___; +} +int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_skillatk_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.skillatk_bonus(sd, skill_id); + } + if( HPMHooks.count.HP_pc_skillatk_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); + } + } + return retVal___; +} +int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_skillheal_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.skillheal_bonus(sd, skill_id); + } + if( HPMHooks.count.HP_pc_skillheal_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); + } + } + return retVal___; +} +int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_skillheal2_bonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.skillheal2_bonus(sd, skill_id); + } + if( HPMHooks.count.HP_pc_skillheal2_bonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); + } + } + return retVal___; +} +void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned int hp, unsigned int sp) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_damage_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_damage_pre[hIndex].func; + preHookFunc(sd, src, &hp, &sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.damage(sd, src, hp, sp); + } + if( HPMHooks.count.HP_pc_damage_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_damage_post[hIndex].func; + postHookFunc(sd, src, &hp, &sp); + } + } + return; +} +int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_dead_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_dead_pre[hIndex].func; + retVal___ = preHookFunc(sd, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.dead(sd, src); + } + if( HPMHooks.count.HP_pc_dead_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_dead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, src); + } + } + return retVal___; +} +void HP_pc_revive(struct map_session_data *sd, unsigned int hp, unsigned int sp) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_revive_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_revive_pre[hIndex].func; + preHookFunc(sd, &hp, &sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.revive(sd, hp, sp); + } + if( HPMHooks.count.HP_pc_revive_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_revive_post[hIndex].func; + postHookFunc(sd, &hp, &sp); + } + } + return; +} +void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_heal_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_heal_pre[hIndex].func; + preHookFunc(sd, &hp, &sp, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.heal(sd, hp, sp, type); + } + if( HPMHooks.count.HP_pc_heal_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_heal_post[hIndex].func; + postHookFunc(sd, &hp, &sp, &type); + } + } + return; +} +int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_itemheal_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *itemid, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_itemheal_pre[hIndex].func; + retVal___ = preHookFunc(sd, &itemid, &hp, &sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.itemheal(sd, itemid, hp, sp); + } + if( HPMHooks.count.HP_pc_itemheal_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *itemid, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_itemheal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &itemid, &hp, &sp); + } + } + return retVal___; +} +int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_percentheal_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_percentheal_pre[hIndex].func; + retVal___ = preHookFunc(sd, &hp, &sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.percentheal(sd, hp, sp); + } + if( HPMHooks.count.HP_pc_percentheal_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *hp, int *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_percentheal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &hp, &sp); + } + } + return retVal___; +} +int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_jobchange_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *job, int *upper); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_jobchange_pre[hIndex].func; + retVal___ = preHookFunc(sd, &job, &upper); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.jobchange(sd, job, upper); + } + if( HPMHooks.count.HP_pc_jobchange_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *job, int *upper); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_jobchange_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &job, &upper); + } + } + return retVal___; +} +int HP_pc_setoption(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setoption_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setoption_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setoption(sd, type); + } + if( HPMHooks.count.HP_pc_setoption_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setoption_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pc_setcart(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setcart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setcart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setcart(sd, type); + } + if( HPMHooks.count.HP_pc_setcart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setcart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pc_setfalcon(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setfalcon_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setfalcon(sd, flag); + } + if( HPMHooks.count.HP_pc_setfalcon_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setfalcon_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_pc_setriding(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setriding_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setriding_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setriding(sd, flag); + } + if( HPMHooks.count.HP_pc_setriding_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setriding_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_pc_setmadogear(struct map_session_data *sd, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setmadogear_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func; + retVal___ = preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setmadogear(sd, flag); + } + if( HPMHooks.count.HP_pc_setmadogear_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setmadogear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &flag); + } + } + return retVal___; +} +int HP_pc_changelook(struct map_session_data *sd, int type, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_changelook_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_changelook_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.changelook(sd, type, val); + } + if( HPMHooks.count.HP_pc_changelook_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_changelook_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); + } + } + return retVal___; +} +int HP_pc_equiplookall(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_equiplookall_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_equiplookall_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.equiplookall(sd); + } + if( HPMHooks.count.HP_pc_equiplookall_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_equiplookall_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_readparam(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_readparam_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readparam_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.readparam(sd, type); + } + if( HPMHooks.count.HP_pc_readparam_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readparam_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pc_setparam(struct map_session_data *sd, int type, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setparam_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setparam_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setparam(sd, type, val); + } + if( HPMHooks.count.HP_pc_setparam_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setparam_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); + } + } + return retVal___; +} +int HP_pc_readreg(struct map_session_data *sd, int reg) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_readreg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *reg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readreg_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.readreg(sd, reg); + } + if( HPMHooks.count.HP_pc_readreg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *reg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readreg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®); + } + } + return retVal___; +} +int HP_pc_setreg(struct map_session_data *sd, int reg, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setreg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *reg, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setreg_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setreg(sd, reg, val); + } + if( HPMHooks.count.HP_pc_setreg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *reg, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setreg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®, &val); + } + } + return retVal___; +} +char* HP_pc_readregstr(struct map_session_data *sd, int reg) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_pc_readregstr_pre ) { + char* (*preHookFunc) (struct map_session_data *sd, int *reg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readregstr_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.readregstr(sd, reg); + } + if( HPMHooks.count.HP_pc_readregstr_post ) { + char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int *reg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readregstr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®); + } + } + return retVal___; +} +int HP_pc_setregstr(struct map_session_data *sd, int reg, const char *str) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setregstr_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *reg, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setregstr_pre[hIndex].func; + retVal___ = preHookFunc(sd, ®, str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setregstr(sd, reg, str); + } + if( HPMHooks.count.HP_pc_setregstr_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *reg, const char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setregstr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ®, str); + } + } + return retVal___; +} +int HP_pc_readregistry(struct map_session_data *sd, const char *reg, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_readregistry_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *reg, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readregistry_pre[hIndex].func; + retVal___ = preHookFunc(sd, reg, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.readregistry(sd, reg, type); + } + if( HPMHooks.count.HP_pc_readregistry_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *reg, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readregistry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, reg, &type); + } + } + return retVal___; +} +int HP_pc_setregistry(struct map_session_data *sd, const char *reg, int val, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setregistry_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *reg, int *val, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setregistry_pre[hIndex].func; + retVal___ = preHookFunc(sd, reg, &val, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setregistry(sd, reg, val, type); + } + if( HPMHooks.count.HP_pc_setregistry_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *reg, int *val, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setregistry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, reg, &val, &type); + } + } + return retVal___; +} +char* HP_pc_readregistry_str(struct map_session_data *sd, const char *reg, int type) { + int hIndex = 0; + char* retVal___ = NULL; + if( HPMHooks.count.HP_pc_readregistry_str_pre ) { + char* (*preHookFunc) (struct map_session_data *sd, const char *reg, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readregistry_str_pre[hIndex].func; + retVal___ = preHookFunc(sd, reg, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.readregistry_str(sd, reg, type); + } + if( HPMHooks.count.HP_pc_readregistry_str_post ) { + char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, const char *reg, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readregistry_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, reg, &type); + } + } + return retVal___; +} +int HP_pc_setregistry_str(struct map_session_data *sd, const char *reg, const char *val, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setregistry_str_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *reg, const char *val, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setregistry_str_pre[hIndex].func; + retVal___ = preHookFunc(sd, reg, val, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setregistry_str(sd, reg, val, type); + } + if( HPMHooks.count.HP_pc_setregistry_str_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *reg, const char *val, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setregistry_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, reg, val, &type); + } + } + return retVal___; +} +int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_addeventtimer_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *tick, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addeventtimer_pre[hIndex].func; + retVal___ = preHookFunc(sd, &tick, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.addeventtimer(sd, tick, name); + } + if( HPMHooks.count.HP_pc_addeventtimer_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *tick, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addeventtimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &tick, name); + } + } + return retVal___; +} +int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_deleventtimer_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_deleventtimer_pre[hIndex].func; + retVal___ = preHookFunc(sd, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.deleventtimer(sd, name); + } + if( HPMHooks.count.HP_pc_deleventtimer_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_deleventtimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); + } + } + return retVal___; +} +int HP_pc_cleareventtimer(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_cleareventtimer_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_cleareventtimer_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.cleareventtimer(sd); + } + if( HPMHooks.count.HP_pc_cleareventtimer_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_cleareventtimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_addeventtimercount_pre ) { + int (*preHookFunc) (struct map_session_data *sd, const char *name, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addeventtimercount_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.addeventtimercount(sd, name, tick); + } + if( HPMHooks.count.HP_pc_addeventtimercount_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addeventtimercount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, &tick); + } + } + return retVal___; +} +int HP_pc_calc_pvprank(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_calc_pvprank_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.calc_pvprank(sd); + } + if( HPMHooks.count.HP_pc_calc_pvprank_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_calc_pvprank_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.calc_pvprank_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_calc_pvprank_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pc_ismarried(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_ismarried_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_ismarried_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.ismarried(sd); + } + if( HPMHooks.count.HP_pc_ismarried_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_ismarried_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_marriage_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_marriage_pre[hIndex].func; + retVal___ = preHookFunc(sd, dstsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.marriage(sd, dstsd); + } + if( HPMHooks.count.HP_pc_marriage_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *dstsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_marriage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, dstsd); + } + } + return retVal___; +} +int HP_pc_divorce(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_divorce_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_divorce_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.divorce(sd); + } + if( HPMHooks.count.HP_pc_divorce_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_divorce_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_partner_pre ) { + struct map_session_data* (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_partner_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.get_partner(sd); + } + if( HPMHooks.count.HP_pc_get_partner_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_partner_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +struct map_session_data* HP_pc_get_father(struct map_session_data *sd) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_father_pre ) { + struct map_session_data* (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_father_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.get_father(sd); + } + if( HPMHooks.count.HP_pc_get_father_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_father_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_mother_pre ) { + struct map_session_data* (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_mother_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.get_mother(sd); + } + if( HPMHooks.count.HP_pc_get_mother_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_mother_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +struct map_session_data* HP_pc_get_child(struct map_session_data *sd) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if( HPMHooks.count.HP_pc_get_child_pre ) { + struct map_session_data* (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_get_child_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.get_child(sd); + } + if( HPMHooks.count.HP_pc_get_child_post ) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_get_child_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_bleeding_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bleeding_pre[hIndex].func; + preHookFunc(sd, &diff_tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.bleeding(sd, diff_tick); + } + if( HPMHooks.count.HP_pc_bleeding_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bleeding_post[hIndex].func; + postHookFunc(sd, &diff_tick); + } + } + return; +} +void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_regen_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_regen_pre[hIndex].func; + preHookFunc(sd, &diff_tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.regen(sd, diff_tick); + } + if( HPMHooks.count.HP_pc_regen_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *diff_tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_regen_post[hIndex].func; + postHookFunc(sd, &diff_tick); + } + } + return; +} +void HP_pc_setstand(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_setstand_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setstand_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.setstand(sd); + } + if( HPMHooks.count.HP_pc_setstand_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setstand_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_pc_candrop(struct map_session_data *sd, struct item *item) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_candrop_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_candrop_pre[hIndex].func; + retVal___ = preHookFunc(sd, item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.candrop(sd, item); + } + if( HPMHooks.count.HP_pc_candrop_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_candrop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item); + } + } + return retVal___; +} +int HP_pc_jobid2mapid(unsigned short b_class) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_jobid2mapid_pre ) { + int (*preHookFunc) (unsigned short *b_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func; + retVal___ = preHookFunc(&b_class); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.jobid2mapid(b_class); + } + if( HPMHooks.count.HP_pc_jobid2mapid_post ) { + int (*postHookFunc) (int retVal___, unsigned short *b_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_jobid2mapid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &b_class); + } + } + return retVal___; +} +int HP_pc_mapid2jobid(unsigned short class_, int sex) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_mapid2jobid_pre ) { + int (*preHookFunc) (unsigned short *class_, int *sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func; + retVal___ = preHookFunc(&class_, &sex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex); + } + if( HPMHooks.count.HP_pc_mapid2jobid_post ) { + int (*postHookFunc) (int retVal___, unsigned short *class_, int *sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_mapid2jobid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_, &sex); + } + } + return retVal___; +} +const char* HP_pc_job_name(int class_) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_pc_job_name_pre ) { + const char* (*preHookFunc) (int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_job_name_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.job_name(class_); + } + if( HPMHooks.count.HP_pc_job_name_post ) { + const char* (*postHookFunc) (const char* retVal___, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_job_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} +void HP_pc_setinvincibletimer(struct map_session_data *sd, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_setinvincibletimer_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_pre[hIndex].func; + preHookFunc(sd, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.setinvincibletimer(sd, val); + } + if( HPMHooks.count.HP_pc_setinvincibletimer_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_post[hIndex].func; + postHookFunc(sd, &val); + } + } + return; +} +void HP_pc_delinvincibletimer(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_delinvincibletimer_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.delinvincibletimer(sd); + } + if( HPMHooks.count.HP_pc_delinvincibletimer_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_addspiritball_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addspiritball_pre[hIndex].func; + retVal___ = preHookFunc(sd, &interval, &max); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.addspiritball(sd, interval, max); + } + if( HPMHooks.count.HP_pc_addspiritball_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *interval, int *max); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addspiritball_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &interval, &max); + } + } + return retVal___; +} +int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_delspiritball_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *count, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_delspiritball_pre[hIndex].func; + retVal___ = preHookFunc(sd, &count, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.delspiritball(sd, count, type); + } + if( HPMHooks.count.HP_pc_delspiritball_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *count, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_delspiritball_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &count, &type); + } + } + return retVal___; +} +void HP_pc_addfame(struct map_session_data *sd, int count) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_addfame_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_addfame_pre[hIndex].func; + preHookFunc(sd, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.addfame(sd, count); + } + if( HPMHooks.count.HP_pc_addfame_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_addfame_post[hIndex].func; + postHookFunc(sd, &count); + } + } + return; +} +unsigned char HP_pc_famerank(int char_id, int job) { + int hIndex = 0; + unsigned char retVal___; + memset(&retVal___, '\0', sizeof(unsigned char)); + if( HPMHooks.count.HP_pc_famerank_pre ) { + unsigned char (*preHookFunc) (int *char_id, int *job); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famerank_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_famerank_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &job); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.famerank(char_id, job); + } + if( HPMHooks.count.HP_pc_famerank_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, int *char_id, int *job); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famerank_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_famerank_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &job); + } + } + return retVal___; +} +int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_set_hate_mob_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *pos, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_set_hate_mob_pre[hIndex].func; + retVal___ = preHookFunc(sd, &pos, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.set_hate_mob(sd, pos, bl); + } + if( HPMHooks.count.HP_pc_set_hate_mob_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_set_hate_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &pos, bl); + } + } + return retVal___; +} +int HP_pc_readdb(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_readdb_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readdb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.readdb(); + } + if( HPMHooks.count.HP_pc_readdb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_pc_map_day_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_map_day_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_map_day_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.map_day_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_map_day_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_map_day_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pc_map_night_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_map_night_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_map_night_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.map_night_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_map_night_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_map_night_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_pc_inventory_rentals(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_inventory_rentals_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventory_rentals_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.inventory_rentals(sd); + } + if( HPMHooks.count.HP_pc_inventory_rentals_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventory_rentals_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_pc_inventory_rental_clear(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_inventory_rental_clear_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.inventory_rental_clear(sd); + } + if( HPMHooks.count.HP_pc_inventory_rental_clear_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_inventory_rental_add_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *seconds); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_pre[hIndex].func; + preHookFunc(sd, &seconds); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.inventory_rental_add(sd, seconds); + } + if( HPMHooks.count.HP_pc_inventory_rental_add_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *seconds); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_post[hIndex].func; + postHookFunc(sd, &seconds); + } + } + return; +} +int HP_pc_disguise(struct map_session_data *sd, int class_) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_disguise_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_disguise_pre[hIndex].func; + retVal___ = preHookFunc(sd, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.disguise(sd, class_); + } + if( HPMHooks.count.HP_pc_disguise_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_disguise_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &class_); + } + } + return retVal___; +} +bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_isautolooting_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_isautolooting_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.isautolooting(sd, nameid); + } + if( HPMHooks.count.HP_pc_isautolooting_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_isautolooting_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); + } + } + return retVal___; +} +void HP_pc_overheat(struct map_session_data *sd, int val) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_overheat_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_overheat_pre[hIndex].func; + preHookFunc(sd, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.overheat(sd, val); + } + if( HPMHooks.count.HP_pc_overheat_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_overheat_post[hIndex].func; + postHookFunc(sd, &val); + } + } + return; +} +int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_banding_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_banding_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.banding(sd, skill_lv); + } + if( HPMHooks.count.HP_pc_banding_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_banding_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_lv); + } + } + return retVal___; +} +void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_itemcd_do_pre ) { + void (*preHookFunc) (struct map_session_data *sd, bool *load); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_itemcd_do_pre[hIndex].func; + preHookFunc(sd, &load); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.itemcd_do(sd, load); + } + if( HPMHooks.count.HP_pc_itemcd_do_post ) { + void (*postHookFunc) (struct map_session_data *sd, bool *load); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_itemcd_do_post[hIndex].func; + postHookFunc(sd, &load); + } + } + return; +} +int HP_pc_load_combo(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_load_combo_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_load_combo_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.load_combo(sd); + } + if( HPMHooks.count.HP_pc_load_combo_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_load_combo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_add_charm_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_add_charm_pre[hIndex].func; + retVal___ = preHookFunc(sd, &interval, &max, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.add_charm(sd, interval, max, type); + } + if( HPMHooks.count.HP_pc_add_charm_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *interval, int *max, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_add_charm_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &interval, &max, &type); + } + } + return retVal___; +} +int HP_pc_del_charm(struct map_session_data *sd, int count, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_del_charm_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *count, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_del_charm_pre[hIndex].func; + retVal___ = preHookFunc(sd, &count, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.del_charm(sd, count, type); + } + if( HPMHooks.count.HP_pc_del_charm_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *count, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_del_charm_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &count, &type); + } + } + return retVal___; +} +void HP_pc_baselevelchanged(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_baselevelchanged_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_baselevelchanged_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.baselevelchanged(sd); + } + if( HPMHooks.count.HP_pc_baselevelchanged_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_baselevelchanged_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_level_penalty_mod_pre ) { + int (*preHookFunc) (int *diff, unsigned char *race, unsigned short *mode, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_pre[hIndex].func; + retVal___ = preHookFunc(&diff, &race, &mode, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.level_penalty_mod(diff, race, mode, type); + } + if( HPMHooks.count.HP_pc_level_penalty_mod_post ) { + int (*postHookFunc) (int retVal___, int *diff, unsigned char *race, unsigned short *mode, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &diff, &race, &mode, &type); + } + } + return retVal___; +} +int HP_pc_calc_skillpoint(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_calc_skillpoint_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.calc_skillpoint(sd); + } + if( HPMHooks.count.HP_pc_calc_skillpoint_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_invincible_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_invincible_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.invincible_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_invincible_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_invincible_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_spiritball_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_spiritball_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.spiritball_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_spiritball_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_spiritball_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pc_check_banding(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_check_banding_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pc_check_banding_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pc.check_banding(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_pc_check_banding_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pc_check_banding_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_inventory_rental_end_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.inventory_rental_end(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_inventory_rental_end_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_check_skilltree_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_check_skilltree_pre[hIndex].func; + preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.check_skilltree(sd, skill_id); + } + if( HPMHooks.count.HP_pc_check_skilltree_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_check_skilltree_post[hIndex].func; + postHookFunc(sd, &skill_id); + } + } + return; +} +int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus_autospell_pre ) { + int (*preHookFunc) (struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_pre[hIndex].func; + retVal___ = preHookFunc(spell, &max, &id, &lv, &rate, &flag, &card_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus_autospell(spell, max, id, lv, rate, flag, card_id); + } + if( HPMHooks.count.HP_pc_bonus_autospell_post ) { + int (*postHookFunc) (int retVal___, struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, spell, &max, &id, &lv, &rate, &flag, &card_id); + } + } + return retVal___; +} +int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus_autospell_onskill_pre ) { + int (*preHookFunc) (struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_pre[hIndex].func; + retVal___ = preHookFunc(spell, &max, &src_skill, &id, &lv, &rate, &card_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus_autospell_onskill(spell, max, src_skill, id, lv, rate, card_id); + } + if( HPMHooks.count.HP_pc_bonus_autospell_onskill_post ) { + int (*postHookFunc) (int retVal___, struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, spell, &max, &src_skill, &id, &lv, &rate, &card_id); + } + } + return retVal___; +} +int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, short rate, short arrow_rate, unsigned char flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus_addeff_pre ) { + int (*preHookFunc) (struct s_addeffect *effect, int *max, enum sc_type *id, short *rate, short *arrow_rate, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_pre[hIndex].func; + retVal___ = preHookFunc(effect, &max, &id, &rate, &arrow_rate, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus_addeff(effect, max, id, rate, arrow_rate, flag); + } + if( HPMHooks.count.HP_pc_bonus_addeff_post ) { + int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int *max, enum sc_type *id, short *rate, short *arrow_rate, unsigned char *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_post[hIndex].func; + retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &arrow_rate, &flag); + } + } + return retVal___; +} +int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus_addeff_onskill_pre ) { + int (*preHookFunc) (struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_pre[hIndex].func; + retVal___ = preHookFunc(effect, &max, &id, &rate, &skill_id, &target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus_addeff_onskill(effect, max, id, rate, skill_id, target); + } + if( HPMHooks.count.HP_pc_bonus_addeff_onskill_post ) { + int (*postHookFunc) (int retVal___, struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &skill_id, &target); + } + } + return retVal___; +} +int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_bonus_item_drop_pre ) { + int (*preHookFunc) (struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_pre[hIndex].func; + retVal___ = preHookFunc(drop, &max, &id, &group, &race, &rate); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, group, race, rate); + } + if( HPMHooks.count.HP_pc_bonus_item_drop_post ) { + int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, drop, &max, &id, &group, &race, &rate); + } + } + return retVal___; +} +void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_calcexp_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func; + preHookFunc(sd, base_exp, job_exp, src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src); + } + if( HPMHooks.count.HP_pc_calcexp_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calcexp_post[hIndex].func; + postHookFunc(sd, base_exp, job_exp, src); + } + } + return; +} +int HP_pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_respawn_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_respawn_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.respawn_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_respawn_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_respawn_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_jobchange_killclone_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pc.jobchange_killclone(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_pc_jobchange_killclone_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_pc_getstat(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_getstat_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getstat_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.getstat(sd, type); + } + if( HPMHooks.count.HP_pc_getstat_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getstat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pc_setstat(struct map_session_data *sd, int type, int val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_setstat_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_setstat_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type, &val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.setstat(sd, type, val); + } + if( HPMHooks.count.HP_pc_setstat_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_setstat_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type, &val); + } + } + return retVal___; +} +int HP_pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_eventtimer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_eventtimer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.eventtimer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_eventtimer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_eventtimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_daynight_timer_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pc.daynight_timer_sub(sd, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_pc_daynight_timer_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_charm_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_charm_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.charm_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_charm_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_charm_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_pc_readdb_levelpenalty_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.readdb_levelpenalty(fields, columns, current); + } + if( HPMHooks.count.HP_pc_readdb_levelpenalty_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +int HP_pc_autosave(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_autosave_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_autosave_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.autosave(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_autosave_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_autosave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_follow_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_follow_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.follow_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pc_follow_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_follow_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +void HP_pc_read_skill_tree(void) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_read_skill_tree_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_read_skill_tree_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.read_skill_tree(); + } + if( HPMHooks.count.HP_pc_read_skill_tree_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_read_skill_tree_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_pc_isUseitem(struct map_session_data *sd, int n) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_isUseitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_isUseitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.isUseitem(sd, n); + } + if( HPMHooks.count.HP_pc_isUseitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_isUseitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n); + } + } + return retVal___; +} +int HP_pc_show_steal(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_show_steal_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pc_show_steal_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pc.show_steal(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_pc_show_steal_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pc_show_steal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_checkcombo_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_checkcombo_pre[hIndex].func; + retVal___ = preHookFunc(sd, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.checkcombo(sd, data); + } + if( HPMHooks.count.HP_pc_checkcombo_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_checkcombo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, data); + } + } + return retVal___; +} +int HP_pc_calcweapontype(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_calcweapontype_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_calcweapontype_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.calcweapontype(sd); + } + if( HPMHooks.count.HP_pc_calcweapontype_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_calcweapontype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pc_removecombo_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_removecombo_pre[hIndex].func; + retVal___ = preHookFunc(sd, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.removecombo(sd, data); + } + if( HPMHooks.count.HP_pc_removecombo_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_removecombo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, data); + } + } + return retVal___; +} +/* pet */ +int HP_pet_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.init(); + } + if( HPMHooks.count.HP_pet_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_pet_final(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_final_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_final_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.final(); + } + if( HPMHooks.count.HP_pet_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_pet_hungry_val(struct pet_data *pd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_hungry_val_pre ) { + int (*preHookFunc) (struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_hungry_val_pre[hIndex].func; + retVal___ = preHookFunc(pd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.hungry_val(pd); + } + if( HPMHooks.count.HP_pet_hungry_val_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_hungry_val_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd); + } + } + return retVal___; +} +void HP_pet_set_intimate(struct pet_data *pd, int value) { + int hIndex = 0; + if( HPMHooks.count.HP_pet_set_intimate_pre ) { + void (*preHookFunc) (struct pet_data *pd, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_set_intimate_pre[hIndex].func; + preHookFunc(pd, &value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pet.set_intimate(pd, value); + } + if( HPMHooks.count.HP_pet_set_intimate_post ) { + void (*postHookFunc) (struct pet_data *pd, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_set_intimate_post[hIndex].func; + postHookFunc(pd, &value); + } + } + return; +} +int HP_pet_create_egg(struct map_session_data *sd, int item_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_create_egg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_create_egg_pre[hIndex].func; + retVal___ = preHookFunc(sd, &item_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.create_egg(sd, item_id); + } + if( HPMHooks.count.HP_pet_create_egg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *item_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_create_egg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &item_id); + } + } + return retVal___; +} +int HP_pet_unlocktarget(struct pet_data *pd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_unlocktarget_pre ) { + int (*preHookFunc) (struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_unlocktarget_pre[hIndex].func; + retVal___ = preHookFunc(pd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.unlocktarget(pd); + } + if( HPMHooks.count.HP_pet_unlocktarget_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_unlocktarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd); + } + } + return retVal___; +} +int HP_pet_attackskill(struct pet_data *pd, int target_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_attackskill_pre ) { + int (*preHookFunc) (struct pet_data *pd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_attackskill_pre[hIndex].func; + retVal___ = preHookFunc(pd, &target_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.attackskill(pd, target_id); + } + if( HPMHooks.count.HP_pet_attackskill_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_attackskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, &target_id); + } + } + return retVal___; +} +int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_target_check_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_target_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.target_check(sd, bl, type); + } + if( HPMHooks.count.HP_pet_target_check_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_target_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl, &type); + } + } + return retVal___; +} +int HP_pet_sc_check(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_sc_check_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_sc_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.sc_check(sd, type); + } + if( HPMHooks.count.HP_pet_sc_check_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_sc_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +int HP_pet_hungry(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_hungry_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_hungry_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.hungry(tid, tick, id, data); + } + if( HPMHooks.count.HP_pet_hungry_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_hungry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pet_search_petDB_index(int key, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_search_petDB_index_pre ) { + int (*preHookFunc) (int *key, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_search_petDB_index_pre[hIndex].func; + retVal___ = preHookFunc(&key, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.search_petDB_index(key, type); + } + if( HPMHooks.count.HP_pet_search_petDB_index_post ) { + int (*postHookFunc) (int retVal___, int *key, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_search_petDB_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, &type); + } + } + return retVal___; +} +int HP_pet_hungry_timer_delete(struct pet_data *pd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_hungry_timer_delete_pre ) { + int (*preHookFunc) (struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_pre[hIndex].func; + retVal___ = preHookFunc(pd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.hungry_timer_delete(pd); + } + if( HPMHooks.count.HP_pet_hungry_timer_delete_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd); + } + } + return retVal___; +} +int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_performance_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_performance_pre[hIndex].func; + retVal___ = preHookFunc(sd, pd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.performance(sd, pd); + } + if( HPMHooks.count.HP_pet_performance_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_performance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pd); + } + } + return retVal___; +} +int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_return_egg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_return_egg_pre[hIndex].func; + retVal___ = preHookFunc(sd, pd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.return_egg(sd, pd); + } + if( HPMHooks.count.HP_pet_return_egg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_return_egg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pd); + } + } + return retVal___; +} +int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_data_init_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_data_init_pre[hIndex].func; + retVal___ = preHookFunc(sd, petinfo); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.data_init(sd, petinfo); + } + if( HPMHooks.count.HP_pet_data_init_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_data_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, petinfo); + } + } + return retVal___; +} +int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_birth_process_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_birth_process_pre[hIndex].func; + retVal___ = preHookFunc(sd, petinfo); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.birth_process(sd, petinfo); + } + if( HPMHooks.count.HP_pet_birth_process_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_birth_process_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, petinfo); + } + } + return retVal___; +} +int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_recv_petdata_pre ) { + int (*preHookFunc) (int *account_id, struct s_pet *p, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_recv_petdata_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, p, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.recv_petdata(account_id, p, flag); + } + if( HPMHooks.count.HP_pet_recv_petdata_post ) { + int (*postHookFunc) (int retVal___, int *account_id, struct s_pet *p, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_recv_petdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, p, &flag); + } + } + return retVal___; +} +int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_select_egg_pre ) { + int (*preHookFunc) (struct map_session_data *sd, short *egg_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_select_egg_pre[hIndex].func; + retVal___ = preHookFunc(sd, &egg_index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.select_egg(sd, egg_index); + } + if( HPMHooks.count.HP_pet_select_egg_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *egg_index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_select_egg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &egg_index); + } + } + return retVal___; +} +int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_catch_process1_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *target_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_catch_process1_pre[hIndex].func; + retVal___ = preHookFunc(sd, &target_class); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.catch_process1(sd, target_class); + } + if( HPMHooks.count.HP_pet_catch_process1_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_catch_process1_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &target_class); + } + } + return retVal___; +} +int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_catch_process2_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_catch_process2_pre[hIndex].func; + retVal___ = preHookFunc(sd, &target_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.catch_process2(sd, target_id); + } + if( HPMHooks.count.HP_pet_catch_process2_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_catch_process2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &target_id); + } + } + return retVal___; +} +int HP_pet_get_egg(int account_id, int pet_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_get_egg_pre ) { + int (*preHookFunc) (int *account_id, int *pet_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &pet_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_id, flag); + } + if( HPMHooks.count.HP_pet_get_egg_post ) { + int (*postHookFunc) (int retVal___, int *account_id, int *pet_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &account_id, &pet_id, &flag); + } + } + return retVal___; +} +int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_unequipitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_unequipitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, pd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.unequipitem(sd, pd); + } + if( HPMHooks.count.HP_pet_unequipitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_unequipitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pd); + } + } + return retVal___; +} +int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_food_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_food_pre[hIndex].func; + retVal___ = preHookFunc(sd, pd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.food(sd, pd); + } + if( HPMHooks.count.HP_pet_food_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_food_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pd); + } + } + return retVal___; +} +int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pet.ai_sub_hard_lootsearch(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_pet_menu(struct map_session_data *sd, int menunum) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_menu_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *menunum); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_menu_pre[hIndex].func; + retVal___ = preHookFunc(sd, &menunum); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.menu(sd, menunum); + } + if( HPMHooks.count.HP_pet_menu_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *menunum); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_menu_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &menunum); + } + } + return retVal___; +} +int HP_pet_change_name(struct map_session_data *sd, char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_change_name_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_change_name_pre[hIndex].func; + retVal___ = preHookFunc(sd, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.change_name(sd, name); + } + if( HPMHooks.count.HP_pet_change_name_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_change_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); + } + } + return retVal___; +} +int HP_pet_change_name_ack(struct map_session_data *sd, char *name, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_change_name_ack_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_change_name_ack_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.change_name_ack(sd, name, flag); + } + if( HPMHooks.count.HP_pet_change_name_ack_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_change_name_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, &flag); + } + } + return retVal___; +} +int HP_pet_equipitem(struct map_session_data *sd, int index) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_equipitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_equipitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.equipitem(sd, index); + } + if( HPMHooks.count.HP_pet_equipitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_equipitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index); + } + } + return retVal___; +} +int HP_pet_randomwalk(struct pet_data *pd, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_randomwalk_pre ) { + int (*preHookFunc) (struct pet_data *pd, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_randomwalk_pre[hIndex].func; + retVal___ = preHookFunc(pd, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.randomwalk(pd, tick); + } + if( HPMHooks.count.HP_pet_randomwalk_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_randomwalk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, &tick); + } + } + return retVal___; +} +int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_ai_sub_hard_pre ) { + int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_pre[hIndex].func; + retVal___ = preHookFunc(pd, sd, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.ai_sub_hard(pd, sd, tick); + } + if( HPMHooks.count.HP_pet_ai_sub_hard_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, sd, &tick); + } + } + return retVal___; +} +int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_ai_sub_foreachclient_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.pet.ai_sub_foreachclient(sd, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_pet_ai_sub_foreachclient_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_ai_hard_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_ai_hard_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.ai_hard(tid, tick, id, data); + } + if( HPMHooks.count.HP_pet_ai_hard_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_ai_hard_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pet_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_delay_item_drop_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_delay_item_drop_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.delay_item_drop(tid, tick, id, data); + } + if( HPMHooks.count.HP_pet_delay_item_drop_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_delay_item_drop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_lootitem_drop_pre ) { + int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_lootitem_drop_pre[hIndex].func; + retVal___ = preHookFunc(pd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.lootitem_drop(pd, sd); + } + if( HPMHooks.count.HP_pet_lootitem_drop_post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_lootitem_drop_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, sd); + } + } + return retVal___; +} +int HP_pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_skill_bonus_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.skill_bonus_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pet_skill_bonus_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_recovery_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_recovery_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.recovery_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pet_recovery_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_recovery_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_heal_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_heal_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_heal_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.heal_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pet_heal_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_heal_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_heal_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_skill_support_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_skill_support_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.skill_support_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_pet_skill_support_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_skill_support_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_pet_read_db(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_pet_read_db_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pet_read_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.read_db(); + } + if( HPMHooks.count.HP_pet_read_db_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pet_read_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +/* quest */ +void HP_quest_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_quest_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.quest.init(); + } + if( HPMHooks.count.HP_quest_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_quest_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_quest_reload_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_reload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.quest.reload(); + } + if( HPMHooks.count.HP_quest_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_quest_search_db(int quest_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_search_db_pre ) { + int (*preHookFunc) (int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_search_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_search_db_pre[hIndex].func; + retVal___ = preHookFunc(&quest_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.search_db(quest_id); + } + if( HPMHooks.count.HP_quest_search_db_post ) { + int (*postHookFunc) (int retVal___, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_search_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_search_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &quest_id); + } + } + return retVal___; +} +int HP_quest_pc_login(TBL_PC *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_pc_login_pre ) { + int (*preHookFunc) (TBL_PC *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_pc_login_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.pc_login(sd); + } + if( HPMHooks.count.HP_quest_pc_login_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_pc_login_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_quest_add(TBL_PC *sd, int quest_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_add_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_add_pre[hIndex].func; + retVal___ = preHookFunc(sd, &quest_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.add(sd, quest_id); + } + if( HPMHooks.count.HP_quest_add_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &quest_id); + } + } + return retVal___; +} +int HP_quest_change(TBL_PC *sd, int qid1, int qid2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_change_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *qid1, int *qid2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_change_pre[hIndex].func; + retVal___ = preHookFunc(sd, &qid1, &qid2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.change(sd, qid1, qid2); + } + if( HPMHooks.count.HP_quest_change_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *qid1, int *qid2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_change_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &qid1, &qid2); + } + } + return retVal___; +} +int HP_quest_delete(TBL_PC *sd, int quest_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_delete_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_delete_pre[hIndex].func; + retVal___ = preHookFunc(sd, &quest_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.delete(sd, quest_id); + } + if( HPMHooks.count.HP_quest_delete_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &quest_id); + } + } + return retVal___; +} +int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_update_objective_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_quest_update_objective_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.quest.update_objective_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_quest_update_objective_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_quest_update_objective_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_quest_update_objective(TBL_PC *sd, int mob_id) { + int hIndex = 0; + if( HPMHooks.count.HP_quest_update_objective_pre ) { + void (*preHookFunc) (TBL_PC *sd, int *mob_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_update_objective_pre[hIndex].func; + preHookFunc(sd, &mob_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.quest.update_objective(sd, mob_id); + } + if( HPMHooks.count.HP_quest_update_objective_post ) { + void (*postHookFunc) (TBL_PC *sd, int *mob_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_update_objective_post[hIndex].func; + postHookFunc(sd, &mob_id); + } + } + return; +} +int HP_quest_update_status(TBL_PC *sd, int quest_id, quest_state qs) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_update_status_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *quest_id, quest_state *qs); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_update_status_pre[hIndex].func; + retVal___ = preHookFunc(sd, &quest_id, &qs); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.update_status(sd, quest_id, qs); + } + if( HPMHooks.count.HP_quest_update_status_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, quest_state *qs); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_update_status_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &quest_id, &qs); + } + } + return retVal___; +} +int HP_quest_check(TBL_PC *sd, int quest_id, quest_check_type type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_check_pre ) { + int (*preHookFunc) (TBL_PC *sd, int *quest_id, quest_check_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, &quest_id, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.check(sd, quest_id, type); + } + if( HPMHooks.count.HP_quest_check_post ) { + int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, quest_check_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &quest_id, &type); + } + } + return retVal___; +} +int HP_quest_read_db(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_quest_read_db_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_read_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.read_db(); + } + if( HPMHooks.count.HP_quest_read_db_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_read_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +/* script */ +void HP_script_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_script_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.init(); + } + if( HPMHooks.count.HP_script_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_script_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_script_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.final(); + } + if( HPMHooks.count.HP_script_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_script_reload(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_reload_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reload_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.reload(); + } + if( HPMHooks.count.HP_script_reload_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reload_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +struct script_code* HP_script_parse(const char *src, const char *file, int line, int options) { + int hIndex = 0; + struct script_code* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_pre ) { + struct script_code* (*preHookFunc) (const char *src, const char *file, int *line, int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_pre[hIndex].func; + retVal___ = preHookFunc(src, file, &line, &options); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse(src, file, line, options); + } + if( HPMHooks.count.HP_script_parse_post ) { + struct script_code* (*postHookFunc) (struct script_code* retVal___, const char *src, const char *file, int *line, int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, file, &line, &options); + } + } + return retVal___; +} +void HP_script_parse_builtin(void) { + int hIndex = 0; + if( HPMHooks.count.HP_script_parse_builtin_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_builtin_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.parse_builtin(); + } + if( HPMHooks.count.HP_script_parse_builtin_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_builtin_post[hIndex].func; + postHookFunc(); + } + } + return; +} +const char* HP_script_parse_subexpr(const char *p, int limit) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_subexpr_pre ) { + const char* (*preHookFunc) (const char *p, int *limit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_subexpr_pre[hIndex].func; + retVal___ = preHookFunc(p, &limit); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_subexpr(p, limit); + } + if( HPMHooks.count.HP_script_parse_subexpr_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p, int *limit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_subexpr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &limit); + } + } + return retVal___; +} +const char* HP_script_skip_space(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_skip_space_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_skip_space_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.skip_space(p); + } + if( HPMHooks.count.HP_script_skip_space_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_skip_space_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +void HP_script_error(const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { + int hIndex = 0; + if( HPMHooks.count.HP_script_error_pre ) { + void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_error_pre[hIndex].func; + preHookFunc(src, file, &start_line, error_msg, error_pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.error(src, file, start_line, error_msg, error_pos); + } + if( HPMHooks.count.HP_script_error_post ) { + void (*postHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_error_post[hIndex].func; + postHookFunc(src, file, &start_line, error_msg, error_pos); + } + } + return; +} +void HP_script_warning(const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { + int hIndex = 0; + if( HPMHooks.count.HP_script_warning_pre ) { + void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_warning_pre[hIndex].func; + preHookFunc(src, file, &start_line, error_msg, error_pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.warning(src, file, start_line, error_msg, error_pos); + } + if( HPMHooks.count.HP_script_warning_post ) { + void (*postHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_warning_post[hIndex].func; + postHookFunc(src, file, &start_line, error_msg, error_pos); + } + } + return; +} +bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_state *st)) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_script_addScript_pre ) { + bool (*preHookFunc) (char *name, char *args, bool ( *func ) (struct script_state *st)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addScript_pre[hIndex].func; + retVal___ = preHookFunc(name, args, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.addScript(name, args, func); + } + if( HPMHooks.count.HP_script_addScript_post ) { + bool (*postHookFunc) (bool retVal___, char *name, char *args, bool ( *func ) (struct script_state *st)); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addScript_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, args, func); + } + } + return retVal___; +} +int HP_script_conv_num(struct script_state *st, struct script_data *data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_conv_num_pre ) { + int (*preHookFunc) (struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_conv_num_pre[hIndex].func; + retVal___ = preHookFunc(st, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.conv_num(st, data); + } + if( HPMHooks.count.HP_script_conv_num_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_conv_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, data); + } + } + return retVal___; +} +const char* HP_script_conv_str(struct script_state *st, struct script_data *data) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_conv_str_pre ) { + const char* (*preHookFunc) (struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_conv_str_pre[hIndex].func; + retVal___ = preHookFunc(st, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.conv_str(st, data); + } + if( HPMHooks.count.HP_script_conv_str_post ) { + const char* (*postHookFunc) (const char* retVal___, struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_conv_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, data); + } + } + return retVal___; +} +TBL_PC* HP_script_rid2sd(struct script_state *st) { + int hIndex = 0; + TBL_PC* retVal___ = NULL; + if( HPMHooks.count.HP_script_rid2sd_pre ) { + TBL_PC* (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_rid2sd_pre[hIndex].func; + retVal___ = preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.rid2sd(st); + } + if( HPMHooks.count.HP_script_rid2sd_post ) { + TBL_PC* (*postHookFunc) (TBL_PC* retVal___, struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_rid2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); + } + } + return retVal___; +} +void HP_script_detach_rid(struct script_state *st) { + int hIndex = 0; + if( HPMHooks.count.HP_script_detach_rid_pre ) { + void (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_detach_rid_pre[hIndex].func; + preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.detach_rid(st); + } + if( HPMHooks.count.HP_script_detach_rid_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_detach_rid_post[hIndex].func; + postHookFunc(st); + } + } + return; +} +struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op type, int val, struct DBMap **ref) { + int hIndex = 0; + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_push_val_pre ) { + struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, int *val, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_push_val_pre[hIndex].func; + retVal___ = preHookFunc(stack, &type, &val, ref); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.push_val(stack, type, val, ref); + } + if( HPMHooks.count.HP_script_push_val_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op *type, int *val, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_push_val_post[hIndex].func; + retVal___ = postHookFunc(retVal___, stack, &type, &val, ref); + } + } + return retVal___; +} +void HP_script_get_val(struct script_state *st, struct script_data *data) { + int hIndex = 0; + if( HPMHooks.count.HP_script_get_val_pre ) { + void (*preHookFunc) (struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func; + preHookFunc(st, data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.get_val(st, data); + } + if( HPMHooks.count.HP_script_get_val_post ) { + void (*postHookFunc) (struct script_state *st, struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_val_post[hIndex].func; + postHookFunc(st, data); + } + } + return; +} +void* HP_script_get_val2(struct script_state *st, int uid, struct DBMap **ref) { + int hIndex = 0; + void* retVal___ = NULL; + if( HPMHooks.count.HP_script_get_val2_pre ) { + void* (*preHookFunc) (struct script_state *st, int *uid, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_val2_pre[hIndex].func; + retVal___ = preHookFunc(st, &uid, ref); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_val2(st, uid, ref); + } + if( HPMHooks.count.HP_script_get_val2_post ) { + void* (*postHookFunc) (void* retVal___, struct script_state *st, int *uid, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_val2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, &uid, ref); + } + } + return retVal___; +} +struct script_data* HP_script_push_str(struct script_stack *stack, enum c_op type, char *str) { + int hIndex = 0; + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_push_str_pre ) { + struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_push_str_pre[hIndex].func; + retVal___ = preHookFunc(stack, &type, str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.push_str(stack, type, str); + } + if( HPMHooks.count.HP_script_push_str_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op *type, char *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_push_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, stack, &type, str); + } + } + return retVal___; +} +struct script_data* HP_script_push_copy(struct script_stack *stack, int pos) { + int hIndex = 0; + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_push_copy_pre ) { + struct script_data* (*preHookFunc) (struct script_stack *stack, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_push_copy_pre[hIndex].func; + retVal___ = preHookFunc(stack, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.push_copy(stack, pos); + } + if( HPMHooks.count.HP_script_push_copy_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_push_copy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, stack, &pos); + } + } + return retVal___; +} +void HP_script_pop_stack(struct script_state *st, int start, int end) { + int hIndex = 0; + if( HPMHooks.count.HP_script_pop_stack_pre ) { + void (*preHookFunc) (struct script_state *st, int *start, int *end); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_pop_stack_pre[hIndex].func; + preHookFunc(st, &start, &end); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.pop_stack(st, start, end); + } + if( HPMHooks.count.HP_script_pop_stack_post ) { + void (*postHookFunc) (struct script_state *st, int *start, int *end); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_pop_stack_post[hIndex].func; + postHookFunc(st, &start, &end); + } + } + return; +} +void HP_script_set_constant(const char *name, int value, bool isparameter) { + int hIndex = 0; + if( HPMHooks.count.HP_script_set_constant_pre ) { + void (*preHookFunc) (const char *name, int *value, bool *isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_constant_pre[hIndex].func; + preHookFunc(name, &value, &isparameter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_constant(name, value, isparameter); + } + if( HPMHooks.count.HP_script_set_constant_post ) { + void (*postHookFunc) (const char *name, int *value, bool *isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_constant_post[hIndex].func; + postHookFunc(name, &value, &isparameter); + } + } + return; +} +void HP_script_set_constant2(const char *name, int value, bool isparameter) { + int hIndex = 0; + if( HPMHooks.count.HP_script_set_constant2_pre ) { + void (*preHookFunc) (const char *name, int *value, bool *isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_constant2_pre[hIndex].func; + preHookFunc(name, &value, &isparameter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_constant2(name, value, isparameter); + } + if( HPMHooks.count.HP_script_set_constant2_post ) { + void (*postHookFunc) (const char *name, int *value, bool *isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_constant2_post[hIndex].func; + postHookFunc(name, &value, &isparameter); + } + } + return; +} +void HP_script_set_constant_force(const char *name, int value, bool isparameter) { + int hIndex = 0; + if( HPMHooks.count.HP_script_set_constant_force_pre ) { + void (*preHookFunc) (const char *name, int *value, bool *isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_force_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_constant_force_pre[hIndex].func; + preHookFunc(name, &value, &isparameter); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_constant_force(name, value, isparameter); + } + if( HPMHooks.count.HP_script_set_constant_force_post ) { + void (*postHookFunc) (const char *name, int *value, bool *isparameter); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_force_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_constant_force_post[hIndex].func; + postHookFunc(name, &value, &isparameter); + } + } + return; +} +bool HP_script_get_constant(const char *name, int *value) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_script_get_constant_pre ) { + bool (*preHookFunc) (const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_constant_pre[hIndex].func; + retVal___ = preHookFunc(name, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_constant(name, value); + } + if( HPMHooks.count.HP_script_get_constant_post ) { + bool (*postHookFunc) (bool retVal___, const char *name, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_constant_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, value); + } + } + return retVal___; +} +void HP_script_label_add(int key, int pos) { + int hIndex = 0; + if( HPMHooks.count.HP_script_label_add_pre ) { + void (*preHookFunc) (int *key, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_label_add_pre[hIndex].func; + preHookFunc(&key, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.label_add(key, pos); + } + if( HPMHooks.count.HP_script_label_add_post ) { + void (*postHookFunc) (int *key, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_label_add_post[hIndex].func; + postHookFunc(&key, &pos); + } + } + return; +} +void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) { + int hIndex = 0; + if( HPMHooks.count.HP_script_run_pre ) { + void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_pre[hIndex].func; + preHookFunc(rootscript, &pos, &rid, &oid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run(rootscript, pos, rid, oid); + } + if( HPMHooks.count.HP_script_run_post ) { + void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_post[hIndex].func; + postHookFunc(rootscript, &pos, &rid, &oid); + } + } + return; +} +void HP_script_run_main(struct script_state *st) { + int hIndex = 0; + if( HPMHooks.count.HP_script_run_main_pre ) { + void (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_main_pre[hIndex].func; + preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run_main(st); + } + if( HPMHooks.count.HP_script_run_main_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_main_post[hIndex].func; + postHookFunc(st); + } + } + return; +} +int HP_script_run_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_run_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.run_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_script_run_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_set_var_pre ) { + int (*preHookFunc) (struct map_session_data *sd, char *name, void *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_var_pre[hIndex].func; + retVal___ = preHookFunc(sd, name, val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.set_var(sd, name, val); + } + if( HPMHooks.count.HP_script_set_var_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, void *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_var_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name, val); + } + } + return retVal___; +} +void HP_script_stop_instances(struct script_code *code) { + int hIndex = 0; + if( HPMHooks.count.HP_script_stop_instances_pre ) { + void (*preHookFunc) (struct script_code *code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_stop_instances_pre[hIndex].func; + preHookFunc(code); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.stop_instances(code); + } + if( HPMHooks.count.HP_script_stop_instances_post ) { + void (*postHookFunc) (struct script_code *code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_stop_instances_post[hIndex].func; + postHookFunc(code); + } + } + return; +} +void HP_script_free_code(struct script_code *code) { + int hIndex = 0; + if( HPMHooks.count.HP_script_free_code_pre ) { + void (*preHookFunc) (struct script_code *code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_free_code_pre[hIndex].func; + preHookFunc(code); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.free_code(code); + } + if( HPMHooks.count.HP_script_free_code_post ) { + void (*postHookFunc) (struct script_code *code); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_free_code_post[hIndex].func; + postHookFunc(code); + } + } + return; +} +void HP_script_free_vars(struct DBMap *var_storage) { + int hIndex = 0; + if( HPMHooks.count.HP_script_free_vars_pre ) { + void (*preHookFunc) (struct DBMap *var_storage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_free_vars_pre[hIndex].func; + preHookFunc(var_storage); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.free_vars(var_storage); + } + if( HPMHooks.count.HP_script_free_vars_post ) { + void (*postHookFunc) (struct DBMap *var_storage); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_free_vars_post[hIndex].func; + postHookFunc(var_storage); + } + } + return; +} +struct script_state* HP_script_alloc_state(struct script_code *rootscript, int pos, int rid, int oid) { + int hIndex = 0; + struct script_state* retVal___ = NULL; + if( HPMHooks.count.HP_script_alloc_state_pre ) { + struct script_state* (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_alloc_state_pre[hIndex].func; + retVal___ = preHookFunc(rootscript, &pos, &rid, &oid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.alloc_state(rootscript, pos, rid, oid); + } + if( HPMHooks.count.HP_script_alloc_state_post ) { + struct script_state* (*postHookFunc) (struct script_state* retVal___, struct script_code *rootscript, int *pos, int *rid, int *oid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_alloc_state_post[hIndex].func; + retVal___ = postHookFunc(retVal___, rootscript, &pos, &rid, &oid); + } + } + return retVal___; +} +void HP_script_free_state(struct script_state *st) { + int hIndex = 0; + if( HPMHooks.count.HP_script_free_state_pre ) { + void (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_free_state_pre[hIndex].func; + preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.free_state(st); + } + if( HPMHooks.count.HP_script_free_state_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_free_state_post[hIndex].func; + postHookFunc(st); + } + } + return; +} +void HP_script_run_autobonus(const char *autobonus, int id, int pos) { + int hIndex = 0; + if( HPMHooks.count.HP_script_run_autobonus_pre ) { + void (*preHookFunc) (const char *autobonus, int *id, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_autobonus_pre[hIndex].func; + preHookFunc(autobonus, &id, &pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run_autobonus(autobonus, id, pos); + } + if( HPMHooks.count.HP_script_run_autobonus_post ) { + void (*postHookFunc) (const char *autobonus, int *id, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_autobonus_post[hIndex].func; + postHookFunc(autobonus, &id, &pos); + } + } + return; +} +void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, void *value) { + int hIndex = 0; + if( HPMHooks.count.HP_script_cleararray_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *varname, void *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_cleararray_pc_pre[hIndex].func; + preHookFunc(sd, varname, value); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.cleararray_pc(sd, varname, value); + } + if( HPMHooks.count.HP_script_cleararray_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *varname, void *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_cleararray_pc_post[hIndex].func; + postHookFunc(sd, varname, value); + } + } + return; +} +void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uint8 idx, void *value, int *refcache) { + int hIndex = 0; + if( HPMHooks.count.HP_script_setarray_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *varname, uint8 *idx, void *value, int *refcache); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_setarray_pc_pre[hIndex].func; + preHookFunc(sd, varname, &idx, value, refcache); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.setarray_pc(sd, varname, idx, value, refcache); + } + if( HPMHooks.count.HP_script_setarray_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *varname, uint8 *idx, void *value, int *refcache); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_setarray_pc_post[hIndex].func; + postHookFunc(sd, varname, &idx, value, refcache); + } + } + return; +} +int HP_script_config_read(char *cfgName) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_config_read_pre ) { + int (*preHookFunc) (char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.config_read(cfgName); + } + if( HPMHooks.count.HP_script_config_read_post ) { + int (*postHookFunc) (int retVal___, char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} +int HP_script_add_str(const char *p) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_add_str_pre ) { + int (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_str_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.add_str(p); + } + if( HPMHooks.count.HP_script_add_str_post ) { + int (*postHookFunc) (int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_get_str(int id) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_get_str_pre ) { + const char* (*preHookFunc) (int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_str_pre[hIndex].func; + retVal___ = preHookFunc(&id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_str(id); + } + if( HPMHooks.count.HP_script_get_str_post ) { + const char* (*postHookFunc) (const char* retVal___, int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &id); + } + } + return retVal___; +} +int HP_script_search_str(const char *p) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_search_str_pre ) { + int (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_search_str_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.search_str(p); + } + if( HPMHooks.count.HP_script_search_str_post ) { + int (*postHookFunc) (int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_search_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, void *value, struct DBMap **ref) { + int hIndex = 0; + if( HPMHooks.count.HP_script_setd_sub_pre ) { + void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_setd_sub_pre[hIndex].func; + preHookFunc(st, sd, varname, &elem, value, ref); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.setd_sub(st, sd, varname, elem, value, ref); + } + if( HPMHooks.count.HP_script_setd_sub_post ) { + void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_setd_sub_post[hIndex].func; + postHookFunc(st, sd, varname, &elem, value, ref); + } + } + return; +} +void HP_script_attach_state(struct script_state *st) { + int hIndex = 0; + if( HPMHooks.count.HP_script_attach_state_pre ) { + void (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_attach_state_pre[hIndex].func; + preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.attach_state(st); + } + if( HPMHooks.count.HP_script_attach_state_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_attach_state_post[hIndex].func; + postHookFunc(st); + } + } + return; +} +struct hQueue* HP_script_queue(int idx) { + int hIndex = 0; + struct hQueue* retVal___ = NULL; + if( HPMHooks.count.HP_script_queue_pre ) { + struct hQueue* (*preHookFunc) (int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_pre[hIndex].func; + retVal___ = preHookFunc(&idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.queue(idx); + } + if( HPMHooks.count.HP_script_queue_post ) { + struct hQueue* (*postHookFunc) (struct hQueue* retVal___, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx); + } + } + return retVal___; +} +bool HP_script_queue_add(int idx, int var) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_script_queue_add_pre ) { + bool (*preHookFunc) (int *idx, int *var); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_add_pre[hIndex].func; + retVal___ = preHookFunc(&idx, &var); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.queue_add(idx, var); + } + if( HPMHooks.count.HP_script_queue_add_post ) { + bool (*postHookFunc) (bool retVal___, int *idx, int *var); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx, &var); + } + } + return retVal___; +} +bool HP_script_queue_del(int idx) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_script_queue_del_pre ) { + bool (*preHookFunc) (int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_del_pre[hIndex].func; + retVal___ = preHookFunc(&idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.queue_del(idx); + } + if( HPMHooks.count.HP_script_queue_del_post ) { + bool (*postHookFunc) (bool retVal___, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_del_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx); + } + } + return retVal___; +} +bool HP_script_queue_remove(int idx, int var) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_script_queue_remove_pre ) { + bool (*preHookFunc) (int *idx, int *var); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_remove_pre[hIndex].func; + retVal___ = preHookFunc(&idx, &var); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.queue_remove(idx, var); + } + if( HPMHooks.count.HP_script_queue_remove_post ) { + bool (*postHookFunc) (bool retVal___, int *idx, int *var); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx, &var); + } + } + return retVal___; +} +int HP_script_queue_create(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_queue_create_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_create_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.queue_create(); + } + if( HPMHooks.count.HP_script_queue_create_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_script_queue_clear(int idx) { + int hIndex = 0; + if( HPMHooks.count.HP_script_queue_clear_pre ) { + void (*preHookFunc) (int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_queue_clear_pre[hIndex].func; + preHookFunc(&idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.queue_clear(idx); + } + if( HPMHooks.count.HP_script_queue_clear_post ) { + void (*postHookFunc) (int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_queue_clear_post[hIndex].func; + postHookFunc(&idx); + } + } + return; +} +const char* HP_script_parse_curly_close(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_curly_close_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_curly_close_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_curly_close(p); + } + if( HPMHooks.count.HP_script_parse_curly_close_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_curly_close_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_syntax_close(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_syntax_close_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_syntax_close(p); + } + if( HPMHooks.count.HP_script_parse_syntax_close_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_syntax_close_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_syntax_close_sub_pre ) { + const char* (*preHookFunc) (const char *p, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_pre[hIndex].func; + retVal___ = preHookFunc(p, flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_syntax_close_sub(p, flag); + } + if( HPMHooks.count.HP_script_parse_syntax_close_sub_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, flag); + } + } + return retVal___; +} +const char* HP_script_parse_syntax(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_syntax_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_syntax_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_syntax(p); + } + if( HPMHooks.count.HP_script_parse_syntax_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_syntax_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) { + int hIndex = 0; + c_op retVal___; + memset(&retVal___, '\0', sizeof(c_op)); + if( HPMHooks.count.HP_script_get_com_pre ) { + c_op (*preHookFunc) (unsigned char *scriptbuf, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_com_pre[hIndex].func; + retVal___ = preHookFunc(scriptbuf, pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_com(scriptbuf, pos); + } + if( HPMHooks.count.HP_script_get_com_post ) { + c_op (*postHookFunc) (c_op retVal___, unsigned char *scriptbuf, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_com_post[hIndex].func; + retVal___ = postHookFunc(retVal___, scriptbuf, pos); + } + } + return retVal___; +} +int HP_script_get_num(unsigned char *scriptbuf, int *pos) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_get_num_pre ) { + int (*preHookFunc) (unsigned char *scriptbuf, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_get_num_pre[hIndex].func; + retVal___ = preHookFunc(scriptbuf, pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_num(scriptbuf, pos); + } + if( HPMHooks.count.HP_script_get_num_post ) { + int (*postHookFunc) (int retVal___, unsigned char *scriptbuf, int *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_get_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, scriptbuf, pos); + } + } + return retVal___; +} +const char* HP_script_op2name(int op) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_op2name_pre ) { + const char* (*preHookFunc) (int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op2name_pre[hIndex].func; + retVal___ = preHookFunc(&op); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.op2name(op); + } + if( HPMHooks.count.HP_script_op2name_post ) { + const char* (*postHookFunc) (const char* retVal___, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op2name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &op); + } + } + return retVal___; +} +void HP_script_reportsrc(struct script_state *st) { + int hIndex = 0; + if( HPMHooks.count.HP_script_reportsrc_pre ) { + void (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reportsrc_pre[hIndex].func; + preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.reportsrc(st); + } + if( HPMHooks.count.HP_script_reportsrc_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reportsrc_post[hIndex].func; + postHookFunc(st); + } + } + return; +} +void HP_script_reportdata(struct script_data *data) { + int hIndex = 0; + if( HPMHooks.count.HP_script_reportdata_pre ) { + void (*preHookFunc) (struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reportdata_pre[hIndex].func; + preHookFunc(data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.reportdata(data); + } + if( HPMHooks.count.HP_script_reportdata_post ) { + void (*postHookFunc) (struct script_data *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reportdata_post[hIndex].func; + postHookFunc(data); + } + } + return; +} +void HP_script_reportfunc(struct script_state *st) { + int hIndex = 0; + if( HPMHooks.count.HP_script_reportfunc_pre ) { + void (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_reportfunc_pre[hIndex].func; + preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.reportfunc(st); + } + if( HPMHooks.count.HP_script_reportfunc_post ) { + void (*postHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_reportfunc_post[hIndex].func; + postHookFunc(st); + } + } + return; +} +void HP_script_disp_error_message2(const char *mes, const char *pos, int report) { + int hIndex = 0; + if( HPMHooks.count.HP_script_disp_error_message2_pre ) { + void (*preHookFunc) (const char *mes, const char *pos, int *report); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_error_message2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_disp_error_message2_pre[hIndex].func; + preHookFunc(mes, pos, &report); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.disp_error_message2(mes, pos, report); + } + if( HPMHooks.count.HP_script_disp_error_message2_post ) { + void (*postHookFunc) (const char *mes, const char *pos, int *report); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_error_message2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_disp_error_message2_post[hIndex].func; + postHookFunc(mes, pos, &report); + } + } + return; +} +void HP_script_disp_warning_message(const char *mes, const char *pos) { + int hIndex = 0; + if( HPMHooks.count.HP_script_disp_warning_message_pre ) { + void (*preHookFunc) (const char *mes, const char *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_disp_warning_message_pre[hIndex].func; + preHookFunc(mes, pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.disp_warning_message(mes, pos); + } + if( HPMHooks.count.HP_script_disp_warning_message_post ) { + void (*postHookFunc) (const char *mes, const char *pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_disp_warning_message_post[hIndex].func; + postHookFunc(mes, pos); + } + } + return; +} +void HP_script_check_event(struct script_state *st, const char *evt) { + int hIndex = 0; + if( HPMHooks.count.HP_script_check_event_pre ) { + void (*preHookFunc) (struct script_state *st, const char *evt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_check_event_pre[hIndex].func; + preHookFunc(st, evt); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.check_event(st, evt); + } + if( HPMHooks.count.HP_script_check_event_post ) { + void (*postHookFunc) (struct script_state *st, const char *evt); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_check_event_post[hIndex].func; + postHookFunc(st, evt); + } + } + return; +} +unsigned int HP_script_calc_hash(const char *p) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_script_calc_hash_pre ) { + unsigned int (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_calc_hash_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.calc_hash(p); + } + if( HPMHooks.count.HP_script_calc_hash_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_calc_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +void HP_script_addb(int a) { + int hIndex = 0; + if( HPMHooks.count.HP_script_addb_pre ) { + void (*preHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addb_pre[hIndex].func; + preHookFunc(&a); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.addb(a); + } + if( HPMHooks.count.HP_script_addb_post ) { + void (*postHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addb_post[hIndex].func; + postHookFunc(&a); + } + } + return; +} +void HP_script_addc(int a) { + int hIndex = 0; + if( HPMHooks.count.HP_script_addc_pre ) { + void (*preHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addc_pre[hIndex].func; + preHookFunc(&a); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.addc(a); + } + if( HPMHooks.count.HP_script_addc_post ) { + void (*postHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addc_post[hIndex].func; + postHookFunc(&a); + } + } + return; +} +void HP_script_addi(int a) { + int hIndex = 0; + if( HPMHooks.count.HP_script_addi_pre ) { + void (*preHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addi_pre[hIndex].func; + preHookFunc(&a); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.addi(a); + } + if( HPMHooks.count.HP_script_addi_post ) { + void (*postHookFunc) (int *a); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addi_post[hIndex].func; + postHookFunc(&a); + } + } + return; +} +void HP_script_addl(int l) { + int hIndex = 0; + if( HPMHooks.count.HP_script_addl_pre ) { + void (*preHookFunc) (int *l); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_addl_pre[hIndex].func; + preHookFunc(&l); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.addl(l); + } + if( HPMHooks.count.HP_script_addl_post ) { + void (*postHookFunc) (int *l); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_addl_post[hIndex].func; + postHookFunc(&l); + } + } + return; +} +void HP_script_set_label(int l, int pos, const char *script_pos) { + int hIndex = 0; + if( HPMHooks.count.HP_script_set_label_pre ) { + void (*preHookFunc) (int *l, int *pos, const char *script_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_label_pre[hIndex].func; + preHookFunc(&l, &pos, script_pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_label(l, pos, script_pos); + } + if( HPMHooks.count.HP_script_set_label_post ) { + void (*postHookFunc) (int *l, int *pos, const char *script_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_label_post[hIndex].func; + postHookFunc(&l, &pos, script_pos); + } + } + return; +} +const char* HP_script_skip_word(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_skip_word_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_skip_word_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.skip_word(p); + } + if( HPMHooks.count.HP_script_skip_word_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_skip_word_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +int HP_script_add_word(const char *p) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_add_word_pre ) { + int (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_word_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.add_word(p); + } + if( HPMHooks.count.HP_script_add_word_post ) { + int (*postHookFunc) (int retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_word_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_custom) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_callfunc_pre ) { + const char* (*preHookFunc) (const char *p, int *require_paren, int *is_custom); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_callfunc_pre[hIndex].func; + retVal___ = preHookFunc(p, &require_paren, &is_custom); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_callfunc(p, require_paren, is_custom); + } + if( HPMHooks.count.HP_script_parse_callfunc_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p, int *require_paren, int *is_custom); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_callfunc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p, &require_paren, &is_custom); + } + } + return retVal___; +} +void HP_script_parse_nextline(bool first, const char *p) { + int hIndex = 0; + if( HPMHooks.count.HP_script_parse_nextline_pre ) { + void (*preHookFunc) (bool *first, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_nextline_pre[hIndex].func; + preHookFunc(&first, p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.parse_nextline(first, p); + } + if( HPMHooks.count.HP_script_parse_nextline_post ) { + void (*postHookFunc) (bool *first, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_nextline_post[hIndex].func; + postHookFunc(&first, p); + } + } + return; +} +const char* HP_script_parse_variable(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_variable_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_variable_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_variable(p); + } + if( HPMHooks.count.HP_script_parse_variable_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_variable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_simpleexpr(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_simpleexpr_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_simpleexpr(p); + } + if( HPMHooks.count.HP_script_parse_simpleexpr_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_expr(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_expr_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_expr_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_expr(p); + } + if( HPMHooks.count.HP_script_parse_expr_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_expr_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_line(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_parse_line_pre ) { + const char* (*preHookFunc) (const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_parse_line_pre[hIndex].func; + retVal___ = preHookFunc(p); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_line(p); + } + if( HPMHooks.count.HP_script_parse_line_post ) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_parse_line_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +void HP_script_read_constdb(void) { + int hIndex = 0; + if( HPMHooks.count.HP_script_read_constdb_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_read_constdb_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.read_constdb(); + } + if( HPMHooks.count.HP_script_read_constdb_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_read_constdb_post[hIndex].func; + postHookFunc(); + } + } + return; +} +const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark, int line) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_print_line_pre ) { + const char* (*preHookFunc) (StringBuf *buf, const char *p, const char *mark, int *line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_print_line_pre[hIndex].func; + retVal___ = preHookFunc(buf, p, mark, &line); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.print_line(buf, p, mark, line); + } + if( HPMHooks.count.HP_script_print_line_post ) { + const char* (*postHookFunc) (const char* retVal___, StringBuf *buf, const char *p, const char *mark, int *line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_print_line_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buf, p, mark, &line); + } + } + return retVal___; +} +void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) { + int hIndex = 0; + if( HPMHooks.count.HP_script_errorwarning_sub_pre ) { + void (*preHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_errorwarning_sub_pre[hIndex].func; + preHookFunc(buf, src, file, &start_line, error_msg, error_pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.errorwarning_sub(buf, src, file, start_line, error_msg, error_pos); + } + if( HPMHooks.count.HP_script_errorwarning_sub_post ) { + void (*postHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_errorwarning_sub_post[hIndex].func; + postHookFunc(buf, src, file, &start_line, error_msg, error_pos); + } + } + return; +} +int HP_script_set_reg(struct script_state *st, TBL_PC *sd, int num, const char *name, const void *value, struct DBMap **ref) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_set_reg_pre ) { + int (*preHookFunc) (struct script_state *st, TBL_PC *sd, int *num, const char *name, const void *value, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_set_reg_pre[hIndex].func; + retVal___ = preHookFunc(st, sd, &num, name, value, ref); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.set_reg(st, sd, num, name, value, ref); + } + if( HPMHooks.count.HP_script_set_reg_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st, TBL_PC *sd, int *num, const char *name, const void *value, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_set_reg_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, sd, &num, name, value, ref); + } + } + return retVal___; +} +void HP_script_stack_expand(struct script_stack *stack) { + int hIndex = 0; + if( HPMHooks.count.HP_script_stack_expand_pre ) { + void (*preHookFunc) (struct script_stack *stack); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_stack_expand_pre[hIndex].func; + preHookFunc(stack); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.stack_expand(stack); + } + if( HPMHooks.count.HP_script_stack_expand_post ) { + void (*postHookFunc) (struct script_stack *stack); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_stack_expand_post[hIndex].func; + postHookFunc(stack); + } + } + return; +} +struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct script_retinfo *ri, DBMap **ref) { + int hIndex = 0; + struct script_data* retVal___ = NULL; + if( HPMHooks.count.HP_script_push_retinfo_pre ) { + struct script_data* (*preHookFunc) (struct script_stack *stack, struct script_retinfo *ri, DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_push_retinfo_pre[hIndex].func; + retVal___ = preHookFunc(stack, ri, ref); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.push_retinfo(stack, ri, ref); + } + if( HPMHooks.count.HP_script_push_retinfo_post ) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, struct script_retinfo *ri, DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_push_retinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, stack, ri, ref); + } + } + return retVal___; +} +int HP_script_pop_val(struct script_state *st) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_pop_val_pre ) { + int (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_val_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_pop_val_pre[hIndex].func; + retVal___ = preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.pop_val(st); + } + if( HPMHooks.count.HP_script_pop_val_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_val_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_pop_val_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); + } + } + return retVal___; +} +void HP_script_op_3(struct script_state *st, int op) { + int hIndex = 0; + if( HPMHooks.count.HP_script_op_3_pre ) { + void (*preHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_3_pre[hIndex].func; + preHookFunc(st, &op); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.op_3(st, op); + } + if( HPMHooks.count.HP_script_op_3_post ) { + void (*postHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_3_post[hIndex].func; + postHookFunc(st, &op); + } + } + return; +} +void HP_script_op_2str(struct script_state *st, int op, const char *s1, const char *s2) { + int hIndex = 0; + if( HPMHooks.count.HP_script_op_2str_pre ) { + void (*preHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_2str_pre[hIndex].func; + preHookFunc(st, &op, s1, s2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.op_2str(st, op, s1, s2); + } + if( HPMHooks.count.HP_script_op_2str_post ) { + void (*postHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_2str_post[hIndex].func; + postHookFunc(st, &op, s1, s2); + } + } + return; +} +void HP_script_op_2num(struct script_state *st, int op, int i1, int i2) { + int hIndex = 0; + if( HPMHooks.count.HP_script_op_2num_pre ) { + void (*preHookFunc) (struct script_state *st, int *op, int *i1, int *i2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_2num_pre[hIndex].func; + preHookFunc(st, &op, &i1, &i2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.op_2num(st, op, i1, i2); + } + if( HPMHooks.count.HP_script_op_2num_post ) { + void (*postHookFunc) (struct script_state *st, int *op, int *i1, int *i2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_2num_post[hIndex].func; + postHookFunc(st, &op, &i1, &i2); + } + } + return; +} +void HP_script_op_2(struct script_state *st, int op) { + int hIndex = 0; + if( HPMHooks.count.HP_script_op_2_pre ) { + void (*preHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_2_pre[hIndex].func; + preHookFunc(st, &op); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.op_2(st, op); + } + if( HPMHooks.count.HP_script_op_2_post ) { + void (*postHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_2_post[hIndex].func; + postHookFunc(st, &op); + } + } + return; +} +void HP_script_op_1(struct script_state *st, int op) { + int hIndex = 0; + if( HPMHooks.count.HP_script_op_1_pre ) { + void (*preHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_op_1_pre[hIndex].func; + preHookFunc(st, &op); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.op_1(st, op); + } + if( HPMHooks.count.HP_script_op_1_post ) { + void (*postHookFunc) (struct script_state *st, int *op); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_op_1_post[hIndex].func; + postHookFunc(st, &op); + } + } + return; +} +void HP_script_check_buildin_argtype(struct script_state *st, int func) { + int hIndex = 0; + if( HPMHooks.count.HP_script_check_buildin_argtype_pre ) { + void (*preHookFunc) (struct script_state *st, int *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_pre[hIndex].func; + preHookFunc(st, &func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.check_buildin_argtype(st, func); + } + if( HPMHooks.count.HP_script_check_buildin_argtype_post ) { + void (*postHookFunc) (struct script_state *st, int *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_post[hIndex].func; + postHookFunc(st, &func); + } + } + return; +} +void HP_script_detach_state(struct script_state *st, bool dequeue_event) { + int hIndex = 0; + if( HPMHooks.count.HP_script_detach_state_pre ) { + void (*preHookFunc) (struct script_state *st, bool *dequeue_event); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_detach_state_pre[hIndex].func; + preHookFunc(st, &dequeue_event); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.detach_state(st, dequeue_event); + } + if( HPMHooks.count.HP_script_detach_state_post ) { + void (*postHookFunc) (struct script_state *st, bool *dequeue_event); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_detach_state_post[hIndex].func; + postHookFunc(st, &dequeue_event); + } + } + return; +} +int HP_script_db_free_code_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_db_free_code_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_db_free_code_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.db_free_code_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_db_free_code_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_db_free_code_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_script_add_autobonus(const char *autobonus) { + int hIndex = 0; + if( HPMHooks.count.HP_script_add_autobonus_pre ) { + void (*preHookFunc) (const char *autobonus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_autobonus_pre[hIndex].func; + preHookFunc(autobonus); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.add_autobonus(autobonus); + } + if( HPMHooks.count.HP_script_add_autobonus_post ) { + void (*postHookFunc) (const char *autobonus); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_autobonus_post[hIndex].func; + postHookFunc(autobonus); + } + } + return; +} +int HP_script_menu_countoptions(const char *str, int max_count, int *total) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_menu_countoptions_pre ) { + int (*preHookFunc) (const char *str, int *max_count, int *total); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_menu_countoptions_pre[hIndex].func; + retVal___ = preHookFunc(str, &max_count, total); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.menu_countoptions(str, max_count, total); + } + if( HPMHooks.count.HP_script_menu_countoptions_post ) { + int (*postHookFunc) (int retVal___, const char *str, int *max_count, int *total); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_menu_countoptions_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, &max_count, total); + } + } + return retVal___; +} +int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_areawarp_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_areawarp_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_areawarp_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_areapercentheal_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int32 HP_script_getarraysize(struct script_state *st, int32 id, int32 idx, int isstring, struct DBMap **ref) { + int hIndex = 0; + int32 retVal___; + memset(&retVal___, '\0', sizeof(int32)); + if( HPMHooks.count.HP_script_getarraysize_pre ) { + int32 (*preHookFunc) (struct script_state *st, int32 *id, int32 *idx, int *isstring, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getarraysize_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_getarraysize_pre[hIndex].func; + retVal___ = preHookFunc(st, &id, &idx, &isstring, ref); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.getarraysize(st, id, idx, isstring, ref); + } + if( HPMHooks.count.HP_script_getarraysize_post ) { + int32 (*postHookFunc) (int32 retVal___, struct script_state *st, int32 *id, int32 *idx, int *isstring, struct DBMap **ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getarraysize_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_getarraysize_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, &id, &idx, &isstring, ref); + } + } + return retVal___; +} +void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int *amount, bool delete_items) { + int hIndex = 0; + if( HPMHooks.count.HP_script_buildin_delitem_delete_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_pre[hIndex].func; + preHookFunc(sd, &idx, amount, &delete_items); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.buildin_delitem_delete(sd, idx, amount, delete_items); + } + if( HPMHooks.count.HP_script_buildin_delitem_delete_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_post[hIndex].func; + postHookFunc(sd, &idx, amount, &delete_items); + } + } + return; +} +bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item *it, bool exact_match) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_script_buildin_delitem_search_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct item *it, bool *exact_match); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_pre[hIndex].func; + retVal___ = preHookFunc(sd, it, &exact_match); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.buildin_delitem_search(sd, it, exact_match); + } + if( HPMHooks.count.HP_script_buildin_delitem_search_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct item *it, bool *exact_match); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, it, &exact_match); + } + } + return retVal___; +} +int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_killmonster_sub_strip(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_killmonster_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_killmonster_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_killmonster_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub_strip(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_announce_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_announce_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_announce_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_getareausers_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_getareausers_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_getareausers_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_getareadropitem_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_mapflag_pvp_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.mapflag_pvp_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_mapflag_pvp_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_pvpoff_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_pvpoff_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_pvpoff_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_pre[hIndex].func; + retVal___ = preHookFunc(sd, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_maprespawnguildid_sub_pc(sd, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_maprespawnguildid_sub_mob(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_mobcount_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_mobcount_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_mobcount_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_playBGM_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_playBGM_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playBGM_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_playBGM_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.playBGM_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_playBGM_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playBGM_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_playBGM_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_playBGM_foreachpc_sub(struct map_session_data *sd, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_playBGM_foreachpc_sub_pre ) { + int (*preHookFunc) (struct map_session_data *sd, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playBGM_foreachpc_sub_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_script_playBGM_foreachpc_sub_pre[hIndex].func; + retVal___ = preHookFunc(sd, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.script.playBGM_foreachpc_sub(sd, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_script_playBGM_foreachpc_sub_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playBGM_foreachpc_sub_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_script_playBGM_foreachpc_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_soundeffect_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_soundeffect_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.soundeffect_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_soundeffect_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_soundeffect_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_query_sql_sub(struct script_state *st, Sql *handle) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_query_sql_sub_pre ) { + int (*preHookFunc) (struct script_state *st, Sql *handle); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_pre[hIndex].func; + retVal___ = preHookFunc(st, handle); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.buildin_query_sql_sub(st, handle); + } + if( HPMHooks.count.HP_script_buildin_query_sql_sub_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st, Sql *handle); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, handle); + } + } + return retVal___; +} +int HP_script_axtoi(const char *hexStg) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_axtoi_pre ) { + int (*preHookFunc) (const char *hexStg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_axtoi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_axtoi_pre[hIndex].func; + retVal___ = preHookFunc(hexStg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.axtoi(hexStg); + } + if( HPMHooks.count.HP_script_axtoi_post ) { + int (*postHookFunc) (int retVal___, const char *hexStg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_axtoi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_axtoi_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hexStg); + } + } + return retVal___; +} +int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_instance_warpall_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.buildin_mobuseskill_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_cleanfloor_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.script.cleanfloor_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_script_cleanfloor_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_run_func(struct script_state *st) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_script_run_func_pre ) { + int (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_run_func_pre[hIndex].func; + retVal___ = preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.run_func(st); + } + if( HPMHooks.count.HP_script_run_func_post ) { + int (*postHookFunc) (int retVal___, struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_run_func_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); + } + } + return retVal___; +} +/* searchstore */ +bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_searchstore_open_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, unsigned int *uses, unsigned short *effect); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_open_pre[hIndex].func; + retVal___ = preHookFunc(sd, &uses, &effect); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.searchstore.open(sd, uses, effect); + } + if( HPMHooks.count.HP_searchstore_open_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *uses, unsigned short *effect); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &uses, &effect); + } + } + return retVal___; +} +void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count) { + int hIndex = 0; + if( HPMHooks.count.HP_searchstore_query_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_query_pre[hIndex].func; + preHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.searchstore.query(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count); + } + if( HPMHooks.count.HP_searchstore_query_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_query_post[hIndex].func; + postHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count); + } + } + return; +} +bool HP_searchstore_querynext(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_searchstore_querynext_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_querynext_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.searchstore.querynext(sd); + } + if( HPMHooks.count.HP_searchstore_querynext_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_querynext_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_searchstore_next(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_searchstore_next_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_next_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.searchstore.next(sd); + } + if( HPMHooks.count.HP_searchstore_next_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_next_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_searchstore_clear(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_searchstore_clear_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_clear_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.searchstore.clear(sd); + } + if( HPMHooks.count.HP_searchstore_clear_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_clear_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_searchstore_close(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_searchstore_close_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_close_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.searchstore.close(sd); + } + if( HPMHooks.count.HP_searchstore_close_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_close_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_searchstore_click(struct map_session_data *sd, int account_id, int store_id, unsigned short nameid) { + int hIndex = 0; + if( HPMHooks.count.HP_searchstore_click_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_click_pre[hIndex].func; + preHookFunc(sd, &account_id, &store_id, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.searchstore.click(sd, account_id, store_id, nameid); + } + if( HPMHooks.count.HP_searchstore_click_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_click_post[hIndex].func; + postHookFunc(sd, &account_id, &store_id, &nameid); + } + } + return; +} +bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_searchstore_queryremote_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_queryremote_pre[hIndex].func; + retVal___ = preHookFunc(sd, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.searchstore.queryremote(sd, account_id); + } + if( HPMHooks.count.HP_searchstore_queryremote_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_queryremote_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &account_id); + } + } + return retVal___; +} +void HP_searchstore_clearremote(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_searchstore_clearremote_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_clearremote_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.searchstore.clearremote(sd); + } + if( HPMHooks.count.HP_searchstore_clearremote_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_clearremote_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_searchstore_result_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func; + retVal___ = preHookFunc(sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine); + } + if( HPMHooks.count.HP_searchstore_result_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine); + for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine); + } + } + return retVal___; +} +/* skill */ +int HP_skill_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.init(); + } + if( HPMHooks.count.HP_skill_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_skill_final(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_final_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_final_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.final(); + } + if( HPMHooks.count.HP_skill_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_skill_reload(void) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_reload_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_reload_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.reload(); + } + if( HPMHooks.count.HP_skill_reload_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_skill_read_db(void) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_read_db_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_read_db_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.read_db(); + } + if( HPMHooks.count.HP_skill_read_db_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_read_db_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_skill_get_index(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_index_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_index_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_index(skill_id); + } + if( HPMHooks.count.HP_skill_get_index_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_index_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_type(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_type_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_type_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_type(skill_id); + } + if( HPMHooks.count.HP_skill_get_type_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_hit(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_hit_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_hit_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_hit(skill_id); + } + if( HPMHooks.count.HP_skill_get_hit_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_hit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_inf(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_inf_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_inf_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_inf(skill_id); + } + if( HPMHooks.count.HP_skill_get_inf_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_inf_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_ele_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_ele_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_ele(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_ele_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_ele_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_nk(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_nk_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_nk_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_nk(skill_id); + } + if( HPMHooks.count.HP_skill_get_nk_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_nk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_max(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_max_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_max_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_max(skill_id); + } + if( HPMHooks.count.HP_skill_get_max_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_range_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_range_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_range(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_range_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_range_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_range2_pre ) { + int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_range2_pre[hIndex].func; + retVal___ = preHookFunc(bl, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_range2(bl, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_range2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_range2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_splash_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_splash_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_splash(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_splash_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_splash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_hp_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_hp_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_hp(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_hp_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_hp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_mhp_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_mhp_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_mhp(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_mhp_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_mhp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_sp_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_sp_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_sp(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_sp_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_sp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_state(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_state_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_state_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_state(skill_id); + } + if( HPMHooks.count.HP_skill_get_state_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_state_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_spiritball_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_spiritball_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_spiritball(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_spiritball_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_spiritball_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_zeny_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_zeny_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_zeny(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_zeny_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_zeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_num_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_num_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_num(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_num_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_cast_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_cast_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_cast(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_cast_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_cast_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_delay_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_delay_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_delay(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_delay_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_delay_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_walkdelay_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_walkdelay_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_walkdelay(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_walkdelay_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_walkdelay_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_time_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_time_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_time(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_time_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_time_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_time2_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_time2_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_time2(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_time2_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_time2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_castnodex_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_castnodex_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_castnodex(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_castnodex_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_castnodex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_delaynodex_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_delaynodex_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_delaynodex(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_delaynodex_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_delaynodex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_castdef(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_castdef_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_castdef_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_castdef(skill_id); + } + if( HPMHooks.count.HP_skill_get_castdef_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_castdef_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_weapontype(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_weapontype_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_weapontype_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_weapontype(skill_id); + } + if( HPMHooks.count.HP_skill_get_weapontype_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_weapontype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_ammotype(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_ammotype_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_ammotype_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_ammotype(skill_id); + } + if( HPMHooks.count.HP_skill_get_ammotype_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_ammotype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_ammo_qty_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_ammo_qty(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_ammo_qty_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_unit_id(uint16 skill_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_unit_id_pre ) { + int (*preHookFunc) (uint16 *skill_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_id_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_unit_id(skill_id, flag); + } + if( HPMHooks.count.HP_skill_get_unit_id_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &flag); + } + } + return retVal___; +} +int HP_skill_get_inf2(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_inf2_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_inf2_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_inf2(skill_id); + } + if( HPMHooks.count.HP_skill_get_inf2_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_inf2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_castcancel(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_castcancel_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_castcancel_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_castcancel(skill_id); + } + if( HPMHooks.count.HP_skill_get_castcancel_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_castcancel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_maxcount_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_maxcount_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_maxcount(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_maxcount_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_maxcount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_blewcount_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_blewcount_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_blewcount(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_blewcount_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_blewcount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_unit_flag(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_unit_flag_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_flag_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_unit_flag(skill_id); + } + if( HPMHooks.count.HP_skill_get_unit_flag_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_flag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_unit_target(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_unit_target_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_target_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_unit_target(skill_id); + } + if( HPMHooks.count.HP_skill_get_unit_target_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_unit_interval(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_unit_interval_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_interval_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_unit_interval(skill_id); + } + if( HPMHooks.count.HP_skill_get_unit_interval_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_interval_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_unit_bl_target(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_unit_bl_target_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_unit_bl_target(skill_id); + } + if( HPMHooks.count.HP_skill_get_unit_bl_target_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_unit_layout_type_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_unit_layout_type(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_unit_layout_type_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_unit_range_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_range_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_unit_range(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_unit_range_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_range_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_cooldown_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_cooldown_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_cooldown(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_cooldown_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_cooldown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_tree_get_max(uint16 skill_id, int b_class) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_tree_get_max_pre ) { + int (*preHookFunc) (uint16 *skill_id, int *b_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_tree_get_max_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &b_class); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, b_class); + } + if( HPMHooks.count.HP_skill_tree_get_max_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, int *b_class); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_tree_get_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &b_class); + } + } + return retVal___; +} +const char* HP_skill_get_name(uint16 skill_id) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_skill_get_name_pre ) { + const char* (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_name_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_name(skill_id); + } + if( HPMHooks.count.HP_skill_get_name_post ) { + const char* (*postHookFunc) (const char* retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +const char* HP_skill_get_desc(uint16 skill_id) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_skill_get_desc_pre ) { + const char* (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_desc_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_desc(skill_id); + } + if( HPMHooks.count.HP_skill_get_desc_post ) { + const char* (*postHookFunc) (const char* retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_desc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +void HP_skill_chk(uint16 *skill_id) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_chk_pre ) { + void (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_chk_pre[hIndex].func; + preHookFunc(skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.chk(skill_id); + } + if( HPMHooks.count.HP_skill_chk_post ) { + void (*postHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_chk_post[hIndex].func; + postHookFunc(skill_id); + } + } + return; +} +int HP_skill_get_casttype(uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_casttype_pre ) { + int (*preHookFunc) (uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_casttype_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_casttype(skill_id); + } + if( HPMHooks.count.HP_skill_get_casttype_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_casttype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_skill_get_casttype2(uint16 index) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_casttype2_pre ) { + int (*preHookFunc) (uint16 *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_casttype2_pre[hIndex].func; + retVal___ = preHookFunc(&index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_casttype2(index); + } + if( HPMHooks.count.HP_skill_get_casttype2_post ) { + int (*postHookFunc) (int retVal___, uint16 *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_casttype2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &index); + } + } + return retVal___; +} +int HP_skill_name2id(const char *name) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_name2id_pre ) { + int (*preHookFunc) (const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_name2id_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.name2id(name); + } + if( HPMHooks.count.HP_skill_name2id_post ) { + int (*postHookFunc) (int retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_name2id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +int HP_skill_isammotype(struct map_session_data *sd, int skill) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_isammotype_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *skill); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.isammotype(sd, skill); + } + if( HPMHooks.count.HP_skill_isammotype_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_isammotype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill); + } + } + return retVal___; +} +int HP_skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_castend_id_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_id_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.castend_id(tid, tick, id, data); + } + if( HPMHooks.count.HP_skill_castend_id_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_castend_pos_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_pos_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.castend_pos(tid, tick, id, data); + } + if( HPMHooks.count.HP_skill_castend_pos_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_pos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const char *mapname) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_castend_map_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, const char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_map_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, mapname); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.castend_map(sd, skill_id, mapname); + } + if( HPMHooks.count.HP_skill_castend_map_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, const char *mapname); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_map_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, mapname); + } + } + return retVal___; +} +int HP_skill_cleartimerskill(struct block_list *src) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_cleartimerskill_pre ) { + int (*preHookFunc) (struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_pre[hIndex].func; + retVal___ = preHookFunc(src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.cleartimerskill(src); + } + if( HPMHooks.count.HP_skill_cleartimerskill_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); + } + } + return retVal___; +} +int HP_skill_addtimerskill(struct block_list *src, unsigned int tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_addtimerskill_pre ) { + int (*preHookFunc) (struct block_list *src, unsigned int *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_addtimerskill_pre[hIndex].func; + retVal___ = preHookFunc(src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.addtimerskill(src, tick, target, x, y, skill_id, skill_lv, type, flag); + } + if( HPMHooks.count.HP_skill_addtimerskill_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, unsigned int *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_addtimerskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag); + } + } + return retVal___; +} +int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_additional_effect_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_additional_effect_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.additional_effect(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); + } + if( HPMHooks.count.HP_skill_additional_effect_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_additional_effect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); + } + } + return retVal___; +} +int HP_skill_counter_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_counter_additional_effect_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.counter_additional_effect(src, bl, skill_id, skill_lv, attack_type, tick); + } + if( HPMHooks.count.HP_skill_counter_additional_effect_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &tick); + } + } + return retVal___; +} +int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int8 dir, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_blown_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blown_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &count, &dir, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.blown(src, target, count, dir, flag); + } + if( HPMHooks.count.HP_skill_blown_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &count, &dir, &flag); + } + } + return retVal___; +} +int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_break_equip_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_break_equip_pre[hIndex].func; + retVal___ = preHookFunc(bl, &where, &rate, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.break_equip(bl, where, rate, flag); + } + if( HPMHooks.count.HP_skill_break_equip_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned short *where, int *rate, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_break_equip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &where, &rate, &flag); + } + } + return retVal___; +} +int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int lv, int time) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_strip_equip_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_strip_equip_pre[hIndex].func; + retVal___ = preHookFunc(bl, &where, &rate, &lv, &time); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.strip_equip(bl, where, rate, lv, time); + } + if( HPMHooks.count.HP_skill_strip_equip_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_strip_equip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &where, &rate, &lv, &time); + } + } + return retVal___; +} +struct skill_unit_group* HP_skill_id2group(int group_id) { + int hIndex = 0; + struct skill_unit_group* retVal___ = NULL; + if( HPMHooks.count.HP_skill_id2group_pre ) { + struct skill_unit_group* (*preHookFunc) (int *group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_id2group_pre[hIndex].func; + retVal___ = preHookFunc(&group_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.id2group(group_id); + } + if( HPMHooks.count.HP_skill_id2group_post ) { + struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, int *group_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_id2group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &group_id); + } + } + return retVal___; +} +struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 skill_id, uint16 skill_lv, short x, short y, int flag) { + int hIndex = 0; + struct skill_unit_group* retVal___ = NULL; + if( HPMHooks.count.HP_skill_unitsetting_pre ) { + struct skill_unit_group* (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unitsetting_pre[hIndex].func; + retVal___ = preHookFunc(src, &skill_id, &skill_lv, &x, &y, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unitsetting(src, skill_id, skill_lv, x, y, flag); + } + if( HPMHooks.count.HP_skill_unitsetting_post ) { + struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unitsetting_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &skill_id, &skill_lv, &x, &y, &flag); + } + } + return retVal___; +} +struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, int x, int y, int val1, int val2) { + int hIndex = 0; + struct skill_unit* retVal___ = NULL; + if( HPMHooks.count.HP_skill_initunit_pre ) { + struct skill_unit* (*preHookFunc) (struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_initunit_pre[hIndex].func; + retVal___ = preHookFunc(group, &idx, &x, &y, &val1, &val2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.initunit(group, idx, x, y, val1, val2); + } + if( HPMHooks.count.HP_skill_initunit_post ) { + struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_initunit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, &idx, &x, &y, &val1, &val2); + } + } + return retVal___; +} +int HP_skill_delunit(struct skill_unit *su) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_delunit_pre ) { + int (*preHookFunc) (struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_delunit_pre[hIndex].func; + retVal___ = preHookFunc(su); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.delunit(su); + } + if( HPMHooks.count.HP_skill_delunit_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *su); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_delunit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, su); + } + } + return retVal___; +} +struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval) { + int hIndex = 0; + struct skill_unit_group* retVal___ = NULL; + if( HPMHooks.count.HP_skill_init_unitgroup_pre ) { + struct skill_unit_group* (*preHookFunc) (struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_init_unitgroup_pre[hIndex].func; + retVal___ = preHookFunc(src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.init_unitgroup(src, count, skill_id, skill_lv, unit_id, limit, interval); + } + if( HPMHooks.count.HP_skill_init_unitgroup_post ) { + struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_init_unitgroup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval); + } + } + return retVal___; +} +int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int line, const char *func) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_del_unitgroup_pre ) { + int (*preHookFunc) (struct skill_unit_group *group, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_del_unitgroup_pre[hIndex].func; + retVal___ = preHookFunc(group, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.del_unitgroup(group, file, line, func); + } + if( HPMHooks.count.HP_skill_del_unitgroup_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit_group *group, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_del_unitgroup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, file, &line, func); + } + } + return retVal___; +} +int HP_skill_clear_unitgroup(struct block_list *src) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_clear_unitgroup_pre ) { + int (*preHookFunc) (struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_pre[hIndex].func; + retVal___ = preHookFunc(src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.clear_unitgroup(src); + } + if( HPMHooks.count.HP_skill_clear_unitgroup_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); + } + } + return retVal___; +} +int HP_skill_clear_group(struct block_list *bl, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_clear_group_pre ) { + int (*preHookFunc) (struct block_list *bl, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_clear_group_pre[hIndex].func; + retVal___ = preHookFunc(bl, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.clear_group(bl, flag); + } + if( HPMHooks.count.HP_skill_clear_group_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_clear_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &flag); + } + } + return retVal___; +} +int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_onplace_pre ) { + int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onplace_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unit_onplace(src, bl, tick); + } + if( HPMHooks.count.HP_skill_unit_onplace_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onplace_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &tick); + } + } + return retVal___; +} +int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_ondamaged_pre ) { + int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *damage, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &damage, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unit_ondamaged(src, bl, damage, tick); + } + if( HPMHooks.count.HP_skill_unit_ondamaged_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *damage, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &damage, &tick); + } + } + return retVal___; +} +int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_cast_fix_pre ) { + int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cast_fix_pre[hIndex].func; + retVal___ = preHookFunc(bl, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.cast_fix(bl, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_cast_fix_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cast_fix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_cast_fix_sc(struct block_list *bl, int time) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_cast_fix_sc_pre ) { + int (*preHookFunc) (struct block_list *bl, int *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_pre[hIndex].func; + retVal___ = preHookFunc(bl, &time); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.cast_fix_sc(bl, time); + } + if( HPMHooks.count.HP_skill_cast_fix_sc_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *time); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &time); + } + } + return retVal___; +} +int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_vf_cast_fix_pre ) { + int (*preHookFunc) (struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_pre[hIndex].func; + retVal___ = preHookFunc(bl, &time, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.vf_cast_fix(bl, time, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_vf_cast_fix_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &time, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_delay_fix_pre ) { + int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_delay_fix_pre[hIndex].func; + retVal___ = preHookFunc(bl, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.delay_fix(bl, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_delay_fix_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_delay_fix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_condition_castbegin_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.check_condition_castbegin(sd, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_check_condition_castbegin_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_condition_castend_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.check_condition_castend(sd, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_check_condition_castend_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_consume_requirement_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_consume_requirement_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.consume_requirement(sd, skill_id, skill_lv, type); + } + if( HPMHooks.count.HP_skill_consume_requirement_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_consume_requirement_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv, &type); + } + } + return retVal___; +} +struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + struct skill_condition retVal___; + memset(&retVal___, '\0', sizeof(struct skill_condition)); + if( HPMHooks.count.HP_skill_get_requirement_pre ) { + struct skill_condition (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_requirement_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_requirement(sd, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_requirement_post ) { + struct skill_condition (*postHookFunc) (struct skill_condition retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_requirement_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint16 *skill_lv, int range, int cast_flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_pc_partner_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_pc_partner_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, skill_lv, &range, &cast_flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.check_pc_partner(sd, skill_id, skill_lv, range, cast_flag); + } + if( HPMHooks.count.HP_skill_check_pc_partner_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_pc_partner_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, skill_lv, &range, &cast_flag); + } + } + return retVal___; +} +int HP_skill_unit_move(struct block_list *bl, unsigned int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_move_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_move_pre[hIndex].func; + retVal___ = preHookFunc(bl, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unit_move(bl, tick, flag); + } + if( HPMHooks.count.HP_skill_unit_move_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_move_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &tick, &flag); + } + } + return retVal___; +} +int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_onleft_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onleft_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, bl, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unit_onleft(skill_id, bl, tick); + } + if( HPMHooks.count.HP_skill_unit_onleft_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onleft_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, bl, &tick); + } + } + return retVal___; +} +int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_onout_pre ) { + int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onout_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unit_onout(src, bl, tick); + } + if( HPMHooks.count.HP_skill_unit_onout_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &tick); + } + } + return retVal___; +} +int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 dx, int16 dy) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_move_unit_group_pre ) { + int (*preHookFunc) (struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_pre[hIndex].func; + retVal___ = preHookFunc(group, &m, &dx, &dy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unit_move_unit_group(group, m, dx, dy); + } + if( HPMHooks.count.HP_skill_unit_move_unit_group_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, &m, &dx, &dy); + } + } + return retVal___; +} +int HP_skill_sit(struct map_session_data *sd, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_sit_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_sit_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.sit(sd, type); + } + if( HPMHooks.count.HP_skill_sit_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_sit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_brandishspear_pre ) { + void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_brandishspear_pre[hIndex].func; + preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.brandishspear(src, bl, skill_id, skill_lv, tick, flag); + } + if( HPMHooks.count.HP_skill_brandishspear_post ) { + void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_brandishspear_post[hIndex].func; + postHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); + } + } + return; +} +void HP_skill_repairweapon(struct map_session_data *sd, int idx) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_repairweapon_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_repairweapon_pre[hIndex].func; + preHookFunc(sd, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.repairweapon(sd, idx); + } + if( HPMHooks.count.HP_skill_repairweapon_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_repairweapon_post[hIndex].func; + postHookFunc(sd, &idx); + } + } + return; +} +void HP_skill_identify(struct map_session_data *sd, int idx) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_identify_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_identify_pre[hIndex].func; + preHookFunc(sd, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.identify(sd, idx); + } + if( HPMHooks.count.HP_skill_identify_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_identify_post[hIndex].func; + postHookFunc(sd, &idx); + } + } + return; +} +void HP_skill_weaponrefine(struct map_session_data *sd, int idx) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_weaponrefine_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_weaponrefine_pre[hIndex].func; + preHookFunc(sd, &idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.weaponrefine(sd, idx); + } + if( HPMHooks.count.HP_skill_weaponrefine_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_weaponrefine_post[hIndex].func; + postHookFunc(sd, &idx); + } + } + return; +} +int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_autospell_pre ) { + int (*preHookFunc) (struct map_session_data *md, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_autospell_pre[hIndex].func; + retVal___ = preHookFunc(md, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.autospell(md, skill_id); + } + if( HPMHooks.count.HP_skill_autospell_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *md, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_autospell_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &skill_id); + } + } + return retVal___; +} +int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_calc_heal_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_calc_heal_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &heal); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.calc_heal(src, target, skill_id, skill_lv, heal); + } + if( HPMHooks.count.HP_skill_calc_heal_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_calc_heal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &heal); + } + } + return retVal___; +} +bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_check_cloaking_pre ) { + bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_cloaking_pre[hIndex].func; + retVal___ = preHookFunc(bl, sce); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.check_cloaking(bl, sce); + } + if( HPMHooks.count.HP_skill_check_cloaking_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_change_entry *sce); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_cloaking_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sce); + } + } + return retVal___; +} +int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_enchant_elemental_end_pre ) { + int (*preHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.enchant_elemental_end(bl, type); + } + if( HPMHooks.count.HP_skill_enchant_elemental_end_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type); + } + } + return retVal___; +} +int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_not_ok_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_not_ok_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.not_ok(skill_id, sd); + } + if( HPMHooks.count.HP_skill_not_ok_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_not_ok_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, sd); + } + } + return retVal___; +} +int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_not_ok_hom_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_not_ok_hom_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, hd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.not_ok_hom(skill_id, hd); + } + if( HPMHooks.count.HP_skill_not_ok_hom_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct homun_data *hd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_not_ok_hom_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, hd); + } + } + return retVal___; +} +int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_not_ok_mercenary_pre ) { + int (*preHookFunc) (uint16 *skill_id, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, md); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.not_ok_mercenary(skill_id, md); + } + if( HPMHooks.count.HP_skill_not_ok_mercenary_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, struct mercenary_data *md); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, md); + } + } + return retVal___; +} +int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_chastle_mob_changetarget_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.chastle_mob_changetarget(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_chastle_mob_changetarget_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigger, int qty) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_can_produce_mix_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *trigger, int *qty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_can_produce_mix_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid, &trigger, &qty); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.can_produce_mix(sd, nameid, trigger, qty); + } + if( HPMHooks.count.HP_skill_can_produce_mix_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *trigger, int *qty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_can_produce_mix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid, &trigger, &qty); + } + } + return retVal___; +} +int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, int slot1, int slot2, int slot3, int qty) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_produce_mix_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_produce_mix_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.produce_mix(sd, skill_id, nameid, slot1, slot2, slot3, qty); + } + if( HPMHooks.count.HP_skill_produce_mix_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_produce_mix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty); + } + } + return retVal___; +} +int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_arrow_create_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_arrow_create_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.arrow_create(sd, nameid); + } + if( HPMHooks.count.HP_skill_arrow_create_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_arrow_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); + } + } + return retVal___; +} +int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_castend_nodamage_id_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.castend_nodamage_id(src, bl, skill_id, skill_lv, tick, flag); + } + if( HPMHooks.count.HP_skill_castend_nodamage_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag); + } + } + return retVal___; +} +int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_castend_damage_id_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.castend_damage_id(src, bl, skill_id, skill_lv, tick, flag); + } + if( HPMHooks.count.HP_skill_castend_damage_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag); + } + } + return retVal___; +} +int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_castend_pos2_pre ) { + int (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_castend_pos2_pre[hIndex].func; + retVal___ = preHookFunc(src, &x, &y, &skill_id, &skill_lv, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.castend_pos2(src, x, y, skill_id, skill_lv, tick, flag); + } + if( HPMHooks.count.HP_skill_castend_pos2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_castend_pos2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &x, &y, &skill_id, &skill_lv, &tick, &flag); + } + } + return retVal___; +} +int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick, bool load) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_blockpc_start_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick, bool *load); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockpc_start_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id, &tick, &load); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.blockpc_start(sd, skill_id, tick, load); + } + if( HPMHooks.count.HP_skill_blockpc_start_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *tick, bool *load); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockpc_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id, &tick, &load); + } + } + return retVal___; +} +int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_blockhomun_start_pre ) { + int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockhomun_start_pre[hIndex].func; + retVal___ = preHookFunc(hd, &skill_id, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.blockhomun_start(hd, skill_id, tick); + } + if( HPMHooks.count.HP_skill_blockhomun_start_post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, uint16 *skill_id, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockhomun_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &skill_id, &tick); + } + } + return retVal___; +} +int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_blockmerc_start_pre ) { + int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockmerc_start_pre[hIndex].func; + retVal___ = preHookFunc(md, &skill_id, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.blockmerc_start(md, skill_id, tick); + } + if( HPMHooks.count.HP_skill_blockmerc_start_post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 *skill_id, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockmerc_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &skill_id, &tick); + } + } + return retVal___; +} +int HP_skill_attack(int attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_attack_pre ) { + int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_attack_pre[hIndex].func; + retVal___ = preHookFunc(&attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.attack(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + } + if( HPMHooks.count.HP_skill_attack_post ) { + int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag); + } + } + return retVal___; +} +int HP_skill_attack_area(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_attack_area_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_attack_area_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.attack_area(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_attack_area_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_attack_area_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_area_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_area_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_area_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.area_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_area_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_area_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_area_sub_count_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_area_sub_count_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.area_sub_count(src, target, skill_id, skill_lv, tick, flag); + } + if( HPMHooks.count.HP_skill_area_sub_count_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_area_sub_count_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &tick, &flag); + } + } + return retVal___; +} +int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_unit_range_pre ) { + int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_unit_range_pre[hIndex].func; + retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.check_unit_range(bl, x, y, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_check_unit_range_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_unit_range_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &x, &y, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_unit_range_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.check_unit_range_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_check_unit_range_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_unit_range2_pre ) { + int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_pre[hIndex].func; + retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.check_unit_range2(bl, x, y, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_check_unit_range2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_unit_range2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &x, &y, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_unit_range2_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.check_unit_range2_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_check_unit_range2_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_toggle_magicpower_pre ) { + void (*preHookFunc) (struct block_list *bl, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_pre[hIndex].func; + preHookFunc(bl, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.toggle_magicpower(bl, skill_id); + } + if( HPMHooks.count.HP_skill_toggle_magicpower_post ) { + void (*postHookFunc) (struct block_list *bl, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_post[hIndex].func; + postHookFunc(bl, &skill_id); + } + } + return; +} +int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_magic_reflect_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_magic_reflect_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.magic_reflect(src, bl, type); + } + if( HPMHooks.count.HP_skill_magic_reflect_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_magic_reflect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &type); + } + } + return retVal___; +} +int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_onskillusage_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_onskillusage_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl, &skill_id, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.onskillusage(sd, bl, skill_id, tick); + } + if( HPMHooks.count.HP_skill_onskillusage_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_onskillusage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl, &skill_id, &tick); + } + } + return retVal___; +} +int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_cell_overlap_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_cell_overlap_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.cell_overlap(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_cell_overlap_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_cell_overlap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_timerskill_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_timerskill_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.timerskill(tid, tick, id, data); + } + if( HPMHooks.count.HP_skill_timerskill_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_timerskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_skill_trap_splash(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_trap_splash_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_trap_splash_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.trap_splash(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_trap_splash_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_trap_splash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_condition_mercenary_pre ) { + int (*preHookFunc) (struct block_list *bl, int *skill_id, int *lv, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_pre[hIndex].func; + retVal___ = preHookFunc(bl, &skill_id, &lv, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.check_condition_mercenary(bl, skill_id, lv, type); + } + if( HPMHooks.count.HP_skill_check_condition_mercenary_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *skill_id, int *lv, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &skill_id, &lv, &type); + } + } + return retVal___; +} +struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) { + int hIndex = 0; + struct skill_unit_group* retVal___ = NULL; + if( HPMHooks.count.HP_skill_locate_element_field_pre ) { + struct skill_unit_group* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_locate_element_field_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.locate_element_field(bl); + } + if( HPMHooks.count.HP_skill_locate_element_field_post ) { + struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_locate_element_field_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_graffitiremover_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_graffitiremover_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.graffitiremover(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_graffitiremover_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_graffitiremover_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_activate_reverberation_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_activate_reverberation_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.activate_reverberation(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_activate_reverberation_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_activate_reverberation_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_dance_overlap_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.dance_overlap_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_dance_overlap_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_dance_overlap(struct skill_unit *su, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_dance_overlap_pre ) { + int (*preHookFunc) (struct skill_unit *su, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_dance_overlap_pre[hIndex].func; + retVal___ = preHookFunc(su, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.dance_overlap(su, flag); + } + if( HPMHooks.count.HP_skill_dance_overlap_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *su, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_dance_overlap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, su, &flag); + } + } + return retVal___; +} +struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 skill_lv, struct block_list *src, int x, int y) { + int hIndex = 0; + struct s_skill_unit_layout* retVal___ = NULL; + if( HPMHooks.count.HP_skill_get_unit_layout_pre ) { + struct s_skill_unit_layout* (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv, src, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_unit_layout(skill_id, skill_lv, src, x, y); + } + if( HPMHooks.count.HP_skill_get_unit_layout_post ) { + struct s_skill_unit_layout* (*postHookFunc) (struct s_skill_unit_layout* retVal___, uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv, src, &x, &y); + } + } + return retVal___; +} +int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_frostjoke_scream_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.frostjoke_scream(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_frostjoke_scream_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_greed(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_greed_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_greed_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.greed(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_greed_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_greed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_destroy_trap_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_destroy_trap_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.destroy_trap(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_destroy_trap_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_destroy_trap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_icewall_block(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_icewall_block_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_icewall_block_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.icewall_block(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_icewall_block_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_icewall_block_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int tick) { + int hIndex = 0; + struct skill_unit_group_tickset* retVal___ = NULL; + if( HPMHooks.count.HP_skill_unitgrouptickset_search_pre ) { + struct skill_unit_group_tickset* (*preHookFunc) (struct block_list *bl, struct skill_unit_group *group, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_pre[hIndex].func; + retVal___ = preHookFunc(bl, group, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unitgrouptickset_search(bl, group, tick); + } + if( HPMHooks.count.HP_skill_unitgrouptickset_search_post ) { + struct skill_unit_group_tickset* (*postHookFunc) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, group, &tick); + } + } + return retVal___; +} +bool HP_skill_dance_switch(struct skill_unit *su, int flag) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_dance_switch_pre ) { + bool (*preHookFunc) (struct skill_unit *su, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_dance_switch_pre[hIndex].func; + retVal___ = preHookFunc(su, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.dance_switch(su, flag); + } + if( HPMHooks.count.HP_skill_dance_switch_post ) { + bool (*postHookFunc) (bool retVal___, struct skill_unit *su, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_dance_switch_post[hIndex].func; + retVal___ = postHookFunc(retVal___, su, &flag); + } + } + return retVal___; +} +int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_condition_char_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.check_condition_char_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_check_condition_char_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.check_condition_mob_master_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_brandishspear_first_pre ) { + void (*preHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_brandishspear_first_pre[hIndex].func; + preHookFunc(tc, &dir, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.brandishspear_first(tc, dir, x, y); + } + if( HPMHooks.count.HP_skill_brandishspear_first_post ) { + void (*postHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_brandishspear_first_post[hIndex].func; + postHookFunc(tc, &dir, &x, &y); + } + } + return; +} +void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_brandishspear_dir_pre ) { + void (*preHookFunc) (struct square *tc, uint8 *dir, int *are); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_pre[hIndex].func; + preHookFunc(tc, &dir, &are); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.brandishspear_dir(tc, dir, are); + } + if( HPMHooks.count.HP_skill_brandishspear_dir_post ) { + void (*postHookFunc) (struct square *tc, uint8 *dir, int *are); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_post[hIndex].func; + postHookFunc(tc, &dir, &are); + } + } + return; +} +int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_fixed_cast_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_fixed_cast(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_fixed_cast_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_skill_sit_count(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_sit_count_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_sit_count_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.sit_count(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_sit_count_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_sit_count_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_sit_in(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_sit_in_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_sit_in_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.sit_in(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_sit_in_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_sit_in_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_sit_out(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_sit_out_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_sit_out_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.sit_out(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_sit_out_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_sit_out_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 skill_lv, cell_t cell, bool flag) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_unitsetmapcell_pre ) { + void (*preHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_pre[hIndex].func; + preHookFunc(src, &skill_id, &skill_lv, &cell, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.unitsetmapcell(src, skill_id, skill_lv, cell, flag); + } + if( HPMHooks.count.HP_skill_unitsetmapcell_post ) { + void (*postHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_post[hIndex].func; + postHookFunc(src, &skill_id, &skill_lv, &cell, &flag); + } + } + return; +} +int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_onplace_timer_pre ) { + int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unit_onplace_timer(src, bl, tick); + } + if( HPMHooks.count.HP_skill_unit_onplace_timer_post ) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &tick); + } + } + return retVal___; +} +int HP_skill_unit_effect(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_effect_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_unit_effect_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.unit_effect(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_unit_effect_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_unit_effect_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.unit_timer_sub_onplace(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_move_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_unit_move_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.unit_move_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_unit_move_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_unit_move_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_blockpc_end_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockpc_end_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.blockpc_end(tid, tick, id, data); + } + if( HPMHooks.count.HP_skill_blockpc_end_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockpc_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_blockhomun_end_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockhomun_end_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.blockhomun_end(tid, tick, id, data); + } + if( HPMHooks.count.HP_skill_blockhomun_end_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockhomun_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_blockmerc_end_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_blockmerc_end_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.blockmerc_end(tid, tick, id, data); + } + if( HPMHooks.count.HP_skill_blockmerc_end_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_blockmerc_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_skill_split_atoi(char *str, int *val) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_split_atoi_pre ) { + int (*preHookFunc) (char *str, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_split_atoi_pre[hIndex].func; + retVal___ = preHookFunc(str, val); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.split_atoi(str, val); + } + if( HPMHooks.count.HP_skill_split_atoi_post ) { + int (*postHookFunc) (int retVal___, char *str, int *val); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_split_atoi_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, val); + } + } + return retVal___; +} +int HP_skill_unit_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_unit_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.unit_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_skill_unit_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_unit_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_unit_timer_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.unit_timer_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_unit_timer_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_skill_init_unit_layout(void) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_init_unit_layout_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.init_unit_layout(); + } + if( HPMHooks.count.HP_skill_init_unit_layout_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_init_unit_layout_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_skill_parse_row_skilldb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_skilldb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_skilldb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_skilldb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_requiredb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_requiredb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_requiredb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_requiredb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_castdb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_castdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_castdb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_castdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_castnodexdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_castnodexdb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_castnodexdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_unitdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_unitdb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_unitdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_producedb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_producedb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_producedb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_createarrowdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_createarrowdb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_createarrowdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_abradb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_abradb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_abradb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_spellbookdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_spellbookdb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_spellbookdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre ) { + bool (*preHookFunc) (char *split[], int *column, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &column, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_magicmushroomdb(split, column, current); + } + if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &column, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_reproducedb_pre ) { + bool (*preHookFunc) (char *split[], int *column, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_pre[hIndex].func; + retVal___ = preHookFunc(split, &column, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_reproducedb(split, column, current); + } + if( HPMHooks.count.HP_skill_parse_row_reproducedb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &column, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_improvisedb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_improvisedb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_improvisedb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_parse_row_changematerialdb_pre ) { + bool (*preHookFunc) (char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_pre[hIndex].func; + retVal___ = preHookFunc(split, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.parse_row_changematerialdb(split, columns, current); + } + if( HPMHooks.count.HP_skill_parse_row_changematerialdb_post ) { + bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, split, &columns, ¤t); + } + } + return retVal___; +} +void HP_skill_usave_add(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_usave_add_pre ) { + void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_usave_add_pre[hIndex].func; + preHookFunc(sd, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.usave_add(sd, skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_usave_add_post ) { + void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_usave_add_post[hIndex].func; + postHookFunc(sd, &skill_id, &skill_lv); + } + } + return; +} +void HP_skill_usave_trigger(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_usave_trigger_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_usave_trigger_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.usave_trigger(sd); + } + if( HPMHooks.count.HP_skill_usave_trigger_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_usave_trigger_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_skill_cooldown_load(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_cooldown_load_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cooldown_load_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.cooldown_load(sd); + } + if( HPMHooks.count.HP_skill_cooldown_load_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cooldown_load_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_skill_spellbook(struct map_session_data *sd, int nameid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_spellbook_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_spellbook_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.spellbook(sd, nameid); + } + if( HPMHooks.count.HP_skill_spellbook_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_spellbook_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); + } + } + return retVal___; +} +int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_block_check_pre ) { + int (*preHookFunc) (struct block_list *bl, enum sc_type *type, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_block_check_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.block_check(bl, type, skill_id); + } + if( HPMHooks.count.HP_skill_block_check_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_block_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type, &skill_id); + } + } + return retVal___; +} +int HP_skill_detonator(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_detonator_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_detonator_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.detonator(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_detonator_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_detonator_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry *sce) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_skill_check_camouflage_pre ) { + bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_check_camouflage_pre[hIndex].func; + retVal___ = preHookFunc(bl, sce); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.check_camouflage(bl, sce); + } + if( HPMHooks.count.HP_skill_check_camouflage_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_change_entry *sce); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_check_camouflage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sce); + } + } + return retVal___; +} +int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_magicdecoy_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_magicdecoy_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.magicdecoy(sd, nameid); + } + if( HPMHooks.count.HP_skill_magicdecoy_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_magicdecoy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); + } + } + return retVal___; +} +int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_poisoningweapon_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_poisoningweapon_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.poisoningweapon(sd, nameid); + } + if( HPMHooks.count.HP_skill_poisoningweapon_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_poisoningweapon_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); + } + } + return retVal___; +} +int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_select_menu_pre ) { + int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_select_menu_pre[hIndex].func; + retVal___ = preHookFunc(sd, &skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.select_menu(sd, skill_id); + } + if( HPMHooks.count.HP_skill_select_menu_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_select_menu_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &skill_id); + } + } + return retVal___; +} +int HP_skill_elementalanalysis(struct map_session_data *sd, int n, uint16 skill_lv, unsigned short *item_list) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_elementalanalysis_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_elementalanalysis_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &skill_lv, item_list); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.elementalanalysis(sd, n, skill_lv, item_list); + } + if( HPMHooks.count.HP_skill_elementalanalysis_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_elementalanalysis_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &skill_lv, item_list); + } + } + return retVal___; +} +int HP_skill_changematerial(struct map_session_data *sd, int n, unsigned short *item_list) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_changematerial_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_changematerial_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, item_list); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.changematerial(sd, n, item_list); + } + if( HPMHooks.count.HP_skill_changematerial_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_changematerial_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, item_list); + } + } + return retVal___; +} +int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_elemental_type_pre ) { + int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_elemental_type_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_elemental_type(skill_id, skill_lv); + } + if( HPMHooks.count.HP_skill_get_elemental_type_post ) { + int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_elemental_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv); + } + } + return retVal___; +} +void HP_skill_cooldown_save(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_skill_cooldown_save_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_cooldown_save_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.cooldown_save(sd); + } + if( HPMHooks.count.HP_skill_cooldown_save_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_cooldown_save_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_skill_maelstrom_suction(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_maelstrom_suction_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_maelstrom_suction_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_maelstrom_suction_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.skill.maelstrom_suction(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_skill_maelstrom_suction_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_maelstrom_suction_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_maelstrom_suction_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_get_new_group_id(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_skill_get_new_group_id_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_get_new_group_id_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_new_group_id(); + } + if( HPMHooks.count.HP_skill_get_new_group_id_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_get_new_group_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +/* status */ +int HP_status_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.init(); + } + if( HPMHooks.count.HP_status_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_status_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_status_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.final(); + } + if( HPMHooks.count.HP_status_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_status_get_refine_chance(enum refine_type wlv, int refine) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_refine_chance_pre ) { + int (*preHookFunc) (enum refine_type *wlv, int *refine); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func; + retVal___ = preHookFunc(&wlv, &refine); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine); + } + if( HPMHooks.count.HP_status_get_refine_chance_post ) { + int (*postHookFunc) (int retVal___, enum refine_type *wlv, int *refine); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_refine_chance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &wlv, &refine); + } + } + return retVal___; +} +sc_type HP_status_skill2sc(int skill_id) { + int hIndex = 0; + sc_type retVal___; + memset(&retVal___, '\0', sizeof(sc_type)); + if( HPMHooks.count.HP_status_skill2sc_pre ) { + sc_type (*preHookFunc) (int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_skill2sc_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.skill2sc(skill_id); + } + if( HPMHooks.count.HP_status_skill2sc_post ) { + sc_type (*postHookFunc) (sc_type retVal___, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_skill2sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} +int HP_status_sc2skill(sc_type sc) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_sc2skill_pre ) { + int (*preHookFunc) (sc_type *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_sc2skill_pre[hIndex].func; + retVal___ = preHookFunc(&sc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.sc2skill(sc); + } + if( HPMHooks.count.HP_status_sc2skill_post ) { + int (*postHookFunc) (int retVal___, sc_type *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_sc2skill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &sc); + } + } + return retVal___; +} +unsigned int HP_status_sc2scb_flag(sc_type sc) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_status_sc2scb_flag_pre ) { + unsigned int (*preHookFunc) (sc_type *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_sc2scb_flag_pre[hIndex].func; + retVal___ = preHookFunc(&sc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.sc2scb_flag(sc); + } + if( HPMHooks.count.HP_status_sc2scb_flag_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, sc_type *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_sc2scb_flag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &sc); + } + } + return retVal___; +} +int HP_status_type2relevant_bl_types(int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_type2relevant_bl_types_pre ) { + int (*preHookFunc) (int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.type2relevant_bl_types(type); + } + if( HPMHooks.count.HP_status_type2relevant_bl_types_post ) { + int (*postHookFunc) (int retVal___, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &type); + } + } + return retVal___; +} +int HP_status_get_sc_type(sc_type idx) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_sc_type_pre ) { + int (*preHookFunc) (sc_type *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_sc_type_pre[hIndex].func; + retVal___ = preHookFunc(&idx); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_sc_type(idx); + } + if( HPMHooks.count.HP_status_get_sc_type_post ) { + int (*postHookFunc) (int retVal___, sc_type *idx); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_sc_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &idx); + } + } + return retVal___; +} +int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_damage_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_damage_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &hp, &sp, &walkdelay, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.damage(src, target, hp, sp, walkdelay, flag); + } + if( HPMHooks.count.HP_status_damage_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &hp, &sp, &walkdelay, &flag); + } + } + return retVal___; +} +int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_charge_pre ) { + int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_charge_pre[hIndex].func; + retVal___ = preHookFunc(bl, &hp, &sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.charge(bl, hp, sp); + } + if( HPMHooks.count.HP_status_charge_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *hp, int64 *sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_charge_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &hp, &sp); + } + } + return retVal___; +} +int HP_status_percent_change(struct block_list *src, struct block_list *target, signed char hp_rate, signed char sp_rate, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_percent_change_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_percent_change_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &hp_rate, &sp_rate, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.percent_change(src, target, hp_rate, sp_rate, flag); + } + if( HPMHooks.count.HP_status_percent_change_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_percent_change_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &hp_rate, &sp_rate, &flag); + } + } + return retVal___; +} +int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_set_hp_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned int *hp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_set_hp_pre[hIndex].func; + retVal___ = preHookFunc(bl, &hp, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.set_hp(bl, hp, flag); + } + if( HPMHooks.count.HP_status_set_hp_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *hp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_set_hp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &hp, &flag); + } + } + return retVal___; +} +int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_set_sp_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned int *sp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_set_sp_pre[hIndex].func; + retVal___ = preHookFunc(bl, &sp, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.set_sp(bl, sp, flag); + } + if( HPMHooks.count.HP_status_set_sp_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *sp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_set_sp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &sp, &flag); + } + } + return retVal___; +} +int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_heal_pre ) { + int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_heal_pre[hIndex].func; + retVal___ = preHookFunc(bl, &hp, &sp, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.heal(bl, hp, sp, flag); + } + if( HPMHooks.count.HP_status_heal_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *hp, int64 *sp, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_heal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &hp, &sp, &flag); + } + } + return retVal___; +} +int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per_sp) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_revive_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_revive_pre[hIndex].func; + retVal___ = preHookFunc(bl, &per_hp, &per_sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.revive(bl, per_hp, per_sp); + } + if( HPMHooks.count.HP_status_revive_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_revive_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &per_hp, &per_sp); + } + } + return retVal___; +} +struct regen_data* HP_status_get_regen_data(struct block_list *bl) { + int hIndex = 0; + struct regen_data* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_regen_data_pre ) { + struct regen_data* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_regen_data_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_regen_data(bl); + } + if( HPMHooks.count.HP_status_get_regen_data_post ) { + struct regen_data* (*postHookFunc) (struct regen_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_regen_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +struct status_data* HP_status_get_status_data(struct block_list *bl) { + int hIndex = 0; + struct status_data* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_status_data_pre ) { + struct status_data* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_status_data_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_status_data(bl); + } + if( HPMHooks.count.HP_status_get_status_data_post ) { + struct status_data* (*postHookFunc) (struct status_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_status_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +struct status_data* HP_status_get_base_status(struct block_list *bl) { + int hIndex = 0; + struct status_data* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_base_status_pre ) { + struct status_data* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_base_status_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_base_status(bl); + } + if( HPMHooks.count.HP_status_get_base_status_post ) { + struct status_data* (*postHookFunc) (struct status_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_base_status_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +const char* HP_status_get_name(struct block_list *bl) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_name_pre ) { + const char* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_name_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_name(bl); + } + if( HPMHooks.count.HP_status_get_name_post ) { + const char* (*postHookFunc) (const char* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_get_class(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_class_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_class_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_class(bl); + } + if( HPMHooks.count.HP_status_get_class_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_get_lv(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_lv_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_lv_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_lv(bl); + } + if( HPMHooks.count.HP_status_get_lv_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_lv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +defType HP_status_get_def(struct block_list *bl) { + int hIndex = 0; + defType retVal___; + memset(&retVal___, '\0', sizeof(defType)); + if( HPMHooks.count.HP_status_get_def_pre ) { + defType (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_def_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_def(bl); + } + if( HPMHooks.count.HP_status_get_def_post ) { + defType (*postHookFunc) (defType retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_def_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +unsigned short HP_status_get_speed(struct block_list *bl) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_get_speed_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_speed_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_speed(bl); + } + if( HPMHooks.count.HP_status_get_speed_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_speed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status_change *sc, int element) { + int hIndex = 0; + unsigned char retVal___; + memset(&retVal___, '\0', sizeof(unsigned char)); + if( HPMHooks.count.HP_status_calc_attack_element_pre ) { + unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_attack_element_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &element); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_attack_element(bl, sc, element); + } + if( HPMHooks.count.HP_status_calc_attack_element_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_attack_element_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &element); + } + } + return retVal___; +} +int HP_status_get_party_id(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_party_id_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_party_id_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_party_id(bl); + } + if( HPMHooks.count.HP_status_get_party_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_party_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_get_guild_id(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_guild_id_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_guild_id_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_guild_id(bl); + } + if( HPMHooks.count.HP_status_get_guild_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_guild_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_get_emblem_id(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_emblem_id_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_emblem_id_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_emblem_id(bl); + } + if( HPMHooks.count.HP_status_get_emblem_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_emblem_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_get_mexp(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_mexp_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_mexp_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_mexp(bl); + } + if( HPMHooks.count.HP_status_get_mexp_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_mexp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_get_race2(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_race2_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_race2_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_race2(bl); + } + if( HPMHooks.count.HP_status_get_race2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_race2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +struct view_data* HP_status_get_viewdata(struct block_list *bl) { + int hIndex = 0; + struct view_data* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_viewdata_pre ) { + struct view_data* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_viewdata_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_viewdata(bl); + } + if( HPMHooks.count.HP_status_get_viewdata_post ) { + struct view_data* (*postHookFunc) (struct view_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_viewdata_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +void HP_status_set_viewdata(struct block_list *bl, int class_) { + int hIndex = 0; + if( HPMHooks.count.HP_status_set_viewdata_pre ) { + void (*preHookFunc) (struct block_list *bl, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_set_viewdata_pre[hIndex].func; + preHookFunc(bl, &class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.set_viewdata(bl, class_); + } + if( HPMHooks.count.HP_status_set_viewdata_post ) { + void (*postHookFunc) (struct block_list *bl, int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_set_viewdata_post[hIndex].func; + postHookFunc(bl, &class_); + } + } + return; +} +void HP_status_change_init(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_status_change_init_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_init_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.change_init(bl); + } + if( HPMHooks.count.HP_status_change_init_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_init_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +struct status_change* HP_status_get_sc(struct block_list *bl) { + int hIndex = 0; + struct status_change* retVal___ = NULL; + if( HPMHooks.count.HP_status_get_sc_pre ) { + struct status_change* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_sc_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_sc(bl); + } + if( HPMHooks.count.HP_status_get_sc_post ) { + struct status_change* (*postHookFunc) (struct status_change* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_isdead(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_isdead_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_isdead_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.isdead(bl); + } + if( HPMHooks.count.HP_status_isdead_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_isdead_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_isimmune(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_isimmune_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_isimmune_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.isimmune(bl); + } + if( HPMHooks.count.HP_status_isimmune_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_isimmune_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_sc_def_pre ) { + int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_sc_def_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type, &rate, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_sc_def(bl, type, rate, tick, flag); + } + if( HPMHooks.count.HP_status_get_sc_def_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_sc_def_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type, &rate, &tick, &flag); + } + } + return retVal___; +} +int HP_status_change_start(struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_change_start_pre ) { + int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_start_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_start(bl, type, rate, val1, val2, val3, val4, tick, flag); + } + if( HPMHooks.count.HP_status_change_start_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + } + } + return retVal___; +} +int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, const char *file, int line) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_change_end__pre ) { + int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_end__pre[hIndex].func; + retVal___ = preHookFunc(bl, &type, &tid, file, &line); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_end_(bl, type, tid, file, line); + } + if( HPMHooks.count.HP_status_change_end__post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_end__post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type, &tid, file, &line); + } + } + return retVal___; +} +int HP_status_kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_kaahi_heal_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.kaahi_heal_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_status_kaahi_heal_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_status_change_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_change_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_status_change_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_change_timer_sub_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_status_change_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.status.change_timer_sub(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_status_change_timer_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_status_change_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_status_change_clear(struct block_list *bl, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_change_clear_pre ) { + int (*preHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_clear_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_clear(bl, type); + } + if( HPMHooks.count.HP_status_change_clear_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type); + } + } + return retVal___; +} +int HP_status_change_clear_buffs(struct block_list *bl, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_change_clear_buffs_pre ) { + int (*preHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_clear_buffs_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_clear_buffs(bl, type); + } + if( HPMHooks.count.HP_status_change_clear_buffs_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_clear_buffs_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type); + } + } + return retVal___; +} +void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, bool first) { + int hIndex = 0; + if( HPMHooks.count.HP_status_calc_bl__pre ) { + void (*preHookFunc) (struct block_list *bl, enum scb_flag *flag, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_bl__pre[hIndex].func; + preHookFunc(bl, &flag, &first); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.calc_bl_(bl, flag, first); + } + if( HPMHooks.count.HP_status_calc_bl__post ) { + void (*postHookFunc) (struct block_list *bl, enum scb_flag *flag, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_bl__post[hIndex].func; + postHookFunc(bl, &flag, &first); + } + } + return; +} +int HP_status_calc_mob_(struct mob_data *md, bool first) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_calc_mob__pre ) { + int (*preHookFunc) (struct mob_data *md, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mob__pre[hIndex].func; + retVal___ = preHookFunc(md, &first); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_mob_(md, first); + } + if( HPMHooks.count.HP_status_calc_mob__post ) { + int (*postHookFunc) (int retVal___, struct mob_data *md, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mob__post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &first); + } + } + return retVal___; +} +int HP_status_calc_pet_(struct pet_data *pd, bool first) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_calc_pet__pre ) { + int (*preHookFunc) (struct pet_data *pd, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_pet__pre[hIndex].func; + retVal___ = preHookFunc(pd, &first); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_pet_(pd, first); + } + if( HPMHooks.count.HP_status_calc_pet__post ) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_pet__post[hIndex].func; + retVal___ = postHookFunc(retVal___, pd, &first); + } + } + return retVal___; +} +int HP_status_calc_pc_(struct map_session_data *sd, bool first) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_calc_pc__pre ) { + int (*preHookFunc) (struct map_session_data *sd, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_pc__pre[hIndex].func; + retVal___ = preHookFunc(sd, &first); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_pc_(sd, first); + } + if( HPMHooks.count.HP_status_calc_pc__post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_pc__post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &first); + } + } + return retVal___; +} +int HP_status_calc_homunculus_(struct homun_data *hd, bool first) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_calc_homunculus__pre ) { + int (*preHookFunc) (struct homun_data *hd, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_homunculus__pre[hIndex].func; + retVal___ = preHookFunc(hd, &first); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_homunculus_(hd, first); + } + if( HPMHooks.count.HP_status_calc_homunculus__post ) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_homunculus__post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, &first); + } + } + return retVal___; +} +int HP_status_calc_mercenary_(struct mercenary_data *md, bool first) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_calc_mercenary__pre ) { + int (*preHookFunc) (struct mercenary_data *md, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mercenary__pre[hIndex].func; + retVal___ = preHookFunc(md, &first); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_mercenary_(md, first); + } + if( HPMHooks.count.HP_status_calc_mercenary__post ) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mercenary__post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, &first); + } + } + return retVal___; +} +int HP_status_calc_elemental_(struct elemental_data *ed, bool first) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_calc_elemental__pre ) { + int (*preHookFunc) (struct elemental_data *ed, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_elemental__pre[hIndex].func; + retVal___ = preHookFunc(ed, &first); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_elemental_(ed, first); + } + if( HPMHooks.count.HP_status_calc_elemental__post ) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_elemental__post[hIndex].func; + retVal___ = postHookFunc(retVal___, ed, &first); + } + } + return retVal___; +} +void HP_status_calc_misc(struct block_list *bl, struct status_data *status, int level) { + int hIndex = 0; + if( HPMHooks.count.HP_status_calc_misc_pre ) { + void (*preHookFunc) (struct block_list *bl, struct status_data *status, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_misc_pre[hIndex].func; + preHookFunc(bl, status, &level); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.calc_misc(bl, status, level); + } + if( HPMHooks.count.HP_status_calc_misc_post ) { + void (*postHookFunc) (struct block_list *bl, struct status_data *status, int *level); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_misc_post[hIndex].func; + postHookFunc(bl, status, &level); + } + } + return; +} +void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct regen_data *regen) { + int hIndex = 0; + if( HPMHooks.count.HP_status_calc_regen_pre ) { + void (*preHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_regen_pre[hIndex].func; + preHookFunc(bl, st, regen); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.calc_regen(bl, st, regen); + } + if( HPMHooks.count.HP_status_calc_regen_post ) { + void (*postHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_regen_post[hIndex].func; + postHookFunc(bl, st, regen); + } + } + return; +} +void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, struct status_change *sc) { + int hIndex = 0; + if( HPMHooks.count.HP_status_calc_regen_rate_pre ) { + void (*preHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_regen_rate_pre[hIndex].func; + preHookFunc(bl, regen, sc); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.calc_regen_rate(bl, regen, sc); + } + if( HPMHooks.count.HP_status_calc_regen_rate_post ) { + void (*postHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_regen_rate_post[hIndex].func; + postHookFunc(bl, regen, sc); + } + } + return; +} +int HP_status_check_skilluse(struct block_list *src, struct block_list *target, uint16 skill_id, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_check_skilluse_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_check_skilluse_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &skill_id, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.check_skilluse(src, target, skill_id, flag); + } + if( HPMHooks.count.HP_status_check_skilluse_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_check_skilluse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &skill_id, &flag); + } + } + return retVal___; +} +int HP_status_check_visibility(struct block_list *src, struct block_list *target) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_check_visibility_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_check_visibility_pre[hIndex].func; + retVal___ = preHookFunc(src, target); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.check_visibility(src, target); + } + if( HPMHooks.count.HP_status_check_visibility_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_check_visibility_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target); + } + } + return retVal___; +} +int HP_status_change_spread(struct block_list *src, struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_change_spread_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_change_spread_pre[hIndex].func; + retVal___ = preHookFunc(src, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_spread(src, bl); + } + if( HPMHooks.count.HP_status_change_spread_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_change_spread_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl); + } + } + return retVal___; +} +defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int def, bool viewable) { + int hIndex = 0; + defType retVal___; + memset(&retVal___, '\0', sizeof(defType)); + if( HPMHooks.count.HP_status_calc_def_pre ) { + defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_def_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &def, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_def(bl, sc, def, viewable); + } + if( HPMHooks.count.HP_status_calc_def_post ) { + defType (*postHookFunc) (defType retVal___, struct block_list *bl, struct status_change *sc, int *def, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_def_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &def, &viewable); + } + } + return retVal___; +} +short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int def2, bool viewable) { + int hIndex = 0; + short retVal___; + memset(&retVal___, '\0', sizeof(short)); + if( HPMHooks.count.HP_status_calc_def2_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_def2_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &def2, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_def2(bl, sc, def2, viewable); + } + if( HPMHooks.count.HP_status_calc_def2_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *def2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_def2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &def2, &viewable); + } + } + return retVal___; +} +defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef, bool viewable) { + int hIndex = 0; + defType retVal___; + memset(&retVal___, '\0', sizeof(defType)); + if( HPMHooks.count.HP_status_calc_mdef_pre ) { + defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mdef_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &mdef, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_mdef(bl, sc, mdef, viewable); + } + if( HPMHooks.count.HP_status_calc_mdef_post ) { + defType (*postHookFunc) (defType retVal___, struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mdef_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &mdef, &viewable); + } + } + return retVal___; +} +short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int mdef2, bool viewable) { + int hIndex = 0; + short retVal___; + memset(&retVal___, '\0', sizeof(short)); + if( HPMHooks.count.HP_status_calc_mdef2_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mdef2_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &mdef2, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_mdef2(bl, sc, mdef2, viewable); + } + if( HPMHooks.count.HP_status_calc_mdef2_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mdef2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &mdef2, &viewable); + } + } + return retVal___; +} +unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_batk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *batk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_batk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &batk, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_batk(bl, sc, batk, viewable); + } + if( HPMHooks.count.HP_status_calc_batk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *batk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_batk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &batk, &viewable); + } + } + return retVal___; +} +int HP_status_get_total_mdef(struct block_list *src) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_total_mdef_pre ) { + int (*preHookFunc) (struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_total_mdef_pre[hIndex].func; + retVal___ = preHookFunc(src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_total_mdef(src); + } + if( HPMHooks.count.HP_status_get_total_mdef_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_total_mdef_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); + } + } + return retVal___; +} +int HP_status_get_total_def(struct block_list *src) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_total_def_pre ) { + int (*preHookFunc) (struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_total_def_pre[hIndex].func; + retVal___ = preHookFunc(src); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_total_def(src); + } + if( HPMHooks.count.HP_status_get_total_def_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_total_def_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src); + } + } + return retVal___; +} +int HP_status_get_matk(struct block_list *src, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_get_matk_pre ) { + int (*preHookFunc) (struct block_list *src, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_matk_pre[hIndex].func; + retVal___ = preHookFunc(src, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_matk(src, flag); + } + if( HPMHooks.count.HP_status_get_matk_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_matk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &flag); + } + } + return retVal___; +} +int HP_status_readdb(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_readdb_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.readdb(); + } + if( HPMHooks.count.HP_status_readdb_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_status_initChangeTables(void) { + int hIndex = 0; + if( HPMHooks.count.HP_status_initChangeTables_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_initChangeTables_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.initChangeTables(); + } + if( HPMHooks.count.HP_status_initChangeTables_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_initChangeTables_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_status_initDummyData(void) { + int hIndex = 0; + if( HPMHooks.count.HP_status_initDummyData_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_initDummyData_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.initDummyData(); + } + if( HPMHooks.count.HP_status_initDummyData_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_initDummyData_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_base_amotion_pc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_amotion_pc_pre[hIndex].func; + retVal___ = preHookFunc(sd, st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_amotion_pc(sd, st); + } + if( HPMHooks.count.HP_status_base_amotion_pc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_amotion_pc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} +unsigned short HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_base_atk_pre ) { + unsigned short (*preHookFunc) (const struct block_list *bl, const struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_atk_pre[hIndex].func; + retVal___ = preHookFunc(bl, st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_atk(bl, st); + } + if( HPMHooks.count.HP_status_base_atk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_atk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, st); + } + } + return retVal___; +} +void HP_status_calc_sigma(void) { + int hIndex = 0; + if( HPMHooks.count.HP_status_calc_sigma_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_sigma_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_sigma_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.calc_sigma(); + } + if( HPMHooks.count.HP_status_calc_sigma_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_sigma_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_sigma_post[hIndex].func; + postHookFunc(); + } + } + return; +} +unsigned int HP_status_base_pc_maxhp(struct map_session_data *sd, struct status_data *st) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_status_base_pc_maxhp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxhp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_pc_maxhp_pre[hIndex].func; + retVal___ = preHookFunc(sd, st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_pc_maxhp(sd, st); + } + if( HPMHooks.count.HP_status_base_pc_maxhp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxhp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_pc_maxhp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} +unsigned int HP_status_base_pc_maxsp(struct map_session_data *sd, struct status_data *st) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_status_base_pc_maxsp_pre ) { + unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxsp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_base_pc_maxsp_pre[hIndex].func; + retVal___ = preHookFunc(sd, st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_pc_maxsp(sd, st); + } + if( HPMHooks.count.HP_status_base_pc_maxsp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxsp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_base_pc_maxsp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} +int HP_status_calc_npc_(struct npc_data *nd, bool first) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_calc_npc__pre ) { + int (*preHookFunc) (struct npc_data *nd, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_npc__pre[hIndex].func; + retVal___ = preHookFunc(nd, &first); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_npc_(nd, first); + } + if( HPMHooks.count.HP_status_calc_npc__post ) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, bool *first); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_npc__post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, &first); + } + } + return retVal___; +} +unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *sc, int str) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_str_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_str_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &str); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_str(bl, sc, str); + } + if( HPMHooks.count.HP_status_calc_str_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *str); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &str); + } + } + return retVal___; +} +unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *sc, int agi) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_agi_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *agi); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_agi_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &agi); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_agi(bl, sc, agi); + } + if( HPMHooks.count.HP_status_calc_agi_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *agi); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_agi_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &agi); + } + } + return retVal___; +} +unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *sc, int vit) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_vit_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *vit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_vit_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &vit); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_vit(bl, sc, vit); + } + if( HPMHooks.count.HP_status_calc_vit_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *vit); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_vit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &vit); + } + } + return retVal___; +} +unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *sc, int int_) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_int_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *int_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_int_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &int_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_int(bl, sc, int_); + } + if( HPMHooks.count.HP_status_calc_int_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *int_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_int_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &int_); + } + } + return retVal___; +} +unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *sc, int dex) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_dex_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_dex_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &dex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_dex(bl, sc, dex); + } + if( HPMHooks.count.HP_status_calc_dex_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *dex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_dex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &dex); + } + } + return retVal___; +} +unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *sc, int luk) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_luk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *luk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_luk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &luk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_luk(bl, sc, luk); + } + if( HPMHooks.count.HP_status_calc_luk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *luk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_luk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &luk); + } + } + return retVal___; +} +unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_watk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *watk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_watk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &watk, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_watk(bl, sc, watk, viewable); + } + if( HPMHooks.count.HP_status_calc_watk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *watk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_watk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &watk, &viewable); + } + } + return retVal___; +} +unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_matk_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_matk_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &matk, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_matk(bl, sc, matk, viewable); + } + if( HPMHooks.count.HP_status_calc_matk_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_matk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &matk, &viewable); + } + } + return retVal___; +} +signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { + int hIndex = 0; + signed short retVal___; + memset(&retVal___, '\0', sizeof(signed short)); + if( HPMHooks.count.HP_status_calc_hit_pre ) { + signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *hit, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_hit_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &hit, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_hit(bl, sc, hit, viewable); + } + if( HPMHooks.count.HP_status_calc_hit_post ) { + signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *hit, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_hit_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &hit, &viewable); + } + } + return retVal___; +} +signed short HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { + int hIndex = 0; + signed short retVal___; + memset(&retVal___, '\0', sizeof(signed short)); + if( HPMHooks.count.HP_status_calc_critical_pre ) { + signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *critical, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_critical_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &critical, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_critical(bl, sc, critical, viewable); + } + if( HPMHooks.count.HP_status_calc_critical_post ) { + signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *critical, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_critical_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &critical, &viewable); + } + } + return retVal___; +} +signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { + int hIndex = 0; + signed short retVal___; + memset(&retVal___, '\0', sizeof(signed short)); + if( HPMHooks.count.HP_status_calc_flee_pre ) { + signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_flee_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &flee, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_flee(bl, sc, flee, viewable); + } + if( HPMHooks.count.HP_status_calc_flee_post ) { + signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *flee, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_flee_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &flee, &viewable); + } + } + return retVal___; +} +signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { + int hIndex = 0; + signed short retVal___; + memset(&retVal___, '\0', sizeof(signed short)); + if( HPMHooks.count.HP_status_calc_flee2_pre ) { + signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_flee2_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &flee2, &viewable); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_flee2(bl, sc, flee2, viewable); + } + if( HPMHooks.count.HP_status_calc_flee2_post ) { + signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_flee2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &flee2, &viewable); + } + } + return retVal___; +} +unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change *sc, int speed) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_speed_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *speed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_speed_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &speed); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_speed(bl, sc, speed); + } + if( HPMHooks.count.HP_status_calc_speed_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *speed); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_speed_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &speed); + } + } + return retVal___; +} +short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate) { + int hIndex = 0; + short retVal___; + memset(&retVal___, '\0', sizeof(short)); + if( HPMHooks.count.HP_status_calc_aspd_rate_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &aspd_rate); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_aspd_rate(bl, sc, aspd_rate); + } + if( HPMHooks.count.HP_status_calc_aspd_rate_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *aspd_rate); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &aspd_rate); + } + } + return retVal___; +} +unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_dmotion_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dmotion); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_dmotion_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &dmotion); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_dmotion(bl, sc, dmotion); + } + if( HPMHooks.count.HP_status_calc_dmotion_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *dmotion); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_dmotion_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &dmotion); + } + } + return retVal___; +} +short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) { + int hIndex = 0; + short retVal___; + memset(&retVal___, '\0', sizeof(short)); + if( HPMHooks.count.HP_status_calc_fix_aspd_pre ) { + short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &aspd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_fix_aspd(bl, sc, aspd); + } + if( HPMHooks.count.HP_status_calc_fix_aspd_post ) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *aspd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &aspd); + } + } + return retVal___; +} +unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_status_calc_maxhp_pre ) { + unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, uint64 *maxhp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_maxhp_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &maxhp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_maxhp(bl, sc, maxhp); + } + if( HPMHooks.count.HP_status_calc_maxhp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, uint64 *maxhp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_maxhp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &maxhp); + } + } + return retVal___; +} +unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) { + int hIndex = 0; + unsigned int retVal___; + memset(&retVal___, '\0', sizeof(unsigned int)); + if( HPMHooks.count.HP_status_calc_maxsp_pre ) { + unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, unsigned int *maxsp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_maxsp_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &maxsp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_maxsp(bl, sc, maxsp); + } + if( HPMHooks.count.HP_status_calc_maxsp_post ) { + unsigned int (*postHookFunc) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, unsigned int *maxsp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_maxsp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &maxsp); + } + } + return retVal___; +} +unsigned char HP_status_calc_element(struct block_list *bl, struct status_change *sc, int element) { + int hIndex = 0; + unsigned char retVal___; + memset(&retVal___, '\0', sizeof(unsigned char)); + if( HPMHooks.count.HP_status_calc_element_pre ) { + unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_element_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &element); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_element(bl, sc, element); + } + if( HPMHooks.count.HP_status_calc_element_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *element); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_element_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &element); + } + } + return retVal___; +} +unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv) { + int hIndex = 0; + unsigned char retVal___; + memset(&retVal___, '\0', sizeof(unsigned char)); + if( HPMHooks.count.HP_status_calc_element_lv_pre ) { + unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_element_lv_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_element_lv(bl, sc, lv); + } + if( HPMHooks.count.HP_status_calc_element_lv_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_element_lv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &lv); + } + } + return retVal___; +} +unsigned short HP_status_calc_mode(struct block_list *bl, struct status_change *sc, int mode) { + int hIndex = 0; + unsigned short retVal___; + memset(&retVal___, '\0', sizeof(unsigned short)); + if( HPMHooks.count.HP_status_calc_mode_pre ) { + unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_mode_pre[hIndex].func; + retVal___ = preHookFunc(bl, sc, &mode); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_mode(bl, sc, mode); + } + if( HPMHooks.count.HP_status_calc_mode_post ) { + unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *mode); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_mode_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, &mode); + } + } + return retVal___; +} +void HP_status_calc_bl_main(struct block_list *bl, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_status_calc_bl_main_pre ) { + void (*preHookFunc) (struct block_list *bl, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_calc_bl_main_pre[hIndex].func; + preHookFunc(bl, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.calc_bl_main(bl, flag); + } + if( HPMHooks.count.HP_status_calc_bl_main_post ) { + void (*postHookFunc) (struct block_list *bl, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_calc_bl_main_post[hIndex].func; + postHookFunc(bl, &flag); + } + } + return; +} +void HP_status_display_add(struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3) { + int hIndex = 0; + if( HPMHooks.count.HP_status_display_add_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_display_add_pre[hIndex].func; + preHookFunc(sd, &type, &dval1, &dval2, &dval3); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.display_add(sd, type, dval1, dval2, dval3); + } + if( HPMHooks.count.HP_status_display_add_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_display_add_post[hIndex].func; + postHookFunc(sd, &type, &dval1, &dval2, &dval3); + } + } + return; +} +void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) { + int hIndex = 0; + if( HPMHooks.count.HP_status_display_remove_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_display_remove_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.display_remove(sd, type); + } + if( HPMHooks.count.HP_status_display_remove_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum sc_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_display_remove_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +int HP_status_natural_heal(struct block_list *bl, va_list args) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_natural_heal_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_pre; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_status_natural_heal_pre[hIndex].func; + retVal___ = preHookFunc(bl, args___copy); + va_end(args___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.status.natural_heal(bl, args___copy); + va_end(args___copy); + } + if( HPMHooks.count.HP_status_natural_heal_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_post; hIndex++ ) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_status_natural_heal_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_status_natural_heal_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_natural_heal_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.natural_heal_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_status_natural_heal_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_natural_heal_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +bool HP_status_readdb_job1(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_status_readdb_job1_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job1_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_job1_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.readdb_job1(fields, columns, current); + } + if( HPMHooks.count.HP_status_readdb_job1_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job1_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_job1_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +bool HP_status_readdb_job2(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_status_readdb_job2_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_job2_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.readdb_job2(fields, columns, current); + } + if( HPMHooks.count.HP_status_readdb_job2_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_job2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_status_readdb_sizefix_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_sizefix_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.readdb_sizefix(fields, columns, current); + } + if( HPMHooks.count.HP_status_readdb_sizefix_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_sizefix_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +bool HP_status_readdb_refine(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_status_readdb_refine_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_refine_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.readdb_refine(fields, columns, current); + } + if( HPMHooks.count.HP_status_readdb_refine_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_refine_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_status_readdb_scconfig_pre ) { + bool (*preHookFunc) (char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_readdb_scconfig_pre[hIndex].func; + retVal___ = preHookFunc(fields, &columns, ¤t); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.readdb_scconfig(fields, columns, current); + } + if( HPMHooks.count.HP_status_readdb_scconfig_post ) { + bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_readdb_scconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); + } + } + return retVal___; +} +/* storage */ +void HP_storage_reconnect(void) { + int hIndex = 0; + if( HPMHooks.count.HP_storage_reconnect_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_reconnect_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.storage.reconnect(); + } + if( HPMHooks.count.HP_storage_reconnect_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_reconnect_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_delitem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_delitem_pre[hIndex].func; + retVal___ = preHookFunc(sd, &n, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.storage.delitem(sd, n, amount); + } + if( HPMHooks.count.HP_storage_delitem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_delitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &n, &amount); + } + } + return retVal___; +} +int HP_storage_open(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_open_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_open_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.storage.open(sd); + } + if( HPMHooks.count.HP_storage_open_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_storage_add(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_add_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_add_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.storage.add(sd, index, amount); + } + if( HPMHooks.count.HP_storage_add_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); + } + } + return retVal___; +} +int HP_storage_get(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_get_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_get_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.storage.get(sd, index, amount); + } + if( HPMHooks.count.HP_storage_get_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); + } + } + return retVal___; +} +int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_additem_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_additem_pre[hIndex].func; + retVal___ = preHookFunc(sd, item_data, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.storage.additem(sd, item_data, amount); + } + if( HPMHooks.count.HP_storage_additem_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_additem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_data, &amount); + } + } + return retVal___; +} +int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_addfromcart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_addfromcart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.storage.addfromcart(sd, index, amount); + } + if( HPMHooks.count.HP_storage_addfromcart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_addfromcart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); + } + } + return retVal___; +} +int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_gettocart_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_gettocart_pre[hIndex].func; + retVal___ = preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.storage.gettocart(sd, index, amount); + } + if( HPMHooks.count.HP_storage_gettocart_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_gettocart_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &index, &amount); + } + } + return retVal___; +} +void HP_storage_close(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_storage_close_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_close_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.storage.close(sd); + } + if( HPMHooks.count.HP_storage_close_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_close_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_storage_pc_quit(struct map_session_data *sd, int flag) { + int hIndex = 0; + if( HPMHooks.count.HP_storage_pc_quit_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_pc_quit_pre[hIndex].func; + preHookFunc(sd, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.storage.pc_quit(sd, flag); + } + if( HPMHooks.count.HP_storage_pc_quit_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_pc_quit_post[hIndex].func; + postHookFunc(sd, &flag); + } + } + return; +} +int HP_storage_comp_item(const void *_i1, const void *_i2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_comp_item_pre ) { + int (*preHookFunc) (const void *_i1, const void *_i2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_comp_item_pre[hIndex].func; + retVal___ = preHookFunc(_i1, _i2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.storage.comp_item(_i1, _i2); + } + if( HPMHooks.count.HP_storage_comp_item_post ) { + int (*postHookFunc) (int retVal___, const void *_i1, const void *_i2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_comp_item_post[hIndex].func; + retVal___ = postHookFunc(retVal___, _i1, _i2); + } + } + return retVal___; +} +void HP_storage_sortitem(struct item *items, unsigned int size) { + int hIndex = 0; + if( HPMHooks.count.HP_storage_sortitem_pre ) { + void (*preHookFunc) (struct item *items, unsigned int *size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_storage_sortitem_pre[hIndex].func; + preHookFunc(items, &size); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.storage.sortitem(items, size); + } + if( HPMHooks.count.HP_storage_sortitem_post ) { + void (*postHookFunc) (struct item *items, unsigned int *size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_storage_sortitem_post[hIndex].func; + postHookFunc(items, &size); + } + } + return; +} +int HP_storage_reconnect_sub(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_storage_reconnect_sub_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_storage_reconnect_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.storage.reconnect_sub(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_storage_reconnect_sub_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_storage_reconnect_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +/* trade */ +void HP_trade_request(struct map_session_data *sd, struct map_session_data *target_sd) { + int hIndex = 0; + if( HPMHooks.count.HP_trade_request_pre ) { + void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *target_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_request_pre[hIndex].func; + preHookFunc(sd, target_sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.trade.request(sd, target_sd); + } + if( HPMHooks.count.HP_trade_request_post ) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *target_sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_request_post[hIndex].func; + postHookFunc(sd, target_sd); + } + } + return; +} +void HP_trade_ack(struct map_session_data *sd, int type) { + int hIndex = 0; + if( HPMHooks.count.HP_trade_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_ack_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.trade.ack(sd, type); + } + if( HPMHooks.count.HP_trade_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_ack_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} +int HP_trade_check_impossible(struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_trade_check_impossible_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_check_impossible_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.trade.check_impossible(sd); + } + if( HPMHooks.count.HP_trade_check_impossible_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_check_impossible_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_trade_check_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_check_pre[hIndex].func; + retVal___ = preHookFunc(sd, tsd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.trade.check(sd, tsd); + } + if( HPMHooks.count.HP_trade_check_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, tsd); + } + } + return retVal___; +} +void HP_trade_additem(struct map_session_data *sd, short index, short amount) { + int hIndex = 0; + if( HPMHooks.count.HP_trade_additem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, short *index, short *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_additem_pre[hIndex].func; + preHookFunc(sd, &index, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.trade.additem(sd, index, amount); + } + if( HPMHooks.count.HP_trade_additem_post ) { + void (*postHookFunc) (struct map_session_data *sd, short *index, short *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_additem_post[hIndex].func; + postHookFunc(sd, &index, &amount); + } + } + return; +} +void HP_trade_addzeny(struct map_session_data *sd, int amount) { + int hIndex = 0; + if( HPMHooks.count.HP_trade_addzeny_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_addzeny_pre[hIndex].func; + preHookFunc(sd, &amount); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.trade.addzeny(sd, amount); + } + if( HPMHooks.count.HP_trade_addzeny_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *amount); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_addzeny_post[hIndex].func; + postHookFunc(sd, &amount); + } + } + return; +} +void HP_trade_ok(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_trade_ok_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_ok_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.trade.ok(sd); + } + if( HPMHooks.count.HP_trade_ok_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_ok_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_trade_cancel(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_trade_cancel_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_cancel_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.trade.cancel(sd); + } + if( HPMHooks.count.HP_trade_cancel_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_cancel_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_trade_commit(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_trade_commit_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_trade_commit_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.trade.commit(sd); + } + if( HPMHooks.count.HP_trade_commit_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_trade_commit_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +/* unit */ +int HP_unit_init(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_init_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.init(); + } + if( HPMHooks.count.HP_unit_init_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_unit_final(void) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_final_pre ) { + int (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_final_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.final(); + } + if( HPMHooks.count.HP_unit_final_post ) { + int (*postHookFunc) (int retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +struct unit_data* HP_unit_bl2ud(struct block_list *bl) { + int hIndex = 0; + struct unit_data* retVal___ = NULL; + if( HPMHooks.count.HP_unit_bl2ud_pre ) { + struct unit_data* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_bl2ud_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.bl2ud(bl); + } + if( HPMHooks.count.HP_unit_bl2ud_post ) { + struct unit_data* (*postHookFunc) (struct unit_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_bl2ud_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +struct unit_data* HP_unit_bl2ud2(struct block_list *bl) { + int hIndex = 0; + struct unit_data* retVal___ = NULL; + if( HPMHooks.count.HP_unit_bl2ud2_pre ) { + struct unit_data* (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_bl2ud2_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.bl2ud2(bl); + } + if( HPMHooks.count.HP_unit_bl2ud2_post ) { + struct unit_data* (*postHookFunc) (struct unit_data* retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_bl2ud2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_attack_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_attack_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.attack_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_unit_attack_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_attack_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_walktoxy_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.walktoxy_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_unit_walktoxy_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_unit_walktoxy_sub(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_walktoxy_sub_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_walktoxy_sub_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.walktoxy_sub(bl); + } + if( HPMHooks.count.HP_unit_walktoxy_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_walktoxy_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_delay_walktoxy_timer_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.delay_walktoxy_timer(tid, tick, id, data); + } + if( HPMHooks.count.HP_unit_delay_walktoxy_timer_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_walktoxy_pre ) { + int (*preHookFunc) (struct block_list *bl, short *x, short *y, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_walktoxy_pre[hIndex].func; + retVal___ = preHookFunc(bl, &x, &y, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.walktoxy(bl, x, y, flag); + } + if( HPMHooks.count.HP_unit_walktoxy_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, short *x, short *y, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_walktoxy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &x, &y, &flag); + } + } + return retVal___; +} +int HP_unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_walktobl_sub_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_walktobl_sub_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.walktobl_sub(tid, tick, id, data); + } + if( HPMHooks.count.HP_unit_walktobl_sub_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_walktobl_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_walktobl_pre ) { + int (*preHookFunc) (struct block_list *bl, struct block_list *tbl, int *range, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_walktobl_pre[hIndex].func; + retVal___ = preHookFunc(bl, tbl, &range, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.walktobl(bl, tbl, range, flag); + } + if( HPMHooks.count.HP_unit_walktobl_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, struct block_list *tbl, int *range, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_walktobl_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, tbl, &range, &flag); + } + } + return retVal___; +} +int HP_unit_run(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_run_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_run_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.run(bl); + } + if( HPMHooks.count.HP_unit_run_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_run_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_wugdash(struct block_list *bl, struct map_session_data *sd) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_wugdash_pre ) { + int (*preHookFunc) (struct block_list *bl, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_wugdash_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_wugdash_pre[hIndex].func; + retVal___ = preHookFunc(bl, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.wugdash(bl, sd); + } + if( HPMHooks.count.HP_unit_wugdash_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_wugdash_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_wugdash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sd); + } + } + return retVal___; +} +int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_escape_pre ) { + int (*preHookFunc) (struct block_list *bl, struct block_list *target, short *dist); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_escape_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_escape_pre[hIndex].func; + retVal___ = preHookFunc(bl, target, &dist); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.escape(bl, target, dist); + } + if( HPMHooks.count.HP_unit_escape_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, struct block_list *target, short *dist); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_escape_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_escape_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, target, &dist); + } + } + return retVal___; +} +int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_movepos_pre ) { + int (*preHookFunc) (struct block_list *bl, short *dst_x, short *dst_y, int *easy, bool *checkpath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_movepos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_movepos_pre[hIndex].func; + retVal___ = preHookFunc(bl, &dst_x, &dst_y, &easy, &checkpath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.movepos(bl, dst_x, dst_y, easy, checkpath); + } + if( HPMHooks.count.HP_unit_movepos_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, short *dst_x, short *dst_y, int *easy, bool *checkpath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_movepos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_movepos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &dst_x, &dst_y, &easy, &checkpath); + } + } + return retVal___; +} +int HP_unit_setdir(struct block_list *bl, unsigned char dir) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_setdir_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned char *dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_setdir_pre[hIndex].func; + retVal___ = preHookFunc(bl, &dir); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.setdir(bl, dir); + } + if( HPMHooks.count.HP_unit_setdir_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char *dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_setdir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &dir); + } + } + return retVal___; +} +uint8 HP_unit_getdir(struct block_list *bl) { + int hIndex = 0; + uint8 retVal___; + memset(&retVal___, '\0', sizeof(uint8)); + if( HPMHooks.count.HP_unit_getdir_pre ) { + uint8 (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_getdir_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.getdir(bl); + } + if( HPMHooks.count.HP_unit_getdir_post ) { + uint8 (*postHookFunc) (uint8 retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_getdir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_blown_pre ) { + int (*preHookFunc) (struct block_list *bl, int *dx, int *dy, int *count, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_blown_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_blown_pre[hIndex].func; + retVal___ = preHookFunc(bl, &dx, &dy, &count, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.blown(bl, dx, dy, count, flag); + } + if( HPMHooks.count.HP_unit_blown_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *dx, int *dy, int *count, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_blown_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_blown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &dx, &dy, &count, &flag); + } + } + return retVal___; +} +int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_warp_pre ) { + int (*preHookFunc) (struct block_list *bl, short *m, short *x, short *y, clr_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_warp_pre[hIndex].func; + retVal___ = preHookFunc(bl, &m, &x, &y, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.warp(bl, m, x, y, type); + } + if( HPMHooks.count.HP_unit_warp_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, short *m, short *x, short *y, clr_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_warp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &m, &x, &y, &type); + } + } + return retVal___; +} +int HP_unit_stop_walking(struct block_list *bl, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_stop_walking_pre ) { + int (*preHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_walking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_stop_walking_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.stop_walking(bl, type); + } + if( HPMHooks.count.HP_unit_stop_walking_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_walking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_stop_walking_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type); + } + } + return retVal___; +} +int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_skilluse_id_pre ) { + int (*preHookFunc) (struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_skilluse_id_pre[hIndex].func; + retVal___ = preHookFunc(src, &target_id, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.skilluse_id(src, target_id, skill_id, skill_lv); + } + if( HPMHooks.count.HP_unit_skilluse_id_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_skilluse_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &target_id, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_unit_is_walking(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_is_walking_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_is_walking_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.is_walking(bl); + } + if( HPMHooks.count.HP_unit_is_walking_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_is_walking_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_can_move(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_can_move_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_can_move_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.can_move(bl); + } + if( HPMHooks.count.HP_unit_can_move_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_can_move_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_resume_running(int tid, unsigned int tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_resume_running_pre ) { + int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_resume_running_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.resume_running(tid, tick, id, data); + } + if( HPMHooks.count.HP_unit_resume_running_post ) { + int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_resume_running_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + } + } + return retVal___; +} +int HP_unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_set_walkdelay_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned int *tick, int *delay, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_set_walkdelay_pre[hIndex].func; + retVal___ = preHookFunc(bl, &tick, &delay, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.set_walkdelay(bl, tick, delay, type); + } + if( HPMHooks.count.HP_unit_set_walkdelay_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *tick, int *delay, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_set_walkdelay_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &tick, &delay, &type); + } + } + return retVal___; +} +int HP_unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_skilluse_id2_pre ) { + int (*preHookFunc) (struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_skilluse_id2_pre[hIndex].func; + retVal___ = preHookFunc(src, &target_id, &skill_id, &skill_lv, &casttime, &castcancel); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.skilluse_id2(src, target_id, skill_id, skill_lv, casttime, castcancel); + } + if( HPMHooks.count.HP_unit_skilluse_id2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_skilluse_id2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &target_id, &skill_id, &skill_lv, &casttime, &castcancel); + } + } + return retVal___; +} +int HP_unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_skilluse_pos_pre ) { + int (*preHookFunc) (struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_skilluse_pos_pre[hIndex].func; + retVal___ = preHookFunc(src, &skill_x, &skill_y, &skill_id, &skill_lv); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.skilluse_pos(src, skill_x, skill_y, skill_id, skill_lv); + } + if( HPMHooks.count.HP_unit_skilluse_pos_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_skilluse_pos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &skill_x, &skill_y, &skill_id, &skill_lv); + } + } + return retVal___; +} +int HP_unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_skilluse_pos2_pre ) { + int (*preHookFunc) (struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_skilluse_pos2_pre[hIndex].func; + retVal___ = preHookFunc(src, &skill_x, &skill_y, &skill_id, &skill_lv, &casttime, &castcancel); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.skilluse_pos2(src, skill_x, skill_y, skill_id, skill_lv, casttime, castcancel); + } + if( HPMHooks.count.HP_unit_skilluse_pos2_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_skilluse_pos2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &skill_x, &skill_y, &skill_id, &skill_lv, &casttime, &castcancel); + } + } + return retVal___; +} +int HP_unit_set_target(struct unit_data *ud, int target_id) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_set_target_pre ) { + int (*preHookFunc) (struct unit_data *ud, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_target_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_set_target_pre[hIndex].func; + retVal___ = preHookFunc(ud, &target_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.set_target(ud, target_id); + } + if( HPMHooks.count.HP_unit_set_target_post ) { + int (*postHookFunc) (int retVal___, struct unit_data *ud, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_target_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_set_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ud, &target_id); + } + } + return retVal___; +} +int HP_unit_stop_attack(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_stop_attack_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_stop_attack_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.stop_attack(bl); + } + if( HPMHooks.count.HP_unit_stop_attack_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_stop_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_unattackable(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_unattackable_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_unattackable_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.unattackable(bl); + } + if( HPMHooks.count.HP_unit_unattackable_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_unattackable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_attack(struct block_list *src, int target_id, int continuous) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_attack_pre ) { + int (*preHookFunc) (struct block_list *src, int *target_id, int *continuous); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_attack_pre[hIndex].func; + retVal___ = preHookFunc(src, &target_id, &continuous); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.attack(src, target_id, continuous); + } + if( HPMHooks.count.HP_unit_attack_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int *target_id, int *continuous); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &target_id, &continuous); + } + } + return retVal___; +} +int HP_unit_cancel_combo(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_cancel_combo_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_cancel_combo_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.cancel_combo(bl); + } + if( HPMHooks.count.HP_unit_cancel_combo_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_cancel_combo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_unit_can_reach_pos_pre ) { + bool (*preHookFunc) (struct block_list *bl, int *x, int *y, int *easy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_can_reach_pos_pre[hIndex].func; + retVal___ = preHookFunc(bl, &x, &y, &easy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.can_reach_pos(bl, x, y, easy); + } + if( HPMHooks.count.HP_unit_can_reach_pos_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, int *x, int *y, int *easy); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_can_reach_pos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &x, &y, &easy); + } + } + return retVal___; +} +bool HP_unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int range, int easy, short *x, short *y) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_unit_can_reach_bl_pre ) { + bool (*preHookFunc) (struct block_list *bl, struct block_list *tbl, int *range, int *easy, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_bl_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_can_reach_bl_pre[hIndex].func; + retVal___ = preHookFunc(bl, tbl, &range, &easy, x, y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.can_reach_bl(bl, tbl, range, easy, x, y); + } + if( HPMHooks.count.HP_unit_can_reach_bl_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct block_list *tbl, int *range, int *easy, short *x, short *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_bl_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_can_reach_bl_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, tbl, &range, &easy, x, y); + } + } + return retVal___; +} +int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_calc_pos_pre ) { + int (*preHookFunc) (struct block_list *bl, int *tx, int *ty, uint8 *dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_calc_pos_pre[hIndex].func; + retVal___ = preHookFunc(bl, &tx, &ty, &dir); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.calc_pos(bl, tx, ty, dir); + } + if( HPMHooks.count.HP_unit_calc_pos_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *tx, int *ty, uint8 *dir); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_calc_pos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &tx, &ty, &dir); + } + } + return retVal___; +} +int HP_unit_attack_timer_sub(struct block_list *src, int tid, unsigned int tick) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_attack_timer_sub_pre ) { + int (*preHookFunc) (struct block_list *src, int *tid, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_attack_timer_sub_pre[hIndex].func; + retVal___ = preHookFunc(src, &tid, &tick); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.attack_timer_sub(src, tid, tick); + } + if( HPMHooks.count.HP_unit_attack_timer_sub_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, int *tid, unsigned int *tick); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_attack_timer_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, &tid, &tick); + } + } + return retVal___; +} +int HP_unit_skillcastcancel(struct block_list *bl, int type) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_skillcastcancel_pre ) { + int (*preHookFunc) (struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_skillcastcancel_pre[hIndex].func; + retVal___ = preHookFunc(bl, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.skillcastcancel(bl, type); + } + if( HPMHooks.count.HP_unit_skillcastcancel_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_skillcastcancel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &type); + } + } + return retVal___; +} +void HP_unit_dataset(struct block_list *bl) { + int hIndex = 0; + if( HPMHooks.count.HP_unit_dataset_pre ) { + void (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_dataset_pre[hIndex].func; + preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.unit.dataset(bl); + } + if( HPMHooks.count.HP_unit_dataset_post ) { + void (*postHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_dataset_post[hIndex].func; + postHookFunc(bl); + } + } + return; +} +int HP_unit_counttargeted(struct block_list *bl) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_counttargeted_pre ) { + int (*preHookFunc) (struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_counttargeted_pre[hIndex].func; + retVal___ = preHookFunc(bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.counttargeted(bl); + } + if( HPMHooks.count.HP_unit_counttargeted_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_counttargeted_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_unit_fixdamage(struct block_list *src, struct block_list *target, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_fixdamage_pre ) { + int (*preHookFunc) (struct block_list *src, struct block_list *target, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_fixdamage_pre[hIndex].func; + retVal___ = preHookFunc(src, target, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.fixdamage(src, target, tick, sdelay, ddelay, damage, div, type, damage2); + } + if( HPMHooks.count.HP_unit_fixdamage_post ) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_fixdamage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, target, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2); + } + } + return retVal___; +} +int HP_unit_changeviewsize(struct block_list *bl, short size) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_changeviewsize_pre ) { + int (*preHookFunc) (struct block_list *bl, short *size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_changeviewsize_pre[hIndex].func; + retVal___ = preHookFunc(bl, &size); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.changeviewsize(bl, size); + } + if( HPMHooks.count.HP_unit_changeviewsize_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, short *size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_changeviewsize_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &size); + } + } + return retVal___; +} +int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_remove_map_pre ) { + int (*preHookFunc) (struct block_list *bl, clr_type *clrtype, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_remove_map_pre[hIndex].func; + retVal___ = preHookFunc(bl, &clrtype, file, &line, func); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.remove_map(bl, clrtype, file, line, func); + } + if( HPMHooks.count.HP_unit_remove_map_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type *clrtype, const char *file, int *line, const char *func); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_remove_map_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &clrtype, file, &line, func); + } + } + return retVal___; +} +void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) { + int hIndex = 0; + if( HPMHooks.count.HP_unit_remove_map_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_remove_map_pc_pre[hIndex].func; + preHookFunc(sd, &clrtype); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.unit.remove_map_pc(sd, clrtype); + } + if( HPMHooks.count.HP_unit_remove_map_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_remove_map_pc_post[hIndex].func; + postHookFunc(sd, &clrtype); + } + } + return; +} +void HP_unit_free_pc(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_unit_free_pc_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_free_pc_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.unit.free_pc(sd); + } + if( HPMHooks.count.HP_unit_free_pc_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_free_pc_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_unit_free(struct block_list *bl, clr_type clrtype) { + int hIndex = 0; + int retVal___; + memset(&retVal___, '\0', sizeof(int)); + if( HPMHooks.count.HP_unit_free_pre ) { + int (*preHookFunc) (struct block_list *bl, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_unit_free_pre[hIndex].func; + retVal___ = preHookFunc(bl, &clrtype); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.free(bl, clrtype); + } + if( HPMHooks.count.HP_unit_free_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type *clrtype); + for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_unit_free_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &clrtype); + } + } + return retVal___; +} +/* vending */ +void HP_vending_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_vending_init_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_vending_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.vending.init(); + } + if( HPMHooks.count.HP_vending_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_vending_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_vending_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_vending_final_pre ) { + void (*preHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_vending_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.vending.final(); + } + if( HPMHooks.count.HP_vending_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_vending_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_vending_close(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_vending_close_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_vending_close_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.vending.close(sd); + } + if( HPMHooks.count.HP_vending_close_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_vending_close_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_vending_open(struct map_session_data *sd, const char *message, const uint8 *data, int count) { + int hIndex = 0; + if( HPMHooks.count.HP_vending_open_pre ) { + void (*preHookFunc) (struct map_session_data *sd, const char *message, const uint8 *data, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_vending_open_pre[hIndex].func; + preHookFunc(sd, message, data, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.vending.open(sd, message, data, count); + } + if( HPMHooks.count.HP_vending_open_post ) { + void (*postHookFunc) (struct map_session_data *sd, const char *message, const uint8 *data, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_vending_open_post[hIndex].func; + postHookFunc(sd, message, data, &count); + } + } + return; +} +void HP_vending_list(struct map_session_data *sd, unsigned int id) { + int hIndex = 0; + if( HPMHooks.count.HP_vending_list_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_vending_list_pre[hIndex].func; + preHookFunc(sd, &id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.vending.list(sd, id); + } + if( HPMHooks.count.HP_vending_list_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_vending_list_post[hIndex].func; + postHookFunc(sd, &id); + } + } + return; +} +void HP_vending_purchase(struct map_session_data *sd, int aid, unsigned int uid, const uint8 *data, int count) { + int hIndex = 0; + if( HPMHooks.count.HP_vending_purchase_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *aid, unsigned int *uid, const uint8 *data, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_purchase_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_vending_purchase_pre[hIndex].func; + preHookFunc(sd, &aid, &uid, data, &count); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.vending.purchase(sd, aid, uid, data, count); + } + if( HPMHooks.count.HP_vending_purchase_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *aid, unsigned int *uid, const uint8 *data, int *count); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_purchase_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_vending_purchase_post[hIndex].func; + postHookFunc(sd, &aid, &uid, data, &count); + } + } + return; +} +bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_vending_search_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_vending_search_pre[hIndex].func; + retVal___ = preHookFunc(sd, &nameid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.vending.search(sd, nameid); + } + if( HPMHooks.count.HP_vending_search_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned short *nameid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_vending_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &nameid); + } + } + return retVal___; +} +bool HP_vending_searchall(struct map_session_data *sd, const struct s_search_store_search *s) { + int hIndex = 0; + bool retVal___; + memset(&retVal___, '\0', sizeof(bool)); + if( HPMHooks.count.HP_vending_searchall_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, const struct s_search_store_search *s); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_searchall_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_vending_searchall_pre[hIndex].func; + retVal___ = preHookFunc(sd, s); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.vending.searchall(sd, s); + } + if( HPMHooks.count.HP_vending_searchall_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_search_store_search *s); + for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_searchall_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_vending_searchall_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, s); + } + } + return retVal___; +} diff --git a/src/plugins/HPMHooking/HPMHooking.sources.inc b/src/plugins/HPMHooking/HPMHooking.sources.inc new file mode 100644 index 000000000..89a668e0c --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking.sources.inc @@ -0,0 +1,37 @@ +memcpy(&HPMHooks.source.atcommand, atcommand, sizeof(struct atcommand_interface)); +memcpy(&HPMHooks.source.battle, battle, sizeof(struct battle_interface)); +memcpy(&HPMHooks.source.bg, bg, sizeof(struct battleground_interface)); +memcpy(&HPMHooks.source.buyingstore, buyingstore, sizeof(struct buyingstore_interface)); +memcpy(&HPMHooks.source.chat, chat, sizeof(struct chat_interface)); +memcpy(&HPMHooks.source.chrif, chrif, sizeof(struct chrif_interface)); +memcpy(&HPMHooks.source.clif, clif, sizeof(struct clif_interface)); +memcpy(&HPMHooks.source.duel, duel, sizeof(struct duel_interface)); +memcpy(&HPMHooks.source.elemental, elemental, sizeof(struct elemental_interface)); +memcpy(&HPMHooks.source.guild, guild, sizeof(struct guild_interface)); +memcpy(&HPMHooks.source.gstorage, gstorage, sizeof(struct guild_storage_interface)); +memcpy(&HPMHooks.source.homun, homun, sizeof(struct homunculus_interface)); +memcpy(&HPMHooks.source.instance, instance, sizeof(struct instance_interface)); +memcpy(&HPMHooks.source.intif, intif, sizeof(struct intif_interface)); +memcpy(&HPMHooks.source.ircbot, ircbot, sizeof(struct irc_bot_interface)); +memcpy(&HPMHooks.source.itemdb, itemdb, sizeof(struct itemdb_interface)); +memcpy(&HPMHooks.source.logs, logs, sizeof(struct log_interface)); +memcpy(&HPMHooks.source.mail, mail, sizeof(struct mail_interface)); +memcpy(&HPMHooks.source.map, map, sizeof(struct map_interface)); +memcpy(&HPMHooks.source.mapit, mapit, sizeof(struct mapit_interface)); +memcpy(&HPMHooks.source.mapreg, mapreg, sizeof(struct mapreg_interface)); +memcpy(&HPMHooks.source.mercenary, mercenary, sizeof(struct mercenary_interface)); +memcpy(&HPMHooks.source.mob, mob, sizeof(struct mob_interface)); +memcpy(&HPMHooks.source.npc, npc, sizeof(struct npc_interface)); +memcpy(&HPMHooks.source.party, party, sizeof(struct party_interface)); +memcpy(&HPMHooks.source.path, path, sizeof(struct path_interface)); +memcpy(&HPMHooks.source.pc, pc, sizeof(struct pc_interface)); +memcpy(&HPMHooks.source.pet, pet, sizeof(struct pet_interface)); +memcpy(&HPMHooks.source.quest, quest, sizeof(struct quest_interface)); +memcpy(&HPMHooks.source.script, script, sizeof(struct script_interface)); +memcpy(&HPMHooks.source.searchstore, searchstore, sizeof(struct searchstore_interface)); +memcpy(&HPMHooks.source.skill, skill, sizeof(struct skill_interface)); +memcpy(&HPMHooks.source.status, status, sizeof(struct status_interface)); +memcpy(&HPMHooks.source.storage, storage, sizeof(struct storage_interface)); +memcpy(&HPMHooks.source.trade, trade, sizeof(struct trade_interface)); +memcpy(&HPMHooks.source.unit, unit, sizeof(struct unit_interface)); +memcpy(&HPMHooks.source.vending, vending, sizeof(struct vending_interface)); diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index ff7d5b2e2..ed573238d 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -1,7 +1,26 @@ - -COMMON_H = ../common/HPMi.h ../common/cbasetypes.h - -PLUGINS = sample db2sql +################ PLUGIN CONFIGURATION ############################## +# # +# When you add a plugin, add its name here: # +# Example: if you have a plugin named my_cool_plugin.c and another # +# one named my_second_plugin.c, add them to the list like this: # +# # +# MYPLUGINS = my_cool_plugin my_second_plugin # +# # +# Note: DO NOT include the .c extension!!! # + +MYPLUGINS = + +# # +######### DO NOT EDIT ANYTHING BELOW THIS LINE!!! ################## + +PLUGINS = sample db2sql HPMHooking $(MYPLUGINS) + +COMMON_H = $(shell ls ../common/*.h) +CONFIG_H = $(shell ls ../config/*.h ../config/*/*.h) +MAP_H = $(shell ls ../map/*.h) +CHAR_H = $(shell ls ../char/*.h) +LOGIN_H = $(shell ls ../login/*.h) +ALL_H = $(COMMON_H) $(CONFIG_H) $(MAP_H) $(CHAR_H) $(LOGIN_H) @SET_MAKE@ @@ -9,17 +28,19 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all $(PLUGINS) sample db2sql clean help +.PHONY: all $(PLUGINS) clean buildclean help all: $(PLUGINS) Makefile -sample: sample@DLLEXT@ - -db2sql: db2sql@DLLEXT@ +$(PLUGINS): %: ../../plugins/%@DLLEXT@ -clean: - @echo " CLEAN plugins" +buildclean: + @echo " CLEAN plugins (build temp files)" @rm -rf *.o + +clean: buildclean + @echo " CLEAN plugins" + @rm -rf ../../plugins/*@DLLEXT@ help: @echo "possible targets are $(PLUGINS:%='%') 'all' 'clean' 'help'" @@ -31,6 +52,8 @@ help: Makefile: Makefile.in @$(MAKE) -C ../.. src/plugins/Makefile -%@DLLEXT@: %.c $(COMMON_H) +.SECONDEXPANSION: + +../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null) @echo " CC $<" - @$(CC) @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o ../../plugins/$@ $< + @$(CC) @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< \ No newline at end of file diff --git a/src/plugins/sample.c b/src/plugins/sample.c index 4f9e34f74..d1a95c71d 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -88,6 +88,26 @@ void sample_packet0f3(int fd) { clif->pGlobalMessage(fd,sd); } +int my_pc_dropitem_storage;/* storage var */ +/* my custom prehook for pc_dropitem, checks if amount of item being dropped is higher than 1 and if so cap it to 1 and store the value of how much it was */ +int my_pc_dropitem_pre(struct map_session_data *sd,int *n,int *amount) { + my_pc_dropitem_storage = 0; + if( *amount > 1 ) { + my_pc_dropitem_storage = *amount; + *amount = 1; + } + return 0; +} +/* postHook receive retVal as the first param, allows posthook to act accordingly to whatever the original was going to return */ +int my_pc_dropitem_post(int retVal, struct map_session_data *sd,int *n,int *amount) { + if( retVal != 1 ) return retVal;/* we don't do anything if pc_dropitem didn't return 1 (success) */ + if( my_pc_dropitem_storage ) {/* signs whether pre-hook did this */ + char output[99]; + snprintf(output,99,"[ Warning ] you can only drop 1 item at a time, capped from %d to 1",my_pc_dropitem_storage); + clif->colormes(sd->fd,COLOR_RED,output); + } + return 1; +} /* run when server starts */ HPExport void plugin_init (void) { char *server_type; @@ -103,6 +123,7 @@ HPExport void plugin_init (void) { /* map-server interfaces */ script = GET_SYMBOL("script"); clif = GET_SYMBOL("clif"); + pc = GET_SYMBOL("pc"); /* session[] */ session = GET_SYMBOL("session"); @@ -132,7 +153,16 @@ HPExport void plugin_init (void) { if( HPMi->addPacket != NULL ) {//link our 'sample' packet to map-server HPMi->addPacket(0xf3,-1,sample_packet0f3,hpClif_Parse,HPMi->pid); } - + + /* in this sample we add a PreHook to pc->dropitem */ + /* to identify whether the item being dropped is on amount higher than 1 */ + /* if so, it stores the amount on a variable (my_pc_dropitem_storage) and changes the amount to 1 */ + addHookPre("pc->dropitem",my_pc_dropitem_pre); + /* in this sample we add a PostHook to pc->dropitem */ + /* if the original pc->dropitem was successful and the amount stored on my_pc_dropitem_storage is higher than 1, */ + /* our posthook will display a message to the user about the cap */ + /* - by checking whether it was successful (retVal value) it allows for the originals conditions to take place */ + addHookPost("pc->dropitem",my_pc_dropitem_post); } /* run when server is ready (online) */ HPExport void server_online (void) { diff --git a/vcproj-10/plugin-HPMHooking.vcxproj b/vcproj-10/plugin-HPMHooking.vcxproj new file mode 100644 index 000000000..db96e4986 --- /dev/null +++ b/vcproj-10/plugin-HPMHooking.vcxproj @@ -0,0 +1,118 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {E64C56D3-CDFB-483B-900B-A62D216B6D2F} + plugin-HPMHooking + Win32Proj + plugin-HPMHooking + + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\plugins\ + $(ProjectName)\$(Configuration)\ + false + ..\plugins\ + $(ProjectName)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + plugin-HPMHooking + plugin-HPMHooking + + + + /MP %(AdditionalOptions) + Disabled + ..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + true + Level3 + ProgramDatabase + 4996;%(DisableSpecificWarnings) + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0417 + + + $(OutDir)$(TargetName).dll + + + true + $(IntDir)$(TargetName).pdb + false + $(IntDir)$(TargetName).lib + MachineX86 + + + + + /MP %(AdditionalOptions) + MaxSpeed + ..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + MultiThreaded + Level3 + ProgramDatabase + 4996;%(DisableSpecificWarnings) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0417 + + + $(OutDir)$(TargetName).dll + + + true + $(IntDir)$(TargetName).pdb + true + true + false + $(IntDir)$(TargetName).lib + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/vcproj-12/plugin-HPMHooking.vcxproj b/vcproj-12/plugin-HPMHooking.vcxproj new file mode 100644 index 000000000..183adcac5 --- /dev/null +++ b/vcproj-12/plugin-HPMHooking.vcxproj @@ -0,0 +1,120 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {E64C56D3-CDFB-483B-900B-A62D216B6D2F} + plugin-HPMHooking + Win32Proj + plugin-HPMHooking + + + + DynamicLibrary + MultiByte + v110 + + + DynamicLibrary + MultiByte + v110 + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\plugins\ + $(ProjectName)\$(Configuration)\ + false + ..\plugins\ + $(ProjectName)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + plugin-HPMHooking + plugin-HPMHooking + + + + /MP %(AdditionalOptions) + Disabled + ..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + true + Level3 + ProgramDatabase + 4996;%(DisableSpecificWarnings) + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0417 + + + $(OutDir)$(TargetName).dll + + + true + $(IntDir)$(TargetName).pdb + false + $(IntDir)$(TargetName).lib + MachineX86 + + + + + /MP %(AdditionalOptions) + MaxSpeed + ..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + MultiThreaded + Level3 + ProgramDatabase + 4996;%(DisableSpecificWarnings) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0417 + + + $(OutDir)$(TargetName).dll + + + true + $(IntDir)$(TargetName).pdb + true + true + false + $(IntDir)$(TargetName).lib + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/vcproj-9/plugin-HPMHooking.vcproj b/vcproj-9/plugin-HPMHooking.vcproj new file mode 100644 index 000000000..8faab8f03 --- /dev/null +++ b/vcproj-9/plugin-HPMHooking.vcproj @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3-70-g09d2 From cd780e51999c6efa1084e6b41ba0efcaaa347b9e Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 18 Oct 2013 17:52:51 -0300 Subject: Minor HPM Update Attempting to hook to a unknown hooking point will now display a message. Added support for item bonuses Check https://github.com/HerculesWS/StaffPlugins/tree/master/shennetsind/bCoolDownRate for a demonstration. Signed-off-by: shennetsind --- src/common/HPM.c | 3 +++ src/map/map.c | 8 ++++++++ src/map/map.h | 9 ++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 8be9298f9..e7ab94687 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -471,6 +471,9 @@ bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsi /* if not check if a sub-hooking list is available (from the server) and run it by */ if( HPM->addhook_sub && HPM->addhook_sub(type,target,hook,pID) ) return true; + + ShowError("HPM:AddHook: unknown Hooking Point '%s'!\n",target); + return false; } void HPM_HookStop (const char *func, unsigned int pID) { diff --git a/src/map/map.c b/src/map/map.c index 14a9b4908..91871e58f 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -4954,6 +4954,10 @@ void read_map_zone_db(void) { } } +int map_get_new_bonus_id (void) { + return map->bonus_id++; +} + /** * @see DBApply */ @@ -5648,6 +5652,8 @@ void map_defaults(void) { map->cache_buffer = NULL; map->flooritem_ers = NULL; + /* */ + map->bonus_id = SP_LAST_KNOWN; /* funcs */ map->zone_init = map_zone_init; map->zone_remove = map_zone_remove; @@ -5814,6 +5820,8 @@ void map_defaults(void) { map->addblcell = map_addblcell; map->delblcell = map_delblcell; + + map->get_new_bonus_id = map_get_new_bonus_id; /** * mapit interface diff --git a/src/map/map.h b/src/map/map.h index 97c7a9d7d..83d5aa5a8 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -406,7 +406,11 @@ enum _sp { SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_CLASS_DROP_ITEM, //2041-2045 SP_EMATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SKILL_USE_SP_RATE, //2046-2049 SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2050-2054 - SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST //2055-2058 + SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST, //2055-2058 + + + /* must be the last, plugins add bonuses from this value onwards */ + SP_LAST_KNOWN, }; enum _look { @@ -856,6 +860,8 @@ struct map_interface { char *cache_buffer; // Has the uncompressed gat data of all maps, so just one allocation has to be made /* */ struct eri *flooritem_ers; + /* */ + int bonus_id; /* funcs */ void (*zone_init) (void); void (*zone_remove) (int m); @@ -1022,6 +1028,7 @@ struct map_interface { bool (*arg_next_value) (const char *option, int i, int argc); void (*addblcell) (struct block_list *bl); void (*delblcell) (struct block_list *bl); + int (*get_new_bonus_id) (void); }; struct map_interface *map; -- cgit v1.2.3-70-g09d2 From 1be53db78a321436d0ebe6093595b769f10874b6 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 9 Nov 2013 17:06:32 -0200 Subject: HPM Support for plugin-implemented "--args" (options) As a necessary measure for the upcoming bot that will keep .sql files in sync with their .txt counterparts. Special Thanks to Haruna Signed-off-by: shennetsind --- src/common/HPM.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++------ src/common/HPM.h | 13 ++++++++ src/common/HPMi.h | 5 ++++ src/common/core.c | 5 ++++ src/login/login.c | 2 -- src/map/map.c | 44 +++++++++++++++------------ src/map/map.h | 2 +- 7 files changed, 130 insertions(+), 31 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index e7ab94687..5d08821e6 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -190,6 +190,9 @@ struct hplugin *hplugin_load(const char* filename) { if( ( plugin->hpi->event[HPET_POST_FINAL] = plugin_import(plugin->dll, "server_post_final",void (*)(void)) ) ) anyEvent = true; + if( ( plugin->hpi->event[HPET_PRE_INIT] = plugin_import(plugin->dll, "server_preinit",void (*)(void)) ) ) + anyEvent = true; + if( !anyEvent ) { ShowWarning("HPM:plugin_load: no events found for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); HPM->unload(plugin); @@ -200,16 +203,17 @@ struct hplugin *hplugin_load(const char* filename) { return NULL; /* id */ - plugin->hpi->pid = plugin->idx; + plugin->hpi->pid = plugin->idx; /* core */ - plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand",plugin->idx); - plugin->hpi->addPacket = HPM->import_symbol("addPacket",plugin->idx); - plugin->hpi->addToSession = HPM->import_symbol("addToSession",plugin->idx); - plugin->hpi->getFromSession = HPM->import_symbol("getFromSession",plugin->idx); - plugin->hpi->removeFromSession = HPM->import_symbol("removeFromSession",plugin->idx); - plugin->hpi->AddHook = HPM->import_symbol("AddHook",plugin->idx); - plugin->hpi->HookStop = HPM->import_symbol("HookStop",plugin->idx); - plugin->hpi->HookStopped = HPM->import_symbol("HookStopped",plugin->idx); + plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand",plugin->idx); + plugin->hpi->addPacket = HPM->import_symbol("addPacket",plugin->idx); + plugin->hpi->addToSession = HPM->import_symbol("addToSession",plugin->idx); + plugin->hpi->getFromSession = HPM->import_symbol("getFromSession",plugin->idx); + plugin->hpi->removeFromSession = HPM->import_symbol("removeFromSession",plugin->idx); + plugin->hpi->AddHook = HPM->import_symbol("AddHook",plugin->idx); + plugin->hpi->HookStop = HPM->import_symbol("HookStop",plugin->idx); + plugin->hpi->HookStopped = HPM->import_symbol("HookStopped",plugin->idx); + plugin->hpi->addArg = HPM->import_symbol("addArg",plugin->idx); /* server specific */ if( HPM->load_sub ) HPM->load_sub(plugin); @@ -247,6 +251,13 @@ void hplugins_config_read(void) { config_t plugins_conf; config_setting_t *plist = NULL; const char *config_filename = "conf/plugins.conf"; // FIXME hardcoded name + FILE *fp; + + /* yes its ugly, its temporary and will be gone as soon as the new inter-server.conf is set */ + if( (fp = fopen("conf/import/plugins.conf","r")) ) { + config_filename = "conf/import/plugins.conf"; + fclose(fp); + } if (conf_read_file(&plugins_conf, config_filename)) return; @@ -483,6 +494,51 @@ void HPM_HookStop (const char *func, unsigned int pID) { bool HPM_HookStopped (void) { return HPM->force_return; } +/* command-line args */ +bool hpm_parse_arg(const char *arg, int *index, char *argv[], bool param) { + struct HPMArgData *data; + + if( (data = strdb_get(HPM->arg_db,arg)) ) { + data->func((data->has_param && param)?argv[(*index)+1]:NULL); + if( data->has_param && param ) *index += 1; + return true; + } + + return false; +} +void hpm_arg_help(void) { + DBIterator *iter = db_iterator(HPM->arg_db); + struct HPMArgData *data = NULL; + + for( data = dbi_first(iter); dbi_exists(iter); data = dbi_next(iter) ) { + if( data->help != NULL ) + data->help(); + else + ShowInfo(" %s (%s)\t\t\n",data->name,HPM->pid2name(data->pluginID)); + } + + dbi_destroy(iter); +} +bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, void (*func) (char *param),void (*help) (void)) { + struct HPMArgData *data = NULL; + + if( strdb_exists(HPM->arg_db, name) ) { + ShowError("HPM:add_arg:%s duplicate! (from %s)\n",name,HPM->pid2name(pluginID)); + return false; + } + + CREATE(data, struct HPMArgData, 1); + + data->pluginID = pluginID; + data->name = aStrdup(name); + data->func = func; + data->help = help; + data->has_param = has_param; + + strdb_put(HPM->arg_db, data->name, data); + + return true; +} void hplugins_share_defaults(void) { /* console */ @@ -497,6 +553,7 @@ void hplugins_share_defaults(void) { HPM->share(HPM_AddHook,"AddHook"); HPM->share(HPM_HookStop,"HookStop"); HPM->share(HPM_HookStopped,"HookStopped"); + HPM->share(hpm_add_arg,"addArg"); /* core */ HPM->share(&runflag,"runflag"); HPM->share(arg_v,"arg_v"); @@ -551,6 +608,8 @@ void hpm_init(void) { HPM->packetsc[i] = 0; } + HPM->arg_db = strdb_alloc(DB_OPT_RELEASE_DATA, 0); + HPM->symbol_defaults(); #ifdef CONSOLE_INPUT @@ -569,6 +628,14 @@ void hpm_memdown(void) { if( HPM->fnames ) free(HPM->fnames); + +} +int hpm_arg_db_clear_sub(DBKey key, DBData *data, va_list args) { + struct HPMArgData *a = DB->data2ptr(data); + + aFree(a->name); + + return 0; } void hpm_final(void) { unsigned int i; @@ -594,6 +661,8 @@ void hpm_final(void) { aFree(HPM->packets[i]); } + HPM->arg_db->destroy(HPM->arg_db,HPM->arg_db_clear_sub); + /* HPM->fnames is cleared after the memory manager goes down */ iMalloc->post_shutdown = hpm_memdown; @@ -626,4 +695,7 @@ void hpm_defaults(void) { HPM->parse_packets = hplugins_parse_packets; HPM->load_sub = NULL; HPM->addhook_sub = NULL; + HPM->arg_db_clear_sub = hpm_arg_db_clear_sub; + HPM->parse_arg = hpm_parse_arg; + HPM->arg_help = hpm_arg_help; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 395555948..e685b3068 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -74,6 +74,14 @@ struct HPMFileNameCache { char *name; }; +struct HPMArgData { + unsigned int pluginID; + char *name;/* e.g. "--my-arg","-v","--whatever" */ + void (*help) (void);/* to display when --help is used */ + void (*func) (char *param);/* NULL when no param is available */ + bool has_param;/* because of the weird "--argparam" instead of the "--arg=param" */ +}; + /* Hercules Plugin Manager Interface */ struct HPM_interface { /* vars */ @@ -93,6 +101,8 @@ struct HPM_interface { /* plugin file ptr caching */ struct HPMFileNameCache *fnames; unsigned int fnamec; + /* --command-line */ + DBMap *arg_db; /* funcs */ void (*init) (void); void (*final) (void); @@ -112,6 +122,9 @@ struct HPM_interface { unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point); void (*load_sub) (struct hplugin *plugin); bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); + bool (*parse_arg) (const char *arg, int* index, char *argv[], bool param); + void (*arg_help) (void); + int (*arg_db_clear_sub) (DBKey key, DBData *data, va_list args); } HPM_s; struct HPM_interface *HPM; diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 9c2a6184e..f071bf09e 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -56,6 +56,7 @@ enum hp_event_types { HPET_FINAL,/* server is shutting down */ HPET_READY,/* server is ready (online) */ HPET_POST_FINAL,/* server is done shutting down */ + HPET_PRE_INIT,/* server is about to start (used to e.g. add custom "--args" handling) */ HPET_MAX, }; @@ -83,6 +84,8 @@ enum HPluginHookType { #define hookStop() HPMi->HookStop(__func__,HPMi->pid) #define hookStopped() HPMi->HookStopped() +#define addArg(name,param,func,help) HPMi->addArg(HPMi->pid,name,param,func,help) + /* Hercules Plugin Mananger Include Interface */ HPExport struct HPMi_interface { /* */ @@ -106,6 +109,8 @@ HPExport struct HPMi_interface { bool (*AddHook) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); void (*HookStop) (const char *func, unsigned int pID); bool (*HookStopped) (void); + /* program --arg/-a */ + bool (*addArg) (unsigned int pluginID, char *name, bool has_param,void (*func) (char *param),void (*help) (void)); } HPMi_s; #ifndef _HPM_H_ HPExport struct HPMi_interface *HPMi; diff --git a/src/common/core.c b/src/common/core.c index f57cc4c79..a414a5d0b 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -8,6 +8,7 @@ #include "../common/strlib.h" #include "core.h" #include "../common/console.h" +#include "../common/random.h" #ifndef MINICORE #include "../common/db.h" @@ -337,6 +338,10 @@ int main (int argc, char **argv) { timer->init(); + /* timer first */ + rnd_init(); + srand((unsigned int)timer->gettick()); + console->init(); HCache->init(); diff --git a/src/login/login.c b/src/login/login.c index f47f1519c..73e89d4ff 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1777,8 +1777,6 @@ int do_init(int argc, char** argv) login_set_defaults(); login_config_read((argc > 1) ? argv[1] : LOGIN_CONF_NAME); login_lan_config_read((argc > 2) ? argv[2] : LAN_CONF_NAME); - - rnd_init(); for( i = 0; i < ARRAYLENGTH(server); ++i ) chrif_server_init(i); diff --git a/src/map/map.c b/src/map/map.c index cd192b7d4..1d47d196e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5215,6 +5215,7 @@ void map_helpscreen(bool do_exit) ShowInfo(" --grf-path \t\tAlternative GRF path configuration.\n"); ShowInfo(" --inter-config \t\tAlternative inter-server configuration.\n"); ShowInfo(" --log-config \t\tAlternative logging configuration.\n"); + HPM->arg_help();/* display help for commands implemented thru HPM */ if( do_exit ) exit(EXIT_SUCCESS); } @@ -5257,10 +5258,11 @@ void do_shutdown(void) } } -bool map_arg_next_value(const char* option, int i, int argc) +bool map_arg_next_value(const char* option, int i, int argc, bool must) { if( i >= argc-1 ) { - ShowWarning("Missing value for option '%s'.\n", option); + if( must ) + ShowWarning("Missing value for option '%s'.\n", option); return false; } @@ -5377,6 +5379,8 @@ void map_hp_symbols(void) { } void map_load_defaults(void) { + map_defaults(); + /* */ atcommand_defaults(); battle_defaults(); battleground_defaults(); @@ -5426,17 +5430,23 @@ int do_init(int argc, char *argv[]) #ifdef GCOLLECT GC_enable_incremental(); #endif + + map_load_defaults(); - map_defaults(); - - rnd_init(); - + HPM->load_sub = HPM_map_plugin_load_sub; + HPM->symbol_defaults_sub = map_hp_symbols; + HPM->config_read(); + + HPM->event(HPET_PRE_INIT); + for( i = 1; i < argc ; i++ ) { const char* arg = argv[i]; if( arg[0] != '-' && ( arg[0] != '/' || arg[1] == '-' ) ) {// -, -- and / ShowError("Unknown option '%s'.\n", argv[i]); exit(EXIT_FAILURE); + } else if ( HPM->parse_arg(arg,&i,argv,map->arg_next_value(arg, i, argc, false)) ) { + continue; /* HPM Triggered */ } else if( (++arg)[0] == '-' ) {// long option arg++; @@ -5445,35 +5455,35 @@ int do_init(int argc, char *argv[]) } else if( strcmp(arg, "version") == 0 ) { map->versionscreen(true); } else if( strcmp(arg, "map-config") == 0 ) { - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) map->MAP_CONF_NAME = argv[++i]; } else if( strcmp(arg, "battle-config") == 0 ) { - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) map->BATTLE_CONF_FILENAME = argv[++i]; } else if( strcmp(arg, "atcommand-config") == 0 ) { - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) map->ATCOMMAND_CONF_FILENAME = argv[++i]; } else if( strcmp(arg, "script-config") == 0 ) { - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) map->SCRIPT_CONF_NAME = argv[++i]; } else if( strcmp(arg, "msg-config") == 0 ) { - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) map->MSG_CONF_NAME = argv[++i]; } else if( strcmp(arg, "grf-path-file") == 0 ) { - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) map->GRF_PATH_FILENAME = argv[++i]; } else if( strcmp(arg, "inter-config") == 0 ) { - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) map->INTER_CONF_NAME = argv[++i]; } else if( strcmp(arg, "log-config") == 0 ) { - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) map->LOG_CONF_NAME = argv[++i]; } else if( strcmp(arg, "run-once") == 0 ) { // close the map-server as soon as its done.. for testing [Celest] runflag = CORE_ST_STOP; } else if( strcmp(arg, "script-check") == 0 ) { minimal = true; runflag = CORE_ST_STOP; - if( map->arg_next_value(arg, i, argc) ) + if( map->arg_next_value(arg, i, argc, true) ) scriptcheck = argv[++i]; } else { ShowError("Unknown option '%s'.\n", argv[i]); @@ -5495,7 +5505,6 @@ int do_init(int argc, char *argv[]) } } - map_load_defaults(); if (!minimal) { map->config_read(map->MAP_CONF_NAME); CREATE(map->list,struct map_data,map->count); @@ -5580,9 +5589,6 @@ int do_init(int argc, char *argv[]) timer->add_func_list(map->removemobs_timer, "map_removemobs_timer"); timer->add_interval(timer->gettick()+1000, map->freeblock_timer, 0, 0, 60*1000); - HPM->load_sub = HPM_map_plugin_load_sub; - HPM->symbol_defaults_sub = map_hp_symbols; - HPM->config_read(); HPM->event(HPET_INIT); } diff --git a/src/map/map.h b/src/map/map.h index 20e328c88..4b2671702 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -1047,7 +1047,7 @@ struct map_interface { int (*abort_sub) (struct map_session_data *sd, va_list ap); void (*helpscreen) (bool do_exit); void (*versionscreen) (bool do_exit); - bool (*arg_next_value) (const char *option, int i, int argc); + bool (*arg_next_value) (const char *option, int i, int argc, bool must); void (*addblcell) (struct block_list *bl); void (*delblcell) (struct block_list *bl); int (*get_new_bonus_id) (void); -- cgit v1.2.3-70-g09d2 From 8fda38dcdabbb9d252b0e11fb07b2ad37f9e659f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 13 Nov 2013 21:26:21 -0200 Subject: HPM Custom Data Struct Makeover! - Modified how the core handles it, making it easier to add new points. - Modified how plugins call it, calls were made shorter, e.g. 'HPMi->getFromSession(session[fd],HPMi->pid,0)' => 'getFromSession(session[fd],0)' -- check src/common/HPMi.h #defines for all the options - Added support for npc_data (getFromNPCD and so on) as requested in http://hercules.ws/board/topic/2923-hpm-custom-struct-npcs/ Signed-off-by: shennetsind --- src/common/HPM.c | 142 +++++++++++++++++++++++++++++++++++++-------------- src/common/HPM.h | 8 +++ src/common/HPMi.h | 31 ++++++++--- src/common/socket.c | 2 +- src/map/HPMmap.c | 81 ++++++----------------------- src/map/HPMmap.h | 5 +- src/map/map.c | 4 +- src/map/npc.c | 11 ++++ src/map/npc.h | 6 ++- src/map/unit.c | 2 +- src/plugins/sample.c | 14 ++--- 11 files changed, 178 insertions(+), 128 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 5d08821e6..81acb3415 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -207,9 +207,9 @@ struct hplugin *hplugin_load(const char* filename) { /* core */ plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand",plugin->idx); plugin->hpi->addPacket = HPM->import_symbol("addPacket",plugin->idx); - plugin->hpi->addToSession = HPM->import_symbol("addToSession",plugin->idx); - plugin->hpi->getFromSession = HPM->import_symbol("getFromSession",plugin->idx); - plugin->hpi->removeFromSession = HPM->import_symbol("removeFromSession",plugin->idx); + plugin->hpi->addToHPData = HPM->import_symbol("addToHPData",plugin->idx); + plugin->hpi->getFromHPData = HPM->import_symbol("getFromHPData",plugin->idx); + plugin->hpi->removeFromHPData = HPM->import_symbol("removeFromHPData",plugin->idx); plugin->hpi->AddHook = HPM->import_symbol("AddHook",plugin->idx); plugin->hpi->HookStop = HPM->import_symbol("HookStop",plugin->idx); plugin->hpi->HookStopped = HPM->import_symbol("HookStopped",plugin->idx); @@ -311,67 +311,129 @@ CPCMD(plugins) { } } } +void hplugins_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { + /* record address */ + switch( type ) { + case HPDT_SESSION: + ret->HPDataSRCPtr = (void**)(&((struct socket_data *)ptr)->hdata); + ret->hdatac = &((struct socket_data *)ptr)->hdatac; + break; + /* goes to sub */ + case HPDT_MSD: + case HPDT_NPCD: + if( HPM->grabHPDataSub ) + HPM->grabHPDataSub(ret,type,ptr); + else + ShowError("HPM:grabHPData failed, type %d needs sub-handler!\n",type); + break; + default: + ret->HPDataSRCPtr = NULL; + ret->hdatac = NULL; + return; + } +} +void hplugins_addToHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, void *data, unsigned int index, bool autofree) { + struct HPluginData *HPData, **HPDataSRC; + struct HPDataOperationStorage action; + unsigned int i, max; + + HPM->grabHPData(&action,type,ptr); -void hplugins_addToSession(struct socket_data *sess, void *data, unsigned int id, unsigned int type, bool autofree) { - struct HPluginData *HPData; - unsigned int i; + if( action.hdatac == NULL ) { /* woo it failed! */ + ShowError("HPM:addToHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index); + return; + } + + /* flag */ + HPDataSRC = *(action.HPDataSRCPtr); + max = *(action.hdatac); - for(i = 0; i < sess->hdatac; i++) { - if( sess->hdata[i]->pluginID == id && sess->hdata[i]->type == type ) { - ShowError("HPM->addToSession:%s: error! attempting to insert duplicate struct of id %u and type %u\n",HPM->pid2name(id),id,type); + /* duplicate check */ + for(i = 0; i < max; i++) { + if( HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index ) { + ShowError("HPM:addToHPData:%s: error! attempting to insert duplicate struct of id %u and index %u\n",HPM->pid2name(pluginID),pluginID,index); return; } } - //HPluginData is always same size, probably better to use the ERS + /* HPluginData is always same size, probably better to use the ERS (with reasonable chunk size e.g. 10/25/50) */ CREATE(HPData, struct HPluginData, 1); - HPData->pluginID = id; - HPData->type = type; + /* input */ + HPData->pluginID = pluginID; + HPData->type = index; HPData->flag.free = autofree ? 1 : 0; HPData->data = data; - RECREATE(sess->hdata,struct HPluginData *,++sess->hdatac); - sess->hdata[sess->hdatac - 1] = HPData; + /* resize */ + *(action.hdatac) += 1; + RECREATE(*(action.HPDataSRCPtr),struct HPluginData *,*(action.hdatac)); + + /* RECREATE modified the addresss */ + HPDataSRC = *(action.HPDataSRCPtr); + HPDataSRC[*(action.hdatac) - 1] = HPData; } -void *hplugins_getFromSession(struct socket_data *sess, unsigned int id, unsigned int type) { - unsigned int i; + +void *hplugins_getFromHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, unsigned int index) { + struct HPDataOperationStorage action; + struct HPluginData **HPDataSRC; + unsigned int i, max; - for(i = 0; i < sess->hdatac; i++) { - if( sess->hdata[i]->pluginID == id && sess->hdata[i]->type == type ) { - break; - } + HPM->grabHPData(&action,type,ptr); + + if( action.hdatac == NULL ) { /* woo it failed! */ + ShowError("HPM:getFromHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index); + return NULL; } - if( i != sess->hdatac ) - return sess->hdata[i]->data; + /* flag */ + HPDataSRC = *(action.HPDataSRCPtr); + max = *(action.hdatac); + for(i = 0; i < max; i++) { + if( HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index ) + return HPDataSRC[i]->data; + } + return NULL; } -void hplugins_removeFromSession(struct socket_data *sess, unsigned int id, unsigned int type) { - unsigned int i; + +void hplugins_removeFromHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, unsigned int index) { + struct HPDataOperationStorage action; + struct HPluginData **HPDataSRC; + unsigned int i, max; + + HPM->grabHPData(&action,type,ptr); - for(i = 0; i < sess->hdatac; i++) { - if( sess->hdata[i]->pluginID == id && sess->hdata[i]->type == type ) { + if( action.hdatac == NULL ) { /* woo it failed! */ + ShowError("HPM:removeFromHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index); + return; + } + + /* flag */ + HPDataSRC = *(action.HPDataSRCPtr); + max = *(action.hdatac); + + for(i = 0; i < max; i++) { + if( HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index ) break; - } } - if( i != sess->hdatac ) { + if( i != max ) { unsigned int cursor; - - aFree(sess->hdata[i]->data); - aFree(sess->hdata[i]); - sess->hdata[i] = NULL; - for(i = 0, cursor = 0; i < sess->hdatac; i++) { - if( sess->hdata[i] == NULL ) + aFree(HPDataSRC[i]->data);/* when its removed we delete it regardless of autofree */ + aFree(HPDataSRC[i]); + HPDataSRC[i] = NULL; + + for(i = 0, cursor = 0; i < max; i++) { + if( HPDataSRC[i] == NULL ) continue; if( i != cursor ) - sess->hdata[cursor] = sess->hdata[i]; + HPDataSRC[cursor] = HPDataSRC[i]; cursor++; } - sess->hdatac = cursor; + *(action.hdatac) = cursor; } } @@ -547,9 +609,9 @@ void hplugins_share_defaults(void) { #endif /* our own */ HPM->share(hplugins_addpacket,"addPacket"); - HPM->share(hplugins_addToSession,"addToSession"); - HPM->share(hplugins_getFromSession,"getFromSession"); - HPM->share(hplugins_removeFromSession,"removeFromSession"); + HPM->share(hplugins_addToHPData,"addToHPData"); + HPM->share(hplugins_getFromHPData,"getFromHPData"); + HPM->share(hplugins_removeFromHPData,"removeFromHPData"); HPM->share(HPM_AddHook,"AddHook"); HPM->share(HPM_HookStop,"HookStop"); HPM->share(HPM_HookStopped,"HookStopped"); @@ -698,4 +760,6 @@ void hpm_defaults(void) { HPM->arg_db_clear_sub = hpm_arg_db_clear_sub; HPM->parse_arg = hpm_parse_arg; HPM->arg_help = hpm_arg_help; + HPM->grabHPData = hplugins_grabHPData; + HPM->grabHPDataSub = NULL; } diff --git a/src/common/HPM.h b/src/common/HPM.h index e685b3068..9a6bda713 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -82,6 +82,11 @@ struct HPMArgData { bool has_param;/* because of the weird "--argparam" instead of the "--arg=param" */ }; +struct HPDataOperationStorage { + void **HPDataSRCPtr; + unsigned int *hdatac; +}; + /* Hercules Plugin Manager Interface */ struct HPM_interface { /* vars */ @@ -125,6 +130,9 @@ struct HPM_interface { bool (*parse_arg) (const char *arg, int* index, char *argv[], bool param); void (*arg_help) (void); int (*arg_db_clear_sub) (DBKey key, DBData *data, va_list args); + void (*grabHPData) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); + /* for server-specific HPData e.g. map_session_data */ + void (*grabHPDataSub) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); } HPM_s; struct HPM_interface *HPM; diff --git a/src/common/HPMi.h b/src/common/HPMi.h index f071bf09e..940782dce 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -77,6 +77,12 @@ enum HPluginHookType { HOOK_TYPE_POST, }; +enum HPluginDataTypes { + HPDT_SESSION, + HPDT_MSD, + HPDT_NPCD, +}; + #define addHookPre(tname,hook) HPMi->AddHook(HOOK_TYPE_PRE,tname,hook,HPMi->pid) #define addHookPost(tname,hook) HPMi->AddHook(HOOK_TYPE_POST,tname,hook,HPMi->pid) /* need better names ;/ */ @@ -85,6 +91,19 @@ enum HPluginHookType { #define hookStopped() HPMi->HookStopped() #define addArg(name,param,func,help) HPMi->addArg(HPMi->pid,name,param,func,help) +/* HPData handy redirects */ +/* session[] */ +#define addToSession(ptr,data,index,autofree) HPMi->addToHPData(HPDT_SESSION,HPMi->pid,ptr,data,index,autofree) +#define getFromSession(ptr,index) HPMi->getFromHPData(HPDT_SESSION,HPMi->pid,ptr,index) +#define removeFromSession(ptr,index) HPMi->removeFromHPData(HPDT_SESSION,HPMi->pid,ptr,index) +/* map_session_data */ +#define addToMSD(ptr,data,index,autofree) HPMi->addToHPData(HPDT_MSD,HPMi->pid,ptr,data,index,autofree) +#define getFromMSD(ptr,index) HPMi->getFromHPData(HPDT_MSD,HPMi->pid,ptr,index) +#define removeFromMSD(ptr,index) HPMi->removeFromHPData(HPDT_MSD,HPMi->pid,ptr,index) +/* npc_data */ +#define addToNPCD(ptr,data,index,autofree) HPMi->addToHPData(HPDT_NPCD,HPMi->pid,ptr,data,index,autofree) +#define getFromNPCD(ptr,index) HPMi->getFromHPData(HPDT_NPCD,HPMi->pid,ptr,index) +#define removeFromNPCD(ptr,index) HPMi->removeFromHPData(HPDT_NPCD,HPMi->pid,ptr,index) /* Hercules Plugin Mananger Include Interface */ HPExport struct HPMi_interface { @@ -95,14 +114,10 @@ HPExport struct HPMi_interface { 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)); void (*addCPCommand) (char *name, CParseFunc func); - /* map_session_data */ - void (*addToMSD) (struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree); - void *(*getFromMSD) (struct map_session_data *sd, unsigned int id, unsigned int type); - void (*removeFromMSD) (struct map_session_data *sd, unsigned int id, unsigned int type); - /* session[] */ - void (*addToSession) (struct socket_data *sess, void *data, unsigned int id, unsigned int type, bool autofree); - void *(*getFromSession) (struct socket_data *sess, unsigned int id, unsigned int type); - void (*removeFromSession) (struct socket_data *sess, unsigned int id, unsigned int type); + /* HPM Custom Data */ + void (*addToHPData) (enum HPluginDataTypes type, unsigned int pluginID, void *ptr, void *data, unsigned int index, bool autofree); + void *(*getFromHPData) (enum HPluginDataTypes type, unsigned int pluginID, void *ptr, unsigned int index); + void (*removeFromHPData) (enum HPluginDataTypes type, unsigned int pluginID, void *ptr, unsigned int index); /* packet */ bool (*addPacket) (unsigned short cmd, unsigned short length, void (*receive)(int fd), unsigned int point, unsigned int pluginID); /* Hooking */ diff --git a/src/common/socket.c b/src/common/socket.c index c66153550..6e877d9be 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -613,8 +613,8 @@ static void delete_session(int fd) for(i = 0; i < session[fd]->hdatac; i++) { if( session[fd]->hdata[i]->flag.free ) { aFree(session[fd]->hdata[i]->data); - aFree(session[fd]->hdata[i]); } + aFree(session[fd]->hdata[i]); } if( session[fd]->hdata ) aFree(session[fd]->hdata); diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 8a69cba97..8d7c74ef2 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -46,76 +46,27 @@ struct HPM_atcommand_list { struct HPM_atcommand_list *atcommand_list = NULL; unsigned int atcommand_list_items = 0; -void HPM_map_addToMSD(struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree) { - struct HPluginData *HPData; - unsigned int i; - - for(i = 0; i < sd->hdatac; i++) { - if( sd->hdata[i]->pluginID == id && sd->hdata[i]->type == type ) { - ShowError("HPMi->addToMSD:%s: error! attempting to insert duplicate struct of type %u on '%s'\n",HPM->pid2name(id),type,sd->status.name); - return; - } - } - - CREATE(HPData, struct HPluginData, 1); - - HPData->pluginID = id; - HPData->type = type; - HPData->flag.free = autofree ? 1 : 0; - HPData->data = data; - - RECREATE(sd->hdata,struct HPluginData *,++sd->hdatac); - sd->hdata[sd->hdatac - 1] = HPData; -} -void *HPM_map_getFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type) { - unsigned int i; - - for(i = 0; i < sd->hdatac; i++) { - if( sd->hdata[i]->pluginID == id && sd->hdata[i]->type == type ) { +void HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { + /* record address */ + switch( type ) { + case HPDT_MSD: + ret->HPDataSRCPtr = (void**)(&((struct map_session_data *)ptr)->hdata); + ret->hdatac = &((struct map_session_data *)ptr)->hdatac; break; - } - } - - if( i != sd->hdatac ) - return sd->hdata[i]->data; - - return NULL; -} -void HPM_map_removeFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type) { - unsigned int i; - - for(i = 0; i < sd->hdatac; i++) { - if( sd->hdata[i]->pluginID == id && sd->hdata[i]->type == type ) { + case HPDT_NPCD: + ret->HPDataSRCPtr = (void**)(&((struct npc_data *)ptr)->hdata); + ret->hdatac = &((struct npc_data *)ptr)->hdatac; break; - } - } - - if( i != sd->hdatac ) { - unsigned int cursor; - - aFree(sd->hdata[i]->data); - aFree(sd->hdata[i]); - sd->hdata[i] = NULL; - - for(i = 0, cursor = 0; i < sd->hdatac; i++) { - if( sd->hdata[i] == NULL ) - continue; - if( i != cursor ) - sd->hdata[cursor] = sd->hdata[i]; - cursor++; - } - - sd->hdatac = cursor; + default: + ret->HPDataSRCPtr = NULL; + ret->hdatac = NULL; + return; } - } + void HPM_map_plugin_load_sub(struct hplugin *plugin) { - plugin->hpi->addCommand = HPM->import_symbol("addCommand",plugin->idx); - plugin->hpi->addScript = HPM->import_symbol("addScript",plugin->idx); - /* */ - plugin->hpi->addToMSD = HPM->import_symbol("addToMSD",plugin->idx); - plugin->hpi->getFromMSD = HPM->import_symbol("getFromMSD",plugin->idx); - plugin->hpi->removeFromMSD = HPM->import_symbol("removeFromMSD",plugin->idx); + plugin->hpi->addCommand = HPM->import_symbol("addCommand",plugin->idx); + plugin->hpi->addScript = HPM->import_symbol("addScript",plugin->idx); } bool HPM_map_add_atcommand(char *name, AtCommandFunc func) { diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h index 96515772b..f5fe70276 100644 --- a/src/map/HPMmap.h +++ b/src/map/HPMmap.h @@ -6,13 +6,12 @@ #include "../common/cbasetypes.h" #include "../map/atcommand.h" +#include "../common/HPM.h" struct hplugin; struct map_session_data; -void HPM_map_addToMSD(struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree); -void *HPM_map_getFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type); -void HPM_map_removeFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type); +void HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); bool HPM_map_add_atcommand(char *name, AtCommandFunc func); void HPM_map_atcommands(void); diff --git a/src/map/map.c b/src/map/map.c index 3469a60ce..b846d6125 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5372,9 +5372,6 @@ void map_hp_symbols(void) { /* specific */ HPM->share(atcommand->create,"addCommand"); HPM->share(script->addScript,"addScript"); - HPM->share(HPM_map_addToMSD,"addToMSD"); - HPM->share(HPM_map_getFromMSD,"getFromMSD"); - HPM->share(HPM_map_removeFromMSD,"removeFromMSD"); /* vars */ HPM->share(map->list,"map->list"); } @@ -5436,6 +5433,7 @@ int do_init(int argc, char *argv[]) HPM->load_sub = HPM_map_plugin_load_sub; HPM->symbol_defaults_sub = map_hp_symbols; + HPM->grabHPDataSub = HPM_map_grabHPData; HPM->config_read(); HPM->event(HPET_PRE_INIT); diff --git a/src/map/npc.c b/src/map/npc.c index 5ca96d587..effc36a4e 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1763,6 +1763,8 @@ void npc_unload_duplicates(struct npc_data* nd) { //Removes an npc from map and db. //Single is to free name (for duplicates). int npc_unload(struct npc_data* nd, bool single) { + unsigned int i; + nullpo_ret(nd); npc->remove_map(nd); @@ -1850,6 +1852,15 @@ int npc_unload(struct npc_data* nd, bool single) { nd->ud = NULL; } + for( i = 0; i < nd->hdatac; i++ ) { + if( nd->hdata[i]->flag.free ) { + aFree(nd->hdata[i]->data); + } + aFree(nd->hdata[i]); + } + if( nd->hdata ) + aFree(nd->hdata); + aFree(nd); return 0; diff --git a/src/map/npc.h b/src/map/npc.h index 10f3406b4..33be957fb 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -5,6 +5,8 @@ #ifndef _NPC_H_ #define _NPC_H_ +#include "../common/HPM.h" //struct HPluginData + #include "map.h" // struct block_list #include "status.h" // struct status_change #include "unit.h" // struct unit_data @@ -74,10 +76,12 @@ struct npc_data { char killer_name[NAME_LENGTH]; } tomb; } u; + /* HPData Support for npc_data */ + struct HPluginData **hdata; + unsigned int hdatac; }; - #define START_NPC_NUM 110000000 enum actor_classes { diff --git a/src/map/unit.c b/src/map/unit.c index eed9fe3be..04af6c117 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2397,8 +2397,8 @@ int unit_free(struct block_list *bl, clr_type clrtype) { for( k = 0; k < sd->hdatac; k++ ) { if( sd->hdata[k]->flag.free ) { aFree(sd->hdata[k]->data); - aFree(sd->hdata[k]); } + aFree(sd->hdata[k]); } if( sd->hdata ) aFree(sd->hdata); diff --git a/src/plugins/sample.c b/src/plugins/sample.c index d1a95c71d..cffd39992 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -48,7 +48,7 @@ void sample_packet0f3(int fd) { ShowInfo("sample_packet0f3: Hello World! received 0xf3 for '%s', redirecting!\n",sd->status.name); /* sample usage of appending data to a socket_data (session[]) entry */ - if( !(data = HPMi->getFromSession(session[fd],HPMi->pid,0)) ) { + if( !(data = getFromSession(session[fd],0)) ) { CREATE(data,struct sample_data_struct,1); data->lastMSGPosition.map = sd->status.last_point.map; @@ -57,17 +57,17 @@ void sample_packet0f3(int fd) { data->someNumber = rand()%777; ShowInfo("Created Appended session[] data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); - HPMi->addToSession(session[fd],data,HPMi->pid,0,true); + addToSession(session[fd],data,0,true); } else { ShowInfo("Existent Appended session[] data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); if( rand()%4 == 2 ) { ShowInfo("Removing Appended session[] data\n"); - HPMi->removeFromSession(session[fd],HPMi->pid,0); + removeFromSession(session[fd],0); } } /* sample usage of appending data to a map_session_data (sd) entry */ - if( !(data = HPMi->getFromMSD(sd,HPMi->pid,0)) ) { + if( !(data = getFromMSD(sd,0)) ) { CREATE(data,struct sample_data_struct,1); data->lastMSGPosition.map = sd->status.last_point.map; @@ -76,12 +76,12 @@ void sample_packet0f3(int fd) { data->someNumber = rand()%777; ShowInfo("Created Appended map_session_data data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); - HPMi->addToMSD(sd,data,HPMi->pid,0,true); + addToMSD(sd,data,0,true); } else { ShowInfo("Existent Appended map_session_data data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); if( rand()%4 == 2 ) { ShowInfo("Removing Appended map_session_data data\n"); - HPMi->removeFromMSD(sd,HPMi->pid,0); + removeFromMSD(sd,0); } } @@ -124,7 +124,7 @@ HPExport void plugin_init (void) { script = GET_SYMBOL("script"); clif = GET_SYMBOL("clif"); pc = GET_SYMBOL("pc"); - + /* session[] */ session = GET_SYMBOL("session"); -- cgit v1.2.3-70-g09d2 From 091e235b78f83bd8c86c84e8b2db5ac9d5da98cd Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 11 Nov 2013 17:56:48 -0200 Subject: Updated db2sql plugin for the needs of the new itemdb May be used as ./map-server --db2sql or by typing "server tools db2sql" within map-server console parse. Special Thanks to Haruna. Signed-off-by: shennetsind --- src/common/HPM.c | 4 +- src/common/sql.c | 3 + src/map/itemdb.c | 123 ++++++++++---------------- src/map/itemdb.h | 3 +- src/map/map.c | 9 +- src/map/map.h | 1 + src/plugins/db2sql.c | 246 +++++++++++++++++++++++++++++++-------------------- 7 files changed, 216 insertions(+), 173 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 81acb3415..1f4d4d532 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -640,7 +640,9 @@ void hplugins_share_defaults(void) { HPM->share(SQL,"SQL"); /* timer */ HPM->share(timer,"timer"); - + /* libconfig (temp) */ + HPM->share(config_setting_lookup_string,"config_setting_lookup_string"); + HPM->share(config_setting_lookup_int,"config_setting_lookup_int"); } void hpm_init(void) { diff --git a/src/common/sql.c b/src/common/sql.c index dc6c4c569..0e06d6d18 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -1005,6 +1005,9 @@ void Sql_HerculesUpdateCheck(Sql* self) { unsigned int performed = 0; StringBuf buf; + if( self == NULL ) + return;/* return silently, build has no mysql connection */ + if( !( ifp = fopen("sql-files/upgrades/index.txt", "r") ) ) { ShowError("SQL upgrade index was not found!\n"); return; diff --git a/src/map/itemdb.c b/src/map/itemdb.c index dff0207c7..f48ed8259 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1826,43 +1826,36 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source) * Reading item from item db * item_db2 overwriting item_db *------------------------------------------*/ -int itemdb_readdb(void) { - const char* filename[] = { - DBPATH"item_db.conf", - "item_db2.conf", - }; +int itemdb_readdb(const char *filename) { bool duplicate[MAX_ITEMDB]; - int fi; config_t item_db_conf; config_setting_t *itdb, *it; + char filepath[256]; + int i = 0, count = 0; + + sprintf(filepath, "%s/%s", map->db_path, filename); + memset(&duplicate,0,sizeof(duplicate)); + if( conf_read_file(&item_db_conf, filepath) || !(itdb = config_setting_get_member(item_db_conf.root, "item_db")) ) { + ShowError("can't read %s\n", filepath); + return 0; + } - for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) { - char filepath[256]; - int i = 0, count = 0; - sprintf(filepath, "%s/%s", map->db_path, filename[fi]); - memset(&duplicate,0,sizeof(duplicate)); - if( conf_read_file(&item_db_conf, filepath) || !(itdb = config_setting_get_member(item_db_conf.root, "item_db")) ) { - ShowError("can't read %s\n", filepath); - continue; - } - - while( (it = config_setting_get_elem(itdb,i++)) ) { - int nameid = itemdb->readdb_libconfig_sub(it, i-1, filename[fi]); + while( (it = config_setting_get_elem(itdb,i++)) ) { + int nameid = itemdb->readdb_libconfig_sub(it, i-1, filename); - if( !nameid ) - continue; + if( !nameid ) + continue; - count++; + count++; - if( duplicate[nameid] ) { - ShowWarning("itemdb_readdb:%s: duplicate entry of ID #%d (%s/%s)\n", - filename[fi], nameid, itemdb_name(nameid), itemdb_jname(nameid)); - } else - duplicate[nameid] = true; - } - config_destroy(&item_db_conf); - ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename[fi]); + if( duplicate[nameid] ) { + ShowWarning("itemdb_readdb:%s: duplicate entry of ID #%d (%s/%s)\n", + filename, nameid, itemdb_name(nameid), itemdb_jname(nameid)); + } else + duplicate[nameid] = true; } + config_destroy(&item_db_conf); + ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename); return 0; } @@ -1956,8 +1949,15 @@ void itemdb_read(bool minimal) { if (map->db_use_sql_item_db) itemdb->read_sqldb(); - else - itemdb->readdb(); + else { + const char* filename[] = { + DBPATH"item_db.conf", + "item_db2.conf", + }; + + for(i = 0; i < ARRAYLENGTH(filename); i++) + itemdb->readdb(filename[i]); + } for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) { if( itemdb->array[i] ) { @@ -2034,18 +2034,13 @@ int itemdb_final_sub(DBKey key, DBData *data, va_list ap) return 0; } - -void itemdb_reload(void) { - struct s_mapiterator* iter; - struct map_session_data* sd; - - int i,d,k; - +void itemdb_clear(bool total) { + int i; // clear the previous itemdb data for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) if( itemdb->array[i] ) itemdb->destroy_item_data(itemdb->array[i], 1); - + for( i = 0; i < itemdb->group_count; i++ ) { if( itemdb->groups[i].nameid ) aFree(itemdb->groups[i].nameid); @@ -2084,12 +2079,24 @@ void itemdb_reload(void) { itemdb->packages = NULL; itemdb->package_count = 0; + if( total ) + return; + itemdb->other->clear(itemdb->other, itemdb->final_sub); memset(itemdb->array, 0, sizeof(itemdb->array)); db_clear(itemdb->names); - + +} +void itemdb_reload(void) { + struct s_mapiterator* iter; + struct map_session_data* sd; + + int i,d,k; + + itemdb->clear(false); + // read new data itemdb->read(false); @@ -2160,41 +2167,8 @@ void itemdb_force_name_constants(void) { dbi_destroy(iter); } void do_final_itemdb(void) { - int i; - - for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) - if( itemdb->array[i] ) - itemdb->destroy_item_data(itemdb->array[i], 1); - - for( i = 0; i < itemdb->group_count; i++ ) { - if( itemdb->groups[i].nameid ) - aFree(itemdb->groups[i].nameid); - } - - if( itemdb->groups ) - aFree(itemdb->groups); - - for( i = 0; i < itemdb->chain_count; i++ ) { - if( itemdb->chains[i].items ) - aFree(itemdb->chains[i].items); - } - - if( itemdb->chains ) - aFree(itemdb->chains); - - for( i = 0; i < itemdb->package_count; i++ ) { - int c; - for( c = 0; c < itemdb->packages[i].random_qty; c++ ) - aFree(itemdb->packages[i].random_groups[c].random_list); - if( itemdb->packages[i].random_groups ) - aFree(itemdb->packages[i].random_groups); - if( itemdb->packages[i].must_items ) - aFree(itemdb->packages[i].must_items); - } + itemdb->clear(true); - if( itemdb->packages ) - aFree(itemdb->packages); - itemdb->other->destroy(itemdb->other, itemdb->final_sub); itemdb->destroy_item_data(&itemdb->dummy, 0); db_destroy(itemdb->names); @@ -2295,4 +2269,5 @@ void itemdb_defaults(void) { itemdb->read = itemdb_read; itemdb->destroy_item_data = destroy_item_data; itemdb->final_sub = itemdb_final_sub; + itemdb->clear = itemdb_clear; } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 870ecce58..533a808bc 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -349,13 +349,14 @@ struct itemdb_interface { int (*validate_entry) (struct item_data *entry, int n, const char *source); int (*readdb_sql_sub) (Sql *handle, int n, const char *source); int (*readdb_libconfig_sub) (config_setting_t *it, int n, const char *source); - int (*readdb) (void); + int (*readdb) (const char *filename); int (*read_sqldb) (void); uint64 (*unique_id) (int8 flag, int64 value); int (*uid_load) (); void (*read) (bool minimal); void (*destroy_item_data) (struct item_data *self, int free_self); int (*final_sub) (DBKey key, DBData *data, va_list ap); + void (*clear) (bool total); }; struct itemdb_interface *itemdb; diff --git a/src/map/map.c b/src/map/map.c index b846d6125..b0ae2f340 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5438,6 +5438,7 @@ int do_init(int argc, char *argv[]) HPM->event(HPET_PRE_INIT); + minimal = map->minimal;/* temp (perhaps make minimal a mask with options of what to load? e.g. plugin 1 does minimal |= mob_db; */ for( i = 1; i < argc ; i++ ) { const char* arg = argv[i]; @@ -5619,12 +5620,17 @@ int do_init(int argc, char *argv[]) duel->init(minimal); vending->init(minimal); - if (minimal) { + if (scriptcheck) { if (npc->parsesrcfile(scriptcheck, false) == 0) exit(EXIT_SUCCESS); exit(EXIT_FAILURE); } + if( minimal ) { + HPM->event(HPET_READY); + exit(EXIT_SUCCESS); + } + npc->event_do_oninit(); // Init npcs (OnInit) if (battle_config.pk_mode) @@ -5659,6 +5665,7 @@ void map_defaults(void) { map = &map_s; /* */ + map->minimal = false; map->count = 0; sprintf(map->db_path ,"db"); diff --git a/src/map/map.h b/src/map/map.h index 4b2671702..4cb00f144 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -800,6 +800,7 @@ struct map_cache_map_info { struct map_interface { /* vars */ + bool minimal; int count; int autosave_interval; diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index d769a601e..c8321f886 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -5,7 +5,9 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/HPMi.h" +#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/conf.h" #include "../config/core.h" #include "../map/clif.h" #include "../map/pc.h" @@ -15,124 +17,176 @@ #include HPExport struct hplugin_info pinfo = { - "DB2SQL", // Plugin name - SERVER_TYPE_MAP,// Which server types this plugin works with? - "0.4", // Plugin version - HPM_VERSION, // HPM Version (don't change, macro is automatically updated) + "DB2SQL", // Plugin name + SERVER_TYPE_MAP, // Which server types this plugin works with? + "0.5", // Plugin version + HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; -SqlStmt* stmt; +struct { + FILE *fp; + struct { + char *p; + unsigned int len; + } buf[4]; + char *db_name; +} tosql; +bool torun = false; -int (*parse_dbrow)(char** str, const char* source, int line, int scriptopt); +int (*itemdb_readdb_libconfig_sub) (config_setting_t *it, int n, const char *source); +int (*h_config_setting_lookup_string) (const config_setting_t *setting, const char *name, const char **value); +int (*h_config_setting_lookup_int) (const config_setting_t *setting, const char *name, int *value); -char* trimbraces(char* str) { - size_t start; - size_t end; - - if( str == NULL ) - return str; - - for( start = 0; str[start] && str[start] == '{'; ++start ) - ; - for( end = strlen(str); start < end && str[end-1] && (str[end-1] == '}' || str[end-1] == '\n'); --end ) - ; - if( start == end ) - *str = '\0'; - else { - str[end] = '\0'; - memmove(str,str+start,end-start+1); - trim(str); +void hstr(const char *str) { + if( strlen(str) > tosql.buf[3].len ) { + tosql.buf[3].len = tosql.buf[3].len + strlen(str) + 1000; + RECREATE(tosql.buf[3].p,char,tosql.buf[3].len); } - return str; + safestrncpy(tosql.buf[3].p,str,strlen(str)); + normalize_name(tosql.buf[3].p,"\t\n"); } -int db2sql(char** str, const char* source, int line, int scriptopt) { +int db2sql(config_setting_t *entry, int n, const char *source) { struct item_data *it = NULL; - unsigned char offset = 0; -#ifdef RENEWAL - if( map->db_use_sql_item_db ) offset = 1; -#endif // RENEWAL - if( (it = itemdb->exists(parse_dbrow(str,source,line,scriptopt))) ) { - /* renewal has the 'matk' and 'equip_level' is now 'equip_level_min', and there is a new 'equip_level_max' field */ -#ifdef RENEWAL - if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`id`,`name_english`,`name_japanese`,`type`,`price_buy`,`price_sell`,`weight`,`atk`,`matk`,`defence`,`range`,`slots`,`equip_jobs`,`equip_upper`,`equip_genders`,`equip_locations`,`weapon_level`,`equip_level_min`,`equip_level_max`,`refineable`,`view`,`script`,`equip_script`,`unequip_script`) VALUES ('%u',?,?,'%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',?,?,?)",map->item_db_re_db, - it->nameid,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11+offset],NULL,0),atoi(str[12+offset]),atoi(str[13+offset]),atoi(str[14+offset]),it->wlv,it->elv,it->elvmax,atoi(str[17+offset]),it->look) ) -#else // not RENEWAL - if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`id`,`name_english`,`name_japanese`,`type`,`price_buy`,`price_sell`,`weight`,`atk`,`defence`,`range`,`slots`,`equip_jobs`,`equip_upper`,`equip_genders`,`equip_locations`,`weapon_level`,`equip_level`,`refineable`,`view`,`script`,`equip_script`,`unequip_script`) VALUES ('%u',?,?,'%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',?,?,?)",map->item_db_db, - it->nameid,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11],NULL,0),atoi(str[12]),atoi(str[13]),atoi(str[14]),it->wlv,it->elv,atoi(str[17]),it->look) ) -#endif // RENEWAL - SqlStmt_ShowDebug(stmt); - else { - if ( SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, it->name, strlen(it->name)) ) - SqlStmt_ShowDebug(stmt); - else { - if ( SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, it->jname, strlen(it->jname)) ) - SqlStmt_ShowDebug(stmt); - else { -#ifdef RENEWAL - if( map->db_use_sql_item_db ) offset += 1; -#endif // RENEWAL - if( it->script ) trimbraces(str[19+offset]); - if ( SQL_SUCCESS != SQL->StmtBindParam(stmt, 2, SQLDT_STRING, it->script?str[19+offset]:"", it->script?strlen(str[19+offset]):0) ) - SqlStmt_ShowDebug(stmt); - else { - if( it->equip_script ) trimbraces(str[20+offset]); - if ( SQL_SUCCESS != SQL->StmtBindParam(stmt, 3, SQLDT_STRING, it->equip_script?str[20+offset]:"", it->equip_script?strlen(str[20+offset]):0) ) - SqlStmt_ShowDebug(stmt); - else { - if( it->unequip_script ) trimbraces(str[21+offset]); - if ( SQL_SUCCESS != SQL->StmtBindParam(stmt, 4, SQLDT_STRING, it->unequip_script?str[21+offset]:"", it->unequip_script?strlen(str[21+offset]):0) ) - SqlStmt_ShowDebug(stmt); - else { - if( SQL_SUCCESS != SQL->StmtExecute(stmt) ) - SqlStmt_ShowDebug(stmt); - } - } - } - } - } - } - return it->nameid; - } - return 0; -} + + if( (it = itemdb->exists(itemdb_readdb_libconfig_sub(entry,n,source))) ) { + char e_name[ITEM_NAME_LENGTH*2+1], e_jname[ITEM_NAME_LENGTH*2+1]; + const char *script = NULL; + char *str; + int i32; + unsigned int ui32, job = 0, upper = 0; + + SQL->EscapeString(NULL, e_name, it->name); + SQL->EscapeString(NULL, e_jname, it->jname); + if( it->script ) { h_config_setting_lookup_string(entry, "Script", &script); hstr(script); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[0].len ) { tosql.buf[0].len = tosql.buf[0].len + strlen(str) + 1000; RECREATE(tosql.buf[0].p,char,tosql.buf[0].len); } SQL->EscapeString(NULL, tosql.buf[0].p, str); } + if( it->equip_script ) { h_config_setting_lookup_string(entry, "OnEquipScript", &script); hstr(script); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[1].len ) { tosql.buf[1].len = tosql.buf[1].len + strlen(str) + 1000; RECREATE(tosql.buf[1].p,char,tosql.buf[1].len); } SQL->EscapeString(NULL, tosql.buf[1].p, str); } + if( it->unequip_script ) { h_config_setting_lookup_string(entry, "OnUnequipScript", &script); hstr(script); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[2].len ) { tosql.buf[2].len = tosql.buf[2].len + strlen(str) + 1000; RECREATE(tosql.buf[2].p,char,tosql.buf[2].len); } SQL->EscapeString(NULL, tosql.buf[2].p, str); } + + if( h_config_setting_lookup_int(entry, "Job", &i32) ) // This is an unsigned value, do not check for >= 0 + ui32 = (unsigned int)i32; + else + ui32 = UINT_MAX; + + job = ui32; + + if( h_config_setting_lookup_int(entry, "Upper", &i32) && i32 >= 0 ) + ui32 = (unsigned int)i32; + else + ui32 = ITEMUPPER_ALL; -CPCMD(db2sql) { + upper = ui32; + + fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%s','%s','%s');\n", + tosql.db_name,it->nameid,e_name,e_jname,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,job,upper,it->sex,it->equip,it->wlv,it->elv,it->elvmax,it->flag.no_refine?0:1,it->look,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:""); + } + return it?it->nameid:0; +} +void totable(void) { + fprintf(tosql.fp,"#\n" + "# Table structure for table `%s`\n" + "#\n" + "\n" + "DROP TABLE IF EXISTS `%s`;\n" + "CREATE TABLE `%s` (\n" + " `id` smallint(5) unsigned NOT NULL DEFAULT '0',\n" + " `name_english` varchar(50) NOT NULL DEFAULT '',\n" + " `name_japanese` varchar(50) NOT NULL DEFAULT '',\n" + " `type` tinyint(2) unsigned NOT NULL DEFAULT '0',\n" + " `price_buy` mediumint(10) DEFAULT NULL,\n" + " `price_sell` mediumint(10) DEFAULT NULL,\n" + " `weight` smallint(5) unsigned DEFAULT NULL,\n" + " `atk` smallint(5) unsigned DEFAULT NULL,\n" + " `matk` smallint(5) unsigned DEFAULT NULL,\n" + " `defence` smallint(5) unsigned DEFAULT NULL,\n" + " `range` tinyint(2) unsigned DEFAULT NULL,\n" + " `slots` tinyint(2) unsigned DEFAULT NULL,\n" + " `equip_jobs` int(12) unsigned DEFAULT NULL,\n" + " `equip_upper` tinyint(8) unsigned DEFAULT NULL,\n" + " `equip_genders` tinyint(2) unsigned DEFAULT NULL,\n" + " `equip_locations` smallint(4) unsigned DEFAULT NULL,\n" + " `weapon_level` tinyint(2) unsigned DEFAULT NULL,\n" + " `equip_level_min` smallint(5) unsigned DEFAULT NULL,\n" + " `equip_level_max` smallint(5) unsigned DEFAULT NULL,\n" + " `refineable` tinyint(1) unsigned DEFAULT NULL,\n" + " `view` smallint(3) unsigned DEFAULT NULL,\n" + " `script` text,\n" + " `equip_script` text,\n" + " `unequip_script` text,\n" + " PRIMARY KEY (`id`)\n" + ") ENGINE=MyISAM;\n" + "\n",tosql.db_name,tosql.db_name,tosql.db_name); +} +void do_db2sql(void) { if( map->db_use_sql_item_db ) { ShowInfo("db2sql: this should not be used with 'db_use_sql_item_db' enabled, skipping...\n"); return; } - stmt = SQL->StmtMalloc(mysql_handle); - if( stmt == NULL ) { - SqlStmt_ShowDebug(stmt); - return; - } - /* link */ - parse_dbrow = itemdb->parse_dbrow; - itemdb->parse_dbrow = db2sql; - /* empty table */ -#ifdef RENEWAL - if ( SQL_ERROR == SQL->Query(mysql_handle, "DELETE FROM `%s`", map->item_db_re_db ) ) -#else // not RENEWAL - if ( SQL_ERROR == SQL->Query(mysql_handle, "DELETE FROM `%s`", map->item_db_db) ) -#endif // RENEWAL - Sql_ShowDebug(mysql_handle); - else { - itemdb->reload(); - } + itemdb_readdb_libconfig_sub = itemdb->readdb_libconfig_sub; + itemdb->readdb_libconfig_sub = db2sql; + /* */ + + if ((tosql.fp = fopen("sql-files/item_db_re.sql", "wt+")) == NULL) { + ShowError("itemdb_tosql: File not found \"%s\".\n", "sql-files/item_db_re.sql"); + return; + } + + tosql.db_name = map->item_db_re_db; + totable(); + + memset(&tosql.buf, 0, sizeof(tosql.buf) ); + + itemdb->clear(false); + itemdb->readdb("re/item_db.conf"); + + fclose(tosql.fp); + + if ((tosql.fp = fopen("sql-files/item_db.sql", "wt+")) == NULL) { + ShowError("itemdb_tosql: File not found \"%s\".\n", "sql-files/item_db.sql"); + return; + } + + tosql.db_name = map->item_db_db; + totable(); + + itemdb->clear(false); + itemdb->readdb("pre-re/item_db.conf"); + + fclose(tosql.fp); + /* unlink */ - itemdb->parse_dbrow = parse_dbrow; + itemdb->readdb_libconfig_sub = itemdb_readdb_libconfig_sub; - SQL->StmtFree(stmt); + if( tosql.buf[0].p ) aFree(tosql.buf[0].p); + if( tosql.buf[1].p ) aFree(tosql.buf[1].p); + if( tosql.buf[2].p ) aFree(tosql.buf[2].p); + if( tosql.buf[3].p ) aFree(tosql.buf[3].p); } - -HPExport void plugin_init (void) { +CPCMD(db2sql) { + do_db2sql(); +} +void db2sql_arg(char *param) { + torun = true; +} +HPExport void server_preinit (void) { + h_config_setting_lookup_string = GET_SYMBOL("config_setting_lookup_string"); + h_config_setting_lookup_int = GET_SYMBOL("config_setting_lookup_int"); + SQL = GET_SYMBOL("SQL"); itemdb = GET_SYMBOL("itemdb"); map = GET_SYMBOL("map"); strlib = GET_SYMBOL("strlib"); + iMalloc = GET_SYMBOL("iMalloc"); + addArg("--db2sql",false,db2sql_arg,NULL); + + map->minimal = true; +} +HPExport void plugin_init (void) { HPMi->addCPCommand("server:tools:db2sql",CPCMD_A(db2sql)); } +HPExport void server_online (void) { + if( torun ) + do_db2sql(); +} -- cgit v1.2.3-70-g09d2 From 12dce46d611d6ea7c772174ebbd555fa10fead99 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 18 Nov 2013 08:53:22 +0100 Subject: Sanitized and improved several macros through the code - Sanitized all potentially unsafe macros (related eA:15259) - Improved some function-like macros to evaluate their argument only once and keep it in a temporary variable. This improves performance in the damage calculation related code. Signed-off-by: Haru --- src/char/char.c | 2 +- src/char/char.h | 2 +- src/char/inter.h | 9 ++-- src/common/HPM.c | 1 + src/common/HPM.h | 24 +++++------ src/common/HPMi.h | 32 +++++++------- src/common/cbasetypes.h | 10 +++-- src/common/console.c | 4 ++ src/common/core.c | 2 +- src/common/db.c | 2 +- src/common/db.h | 12 +++--- src/common/ers.h | 10 ++--- src/common/grfio.h | 2 +- src/common/malloc.c | 64 ++++++++++++++-------------- src/common/malloc.h | 16 +++---- src/common/mapindex.h | 2 +- src/common/mempool.c | 10 ++--- src/common/mmo.h | 2 +- src/common/netbuffer.h | 10 ++--- src/common/network.c | 2 +- src/common/raconf.c | 29 ++++++------- src/common/showmsg.c | 111 +++++++++++++++++++----------------------------- src/common/socket.c | 26 ++++++------ src/common/socket.h | 21 ++++----- src/common/spinlock.h | 4 +- src/common/sql.h | 14 ++---- src/common/strlib.h | 32 +++++++------- src/common/timer.h | 2 +- src/common/utils.h | 2 +- src/config/const.h | 7 --- src/login/login.h | 4 +- src/map/atcommand.c | 69 ++++++++++++++---------------- src/map/battle.c | 50 ++++++++++++++-------- src/map/battle.h | 14 +++--- src/map/chrif.c | 2 +- src/map/clif.c | 4 +- src/map/clif.h | 2 +- src/map/elemental.h | 4 +- src/map/homunculus.h | 2 +- src/map/intif.c | 2 +- src/map/intif.h | 6 +-- src/map/itemdb.h | 75 ++++++++++++++++---------------- src/map/map.c | 4 +- src/map/map.h | 18 ++++---- src/map/mob.c | 2 +- src/map/mob.h | 7 +-- src/map/path.h | 12 +++--- src/map/pc.h | 30 ++++++------- src/map/pet.h | 4 +- src/map/script.c | 15 ++++--- src/map/script.h | 37 ++++++++-------- src/map/skill.c | 36 ++++++++-------- src/map/status.c | 32 ++++++++------ src/map/status.h | 106 ++++++++++++++++++++++----------------------- 54 files changed, 495 insertions(+), 508 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index f1b95474e..a1c6f73b1 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3933,7 +3933,7 @@ int parse_char(int fd) while( RFIFOREST(fd) >= 2 ) { //For use in packets that depend on an sd being present [Skotlex] - #define FIFOSD_CHECK(rest) { if(RFIFOREST(fd) < rest) return 0; if (sd==NULL || !sd->auth) { RFIFOSKIP(fd,rest); return 0; } } + #define FIFOSD_CHECK(rest) do { if(RFIFOREST(fd) < (rest)) return 0; if (sd==NULL || !sd->auth) { RFIFOSKIP(fd,(rest)); return 0; } } while (0) if( HPM->packetsc[hpParse_Char] ) { if( (i = HPM->parse_packets(fd,hpParse_Char)) ) { diff --git a/src/char/char.h b/src/char/char.h index c7a387645..c6aa1b66d 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -48,7 +48,7 @@ DBMap* online_char_db; // int account_id -> struct online_char_data* #define MAX_MAP_SERVERS 2 -#define DEFAULT_AUTOSAVE_INTERVAL 300*1000 +#define DEFAULT_AUTOSAVE_INTERVAL (300*1000) enum { TABLE_INVENTORY, diff --git a/src/char/inter.h b/src/char/inter.h index 88501c9a0..9b958dc72 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -30,13 +30,12 @@ int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type uint64 inter_chk_lastuid(int8 flag, uint64 value); #ifdef NSI_UNIQUE_ID - #define updateLastUid(val_) inter_chk_lastuid(1, val_) - #define dbUpdateUid(handler_)\ - { \ + #define updateLastUid(val_) inter_chk_lastuid(1, (val_)) + #define dbUpdateUid(handler_) do { \ uint64 unique_id_ = inter_chk_lastuid(0, 0); \ - if (unique_id_ && SQL_ERROR == SQL->Query(handler_, "UPDATE `%s` SET `value`='%"PRIu64"' WHERE `varname`='unique_id'", interreg_db, unique_id_)) \ + if (unique_id_ && SQL_ERROR == SQL->Query((handler_), "UPDATE `%s` SET `value`='%"PRIu64"' WHERE `varname`='unique_id'", interreg_db, unique_id_)) \ Sql_ShowDebug(handler_);\ - } + } while(0) #else #define dbUpdateUid(handler_) #define updateLastUid(val_) diff --git a/src/common/HPM.c b/src/common/HPM.c index 1f4d4d532..641ffe2e6 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -108,6 +108,7 @@ bool hplugin_populate(struct hplugin *plugin, const char *filename) { return true; } +#undef HPM_POP struct hplugin *hplugin_load(const char* filename) { struct hplugin *plugin; struct hplugin_info *info; diff --git a/src/common/HPM.h b/src/common/HPM.h index 9a6bda713..5466693ab 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -12,29 +12,29 @@ #define WIN32_LEAN_AND_MEAN #endif #include - #define plugin_open(x) LoadLibraryA(x) - #define plugin_import(x,y,z) (z)GetProcAddress(x,y) - #define plugin_close(x) FreeLibrary(x) + #define plugin_open(x) LoadLibraryA(x) + #define plugin_import(x,y,z) (z)GetProcAddress((x),(y)) + #define plugin_close(x) FreeLibrary(x) - #define DLL_EXT ".dll" - #define DLL HINSTANCE + #define DLL_EXT ".dll" + #define DLL HINSTANCE #else // ! WIN32 #include #ifdef RTLD_DEEPBIND // Certain linux ditributions require this, but it's not available everywhere - #define plugin_open(x) dlopen(x,RTLD_NOW|RTLD_DEEPBIND) + #define plugin_open(x) dlopen((x),RTLD_NOW|RTLD_DEEPBIND) #else // ! RTLD_DEEPBIND - #define plugin_open(x) dlopen(x,RTLD_NOW) + #define plugin_open(x) dlopen((x),RTLD_NOW) #endif // RTLD_DEEPBIND - #define plugin_import(x,y,z) (z)dlsym(x,y) - #define plugin_close(x) dlclose(x) + #define plugin_import(x,y,z) (z)dlsym((x),(y)) + #define plugin_close(x) dlclose(x) #ifdef CYGWIN - #define DLL_EXT ".dll" + #define DLL_EXT ".dll" #else - #define DLL_EXT ".so" + #define DLL_EXT ".so" #endif - #define DLL void * + #define DLL void * #include // size_t diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 940782dce..7637dc832 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -47,9 +47,9 @@ struct hplugin_info { HPExport void *(*import_symbol) (char *name, unsigned int pID); HPExport Sql *mysql_handle; -#define GET_SYMBOL(n) import_symbol(n,HPMi->pid) +#define GET_SYMBOL(n) import_symbol((n),HPMi->pid) -#define SERVER_TYPE_ALL SERVER_TYPE_LOGIN|SERVER_TYPE_CHAR|SERVER_TYPE_MAP +#define SERVER_TYPE_ALL (SERVER_TYPE_LOGIN|SERVER_TYPE_CHAR|SERVER_TYPE_MAP) enum hp_event_types { HPET_INIT,/* server starts */ @@ -83,27 +83,27 @@ enum HPluginDataTypes { HPDT_NPCD, }; -#define addHookPre(tname,hook) HPMi->AddHook(HOOK_TYPE_PRE,tname,hook,HPMi->pid) -#define addHookPost(tname,hook) HPMi->AddHook(HOOK_TYPE_POST,tname,hook,HPMi->pid) +#define addHookPre(tname,hook) (HPMi->AddHook(HOOK_TYPE_PRE,(tname),(hook),HPMi->pid)) +#define addHookPost(tname,hook) (HPMi->AddHook(HOOK_TYPE_POST,(tname),(hook),HPMi->pid)) /* need better names ;/ */ /* will not run the original function after pre-hook processing is complete (other hooks will run) */ -#define hookStop() HPMi->HookStop(__func__,HPMi->pid) -#define hookStopped() HPMi->HookStopped() +#define hookStop() (HPMi->HookStop(__func__,HPMi->pid)) +#define hookStopped() (HPMi->HookStopped()) -#define addArg(name,param,func,help) HPMi->addArg(HPMi->pid,name,param,func,help) +#define addArg(name,param,func,help) (HPMi->addArg(HPMi->pid,(name),(param),(func),(help))) /* HPData handy redirects */ /* session[] */ -#define addToSession(ptr,data,index,autofree) HPMi->addToHPData(HPDT_SESSION,HPMi->pid,ptr,data,index,autofree) -#define getFromSession(ptr,index) HPMi->getFromHPData(HPDT_SESSION,HPMi->pid,ptr,index) -#define removeFromSession(ptr,index) HPMi->removeFromHPData(HPDT_SESSION,HPMi->pid,ptr,index) +#define addToSession(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_SESSION,HPMi->pid,(ptr),(data),(index),(autofree))) +#define getFromSession(ptr,index) (HPMi->getFromHPData(HPDT_SESSION,HPMi->pid,(ptr),(index))) +#define removeFromSession(ptr,index) (HPMi->removeFromHPData(HPDT_SESSION,HPMi->pid,(ptr),(index))) /* map_session_data */ -#define addToMSD(ptr,data,index,autofree) HPMi->addToHPData(HPDT_MSD,HPMi->pid,ptr,data,index,autofree) -#define getFromMSD(ptr,index) HPMi->getFromHPData(HPDT_MSD,HPMi->pid,ptr,index) -#define removeFromMSD(ptr,index) HPMi->removeFromHPData(HPDT_MSD,HPMi->pid,ptr,index) +#define addToMSD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_MSD,HPMi->pid,(ptr),(data),(index),(autofree))) +#define getFromMSD(ptr,index) (HPMi->getFromHPData(HPDT_MSD,HPMi->pid,(ptr),(index))) +#define removeFromMSD(ptr,index) (HPMi->removeFromHPData(HPDT_MSD,HPMi->pid,(ptr),(index))) /* npc_data */ -#define addToNPCD(ptr,data,index,autofree) HPMi->addToHPData(HPDT_NPCD,HPMi->pid,ptr,data,index,autofree) -#define getFromNPCD(ptr,index) HPMi->getFromHPData(HPDT_NPCD,HPMi->pid,ptr,index) -#define removeFromNPCD(ptr,index) HPMi->removeFromHPData(HPDT_NPCD,HPMi->pid,ptr,index) +#define addToNPCD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_NPCD,HPMi->pid,(ptr),(data),(index),(autofree))) +#define getFromNPCD(ptr,index) (HPMi->getFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index))) +#define removeFromNPCD(ptr,index) (HPMi->removeFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index))) /* Hercules Plugin Mananger Include Interface */ HPExport struct HPMi_interface { diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index d2a0a5dd9..6de2ace01 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -293,7 +293,9 @@ typedef char bool; // if using macros then something that is type independent //#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b))) // Avoid "value computed is not used" warning and generates the same assembly code -#define swap(a,b) if (a != b) ((a ^= b), (b ^= a), (a ^= b)) +//#define swap(a,b) if (a != b) ((a ^= b), (b ^= a), (a ^= b)) +// but is vulnerable to 'if (foo) swap(bar, baz); else quux();', causing the else to nest incorrectly. +#define swap(a,b) do { if ((a) != (b)) { (a) ^= (b); (b) ^= (a); (a) ^= (b); } } while(0) #if 0 //to be activated soon, more tests needed on how VS works with the macro above #ifdef WIN32 #undef swap @@ -313,7 +315,7 @@ typedef char bool; #endif #endif -#define swap_ptr(a,b) if ((a) != (b)) ((a) = (void*)((intptr_t)(a) ^ (intptr_t)(b)), (b) = (void*)((intptr_t)(a) ^ (intptr_t)(b)), (a) = (void*)((intptr_t)(a) ^ (intptr_t)(b))) +#define swap_ptr(a,b) do { if ((a) != (b)) (a) = (void*)((intptr_t)(a) ^ (intptr_t)(b)); (b) = (void*)((intptr_t)(a) ^ (intptr_t)(b)); (a) = (void*)((intptr_t)(a) ^ (intptr_t)(b)); } while(0) #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) @@ -429,8 +431,8 @@ void SET_FUNCPOINTER(T1& var, T2 p) var = tmp.out; } #else -#define SET_POINTER(var,p) (var) = (p) -#define SET_FUNCPOINTER(var,p) (var) = (p) +#define SET_POINTER(var,p) ((var) = (p)) +#define SET_FUNCPOINTER(var,p) ((var) = (p)) #endif diff --git a/src/common/console.c b/src/common/console.c index cb8ed5917..94824dc25 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -175,6 +175,10 @@ void console_load_defaults(void) { } } } +#undef CP_DEF_C +#undef CP_DEF_C2 +#undef CP_DEF_S +#undef CP_DEF void console_parse_create(char *name, CParseFunc func) { unsigned int i; char *tok; diff --git a/src/common/core.c b/src/common/core.c index a414a5d0b..dd839b372 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -53,7 +53,7 @@ char *SERVER_NAME = NULL; #endif #ifndef POSIX -#define compat_signal(signo, func) signal(signo, func) +#define compat_signal(signo, func) signal((signo), (func)) #else sigfunc *compat_signal(int signo, sigfunc *func) { struct sigaction sact, oact; diff --git a/src/common/db.c b/src/common/db.c index b3a58e0a4..c3ca7e0a4 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -315,7 +315,7 @@ static struct db_stats { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -#define DB_COUNTSTAT(token) if (stats. ## token != UINT32_MAX) ++stats. ## token +#define DB_COUNTSTAT(token) do { if (stats. ## token != UINT32_MAX) ++stats. ## token ; } while(0) #else /* !defined(DB_ENABLE_STATS) */ #define DB_COUNTSTAT(token) #endif /* !defined(DB_ENABLE_STATS) */ diff --git a/src/common/db.h b/src/common/db.h index dffd2356d..b9d6af382 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -659,14 +659,14 @@ struct DBMap { #define stridb_alloc(opt,maxlen) DB->alloc(__FILE__,__func__,__LINE__,DB_ISTRING,(opt),(maxlen)) #define db_destroy(db) ( (db)->destroy((db),NULL) ) // Other macros -#define db_clear(db) ( (db)->clear(db,NULL) ) +#define db_clear(db) ( (db)->clear((db),NULL) ) #define db_size(db) ( (db)->size(db) ) #define db_iterator(db) ( (db)->iterator(db) ) -#define dbi_first(dbi) ( DB->data2ptr((dbi)->first(dbi,NULL)) ) -#define dbi_last(dbi) ( DB->data2ptr((dbi)->last(dbi,NULL)) ) -#define dbi_next(dbi) ( DB->data2ptr((dbi)->next(dbi,NULL)) ) -#define dbi_prev(dbi) ( DB->data2ptr((dbi)->prev(dbi,NULL)) ) -#define dbi_remove(dbi) ( (dbi)->remove(dbi,NULL) ) +#define dbi_first(dbi) ( DB->data2ptr((dbi)->first((dbi),NULL)) ) +#define dbi_last(dbi) ( DB->data2ptr((dbi)->last((dbi),NULL)) ) +#define dbi_next(dbi) ( DB->data2ptr((dbi)->next((dbi),NULL)) ) +#define dbi_prev(dbi) ( DB->data2ptr((dbi)->prev((dbi),NULL)) ) +#define dbi_remove(dbi) ( (dbi)->remove((dbi),NULL) ) #define dbi_exists(dbi) ( (dbi)->exists(dbi) ) #define dbi_destroy(dbi) ( (dbi)->destroy(dbi) ) diff --git a/src/common/ers.h b/src/common/ers.h index 51701d778..4ff2a6230 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -137,11 +137,11 @@ typedef struct eri { #else /* not DISABLE_ERS */ // These defines should be used to allow the code to keep working whenever // the system is disabled -# define ers_alloc(obj,type) (type *)(obj)->alloc(obj) -# define ers_free(obj,entry) (obj)->free((obj),(entry)) -# define ers_entry_size(obj) (obj)->entry_size(obj) -# define ers_destroy(obj) (obj)->destroy(obj) -# define ers_chunk_size(obj,size) (obj)->chunk_size(obj,size) +# define ers_alloc(obj,type) ((type *)(obj)->alloc(obj)) +# define ers_free(obj,entry) ((obj)->free((obj),(entry))) +# define ers_entry_size(obj) ((obj)->entry_size(obj)) +# define ers_destroy(obj) ((obj)->destroy(obj)) +# define ers_chunk_size(obj,size) ((obj)->chunk_size((obj),(size))) /** * Get a new instance of the manager that handles the specified entry size. diff --git a/src/common/grfio.h b/src/common/grfio.h index c5a56a14e..a88b20393 100644 --- a/src/common/grfio.h +++ b/src/common/grfio.h @@ -8,7 +8,7 @@ void grfio_init(const char* fname); void grfio_final(void); void* grfio_reads(const char* fname, int* size); char* grfio_find_file(const char* fname); -#define grfio_read(fn) grfio_reads(fn, NULL) +#define grfio_read(fn) grfio_reads((fn), NULL) unsigned long grfio_crc32(const unsigned char *buf, unsigned int len); int decode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen); diff --git a/src/common/malloc.c b/src/common/malloc.c index 4d2c93b77..1cb7836ab 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -19,28 +19,28 @@ struct malloc_interface iMalloc_s; # include # include "memwatch.h" -# define MALLOC(n,file,line,func) mwMalloc((n),(file),(line)) -# define CALLOC(m,n,file,line,func) mwCalloc((m),(n),(file),(line)) -# define REALLOC(p,n,file,line,func) mwRealloc((p),(n),(file),(line)) -# define STRDUP(p,file,line,func) mwStrdup((p),(file),(line)) -# define FREE(p,file,line,func) mwFree((p),(file),(line)) -# define MEMORY_USAGE() 0 -# define MEMORY_VERIFY(ptr) mwIsSafeAddr(ptr, 1) -# define MEMORY_CHECK() CHECK() +# define MALLOC(n,file,line,func) mwMalloc((n),(file),(line)) +# define CALLOC(m,n,file,line,func) mwCalloc((m),(n),(file),(line)) +# define REALLOC(p,n,file,line,func) mwRealloc((p),(n),(file),(line)) +# define STRDUP(p,file,line,func) mwStrdup((p),(file),(line)) +# define FREE(p,file,line,func) mwFree((p),(file),(line)) +# define MEMORY_USAGE() (size_t)0 +# define MEMORY_VERIFY(ptr) mwIsSafeAddr((ptr), 1) +# define MEMORY_CHECK() CHECK() #elif defined(DMALLOC) # include # include # include "dmalloc.h" -# define MALLOC(n,file,line,func) dmalloc_malloc((file),(line),(n),DMALLOC_FUNC_MALLOC,0,0) -# define CALLOC(m,n,file,line,func) dmalloc_malloc((file),(line),(m)*(n),DMALLOC_FUNC_CALLOC,0,0) -# define REALLOC(p,n,file,line,func) dmalloc_realloc((file),(line),(p),(n),DMALLOC_FUNC_REALLOC,0) -# define STRDUP(p,file,line,func) strdup(p) -# define FREE(p,file,line,func) free(p) -# define MEMORY_USAGE() dmalloc_memory_allocated() -# define MEMORY_VERIFY(ptr) (dmalloc_verify(ptr) == DMALLOC_VERIFY_NOERROR) -# define MEMORY_CHECK() dmalloc_log_stats(); dmalloc_log_unfreed() +# define MALLOC(n,file,line,func) dmalloc_malloc((file),(line),(n),DMALLOC_FUNC_MALLOC,0,0) +# define CALLOC(m,n,file,line,func) dmalloc_malloc((file),(line),(m)*(n),DMALLOC_FUNC_CALLOC,0,0) +# define REALLOC(p,n,file,line,func) dmalloc_realloc((file),(line),(p),(n),DMALLOC_FUNC_REALLOC,0) +# define STRDUP(p,file,line,func) strdup(p) +# define FREE(p,file,line,func) free(p) +# define MEMORY_USAGE() dmalloc_memory_allocated() +# define MEMORY_VERIFY(ptr) (dmalloc_verify(ptr) == DMALLOC_VERIFY_NOERROR) +# define MEMORY_CHECK() do { dmalloc_log_stats(); dmalloc_log_unfreed() } while(0) #elif defined(GCOLLECT) @@ -50,24 +50,26 @@ struct malloc_interface iMalloc_s; # else # define RETURN_ADDR # endif -# define MALLOC(n,file,line,func) GC_debug_malloc((n), RETURN_ADDR (file),(line)) -# define CALLOC(m,n,file,line,func) GC_debug_malloc((m)*(n), RETURN_ADDR (file),(line)) -# define REALLOC(p,n,file,line,func) GC_debug_realloc((p),(n), RETURN_ADDR (file),(line)) -# define STRDUP(p,file,line,func) GC_debug_strdup((p), RETURN_ADDR (file),(line)) -# define FREE(p,file,line,func) GC_debug_free(p) -# define MEMORY_USAGE() GC_get_heap_size() -# define MEMORY_VERIFY(ptr) (GC_base(ptr) != NULL) -# define MEMORY_CHECK() GC_gcollect() +# define MALLOC(n,file,line,func) GC_debug_malloc((n), RETURN_ADDR (file),(line)) +# define CALLOC(m,n,file,line,func) GC_debug_malloc((m)*(n), RETURN_ADDR (file),(line)) +# define REALLOC(p,n,file,line,func) GC_debug_realloc((p),(n), RETURN_ADDR (file),(line)) +# define STRDUP(p,file,line,func) GC_debug_strdup((p), RETURN_ADDR (file),(line)) +# define FREE(p,file,line,func) GC_debug_free(p) +# define MEMORY_USAGE() GC_get_heap_size() +# define MEMORY_VERIFY(ptr) (GC_base(ptr) != NULL) +# define MEMORY_CHECK() GC_gcollect() + +# undef RETURN_ADDR #else -# define MALLOC(n,file,line,func) malloc(n) -# define CALLOC(m,n,file,line,func) calloc((m),(n)) -# define REALLOC(p,n,file,line,func) realloc((p),(n)) -# define STRDUP(p,file,line,func) strdup(p) -# define FREE(p,file,line,func) free(p) -# define MEMORY_USAGE() 0 -# define MEMORY_VERIFY(ptr) true +# define MALLOC(n,file,line,func) malloc(n) +# define CALLOC(m,n,file,line,func) calloc((m),(n)) +# define REALLOC(p,n,file,line,func) realloc((p),(n)) +# define STRDUP(p,file,line,func) strdup(p) +# define FREE(p,file,line,func) free(p) +# define MEMORY_USAGE() (size_t)0 +# define MEMORY_VERIFY(ptr) true # define MEMORY_CHECK() #endif diff --git a/src/common/malloc.h b/src/common/malloc.h index bc8aa9a20..cd0ef238b 100644 --- a/src/common/malloc.h +++ b/src/common/malloc.h @@ -30,11 +30,11 @@ #undef LOG_MEMMGR #endif -# define aMalloc(n) iMalloc->malloc (n,ALC_MARK) -# define aCalloc(m,n) iMalloc->calloc (m,n,ALC_MARK) -# define aRealloc(p,n) iMalloc->realloc (p,n,ALC_MARK) -# define aStrdup(p) iMalloc->astrdup (p,ALC_MARK) -# define aFree(p) iMalloc->free (p,ALC_MARK) +# define aMalloc(n) (iMalloc->malloc((n),ALC_MARK)) +# define aCalloc(m,n) (iMalloc->calloc((m),(n),ALC_MARK)) +# define aRealloc(p,n) (iMalloc->realloc((p),(n),ALC_MARK)) +# define aStrdup(p) (iMalloc->astrdup((p),ALC_MARK)) +# define aFree(p) (iMalloc->free((p),ALC_MARK)) /////////////// Buffer Creation ///////////////// // Full credit for this goes to Shinomori [Ajarn] @@ -46,15 +46,15 @@ #else // others don't, so we emulate them -#define CREATE_BUFFER(name, type, size) type *name = (type *) aCalloc (size, sizeof(type)) +#define CREATE_BUFFER(name, type, size) type *name = (type *) aCalloc((size), sizeof(type)) #define DELETE_BUFFER(name) aFree(name) #endif ////////////// Others ////////////////////////// // should be merged with any of above later -#define CREATE(result, type, number) (result) = (type *) aCalloc ((number), sizeof(type)) -#define RECREATE(result, type, number) (result) = (type *) aRealloc ((result), sizeof(type) * (number)) +#define CREATE(result, type, number) ((result) = (type *) aCalloc((number), sizeof(type))) +#define RECREATE(result, type, number) ((result) = (type *) aRealloc((result), sizeof(type) * (number))) //////////////////////////////////////////////// diff --git a/src/common/mapindex.h b/src/common/mapindex.h index 646f73f18..cf5486808 100644 --- a/src/common/mapindex.h +++ b/src/common/mapindex.h @@ -60,7 +60,7 @@ bool mapindex_exists(int id); const char* mapindex_getmapname(const char* string, char* output); const char* mapindex_getmapname_ext(const char* string, char* output); unsigned short mapindex_name2id(const char*); -#define mapindex_id2name(n) mapindex_id2name_sub(n,__FILE__, __LINE__, __func__) +#define mapindex_id2name(n) mapindex_id2name_sub((n),__FILE__, __LINE__, __func__) const char* mapindex_id2name_sub(unsigned short,const char *file, int line, const char *func); int mapindex_init(void); void mapindex_final(void); diff --git a/src/common/mempool.c b/src/common/mempool.c index 5eccbf178..4559d8f2a 100644 --- a/src/common/mempool.c +++ b/src/common/mempool.c @@ -30,16 +30,16 @@ #include "../common/malloc.h" #include "../common/mutex.h" -#define ALIGN16 ra_align(16) -#define ALIGN_TO(x, a) (x + ( a - ( x % a) ) ) -#define ALIGN_TO_16(x) ALIGN_TO(x, 16) +#define ALIGN16 ra_align(16) +#define ALIGN_TO(x, a) ((x) + ( (a) - ( (x) % (a)) ) ) +#define ALIGN_TO_16(x) ALIGN_TO((x), 16) #undef MEMPOOL_DEBUG #define MEMPOOLASSERT -#define NODE_TO_DATA(x) ( ((char*)x) + sizeof(struct node) ) -#define DATA_TO_NODE(x) ( (struct node*)(((char*)x) - sizeof(struct node)) ) +#define NODE_TO_DATA(x) ( ((char*)(x)) + sizeof(struct node) ) +#define DATA_TO_NODE(x) ( (struct node*)(((char*)(x)) - sizeof(struct node)) ) struct ra_align(16) node{ void *next; void *segment; diff --git a/src/common/mmo.h b/src/common/mmo.h index 309203aa8..5816b467c 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -112,7 +112,7 @@ #define MAX_STORAGE 600 #define MAX_GUILD_STORAGE 600 #define MAX_PARTY 12 -#define MAX_GUILD 16+10*6 // Increased max guild members +6 per 1 extension levels [Lupus] +#define MAX_GUILD (16+10*6) // Increased max guild members +6 per 1 extension levels [Lupus] #define MAX_GUILDPOSITION 20 // Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW] #define MAX_GUILDEXPULSION 32 #define MAX_GUILDALLIANCE 16 diff --git a/src/common/netbuffer.h b/src/common/netbuffer.h index 844241226..6ddecfdd9 100644 --- a/src/common/netbuffer.h +++ b/src/common/netbuffer.h @@ -73,11 +73,9 @@ void netbuffer_incref( netbuf buf ); // Some Useful macros -#define NBUFP(netbuf,pos) (((uint8*)(netbuf->buf)) + (pos)) -#define NBUFB(netbuf,pos) (*(uint8*)((netbuf->buf) + (pos))) -#define NBUFW(netbuf,pos) (*(uint16*)((netbuf->buf) + (pos))) -#define NBUFL(netbuf,pos) (*(uint32*)((netbuf->buf) + (pos))) - - +#define NBUFP(netbuf,pos) (((uint8*)((netbuf)->buf)) + (pos)) +#define NBUFB(netbuf,pos) (*(uint8*)(((netbuf)->buf) + (pos))) +#define NBUFW(netbuf,pos) (*(uint16*)(((netbuf)->buf) + (pos))) +#define NBUFL(netbuf,pos) (*(uint32*)(((netbuf)->buf) + (pos))) #endif diff --git a/src/common/network.c b/src/common/network.c index 1f1621363..a40cbd602 100644 --- a/src/common/network.c +++ b/src/common/network.c @@ -50,7 +50,7 @@ SESSION g_Session[MAXCONN]; static bool onSend(int32 fd); -#define _network_free_netbuf_async( buf ) add_timer( 0, _network_async_free_netbuf_proc, 0, (intptr_t) buf) +#define _network_free_netbuf_async( buf ) add_timer( 0, _network_async_free_netbuf_proc, 0, (intptr_t)(buf)) static int _network_async_free_netbuf_proc(int tid, unsigned int tick, int id, intptr_t data){ // netbuf is in data netbuffer_put( (netbuf)data ); diff --git a/src/common/raconf.c b/src/common/raconf.c index f7d1284b7..abeed444b 100644 --- a/src/common/raconf.c +++ b/src/common/raconf.c @@ -382,21 +382,20 @@ static bool configParse(raconf inst, const char *fileName){ }//end: configParse() -#define MAKEKEY(dest, section, key) { size_t section_len, key_len; \ - if(section == NULL || *section == '\0'){ \ - strncpy(dest, "", 9); \ - section_len = 9; \ - }else{ \ - section_len = strlen(section); \ - strncpy(dest, section, section_len); \ - } \ - \ - dest[section_len] = '.'; \ - \ - key_len = strlen(key); \ - strncpy(&dest[section_len+1], key, key_len); \ - dest[section_len + key_len + 1] = '\0'; \ - } +#define MAKEKEY(dest, section, key) do { \ + size_t section_len_, key_len_; \ + if((section) == NULL || *(section) == '\0'){ \ + strncpy((dest), "", 9); \ + section_len_ = 9; \ + } else { \ + section_len_ = strlen(section); \ + strncpy((dest), (section), section_len_); \ + } \ + (dest)[section_len_] = '.'; \ + key_len_ = strlen(key); \ + strncpy(&(dest)[section_len_+1], (key), key_len_); \ + (dest)[section_len_ + key_len_ + 1] = '\0'; \ +} while(0) raconf raconf_parse(const char *file_name){ diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 9e0f63003..14342fe5e 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -16,33 +16,17 @@ #include "../../3rdparty/libconfig/libconfig.h" #ifdef WIN32 - #include "../common/winapi.h" - - #ifdef DEBUGLOGMAP - #define DEBUGLOGPATH "log\\map-server.log" - #else - #ifdef DEBUGLOGCHAR - #define DEBUGLOGPATH "log\\char-server.log" - #else - #ifdef DEBUGLOGLOGIN - #define DEBUGLOGPATH "log\\login-server.log" - #endif - #endif - #endif -#else - #include - - #ifdef DEBUGLOGMAP - #define DEBUGLOGPATH "log/map-server.log" - #else - #ifdef DEBUGLOGCHAR - #define DEBUGLOGPATH "log/char-server.log" - #else - #ifdef DEBUGLOGLOGIN - #define DEBUGLOGPATH "log/login-server.log" - #endif - #endif - #endif +#include "../common/winapi.h" +#else // not WIN32 +#include +#endif // WIN32 + +#if defined(DEBUGLOGMAP) +#define DEBUGLOGPATH "log"PATHSEP_STR"map-server.log" +#elif defined(DEBUGLOGCHAR) +#define DEBUGLOGPATH "log"PATHSEP_STR"char-server.log" +#elif defined(DEBUGLOGLOGIN) +#define DEBUGLOGPATH "log"PATHSEP_STR"login-server.log" #endif /////////////////////////////////////////////////////////////////////////////// @@ -61,41 +45,40 @@ int console_msg_log = 0;//[Ind] msg error logging #define SBUF_SIZE 2054 // never put less that what's required for the debug message -#define NEWBUF(buf) \ - struct { \ - char s_[SBUF_SIZE]; \ - StringBuf *d_; \ - char *v_; \ - int l_; \ - } buf ={"",NULL,NULL,0}; \ +#define NEWBUF(buf) \ + struct { \ + char s_[SBUF_SIZE]; \ + StringBuf *d_; \ + char *v_; \ + int l_; \ + } buf ={"",NULL,NULL,0}; \ //define NEWBUF -#define BUFVPRINTF(buf,fmt,args) \ - buf.l_ = vsnprintf(buf.s_, SBUF_SIZE, fmt, args); \ - if( buf.l_ >= 0 && buf.l_ < SBUF_SIZE ) \ - {/* static buffer */ \ - buf.v_ = buf.s_; \ - } \ - else \ - {/* dynamic buffer */ \ - buf.d_ = StrBuf->Malloc(); \ - buf.l_ = StrBuf->Vprintf(buf.d_, fmt, args); \ - buf.v_ = StrBuf->Value(buf.d_); \ - ShowDebug("showmsg: dynamic buffer used, increase the static buffer size to %d or more.\n", buf.l_+1);\ - } \ -//define BUFVPRINTF - -#define BUFVAL(buf) buf.v_ -#define BUFLEN(buf) buf.l_ - -#define FREEBUF(buf) \ - if( buf.d_ ) \ - { \ - StrBuf->Free(buf.d_); \ - buf.d_ = NULL; \ - } \ - buf.v_ = NULL; \ -//define FREEBUF +#define BUFVPRINTF(buf,fmt,args) do { \ + (buf).l_ = vsnprintf((buf).s_, SBUF_SIZE, (fmt), args); \ + if( (buf).l_ >= 0 && (buf).l_ < SBUF_SIZE ) \ + {/* static buffer */ \ + (buf).v_ = (buf).s_; \ + } \ + else \ + {/* dynamic buffer */ \ + (buf).d_ = StrBuf->Malloc(); \ + (buf).l_ = StrBuf->Vprintf((buf).d_, (fmt), args); \ + (buf).v_ = StrBuf->Value((buf).d_); \ + ShowDebug("showmsg: dynamic buffer used, increase the static buffer size to %d or more.\n", (buf).l_+1); \ + } \ +} while(0) //define BUFVPRINTF + +#define BUFVAL(buf) ((buf).v_) +#define BUFLEN(buf) ((buf).l_) + +#define FREEBUF(buf) do {\ + if( (buf).d_ ) { \ + StrBuf->Free((buf).d_); \ + (buf).d_ = NULL; \ + } \ + (buf).v_ = NULL; \ +} while(0) //define FREEBUF /////////////////////////////////////////////////////////////////////////////// #ifdef _WIN32 @@ -666,14 +649,6 @@ int FPRINTF(FILE *file, const char *fmt, ...) #endif// not _WIN32 - - - - - - - - char timestamp_format[20] = ""; //For displaying Timestamps int _vShowMessage(enum msg_type flag, const char *string, va_list ap) diff --git a/src/common/socket.c b/src/common/socket.c index 6e877d9be..2ae9d44b3 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -157,19 +157,19 @@ char* sErr(int code) return sbuf; } -#define sBind(fd,name,namelen) bind(fd2sock(fd),name,namelen) -#define sConnect(fd,name,namelen) connect(fd2sock(fd),name,namelen) -#define sIoctl(fd,cmd,argp) ioctlsocket(fd2sock(fd),cmd,argp) -#define sListen(fd,backlog) listen(fd2sock(fd),backlog) -#define sRecv(fd,buf,len,flags) recv(fd2sock(fd),buf,len,flags) -#define sSelect select -#define sSend(fd,buf,len,flags) send(fd2sock(fd),buf,len,flags) -#define sSetsockopt(fd,level,optname,optval,optlen) setsockopt(fd2sock(fd),level,optname,optval,optlen) -#define sShutdown(fd,how) shutdown(fd2sock(fd),how) -#define sFD_SET(fd,set) FD_SET(fd2sock(fd),set) -#define sFD_CLR(fd,set) FD_CLR(fd2sock(fd),set) -#define sFD_ISSET(fd,set) FD_ISSET(fd2sock(fd),set) -#define sFD_ZERO FD_ZERO +#define sBind(fd,name,namelen) bind(fd2sock(fd),(name),(namelen)) +#define sConnect(fd,name,namelen) connect(fd2sock(fd),(name),(namelen)) +#define sIoctl(fd,cmd,argp) ioctlsocket(fd2sock(fd),(cmd),(argp)) +#define sListen(fd,backlog) listen(fd2sock(fd),(backlog)) +#define sRecv(fd,buf,len,flags) recv(fd2sock(fd),(buf),(len),(flags)) +#define sSelect select +#define sSend(fd,buf,len,flags) send(fd2sock(fd),(buf),(len),(flags)) +#define sSetsockopt(fd,level,optname,optval,optlen) setsockopt(fd2sock(fd),(level),(optname),(optval),(optlen)) +#define sShutdown(fd,how) shutdown(fd2sock(fd),(how)) +#define sFD_SET(fd,set) FD_SET(fd2sock(fd),(set)) +#define sFD_CLR(fd,set) FD_CLR(fd2sock(fd),(set)) +#define sFD_ISSET(fd,set) FD_ISSET(fd2sock(fd),(set)) +#define sFD_ZERO FD_ZERO ///////////////////////////////////////////////////////////////////// #else diff --git a/src/common/socket.h b/src/common/socket.h index 923fa2515..02817f653 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -24,18 +24,18 @@ struct HPluginData; // socket I/O macros #define RFIFOHEAD(fd) -#define WFIFOHEAD(fd, size) do{ if((fd) && session[fd]->wdata_size + (size) > session[fd]->max_wdata ) realloc_writefifo(fd, size); }while(0) +#define WFIFOHEAD(fd, size) do{ if((fd) && session[fd]->wdata_size + (size) > session[fd]->max_wdata ) realloc_writefifo((fd), (size)); }while(0) #define RFIFOP(fd,pos) (session[fd]->rdata + session[fd]->rdata_pos + (pos)) #define WFIFOP(fd,pos) (session[fd]->wdata + session[fd]->wdata_size + (pos)) -#define RFIFOB(fd,pos) (*(uint8*)RFIFOP(fd,pos)) -#define WFIFOB(fd,pos) (*(uint8*)WFIFOP(fd,pos)) -#define RFIFOW(fd,pos) (*(uint16*)RFIFOP(fd,pos)) -#define WFIFOW(fd,pos) (*(uint16*)WFIFOP(fd,pos)) -#define RFIFOL(fd,pos) (*(uint32*)RFIFOP(fd,pos)) -#define WFIFOL(fd,pos) (*(uint32*)WFIFOP(fd,pos)) -#define RFIFOQ(fd,pos) (*(uint64*)RFIFOP(fd,pos)) -#define WFIFOQ(fd,pos) (*(uint64*)WFIFOP(fd,pos)) +#define RFIFOB(fd,pos) (*(uint8*)RFIFOP((fd),(pos))) +#define WFIFOB(fd,pos) (*(uint8*)WFIFOP((fd),(pos))) +#define RFIFOW(fd,pos) (*(uint16*)RFIFOP((fd),(pos))) +#define WFIFOW(fd,pos) (*(uint16*)WFIFOP((fd),(pos))) +#define RFIFOL(fd,pos) (*(uint32*)RFIFOP((fd),(pos))) +#define WFIFOL(fd,pos) (*(uint32*)WFIFOP((fd),(pos))) +#define RFIFOQ(fd,pos) (*(uint64*)RFIFOP((fd),(pos))) +#define WFIFOQ(fd,pos) (*(uint64*)WFIFOP((fd),(pos))) #define RFIFOSPACE(fd) (session[fd]->max_rdata - session[fd]->rdata_size) #define WFIFOSPACE(fd) (session[fd]->max_wdata - session[fd]->wdata_size) @@ -146,8 +146,9 @@ void set_defaultparse(ParseFunc defaultparse); uint32 host2ip(const char* hostname); const char* ip2str(uint32 ip, char ip_str[16]); uint32 str2ip(const char* ip_str); +// Note: purposely returns four comma-separated arguments #define CONVIP(ip) ((ip)>>24)&0xFF,((ip)>>16)&0xFF,((ip)>>8)&0xFF,((ip)>>0)&0xFF -#define MAKEIP(a,b,c,d) (uint32)( ( ( (a)&0xFF ) << 24 ) | ( ( (b)&0xFF ) << 16 ) | ( ( (c)&0xFF ) << 8 ) | ( ( (d)&0xFF ) << 0 ) ) +#define MAKEIP(a,b,c,d) ((uint32)( ( ( (a)&0xFF ) << 24 ) | ( ( (b)&0xFF ) << 16 ) | ( ( (c)&0xFF ) << 8 ) | ( ( (d)&0xFF ) << 0 ) )) uint16 ntows(uint16 netshort); int socket_getips(uint32* ips, int max); diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 3419bfdd5..9b9e4ce94 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -52,8 +52,8 @@ static forceinline void FinalizeSpinLock(PSPIN_LOCK lck){ } -#define getsynclock(l) { while(1){ if(InterlockedCompareExchange(l, 1, 0) == 0) break; rathread_yield(); } } -#define dropsynclock(l) { InterlockedExchange(l, 0); } +#define getsynclock(l) do { if(InterlockedCompareExchange((l), 1, 0) == 0) break; rathread_yield(); } while(/*always*/1) +#define dropsynclock(l) do { InterlockedExchange((l), 0); } while(0) static forceinline void EnterSpinLock(PSPIN_LOCK lck){ int tid = rathread_get_tid(); diff --git a/src/common/sql.h b/src/common/sql.h index da00edf2d..1fb436853 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -11,7 +11,7 @@ // Return codes -#define SQL_ERROR -1 +#define SQL_ERROR (-1) #define SQL_SUCCESS 0 #define SQL_NO_DATA 100 @@ -277,7 +277,7 @@ void sql_defaults(void); #if defined(SQL_REMOVE_SHOWDEBUG) #define Sql_ShowDebug(self) (void)0 #else -#define Sql_ShowDebug(self) SQL->ShowDebug_(self, __FILE__, __LINE__) +#define Sql_ShowDebug(self) (SQL->ShowDebug_((self), __FILE__, __LINE__)) #endif void Sql_HerculesUpdateCheck(Sql* self); @@ -286,16 +286,10 @@ void Sql_HerculesUpdateSkip(Sql* self,const char *filename); #if defined(SQL_REMOVE_SHOWDEBUG) #define SqlStmt_ShowDebug(self) (void)0 #else -#define SqlStmt_ShowDebug(self) SQL->StmtShowDebug_(self, __FILE__, __LINE__) -#endif /// Shows debug information (with statement). - - - - - +#define SqlStmt_ShowDebug(self) (SQL->StmtShowDebug_((self), __FILE__, __LINE__)) +#endif void Sql_Init(void); - #endif /* _COMMON_SQL_H_ */ diff --git a/src/common/strlib.h b/src/common/strlib.h index 5ef455a0e..0c3b0a486 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -168,28 +168,28 @@ void strlib_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ #ifndef STRLIB_C - #define jstrescape(pt) strlib->jstrescape(pt) - #define jstrescapecpy(pt,spt) strlib->jstrescapecpy(pt,spt) - #define jmemescapecpy(pt,spt,size) strlib->jmemescapecpy(pt,spt,size) - #define remove_control_chars(str) strlib->remove_control_chars(str) - #define trim(str) strlib->trim(str) - #define normalize_name(str,delims) strlib->normalize_name(str,delims) - #define stristr(haystack,needle) strlib->stristr(haystack,needle) + #define jstrescape(pt) (strlib->jstrescape(pt)) + #define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt))) + #define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size))) + #define remove_control_chars(str) (strlib->remove_control_chars(str)) + #define trim(str) (strlib->trim(str)) + #define normalize_name(str,delims) (strlib->normalize_name((str),(delims))) + #define stristr(haystack,needle) (strlib->stristr((haystack),(needle))) #if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN) - #define strnln(string,maxlen) strlib->strnlen(string,maxlen) + #define strnln(string,maxlen) (strlib->strnlen((string),(maxlen))) #endif #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER <= 1200 - #define strtoull(str,endptr,base) strlib->strtoull(str,endptr,base) + #define strtoull(str,endptr,base) (strlib->strtoull((str),(endptr),(base))) #endif - #define e_mail_check(email) strlib->e_mail_check(email) - #define config_switch(str) strlib->config_switch(str) - #define safestrncpy(dst,src,n) strlib->safestrncpy(dst,src,n) - #define safestrnlen(string,maxlen) strlib->safestrnlen(string,maxlen) - #define safesnprintf(buf,sz,fmt,...) strlib->safesnprintf(buf,sz,fmt,##__VA_ARGS__) - #define strline(str,pos) strlib->strline(str,pos) - #define bin2hex(output,input,count) strlib->bin2hex(output,input,count) + #define e_mail_check(email) (strlib->e_mail_check(email)) + #define config_switch(str) (strlib->config_switch(str)) + #define safestrncpy(dst,src,n) (strlib->safestrncpy((dst),(src),(n))) + #define safestrnlen(string,maxlen) (strlib->safestrnlen((string),(maxlen))) + #define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__)) + #define strline(str,pos) (strlib->strline((str),(pos))) + #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) #endif /* STRLIB_C */ #endif /* _STRLIB_H_ */ diff --git a/src/common/timer.h b/src/common/timer.h index 4a2bebe7d..9aa29861e 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -8,7 +8,7 @@ #define DIFF_TICK(a,b) ((a)-(b)) #define DIFF_TICK32(a,b) ((int32)((a)-(b))) -#define INVALID_TIMER -1 +#define INVALID_TIMER (-1) // timer flags enum { diff --git a/src/common/utils.h b/src/common/utils.h index 3e1463d6b..719e1e533 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -20,7 +20,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*)); bool exists(const char* filename); //Caps values to min/max -#define cap_value(a, min, max) ((a >= max) ? max : (a <= min) ? min : a) +#define cap_value(a, min, max) (((a) >= (max)) ? (max) : ((a) <= (min)) ? (min) : (a)) /// calculates the value of A / B, in percent (rounded down) unsigned int get_percentage(const unsigned int A, const unsigned int B); diff --git a/src/config/const.h b/src/config/const.h index 6f0dc6311..fc82d66f9 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -114,13 +114,6 @@ #undef CONSOLE_INPUT #endif -#ifdef RENEWAL - #define ITEMDB_SQL_COLUMNS 24 -#else - #define ITEMDB_SQL_COLUMNS 22 -#endif - - /** * End of File **/ diff --git a/src/login/login.h b/src/login/login.h index 0a41b803f..15edb14dc 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -89,8 +89,8 @@ struct Login_Config { struct client_hash_node *client_hash_nodes; // linked list containg md5 hash for each gm group }; -#define sex_num2str(num) ( (num == SEX_FEMALE ) ? 'F' : (num == SEX_MALE ) ? 'M' : 'S' ) -#define sex_str2num(str) ( (str == 'F' ) ? SEX_FEMALE : (str == 'M' ) ? SEX_MALE : SEX_SERVER ) +#define sex_num2str(num) ( ((num) == SEX_FEMALE) ? 'F' : ((num) == SEX_MALE) ? 'M' : 'S' ) +#define sex_str2num(str) ( ((str) == 'F') ? SEX_FEMALE : ((str) == 'M') ? SEX_MALE : SEX_SERVER ) #define MAX_SERVERS 30 extern struct mmo_char_server server[MAX_SERVERS]; diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 4a471fe5d..3b06140d4 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -164,38 +164,32 @@ ACMD(send) clif->message(fd, msg_txt(i)); return false; } - -#define PARSE_ERROR(error,p) \ -{\ -clif->message(fd, (error));\ -sprintf(atcmd_output, ">%s", (p));\ -clif->message(fd, atcmd_output);\ -} - //define PARSE_ERROR - -#define CHECK_EOS(p) \ -if(*(p) == 0){\ -clif->message(fd, "Unexpected end of string");\ -return false;\ -} - //define CHECK_EOS - -#define SKIP_VALUE(p) \ -{\ -while(*(p) && !ISSPACE(*(p))) ++(p); /* non-space */\ -while(*(p) && ISSPACE(*(p))) ++(p); /* space */\ -} - //define SKIP_VALUE - -#define GET_VALUE(p,num) \ -{\ -if(sscanf((p), "x%lx", &(num)) < 1 && sscanf((p), "%ld ", &(num)) < 1){\ -PARSE_ERROR("Invalid number in:",(p));\ -return false;\ -}\ -} - //define GET_VALUE - + +#define PARSE_ERROR(error,p) do {\ + clif->message(fd, (error));\ + sprintf(atcmd_output, ">%s", (p));\ + clif->message(fd, atcmd_output);\ +} while(0) //define PARSE_ERROR + +#define CHECK_EOS(p) do { \ + if(*(p) == 0){ \ + clif->message(fd, "Unexpected end of string");\ + return false;\ + } \ +} while(0) //define CHECK_EOS + +#define SKIP_VALUE(p) do { \ + while(*(p) && !ISSPACE(*(p))) ++(p); /* non-space */\ + while(*(p) && ISSPACE(*(p))) ++(p); /* space */\ +} while(0) //define SKIP_VALUE + +#define GET_VALUE(p,num) do { \ + if(sscanf((p), "x%lx", &(num)) < 1 && sscanf((p), "%ld ", &(num)) < 1){\ + PARSE_ERROR("Invalid number in:",(p));\ + return false;\ + }\ +} while(0) //define GET_VALUE + if (type > 0 && type < MAX_PACKET_DB) { if(len) @@ -8585,10 +8579,11 @@ ACMD(unloadnpcfile) { return true; } ACMD(cart) { -#define MC_CART_MDFY(x,idx) \ -sd->status.skill[idx].id = x?MC_PUSHCART:0; \ -sd->status.skill[idx].lv = x?1:0; \ -sd->status.skill[idx].flag = x?1:0; +#define MC_CART_MDFY(x,idx) do { \ + sd->status.skill[idx].id = (x)?MC_PUSHCART:0; \ + sd->status.skill[idx].lv = (x)?1:0; \ + sd->status.skill[idx].flag = (x)?1:0; \ +} while(0) int val = atoi(message); bool need_skill = pc->checkskill(sd, MC_PUSHCART) ? false : true; @@ -9616,6 +9611,8 @@ void atcommand_basecommands(void) { return; } +#undef ACMD_DEF +#undef ACMD_DEF2 bool atcommand_add(char *name,AtCommandFunc func, bool replace) { AtCommandInfo* cmd; diff --git a/src/map/battle.c b/src/map/battle.c index cd8c36b69..78f54733c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3189,7 +3189,7 @@ int battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { return 0; } //For quick div adjustment. -#define damage_div_fix(dmg, div) { if (div > 1) (dmg)*=div; else if (div < 0) (div)*=-1; } +#define damage_div_fix(dmg, div) do { if ((div) > 1) (dmg)*=(div); else if ((div) < 0) (div)*=-1; } while(0) /*========================================== * battle_calc_magic_attack [DracoRPG] *------------------------------------------*/ @@ -3305,11 +3305,11 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list ad.damage = 0; //reinitialize.. #endif //MATK_RATE scales the damage. 100 = no change. 50 is halved, 200 is doubled, etc -#define MATK_RATE( a ) { ad.damage= ad.damage*(a)/100; } +#define MATK_RATE( a ) ( ad.damage= ad.damage*(a)/100 ) //Adds dmg%. 100 = +100% (double) damage. 10 = +10% damage -#define MATK_ADDRATE( a ) { ad.damage+= ad.damage*(a)/100; } +#define MATK_ADDRATE( a ) ( ad.damage+= ad.damage*(a)/100 ) //Adds an absolute value to damage. 100 = +100 damage -#define MATK_ADD( a ) { ad.damage+= a; } +#define MATK_ADD( a ) ( ad.damage+= (a) ) switch (skill_id) { //Calc base damage according to skill @@ -3499,6 +3499,9 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list } return ad; +#undef MATK_RATE +#undef MATK_ADDRATE +#undef MATK_ADD } /*========================================== @@ -4359,19 +4362,19 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list //Assuming that 99% of the cases we will not need to check for the flag.rh... we don't. //ATK_RATE scales the damage. 100 = no change. 50 is halved, 200 is doubled, etc -#define ATK_RATE( a ) { wd.damage= wd.damage*(a)/100 ; if(flag.lh) wd.damage2= wd.damage2*(a)/100; } -#define ATK_RATE2( a , b ) { wd.damage= wd.damage*(a)/100 ; if(flag.lh) wd.damage2= wd.damage2*(b)/100; } -#define ATK_RATER(a){ wd.damage = wd.damage*(a)/100;} -#define ATK_RATEL(a){ wd.damage2 = wd.damage2*(a)/100;} +#define ATK_RATE( a ) do { int64 temp__ = (a); wd.damage= wd.damage*temp__/100 ; if(flag.lh) wd.damage2= wd.damage2*temp__/100; } while(0) +#define ATK_RATE2( a , b ) do { wd.damage= wd.damage*(a)/100 ; if(flag.lh) wd.damage2= wd.damage2*(b)/100; } while(0) +#define ATK_RATER(a) ( wd.damage = wd.damage*(a)/100 ) +#define ATK_RATEL(a) ( wd.damage2 = wd.damage2*(a)/100 ) //Adds dmg%. 100 = +100% (double) damage. 10 = +10% damage -#define ATK_ADDRATE( a ) { wd.damage+= wd.damage*(a)/100 ; if(flag.lh) wd.damage2+= wd.damage2*(a)/100; } -#define ATK_ADDRATE2( a , b ) { wd.damage+= wd.damage*(a)/100 ; if(flag.lh) wd.damage2+= wd.damage2*(b)/100; } +#define ATK_ADDRATE( a ) do { int64 temp__ = (a); wd.damage+= wd.damage*temp__/100; if(flag.lh) wd.damage2+= wd.damage2*temp__/100; } while(0) +#define ATK_ADDRATE2( a , b ) do { wd.damage+= wd.damage*(a)/100 ; if(flag.lh) wd.damage2+= wd.damage2*(b)/100; } while(0) //Adds an absolute value to damage. 100 = +100 damage -#define ATK_ADD( a ) { wd.damage+= a; if (flag.lh) wd.damage2+= a; } -#define ATK_ADD2( a , b ) { wd.damage+= a; if (flag.lh) wd.damage2+= b; } +#define ATK_ADD( a ) do { int64 temp__ = (a); wd.damage += temp__; if (flag.lh) wd.damage2 += temp__; } while(0) +#define ATK_ADD2( a , b ) do { wd.damage += (a); if (flag.lh) wd.damage2 += (b); } while(0) #ifdef RENEWAL -#define GET_NORMAL_ATTACK( f ) { wd.damage = battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_R, f, wd.flag); } -#define GET_NORMAL_ATTACK2( f ) { wd.damage2 = battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_L, f, wd.flag); } +#define GET_NORMAL_ATTACK( f ) ( wd.damage = battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_R, (f), wd.flag) ) +#define GET_NORMAL_ATTACK2( f ) ( wd.damage2 = battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_L, (f), wd.flag) ) #endif switch (skill_id) { //Calc base damage according to skill @@ -5070,7 +5073,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list )) && rnd()%100 < tsc->data[SC_SWORDREJECT]->val2 ) { - ATK_RATER(50) + ATK_RATER(50); status_fix_damage(target,src,wd.damage,clif->damage(target,src,timer->gettick(),0,0,wd.damage,0,0,0)); clif->skill_nodamage(target,target,ST_REJECTSWORD,tsc->data[SC_SWORDREJECT]->val1,1); if( --(tsc->data[SC_SWORDREJECT]->val3) <= 0 ) @@ -5147,9 +5150,9 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i sc = status->get_sc(bl); #ifdef RENEWAL -#define NORMALIZE_RDAMAGE(d){ trdamage += rdamage = max(1, min(max_reflect_damage, d)); } +#define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, min(max_reflect_damage, (d))) ) #else -#define NORMALIZE_RDAMAGE(d){ trdamage += rdamage = max(1, d); } +#define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, (d)) ) #endif if( sc && sc->data[SC_CRESCENTELBOW] && !is_boss(src) && rnd()%100 < sc->data[SC_CRESCENTELBOW]->val2 ){ @@ -5214,6 +5217,7 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i } return max(0, trdamage); +#undef NORMALIZE_RDAMAGE } void battle_drain(TBL_PC *sd, struct block_list *tbl, int64 rdamage, int64 ldamage, int race, int boss) @@ -5468,7 +5472,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t if( sc && sc->count ) { if (sc->data[SC_EXEEDBREAK]) { - ATK_RATER(sc->data[SC_EXEEDBREAK]->val1) + ATK_RATER(sc->data[SC_EXEEDBREAK]->val1); status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER); } if( sc->data[SC_SPELLFIST] ) { @@ -5670,6 +5674,16 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t map->freeblock_unlock(); return wd.dmg_lv; } +#undef ATK_RATE +#undef ATK_RATE2 +#undef ATK_RATER +#undef ATK_RATEL +#undef ATK_ADDRATE +#undef ATK_ADDRATE2 +#undef ATK_ADD +#undef ATK_ADD2 +#undef GET_NORMAL_ATTACK +#undef GET_NORMAL_ATTACK2 int battle_check_undead(int race,int element) { diff --git a/src/map/battle.h b/src/map/battle.h index fd6699f4d..a8b291818 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -21,14 +21,14 @@ struct status_data; /** * Defines **/ -#define MIN_HAIR_STYLE battle_config.min_hair_style -#define MAX_HAIR_STYLE battle_config.max_hair_style -#define MIN_HAIR_COLOR battle_config.min_hair_color -#define MAX_HAIR_COLOR battle_config.max_hair_color -#define MIN_CLOTH_COLOR battle_config.min_cloth_color -#define MAX_CLOTH_COLOR battle_config.max_cloth_color +#define MIN_HAIR_STYLE (battle_config.min_hair_style) +#define MAX_HAIR_STYLE (battle_config.max_hair_style) +#define MIN_HAIR_COLOR (battle_config.min_hair_color) +#define MAX_HAIR_COLOR (battle_config.max_hair_color) +#define MIN_CLOTH_COLOR (battle_config.min_cloth_color) +#define MAX_CLOTH_COLOR (battle_config.max_cloth_color) -#define is_boss(bl) (status_get_mode(bl)&MD_BOSS) // Can refine later [Aru] +#define is_boss(bl) (status_get_mode(bl)&MD_BOSS) // Can refine later [Aru] /** * Enumerations diff --git a/src/map/chrif.c b/src/map/chrif.c index 5927e31bf..e9c3bbabf 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -88,7 +88,7 @@ struct chrif_interface chrif_s; //2b27: Incoming, chrif_authfail -> 'client authentication failed' //This define should spare writing the check in every function. [Skotlex] -#define chrif_check(a) { if(!chrif->isconnected()) return a; } +#define chrif_check(a) do { if(!chrif->isconnected()) return a; } while(0) /// Resets all the data. void chrif_reset(void) { diff --git a/src/map/clif.c b/src/map/clif.c index 84976d67c..913f55784 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -18201,8 +18201,8 @@ void packetdb_loaddb(void) { memset(packet_db,0,sizeof(packet_db)); - #define packet(id, size, ...) packetdb_addpacket(id, size, ##__VA_ARGS__, 0xFFFF) - #define packetKeys(a,b,c) { clif->cryptKey[0] = a; clif->cryptKey[1] = b; clif->cryptKey[2] = c; } + #define packet(id, size, ...) packetdb_addpacket((id), (size), ##__VA_ARGS__, 0xFFFF) + #define packetKeys(a,b,c) do { clif->cryptKey[0] = (a); clif->cryptKey[1] = (b); clif->cryptKey[2] = (c); } while(0) #include "packets.h" /* load structure data */ #undef packet #undef packetKeys diff --git a/src/map/clif.h b/src/map/clif.h index 88f3383d1..76d52311f 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -45,7 +45,7 @@ struct skill_cd; **/ #define packet_len(cmd) packet_db[cmd].len #define P2PTR(fd) RFIFO2PTR(fd) -#define clif_menuskill_clear(sd) (sd)->menuskill_id = (sd)->menuskill_val = (sd)->menuskill_val2 = 0; +#define clif_menuskill_clear(sd) ((sd)->menuskill_id = (sd)->menuskill_val = (sd)->menuskill_val2 = 0) #define HCHSYS_NAME_LENGTH 20 /** diff --git a/src/map/elemental.h b/src/map/elemental.h index 8ffffa5e3..830a6a577 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -21,8 +21,8 @@ #define EL_SKILLMODE_ASSIST 0x2 #define EL_SKILLMODE_AGGRESSIVE 0x4 -#define elemental_stop_walking(ed, type) unit->stop_walking(&(ed)->bl, type) -#define elemental_stop_attack(ed) unit->stop_attack(&(ed)->bl) +#define elemental_stop_walking(ed, type) (unit->stop_walking(&(ed)->bl, (type))) +#define elemental_stop_attack(ed) (unit->stop_attack(&(ed)->bl)) /** * Structures diff --git a/src/map/homunculus.h b/src/map/homunculus.h index b7906d4c8..117f9da8e 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -10,7 +10,7 @@ #include "pc.h" #define MAX_HOM_SKILL_REQUIRE 5 -#define homdb_checkid(id) (id >= HM_CLASS_BASE && id <= HM_CLASS_MAX) +#define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX) #define homun_alive(x) ((x) && (x)->homunculus.vaporize == HOM_ST_ACTIVE && (x)->battle_status.hp > 0) struct h_stats { diff --git a/src/map/intif.c b/src/map/intif.c index e6ff91af7..36ae753db 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -35,7 +35,7 @@ struct intif_interface intif_s; -#define inter_fd chrif->fd // alias +#define inter_fd (chrif->fd) // alias //----------------------------------------------------------------- // Send to inter server diff --git a/src/map/intif.h b/src/map/intif.h index 5e996b6fe..d0dfd25cd 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -22,9 +22,9 @@ struct auction_data; /** * Defines **/ -#define intif_rename_pc(sd, name) intif->rename(sd, 0, name) -#define intif_rename_pet(sd, name) intif->rename(sd, 1, name) -#define intif_rename_hom(sd, name) intif->rename(sd, 2, name) +#define intif_rename_pc(sd, name) (intif->rename((sd), 0, (name))) +#define intif_rename_pet(sd, name) (intif->rename((sd), 1, (name))) +#define intif_rename_hom(sd, name) (intif->rename((sd), 2, (name))) #define INTIF_PACKET_LEN_TABLE_SIZE 161 diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 3f31c79d4..4ee6637c1 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -28,7 +28,7 @@ struct item_package; #define CARD0_PET ((short)0xFF00) //Marks if the card0 given is "special" (non-item id used to mark pets/created items. [Skotlex] -#define itemdb_isspecial(i) (i == CARD0_FORGE || i == CARD0_CREATE || i == CARD0_PET) +#define itemdb_isspecial(i) ((i) == CARD0_FORGE || (i) == CARD0_CREATE || (i) == CARD0_PET) //Use apple for unknown items. #define UNKNOWN_ITEM_ID 512 @@ -236,44 +236,45 @@ struct item_package { unsigned short must_qty; }; -#define itemdb_name(n) itemdb->search(n)->name -#define itemdb_jname(n) itemdb->search(n)->jname -#define itemdb_type(n) itemdb->search(n)->type -#define itemdb_atk(n) itemdb->search(n)->atk -#define itemdb_def(n) itemdb->search(n)->def -#define itemdb_look(n) itemdb->search(n)->look -#define itemdb_weight(n) itemdb->search(n)->weight -#define itemdb_equip(n) itemdb->search(n)->equip -#define itemdb_usescript(n) itemdb->search(n)->script -#define itemdb_equipscript(n) itemdb->search(n)->script -#define itemdb_wlv(n) itemdb->search(n)->wlv -#define itemdb_range(n) itemdb->search(n)->range -#define itemdb_slot(n) itemdb->search(n)->slot -#define itemdb_available(n) (itemdb->search(n)->flag.available) -#define itemdb_viewid(n) (itemdb->search(n)->view_id) -#define itemdb_autoequip(n) (itemdb->search(n)->flag.autoequip) -#define itemdb_is_rune(n) ((n >= ITEMID_NAUTHIZ && n <= ITEMID_HAGALAZ) || n == ITEMID_LUX_ANIMA) -#define itemdb_is_element(n) (n >= 990 && n <= 993) -#define itemdb_is_spellbook(n) (n >= 6188 && n <= 6205) -#define itemdb_is_poison(n) (n >= 12717 && n <= 12724) -#define itemid_isgemstone(id) ( (id) >= ITEMID_YELLOW_GEMSTONE && (id) <= ITEMID_BLUE_GEMSTONE ) -#define itemdb_iscashfood(id) ( (id) >= 12202 && (id) <= 12207 ) -#define itemdb_is_GNbomb(n) (n >= 13260 && n <= 13267) -#define itemdb_is_GNthrowable(n) (n >= 13268 && n <= 13290) +#define itemdb_name(n) (itemdb->search(n)->name) +#define itemdb_jname(n) (itemdb->search(n)->jname) +#define itemdb_type(n) (itemdb->search(n)->type) +#define itemdb_atk(n) (itemdb->search(n)->atk) +#define itemdb_def(n) (itemdb->search(n)->def) +#define itemdb_look(n) (itemdb->search(n)->look) +#define itemdb_weight(n) (itemdb->search(n)->weight) +#define itemdb_equip(n) (itemdb->search(n)->equip) +#define itemdb_usescript(n) (itemdb->search(n)->script) +#define itemdb_equipscript(n) (itemdb->search(n)->script) +#define itemdb_wlv(n) (itemdb->search(n)->wlv) +#define itemdb_range(n) (itemdb->search(n)->range) +#define itemdb_slot(n) (itemdb->search(n)->slot) +#define itemdb_available(n) (itemdb->search(n)->flag.available) +#define itemdb_viewid(n) (itemdb->search(n)->view_id) +#define itemdb_autoequip(n) (itemdb->search(n)->flag.autoequip) +#define itemdb_value_buy(n) (itemdb->search(n)->value_buy) +#define itemdb_value_sell(n) (itemdb->search(n)->value_sell) +#define itemdb_canrefine(n) (!itemdb->search(n)->flag.no_refine) + +#define itemdb_is_rune(n) (((n) >= ITEMID_NAUTHIZ && (n) <= ITEMID_HAGALAZ) || (n) == ITEMID_LUX_ANIMA) +#define itemdb_is_element(n) ((n) >= 990 && (n) <= 993) +#define itemdb_is_spellbook(n) ((n) >= 6188 && (n) <= 6205) +#define itemdb_is_poison(n) ((n) >= 12717 && (n) <= 12724) +#define itemid_isgemstone(n) ((n) >= ITEMID_YELLOW_GEMSTONE && (n) <= ITEMID_BLUE_GEMSTONE) +#define itemdb_iscashfood(n) ((n) >= 12202 && (n) <= 12207) +#define itemdb_is_GNbomb(n) ((n) >= 13260 && (n) <= 13267) +#define itemdb_is_GNthrowable(n) ((n) >= 13268 && (n) <= 13290) -#define itemdb_value_buy(n) itemdb->search(n)->value_buy -#define itemdb_value_sell(n) itemdb->search(n)->value_sell -#define itemdb_canrefine(n) (!itemdb->search(n)->flag.no_refine) //Item trade restrictions [Skotlex] -#define itemdb_isdropable(item, gmlv) itemdb->isrestricted(item, gmlv, 0, itemdb->isdropable_sub) -#define itemdb_cantrade(item, gmlv, gmlv2) itemdb->isrestricted(item, gmlv, gmlv2, itemdb->cantrade_sub) -#define itemdb_canpartnertrade(item, gmlv, gmlv2) itemdb->isrestricted(item, gmlv, gmlv2, itemdb->canpartnertrade_sub) -#define itemdb_cansell(item, gmlv) itemdb->isrestricted(item, gmlv, 0, itemdb->cansell_sub) -#define itemdb_cancartstore(item, gmlv) itemdb->isrestricted(item, gmlv, 0, itemdb->cancartstore_sub) -#define itemdb_canstore(item, gmlv) itemdb->isrestricted(item, gmlv, 0, itemdb->canstore_sub) -#define itemdb_canguildstore(item, gmlv) itemdb->isrestricted(item , gmlv, 0, itemdb->canguildstore_sub) -#define itemdb_canmail(item, gmlv) itemdb->isrestricted(item , gmlv, 0, itemdb->canmail_sub) -#define itemdb_canauction(item, gmlv) itemdb->isrestricted(item , gmlv, 0, itemdb->canauction_sub) +#define itemdb_isdropable(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->isdropable_sub)) +#define itemdb_cantrade(item, gmlv, gmlv2) (itemdb->isrestricted((item), (gmlv), (gmlv2), itemdb->cantrade_sub)) +#define itemdb_canpartnertrade(item, gmlv, gmlv2) (itemdb->isrestricted((item), (gmlv), (gmlv2), itemdb->canpartnertrade_sub)) +#define itemdb_cansell(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->cansell_sub)) +#define itemdb_cancartstore(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->cancartstore_sub)) +#define itemdb_canstore(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->canstore_sub)) +#define itemdb_canguildstore(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->canguildstore_sub)) +#define itemdb_canmail(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->canmail_sub)) +#define itemdb_canauction(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->canauction_sub)) struct itemdb_interface { void (*init) (bool minimal); diff --git a/src/map/map.c b/src/map/map.c index 17648a661..099d2c6ea 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2095,9 +2095,7 @@ struct s_mapiterator /// @param _bl_ block_list /// @return true if it matches #define MAPIT_MATCHES(_mapit_,_bl_) \ - ( \ - ( (_bl_)->type & (_mapit_)->types /* type matches */ ) \ - ) + ( (_bl_)->type & (_mapit_)->types /* type matches */ ) /// Allocates a new iterator. /// Returns the new iterator. diff --git a/src/map/map.h b/src/map/map.h index 4cb00f144..6580d7e50 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -26,7 +26,7 @@ enum E_MAPSERVER_ST { }; #define MAX_NPC_PER_MAP 512 -#define AREA_SIZE battle_config.area_size +#define AREA_SIZE (battle_config.area_size) #define DAMAGELOG_SIZE 30 #define LOOTITEM_SIZE 10 #define MAX_MOBSKILL 50 @@ -39,7 +39,7 @@ enum E_MAPSERVER_ST { #define MAX_LEVEL 150 #define MAX_IGNORE_LIST 20 // official is 14 #define MAX_VENDING 12 -#define MAX_MAP_SIZE 512*512 // Wasn't there something like this already? Can't find it.. [Shinryo] +#define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo] #define BLOCK_SIZE 8 #define block_free_max 1048576 @@ -221,7 +221,7 @@ enum { #define CHAT_SIZE_MAX (255 + 1) // 24 for npc name + 24 for label + 2 for a "::" and 1 for EOS #define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 ) -#define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000 +#define DEFAULT_AUTOSAVE_INTERVAL (5*60*1000) // Specifies maps where players may hit each other #define map_flag_vs(m) (map->list[m].flag.pvp || map->list[m].flag.gvg_dungeon || map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) || map->list[m].flag.battleground) // Specifies maps that have special GvG/WoE restrictions @@ -724,7 +724,7 @@ struct map_data_other_server { uint16 port; }; -#define map_id2index(id) map->list[(id)].index +#define map_id2index(id) (map->list[(id)].index) /// Bitfield of flags for the iterator. enum e_mapitflags { @@ -747,11 +747,11 @@ struct mapit_interface { struct mapit_interface *mapit; -#define mapit_getallusers() mapit->alloc(MAPIT_NORMAL,BL_PC) -#define mapit_geteachpc() mapit->alloc(MAPIT_NORMAL,BL_PC) -#define mapit_geteachmob() mapit->alloc(MAPIT_NORMAL,BL_MOB) -#define mapit_geteachnpc() mapit->alloc(MAPIT_NORMAL,BL_NPC) -#define mapit_geteachiddb() mapit->alloc(MAPIT_NORMAL,BL_ALL) +#define mapit_getallusers() (mapit->alloc(MAPIT_NORMAL,BL_PC)) +#define mapit_geteachpc() (mapit->alloc(MAPIT_NORMAL,BL_PC)) +#define mapit_geteachmob() (mapit->alloc(MAPIT_NORMAL,BL_MOB)) +#define mapit_geteachnpc() (mapit->alloc(MAPIT_NORMAL,BL_NPC)) +#define mapit_geteachiddb() (mapit->alloc(MAPIT_NORMAL,BL_ALL)) //Useful typedefs from jA [Skotlex] typedef struct map_session_data TBL_PC; diff --git a/src/map/mob.c b/src/map/mob.c index 4e648b2a6..b41dedac1 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -52,7 +52,7 @@ struct mob_interface mob_s; #define MOB_LAZYSKILLPERC 0 // Probability for mobs far from players from doing their IDLE skill. (rate of 1000 minute) // Move probability for mobs away from players (rate of 1000 minute) // in Aegis, this is 100% for mobs that have been activated by players and none otherwise. -#define MOB_LAZYMOVEPERC(md) (md->state.spotted?1000:0) +#define MOB_LAZYMOVEPERC(md) ((md)->state.spotted?1000:0) #define MOB_MAX_DELAY (24*3600*1000) #define MAX_MINCHASE 30 //Max minimum chase value to use for mobs. #define RUDE_ATTACKED_COUNT 2 //After how many rude-attacks should the skill be used? diff --git a/src/map/mob.h b/src/map/mob.h index 110d027ef..48a9f078e 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -37,7 +37,7 @@ #define MOB_CLONE_END MAX_MOB_DB //Used to determine default enemy type of mobs (for use in eachinrange calls) -#define DEFAULT_ENEMY_TYPE(md) (md->special_state.ai?BL_CHAR:BL_MOB|BL_PC|BL_HOM|BL_MER) +#define DEFAULT_ENEMY_TYPE(md) ((md)->special_state.ai?BL_CHAR:BL_MOB|BL_PC|BL_HOM|BL_MER) #define MAX_MOB_CHAT 250 //Max Skill's messages @@ -243,8 +243,9 @@ struct item_drop_list { }; -#define mob_stop_walking(md, type) unit->stop_walking(&(md)->bl, type) -#define mob_stop_attack(md) unit->stop_attack(&(md)->bl) +#define mob_stop_walking(md, type) (unit->stop_walking(&(md)->bl, (type))) +#define mob_stop_attack(md) (unit->stop_attack(&(md)->bl)) + #define mob_is_battleground(md) ( map->list[(md)->bl.m].flag.battleground && ((md)->class_ == MOBID_BARRICADE2 || ((md)->class_ >= MOBID_FOOD_STOR && (md)->class_ <= MOBID_PINK_CRYST)) ) #define mob_is_gvg(md) (map->list[(md)->bl.m].flag.gvg_castle && ( (md)->class_ == MOBID_EMPERIUM || (md)->class_ == MOBID_BARRICADE1 || (md)->class_ == MOBID_GUARIDAN_STONE1 || (md)->class_ == MOBID_GUARIDAN_STONE2) ) #define mob_is_treasure(md) (((md)->class_ >= MOBID_TREAS01 && (md)->class_ <= MOBID_TREAS40) || ((md)->class_ >= MOBID_TREAS41 && (md)->class_ <= MOBID_TREAS49)) diff --git a/src/map/path.h b/src/map/path.h index e872c8877..a889a6409 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -23,13 +23,13 @@ struct shootpath_data { int y[MAX_WALKPATH]; }; -#define check_distance_bl(bl1, bl2, distance) path->check_distance((bl1)->x - (bl2)->x, (bl1)->y - (bl2)->y, distance) -#define check_distance_blxy(bl, x1, y1, distance) path->check_distance((bl)->x-(x1), (bl)->y-(y1), distance) -#define check_distance_xy(x0, y0, x1, y1, distance) path->check_distance((x0)-(x1), (y0)-(y1), distance) +#define check_distance_bl(bl1, bl2, distance) (path->check_distance((bl1)->x - (bl2)->x, (bl1)->y - (bl2)->y, distance)) +#define check_distance_blxy(bl, x1, y1, distance) (path->check_distance((bl)->x - (x1), (bl)->y - (y1), distance)) +#define check_distance_xy(x0, y0, x1, y1, distance) (path->check_distance((x0) - (x1), (y0) - (y1), distance)) -#define distance_bl(bl1, bl2) path->distance((bl1)->x - (bl2)->x, (bl1)->y - (bl2)->y) -#define distance_blxy(bl, x1, y1) path->distance((bl)->x-(x1), (bl)->y-(y1)) -#define distance_xy(x0, y0, x1, y1) path->distance((x0)-(x1), (y0)-(y1)) +#define distance_bl(bl1, bl2) (path->distance((bl1)->x - (bl2)->x, (bl1)->y - (bl2)->y)) +#define distance_blxy(bl, x1, y1) (path->distance((bl)->x - (x1), (bl)->y - (y1))) +#define distance_xy(x0, y0, x1, y1) (path->distance((x0) - (x1), (y0) - (y1))) struct path_interface { // calculates destination cell for knockback diff --git a/src/map/pc.h b/src/map/pc.h index 71c76b643..f10bd0f59 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -615,8 +615,8 @@ enum equip_pos { // Rune Knight Dragon #define pc_isridingdragon(sd) ( (sd)->sc.option&OPTION_DRAGON ) -#define pc_stop_walking(sd, type) unit->stop_walking(&(sd)->bl, type) -#define pc_stop_attack(sd) unit->stop_attack(&(sd)->bl) +#define pc_stop_walking(sd, type) (unit->stop_walking(&(sd)->bl, (type))) +#define pc_stop_attack(sd) (unit->stop_attack(&(sd)->bl)) //Weapon check considering dual wielding. #define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \ @@ -633,7 +633,7 @@ enum equip_pos { || ( (class_) >= JOB_KAGEROU && (class_) <= JOB_OBORO ) \ || ( (class_) >= JOB_REBELLION && (class_) < JOB_MAX ) \ ) -#define pcdb_checkid(class_) pcdb_checkid_sub((unsigned int)class_) +#define pcdb_checkid(class_) pcdb_checkid_sub((unsigned int)(class_)) // clientside display macros (values to the left/right of the "+") #ifdef RENEWAL @@ -671,18 +671,18 @@ enum equip_pos { #define pc_checkoverhp(sd) ((sd)->battle_status.hp == (sd)->battle_status.max_hp) #define pc_checkoversp(sd) ((sd)->battle_status.sp == (sd)->battle_status.max_sp) -#define pc_readglobalreg(sd,reg) pc->readregistry(sd,reg,3) -#define pc_setglobalreg(sd,reg,val) pc->setregistry(sd,reg,val,3) -#define pc_readglobalreg_str(sd,reg) pc->readregistry_str(sd,reg,3) -#define pc_setglobalreg_str(sd,reg,val) pc->setregistry_str(sd,reg,val,3) -#define pc_readaccountreg(sd,reg) pc->readregistry(sd,reg,2) -#define pc_setaccountreg(sd,reg,val) pc->setregistry(sd,reg,val,2) -#define pc_readaccountregstr(sd,reg) pc->readregistry_str(sd,reg,2) -#define pc_setaccountregstr(sd,reg,val) pc->setregistry_str(sd,reg,val,2) -#define pc_readaccountreg2(sd,reg) pc->readregistry(sd,reg,1) -#define pc_setaccountreg2(sd,reg,val) pc->setregistry(sd,reg,val,1) -#define pc_readaccountreg2str(sd,reg) pc->readregistry_str(sd,reg,1) -#define pc_setaccountreg2str(sd,reg,val) pc->setregistry_str(sd,reg,val,1) +#define pc_readglobalreg(sd,reg) (pc->readregistry((sd),(reg),3)) +#define pc_setglobalreg(sd,reg,val) (pc->setregistry((sd),(reg),(val),3)) +#define pc_readglobalreg_str(sd,reg) (pc->readregistry_str((sd),(reg),3)) +#define pc_setglobalreg_str(sd,reg,val) (pc->setregistry_str((sd),(reg),(val),3)) +#define pc_readaccountreg(sd,reg) (pc->readregistry((sd),(reg),2)) +#define pc_setaccountreg(sd,reg,val) (pc->setregistry((sd),(reg),(val),2)) +#define pc_readaccountregstr(sd,reg) (pc->readregistry_str((sd),(reg),2)) +#define pc_setaccountregstr(sd,reg,val) (pc->setregistry_str((sd),(reg),(val),2)) +#define pc_readaccountreg2(sd,reg) (pc->readregistry((sd),(reg),1)) +#define pc_setaccountreg2(sd,reg,val) (pc->setregistry((sd),(reg),(val),1)) +#define pc_readaccountreg2str(sd,reg) (pc->readregistry_str((sd),(reg),1)) +#define pc_setaccountreg2str(sd,reg,val) (pc->setregistry_str((sd),(reg),(val),1)) struct skill_tree_entry { short id; diff --git a/src/map/pet.h b/src/map/pet.h index f9a756de2..f1a219700 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -98,8 +98,8 @@ struct pet_data { struct map_session_data *msd; }; -#define pet_stop_walking(pd, type) unit->stop_walking(&(pd)->bl, type) -#define pet_stop_attack(pd) unit->stop_attack(&(pd)->bl) +#define pet_stop_walking(pd, type) (unit->stop_walking(&(pd)->bl, (type))) +#define pet_stop_attack(pd) (unit->stop_attack(&(pd)->bl)) struct pet_interface { struct s_pet_db db[MAX_PET_DB]; diff --git a/src/map/script.c b/src/map/script.c index 0827258d7..0f2c86868 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -278,7 +278,7 @@ void disp_error_message2(const char *mes,const char *pos,int report) script->error_report = report; longjmp( script->error_jump, 1 ); } -#define disp_error_message(mes,pos) script->disp_error_message2(mes,pos,1) +#define disp_error_message(mes,pos) (script->disp_error_message2((mes),(pos),1)) void disp_warning_message(const char *mes, const char *pos) { script->warning(script->parser_current_src,script->parser_current_file,script->parser_current_line,mes,pos); @@ -3986,9 +3986,6 @@ const char *script_getfuncname(struct script_state *st) { // buildin functions // -#define BUILDIN_DEF(x,args) { buildin_ ## x , #x , args } -#define BUILDIN_DEF2(x,x2,args) { buildin_ ## x , x2 , args } - ///////////////////////////////////////////////////////////////////// // NPC interaction // @@ -13016,7 +13013,7 @@ BUILDIN(isequippedcnt) } for (i=0; id!=0; i++) { - script_fetch(st,i+2, id) else id = 0; + script_fetch(st,i+2, id); if (id <= 0) continue; @@ -13074,7 +13071,7 @@ BUILDIN(isequipped) setitem_hash = sd->bonus.setitem_hash; setitem_hash2 = sd->bonus.setitem_hash2; for (i=0; id!=0; i++) { - script_fetch(st,i+2, id) else id = 0; + script_fetch(st,i+2, id); if (id <= 0) continue; flag = 0; @@ -13148,7 +13145,7 @@ BUILDIN(cardscnt) { sd = script->rid2sd(st); for (i=0; id!=0; i++) { - script_fetch(st,i+2, id) else id = 0; + script_fetch(st,i+2, id); if (id <= 0) continue; @@ -17961,6 +17958,8 @@ bool script_hp_add(char *name, char *args, bool (*func)(struct script_state *st) return true; } +#define BUILDIN_DEF(x,args) { buildin_ ## x , #x , args } +#define BUILDIN_DEF2(x,x2,args) { buildin_ ## x , x2 , args } void script_parse_builtin(void) { struct script_function BUILDIN[] = { // NPC interaction @@ -18504,6 +18503,8 @@ void script_parse_builtin(void) { } } } +#undef BUILDIN_DEF +#undef BUILDIN_DEF2 void script_label_add(int key, int pos) { int idx = script->label_count; diff --git a/src/map/script.h b/src/map/script.h index 0bb92c433..32426e988 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -22,9 +22,9 @@ struct eri; **/ // TODO: Remove temporary code #define ENABLE_CASE_CHECK -#define DeprecationWarning(func, bad, good, file, line) ShowWarning("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'. This will be a critical error in a near future.\n", func, bad, good, file, line); -#define DeprecationWarning2(func, bad, good, where) ShowWarning("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s'). If it is a local (.@) variable, and you're absolutely sure you used the correct case, please disragard this message, otherwise please correct your scripts, as this will become fatal in a near future.\n", func, bad, good, where); -#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead). This will be a critical error in a near future.", p); +#define DeprecationWarning(func, bad, good, file, line) ShowWarning("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'. This will be a critical error in a near future.\n", (func), (bad), (good), (file), (line)); +#define DeprecationWarning2(func, bad, good, where) ShowWarning("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s'). This will become fatal in a near future.\n", (func), (bad), (good), (where)); +#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead). This will be a critical error in a near future.", (p)); #define NUM_WHISPER_VAR 10 @@ -71,24 +71,24 @@ struct eri; /// Returns the index of the last data in the stack #define script_lastdata(st) ( (st)->end - (st)->start - 1 ) /// Pushes an int into the stack -#define script_pushint(st,val) script->push_val((st)->stack, C_INT, (val),NULL) +#define script_pushint(st,val) (script->push_val((st)->stack, C_INT, (val),NULL)) /// Pushes a string into the stack (script engine frees it automatically) -#define script_pushstr(st,val) script->push_str((st)->stack, C_STR, (val)) +#define script_pushstr(st,val) (script->push_str((st)->stack, C_STR, (val))) /// Pushes a copy of a string into the stack -#define script_pushstrcopy(st,val) script->push_str((st)->stack, C_STR, aStrdup(val)) +#define script_pushstrcopy(st,val) (script->push_str((st)->stack, C_STR, aStrdup(val))) /// Pushes a constant string into the stack (must never change or be freed) -#define script_pushconststr(st,val) script->push_str((st)->stack, C_CONSTSTR, (val)) +#define script_pushconststr(st,val) (script->push_str((st)->stack, C_CONSTSTR, (val))) /// Pushes a nil into the stack -#define script_pushnil(st) script->push_val((st)->stack, C_NOP, 0,NULL) +#define script_pushnil(st) (script->push_val((st)->stack, C_NOP, 0,NULL)) /// Pushes a copy of the data in the target index -#define script_pushcopy(st,i) script->push_copy((st)->stack, (st)->start + (i)) +#define script_pushcopy(st,i) (script->push_copy((st)->stack, (st)->start + (i))) -#define script_isstring(st,i) data_isstring(script_getdata(st,i)) -#define script_isint(st,i) data_isint(script_getdata(st,i)) +#define script_isstring(st,i) data_isstring(script_getdata((st),(i))) +#define script_isint(st,i) data_isint(script_getdata((st),(i))) -#define script_getnum(st,val) script->conv_num(st, script_getdata(st,val)) -#define script_getstr(st,val) script->conv_str(st, script_getdata(st,val)) -#define script_getref(st,val) ( script_getdata(st,val)->ref ) +#define script_getnum(st,val) (script->conv_num((st), script_getdata((st),(val)))) +#define script_getstr(st,val) (script->conv_str((st), script_getdata((st),(val)))) +#define script_getref(st,val) ( script_getdata((st),(val))->ref ) // Note: "top" functions/defines use indexes relative to the top of the stack // -1 is the index of the data at the top @@ -147,9 +147,12 @@ struct eri; #define BUILDIN(x) bool buildin_ ## x (struct script_state* st) #define BUILDIN_A(x) buildin_ ## x -#define script_fetch(st, n, t) \ - if( script_hasdata(st,n) ) \ - (t)=script_getnum(st,n); +#define script_fetch(st, n, t) do { \ + if( script_hasdata((st),(n)) ) \ + (t)=script_getnum((st),(n)); \ + else \ + (t) = 0; \ +} while(0) /** diff --git a/src/map/skill.c b/src/map/skill.c index fa26cdb12..c38363ef3 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -47,13 +47,13 @@ // ranges reserved for mapping skill ids to skilldb offsets #define HM_SKILLRANGEMIN 750 -#define HM_SKILLRANGEMAX HM_SKILLRANGEMIN + MAX_HOMUNSKILL -#define MC_SKILLRANGEMIN HM_SKILLRANGEMAX + 1 -#define MC_SKILLRANGEMAX MC_SKILLRANGEMIN + MAX_MERCSKILL -#define EL_SKILLRANGEMIN MC_SKILLRANGEMAX + 1 -#define EL_SKILLRANGEMAX EL_SKILLRANGEMIN + MAX_ELEMENTALSKILL -#define GD_SKILLRANGEMIN EL_SKILLRANGEMAX + 1 -#define GD_SKILLRANGEMAX GD_SKILLRANGEMIN + MAX_GUILDSKILL +#define HM_SKILLRANGEMAX (HM_SKILLRANGEMIN + MAX_HOMUNSKILL) +#define MC_SKILLRANGEMIN (HM_SKILLRANGEMAX + 1) +#define MC_SKILLRANGEMAX (MC_SKILLRANGEMIN + MAX_MERCSKILL) +#define EL_SKILLRANGEMIN (MC_SKILLRANGEMAX + 1) +#define EL_SKILLRANGEMAX (EL_SKILLRANGEMIN + MAX_ELEMENTALSKILL) +#define GD_SKILLRANGEMIN (EL_SKILLRANGEMAX + 1) +#define GD_SKILLRANGEMAX (GD_SKILLRANGEMIN + MAX_GUILDSKILL) #if GD_SKILLRANGEMAX > 999 #error GD_SKILLRANGEMAX is greater than 999 @@ -131,17 +131,17 @@ void skill_chk(uint16* skill_id) { *skill_id = skill->get_index(*skill_id); // checks/adjusts id } -#define skill_get(var,id) { skill->chk(&id); if(!id) return 0; return var; } -#define skill_get2(var,id,lv) { \ - skill->chk(&id); \ - if(!id) return 0; \ - if( lv > MAX_SKILL_LEVEL && var > 1 ) { \ - int lv2 = lv; lv = skill->db[id].max; \ - return (var) + ((lv2-lv)/2);\ +#define skill_get(var,id) do { skill->chk(&(id)); if(!(id)) return 0; return (var); } while(0) +#define skill_get2(var,id,lv) do { \ + skill->chk(&(id)); \ + if(!(id)) return 0; \ + if( (lv) > MAX_SKILL_LEVEL && (var) > 1 ) { \ + int lv2__ = (lv); (lv) = skill->db[(id)].max; \ + return (var) + ((lv2__-(lv))/2);\ } \ - return var;\ -} -#define skill_glv(lv) min(lv,MAX_SKILL_LEVEL-1) + return (var);\ +} while(0) +#define skill_glv(lv) min((lv),MAX_SKILL_LEVEL-1) // Skill DB int skill_get_hit( uint16 skill_id ) { skill_get (skill->db[skill_id].hit, skill_id); } int skill_get_inf( uint16 skill_id ) { skill_get (skill->db[skill_id].inf, skill_id); } @@ -9523,7 +9523,7 @@ int skill_castend_map (struct map_session_data *sd, uint16 skill_id, const char nullpo_ret(sd); //Simplify skill_failed code. -#define skill_failed(sd) { sd->menuskill_id = sd->menuskill_val = 0; } +#define skill_failed(sd) ( (sd)->menuskill_id = (sd)->menuskill_val = 0 ) if(skill_id != sd->menuskill_id) return 0; diff --git a/src/map/status.c b/src/map/status.c index a8389691f..d64986eca 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -102,10 +102,6 @@ int status_type2relevant_bl_types(int type) return status->RelevantBLTypes[type]; } -#define add_sc(skill,sc) set_sc(skill,sc,SI_BLANK,SCB_NONE) -// indicates that the status displays a visual effect for the affected unit, and should be sent to the client for all supported units -#define set_sc_with_vfx(skill, sc, icon, flag) set_sc((skill), (sc), (icon), (flag)); if((icon) < SI_MAX) status->RelevantBLTypes[(icon)] |= BL_SCEFFECT - static void set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) { uint16 idx; if( (idx = skill->get_index(skill_id)) == 0 ) { @@ -128,6 +124,10 @@ static void set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) { } void initChangeTables(void) { +#define add_sc(skill,sc) set_sc((skill),(sc),SI_BLANK,SCB_NONE) +// indicates that the status displays a visual effect for the affected unit, and should be sent to the client for all supported units +#define set_sc_with_vfx(skill, sc, icon, flag) do { set_sc((skill), (sc), (icon), (flag)); if((icon) < SI_MAX) status->RelevantBLTypes[(icon)] |= BL_SCEFFECT; } while(0) + int i; for (i = 0; i < SC_MAX; i++) @@ -1034,6 +1034,8 @@ void initChangeTables(void) { if( !battle_config.display_hallucination ) //Disable Hallucination. status->IconChangeTable[SC_ILLUSION] = SI_BLANK; +#undef add_sc +#undef set_sc_with_vfx } void initDummyData(void) @@ -8559,12 +8561,14 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val break; case SC_GENSOU: - #define PER( a ) do { \ - if( a <= 15 ) lv = 1; \ - else if( a <= 30 ) lv = 2; \ - else if( a <= 50 ) lv = 3; \ - else if( a <= 75 ) lv = 4; \ - } while(0) +#define PER( a, lvl ) do { \ + int temp__ = (a); \ + if( temp__ <= 15 ) (lvl) = 1; \ + else if( temp__ <= 30 ) (lvl) = 2; \ + else if( temp__ <= 50 ) (lvl) = 3; \ + else if( temp__ <= 75 ) (lvl) = 4; \ + else (lvl) = 5; \ +} while(0) { int hp = status_get_hp(bl), sp = status_get_sp(bl), lv = 5; @@ -8572,13 +8576,13 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if( rand()%100 > (25 + 10 * val1) - status_get_int(bl) / 2) return 0; - PER( 100 / (status_get_max_hp(bl) / hp) ); + PER( 100 / (status_get_max_hp(bl) / hp), lv ); status->heal(bl, (!(hp%2) ? (6-lv) *4 / 100 : -(lv*4) / 100), 0, 1); - PER( 100 / (status_get_max_sp(bl) / sp) ); + PER( 100 / (status_get_max_sp(bl) / sp), lv ); status->heal(bl, 0,(!(sp%2) ? (6-lv) *3 / 100 : -(lv*3) / 100), 1); } - #undef PER +#undef PER break; case SC_ANGRIFFS_MODUS: val2 = 50 + 20 * val1; //atk bonus @@ -10022,7 +10026,7 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { // set the next timer of the sce (don't assume the status still exists) #define sc_timer_next(t,f,i,d) do { \ if( (sce=sc->data[type]) ) \ - sce->timer = timer->add(t,f,i,d); \ + sce->timer = timer->add((t),(f),(i),(d)); \ else \ ShowError("status_change_timer: Unexpected NULL status change id: %d data: %d\n", id, data); \ } while(0) diff --git a/src/map/status.h b/src/map/status.h index cdd5fa481..75582e9a4 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1764,67 +1764,67 @@ struct status_change { //Define for standard HP damage attacks. -#define status_fix_damage(src, target, hp, walkdelay) status->damage(src, target, hp, 0, walkdelay, 0) +#define status_fix_damage(src, target, hp, walkdelay) (status->damage((src), (target), (hp), 0, (walkdelay), 0)) //Define for standard HP/SP damage triggers. -#define status_zap(bl, hp, sp) status->damage(NULL, bl, hp, sp, 0, 1) +#define status_zap(bl, hp, sp) (status->damage(NULL, (bl), (hp), (sp), 0, 1)) //Easier handling of status->percent_change -#define status_percent_heal(bl, hp_rate, sp_rate) status->percent_change(NULL, bl, -(hp_rate), -(sp_rate), 0) -#define status_percent_damage(src, target, hp_rate, sp_rate, kill) status->percent_change(src, target, hp_rate, sp_rate, (kill)?1:2) +#define status_percent_heal(bl, hp_rate, sp_rate) (status->percent_change(NULL, (bl), -(hp_rate), -(sp_rate), 0)) +#define status_percent_damage(src, target, hp_rate, sp_rate, kill) (status->percent_change((src), (target), (hp_rate), (sp_rate), (kill)?1:2)) //Instant kill with no drops/exp/etc -#define status_kill(bl) status_percent_damage(NULL, bl, 100, 0, true) +#define status_kill(bl) status_percent_damage(NULL, (bl), 100, 0, true) -#define status_get_range(bl) status->get_status_data(bl)->rhw.range -#define status_get_hp(bl) status->get_status_data(bl)->hp -#define status_get_max_hp(bl) status->get_status_data(bl)->max_hp -#define status_get_sp(bl) status->get_status_data(bl)->sp -#define status_get_max_sp(bl) status->get_status_data(bl)->max_sp -#define status_get_str(bl) status->get_status_data(bl)->str -#define status_get_agi(bl) status->get_status_data(bl)->agi -#define status_get_vit(bl) status->get_status_data(bl)->vit -#define status_get_int(bl) status->get_status_data(bl)->int_ -#define status_get_dex(bl) status->get_status_data(bl)->dex -#define status_get_luk(bl) status->get_status_data(bl)->luk -#define status_get_hit(bl) status->get_status_data(bl)->hit -#define status_get_flee(bl) status->get_status_data(bl)->flee -#define status_get_mdef(bl) status->get_status_data(bl)->mdef -#define status_get_flee2(bl) status->get_status_data(bl)->flee2 -#define status_get_def2(bl) status->get_status_data(bl)->def2 -#define status_get_mdef2(bl) status->get_status_data(bl)->mdef2 -#define status_get_critical(bl) status->get_status_data(bl)->cri -#define status_get_batk(bl) status->get_status_data(bl)->batk -#define status_get_watk(bl) status->get_status_data(bl)->rhw.atk -#define status_get_watk2(bl) status->get_status_data(bl)->rhw.atk2 -#define status_get_matk_max(bl) status->get_status_data(bl)->matk_max -#define status_get_matk_min(bl) status->get_status_data(bl)->matk_min -#define status_get_lwatk(bl) status->get_status_data(bl)->lhw.atk -#define status_get_lwatk2(bl) status->get_status_data(bl)->lhw.atk2 -#define status_get_adelay(bl) status->get_status_data(bl)->adelay -#define status_get_amotion(bl) status->get_status_data(bl)->amotion -#define status_get_dmotion(bl) status->get_status_data(bl)->dmotion -#define status_get_element(bl) status->get_status_data(bl)->def_ele -#define status_get_element_level(bl) status->get_status_data(bl)->ele_lv -#define status_get_attack_sc_element(bl, sc) status->calc_attack_element(bl, sc, 0) -#define status_get_attack_element(bl) status->get_status_data(bl)->rhw.ele -#define status_get_attack_lelement(bl) status->get_status_data(bl)->lhw.ele -#define status_get_race(bl) status->get_status_data(bl)->race -#define status_get_size(bl) status->get_status_data(bl)->size -#define status_get_mode(bl) status->get_status_data(bl)->mode +#define status_get_range(bl) (status->get_status_data(bl)->rhw.range) +#define status_get_hp(bl) (status->get_status_data(bl)->hp) +#define status_get_max_hp(bl) (status->get_status_data(bl)->max_hp) +#define status_get_sp(bl) (status->get_status_data(bl)->sp) +#define status_get_max_sp(bl) (status->get_status_data(bl)->max_sp) +#define status_get_str(bl) (status->get_status_data(bl)->str) +#define status_get_agi(bl) (status->get_status_data(bl)->agi) +#define status_get_vit(bl) (status->get_status_data(bl)->vit) +#define status_get_int(bl) (status->get_status_data(bl)->int_) +#define status_get_dex(bl) (status->get_status_data(bl)->dex) +#define status_get_luk(bl) (status->get_status_data(bl)->luk) +#define status_get_hit(bl) (status->get_status_data(bl)->hit) +#define status_get_flee(bl) (status->get_status_data(bl)->flee) +#define status_get_mdef(bl) (status->get_status_data(bl)->mdef) +#define status_get_flee2(bl) (status->get_status_data(bl)->flee2) +#define status_get_def2(bl) (status->get_status_data(bl)->def2) +#define status_get_mdef2(bl) (status->get_status_data(bl)->mdef2) +#define status_get_critical(bl) (status->get_status_data(bl)->cri) +#define status_get_batk(bl) (status->get_status_data(bl)->batk) +#define status_get_watk(bl) (status->get_status_data(bl)->rhw.atk) +#define status_get_watk2(bl) (status->get_status_data(bl)->rhw.atk2) +#define status_get_matk_max(bl) (status->get_status_data(bl)->matk_max) +#define status_get_matk_min(bl) (status->get_status_data(bl)->matk_min) +#define status_get_lwatk(bl) (status->get_status_data(bl)->lhw.atk) +#define status_get_lwatk2(bl) (status->get_status_data(bl)->lhw.atk2) +#define status_get_adelay(bl) (status->get_status_data(bl)->adelay) +#define status_get_amotion(bl) (status->get_status_data(bl)->amotion) +#define status_get_dmotion(bl) (status->get_status_data(bl)->dmotion) +#define status_get_element(bl) (status->get_status_data(bl)->def_ele) +#define status_get_element_level(bl) (status->get_status_data(bl)->ele_lv) +#define status_get_attack_sc_element(bl, sc) (status->calc_attack_element((bl), (sc), 0)) +#define status_get_attack_element(bl) (status->get_status_data(bl)->rhw.ele) +#define status_get_attack_lelement(bl) (status->get_status_data(bl)->lhw.ele) +#define status_get_race(bl) (status->get_status_data(bl)->race) +#define status_get_size(bl) (status->get_status_data(bl)->size) +#define status_get_mode(bl) (status->get_status_data(bl)->mode) //Short version, receives rate in 1->100 range, and does not uses a flag setting. -#define sc_start(bl, type, rate, val1, tick) status->change_start(bl,type,100*(rate),val1,0,0,0,tick,0) -#define sc_start2(bl, type, rate, val1, val2, tick) status->change_start(bl,type,100*(rate),val1,val2,0,0,tick,0) -#define sc_start4(bl, type, rate, val1, val2, val3, val4, tick) status->change_start(bl,type,100*(rate),val1,val2,val3,val4,tick,0) +#define sc_start(bl, type, rate, val1, tick) (status->change_start((bl),(type),100*(rate),(val1),0,0,0,(tick),0)) +#define sc_start2(bl, type, rate, val1, val2, tick) (status->change_start((bl),(type),100*(rate),(val1),(val2),0,0,(tick),0)) +#define sc_start4(bl, type, rate, val1, val2, val3, val4, tick) (status->change_start((bl),(type),100*(rate),(val1),(val2),(val3),(val4),(tick),0)) -#define status_change_end(bl,type,tid) status->change_end_(bl,type,tid,__FILE__,__LINE__) +#define status_change_end(bl,type,tid) (status->change_end_((bl),(type),(tid),__FILE__,__LINE__)) -#define status_calc_bl(bl, flag) status->calc_bl_(bl, (enum scb_flag)(flag), SCO_NONE) -#define status_calc_mob(md, opt) status->calc_bl_(&(md)->bl, SCB_ALL, opt) -#define status_calc_pet(pd, opt) status->calc_bl_(&(pd)->bl, SCB_ALL, opt) -#define status_calc_pc(sd, opt) status->calc_bl_(&(sd)->bl, SCB_ALL, opt) -#define status_calc_homunculus(hd, opt) status->calc_bl_(&(hd)->bl, SCB_ALL, opt) -#define status_calc_mercenary(md, opt) status->calc_bl_(&(md)->bl, SCB_ALL, opt) -#define status_calc_elemental(ed, opt) status->calc_bl_(&(ed)->bl, SCB_ALL, opt) -#define status_calc_npc(nd, opt) status->calc_bl_(&(nd)->bl, SCB_ALL, opt) +#define status_calc_bl(bl, flag) (status->calc_bl_((bl), (enum scb_flag)(flag), SCO_NONE)) +#define status_calc_mob(md, opt) (status->calc_bl_(&(md)->bl, SCB_ALL, (opt))) +#define status_calc_pet(pd, opt) (status->calc_bl_(&(pd)->bl, SCB_ALL, (opt))) +#define status_calc_pc(sd, opt) (status->calc_bl_(&(sd)->bl, SCB_ALL, (opt))) +#define status_calc_homunculus(hd, opt) (status->calc_bl_(&(hd)->bl, SCB_ALL, (opt))) +#define status_calc_mercenary(md, opt) (status->calc_bl_(&(md)->bl, SCB_ALL, (opt))) +#define status_calc_elemental(ed, opt) (status->calc_bl_(&(ed)->bl, SCB_ALL, (opt))) +#define status_calc_npc(nd, opt) (status->calc_bl_(&(nd)->bl, SCB_ALL, (opt))) // bonus values and upgrade chances for refining equipment struct s_refine_info { -- cgit v1.2.3-70-g09d2 From 1064d8c073580fcb6a73c29a1c3c0ceb8a5df587 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 25 Nov 2013 11:19:28 -0200 Subject: Fixed equip_level_max handling in the sql db converter The field is now NULL when the value is not provided, instead of MAX_LEVEL. Special Thanks to Mvmbles for bringing the issue to our attention. Signed-off-by: shennetsind --- src/common/HPM.c | 2 ++ src/plugins/db2sql.c | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 641ffe2e6..005bc2ddc 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -644,6 +644,8 @@ void hplugins_share_defaults(void) { /* libconfig (temp) */ HPM->share(config_setting_lookup_string,"config_setting_lookup_string"); HPM->share(config_setting_lookup_int,"config_setting_lookup_int"); + HPM->share(config_setting_get_member,"config_setting_get_member"); + HPM->share(config_setting_length,"config_setting_length"); } void hpm_init(void) { diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 9161e0263..1bf3f6c01 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -36,6 +36,8 @@ bool torun = false; int (*itemdb_readdb_libconfig_sub) (config_setting_t *it, int n, const char *source); int (*h_config_setting_lookup_string) (const config_setting_t *setting, const char *name, const char **value); int (*h_config_setting_lookup_int) (const config_setting_t *setting, const char *name, int *value); +config_setting_t *(*h_config_setting_get_member) (const config_setting_t *setting, const char *name); +int (*h_config_setting_length) (const config_setting_t *setting); void hstr(const char *str) { if( strlen(str) > tosql.buf[3].len ) { @@ -54,7 +56,8 @@ int db2sql(config_setting_t *entry, int n, const char *source) { char *str; int i32; unsigned int ui32, job = 0, upper = 0; - + config_setting_t *t = NULL; + SQL->EscapeString(NULL, e_name, it->name); SQL->EscapeString(NULL, e_jname, it->jname); if( it->script ) { h_config_setting_lookup_string(entry, "Script", &script); hstr(script); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[0].len ) { tosql.buf[0].len = tosql.buf[0].len + strlen(str) + 1000; RECREATE(tosql.buf[0].p,char,tosql.buf[0].len); } SQL->EscapeString(NULL, tosql.buf[0].p, str); } @@ -75,8 +78,13 @@ int db2sql(config_setting_t *entry, int n, const char *source) { upper = ui32; - fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%s','%s','%s');\n", - tosql.db_name,it->nameid,e_name,e_jname,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,job,upper,it->sex,it->equip,it->wlv,it->elv,it->elvmax,it->flag.no_refine?0:1,it->look,it->flag.bindonequip?1:0,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:""); + /* check if we have the equip_level_max, if so we send it -- otherwise we send NULL */ + if( (t = h_config_setting_get_member(entry, "EquipLv")) && config_setting_is_aggregate(t) && h_config_setting_length(t) >= 2 ) + fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%s','%s','%s');\n", + tosql.db_name,it->nameid,e_name,e_jname,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,job,upper,it->sex,it->equip,it->wlv,it->elv,it->elvmax,it->flag.no_refine?0:1,it->look,it->flag.bindonequip?1:0,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:""); + else + fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',NULL,'%u','%u','%u','%s','%s','%s');\n", + tosql.db_name,it->nameid,e_name,e_jname,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,job,upper,it->sex,it->equip,it->wlv,it->elv,it->flag.no_refine?0:1,it->look,it->flag.bindonequip?1:0,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:""); } return it?it->nameid:0; @@ -186,6 +194,8 @@ void db2sql_arg(char *param) { HPExport void server_preinit (void) { h_config_setting_lookup_string = GET_SYMBOL("config_setting_lookup_string"); h_config_setting_lookup_int = GET_SYMBOL("config_setting_lookup_int"); + h_config_setting_get_member = GET_SYMBOL("config_setting_get_member"); + h_config_setting_length = GET_SYMBOL("config_setting_length"); SQL = GET_SYMBOL("SQL"); itemdb = GET_SYMBOL("itemdb"); -- cgit v1.2.3-70-g09d2 From 0e25c604d9f84cbb0a9a737633a8b764c2a9d96f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 16 Dec 2013 20:20:39 -0200 Subject: Introducing HPM Support for custom battle confs Special Thanks to Mhalicot. Signed-off-by: shennetsind --- src/common/HPM.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++- src/common/HPM.h | 11 +++++++++ src/common/HPMi.h | 11 +++++++++ src/map/battle.c | 6 ++++- src/plugins/sample.c | 13 ++++++++++- 5 files changed, 103 insertions(+), 3 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 005bc2ddc..8e41e5838 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -215,6 +215,7 @@ struct hplugin *hplugin_load(const char* filename) { plugin->hpi->HookStop = HPM->import_symbol("HookStop",plugin->idx); plugin->hpi->HookStopped = HPM->import_symbol("HookStopped",plugin->idx); plugin->hpi->addArg = HPM->import_symbol("addArg",plugin->idx); + plugin->hpi->addConf = HPM->import_symbol("addConf",plugin->idx); /* server specific */ if( HPM->load_sub ) HPM->load_sub(plugin); @@ -602,6 +603,48 @@ bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, void (*func) return true; } +bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val)) { + struct HPConfListenStorage *conf; + unsigned int i; + + if( type >= HPCT_MAX ) { + ShowError("HPM->addConf:%s: unknown point '%u' specified for config '%s'\n",HPM->pid2name(pluginID),type,name); + return false; + } + + for(i = 0; i < HPM->confsc[type]; i++) { + if( !strcmpi(name,HPM->confs[type][i].key) ) { + ShowError("HPM->addConf:%s: duplicate '%s', already in use by '%s'!",HPM->pid2name(pluginID),name,HPM->pid2name(HPM->confs[type][i].pluginID)); + return false; + } + } + + RECREATE(HPM->confs[type], struct HPConfListenStorage, ++HPM->confsc[type]); + conf = &HPM->confs[type][HPM->confsc[type] - 1]; + + conf->pluginID = pluginID; + safestrncpy(conf->key, name, HPM_ADDCONF_LENGTH); + conf->func = func; + + return true; +} +bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType point) { + unsigned int i; + + /* exists? */ + for(i = 0; i < HPM->confsc[point]; i++) { + if( !strcmpi(w1,HPM->confs[point][i].key) ) + break; + } + + /* trigger and we're set! */ + if( i != HPM->confsc[point] ) { + HPM->confs[point][i].func(w2); + return true; + } + + return false; +} void hplugins_share_defaults(void) { /* console */ @@ -617,6 +660,7 @@ void hplugins_share_defaults(void) { HPM->share(HPM_HookStop,"HookStop"); HPM->share(HPM_HookStopped,"HookStopped"); HPM->share(hpm_add_arg,"addArg"); + HPM->share(hplugins_addconf,"addConf"); /* core */ HPM->share(&runflag,"runflag"); HPM->share(arg_v,"arg_v"); @@ -728,6 +772,11 @@ void hpm_final(void) { aFree(HPM->packets[i]); } + for( i = 0; i < HPCT_MAX; i++ ) { + if( HPM->confsc[i] ) + aFree(HPM->confs[i]); + } + HPM->arg_db->destroy(HPM->arg_db,HPM->arg_db_clear_sub); /* HPM->fnames is cleared after the memory manager goes down */ @@ -736,13 +785,26 @@ void hpm_final(void) { return; } void hpm_defaults(void) { + unsigned int i; HPM = &HPM_s; HPM->fnames = NULL; HPM->fnamec = 0; HPM->force_return = false; HPM->hooking = false; - + /* */ + HPM->fnames = NULL; + HPM->fnamec = 0; + for(i = 0; i < hpPHP_MAX; i++) { + HPM->packets[i] = NULL; + HPM->packetsc[i] = 0; + } + for(i = 0; i < HPCT_MAX; i++) { + HPM->confs[i] = NULL; + HPM->confsc[i] = 0; + } + HPM->arg_db = NULL; + /* */ HPM->init = hpm_init; HPM->final = hpm_final; @@ -767,4 +829,5 @@ void hpm_defaults(void) { HPM->arg_help = hpm_arg_help; HPM->grabHPData = hplugins_grabHPData; HPM->grabHPDataSub = NULL; + HPM->parseConf = hplugins_parse_conf; } diff --git a/src/common/HPM.h b/src/common/HPM.h index d5a5cbb6a..1f2ba4648 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -88,6 +88,12 @@ struct HPDataOperationStorage { void **HPDataSRCPtr; unsigned int *hdatac; }; +/* */ +struct HPConfListenStorage { + unsigned int pluginID; + char key[HPM_ADDCONF_LENGTH]; + void (*func) (const char *val); +}; /* Hercules Plugin Manager Interface */ struct HPM_interface { @@ -108,6 +114,9 @@ struct HPM_interface { /* plugin file ptr caching */ struct HPMFileNameCache *fnames; unsigned int fnamec; + /* config listen */ + struct HPConfListenStorage *confs[HPCT_MAX]; + unsigned int confsc[HPCT_MAX]; /* --command-line */ DBMap *arg_db; /* funcs */ @@ -135,6 +144,8 @@ struct HPM_interface { void (*grabHPData) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); /* for server-specific HPData e.g. map_session_data */ void (*grabHPDataSub) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); + /* for custom config parsing */ + bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point); } HPM_s; struct HPM_interface *HPM; diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 2cd1075c4..742132cde 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -36,6 +36,7 @@ struct map_session_data; #include "../common/showmsg.h" #define HPM_VERSION "1.0" +#define HPM_ADDCONF_LENGTH 40 struct hplugin_info { char* name; @@ -83,6 +84,12 @@ enum HPluginDataTypes { HPDT_NPCD, }; +/* used in macros and conf storage */ +enum HPluginConfType { + HPCT_BATTLE, /* battle-conf (map-server */ + HPCT_MAX, +}; + #define addHookPre(tname,hook) (HPMi->AddHook(HOOK_TYPE_PRE,(tname),(hook),HPMi->pid)) #define addHookPost(tname,hook) (HPMi->AddHook(HOOK_TYPE_POST,(tname),(hook),HPMi->pid)) /* need better names ;/ */ @@ -128,6 +135,8 @@ enum HPluginDataTypes { } /* HPMi->addPacket */ #define addPacket(cmd,len,receive,point) HPMi->addPacket(cmd,len,receive,point,HPMi->pid) +/* HPMi->addBattleConf */ +#define addBattleConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_BATTLE,bcname,funcname) /* Hercules Plugin Mananger Include Interface */ HPExport struct HPMi_interface { @@ -150,6 +159,8 @@ HPExport struct HPMi_interface { bool (*HookStopped) (void); /* program --arg/-a */ bool (*addArg) (unsigned int pluginID, char *name, bool has_param,void (*func) (char *param),void (*help) (void)); + /* battle-config recv param */ + bool (*addConf) (unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val)); } HPMi_s; #ifndef _HPM_H_ HPExport struct HPMi_interface *HPMi; diff --git a/src/map/battle.c b/src/map/battle.c index 3b8064278..b8143213a 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -12,6 +12,7 @@ #include "../common/socket.h" #include "../common/strlib.h" #include "../common/utils.h" +#include "../common/HPM.h" #include "map.h" #include "path.h" @@ -6708,8 +6709,11 @@ int battle_set_value(const char* w1, const char* w2) int i; ARR_FIND(0, ARRAYLENGTH(battle_data), i, strcmpi(w1, battle_data[i].str) == 0); - if (i == ARRAYLENGTH(battle_data)) + if (i == ARRAYLENGTH(battle_data)) { + if( HPM->parseConf(w1,w2,HPCT_BATTLE) ) /* if plugin-owned, succeed */ + return 1; return 0; // not found + } if (val < battle_data[i].min || val > battle_data[i].max) { diff --git a/src/plugins/sample.c b/src/plugins/sample.c index 552194e43..b3e2b570f 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -109,6 +109,10 @@ int my_pc_dropitem_post(int retVal, struct map_session_data *sd,int *n,int *amou } return 1; } +void parse_my_setting(const char *val) { + ShowDebug("Received 'my_setting:%s'\n",val); + /* do anything with the var e.g. config_switch(val) */ +} /* run when server starts */ HPExport void plugin_init (void) { char *server_type; @@ -168,7 +172,14 @@ HPExport void plugin_init (void) { /* if the original pc->dropitem was successful and the amount stored on my_pc_dropitem_storage is higher than 1, */ /* our posthook will display a message to the user about the cap */ /* - by checking whether it was successful (retVal value) it allows for the originals conditions to take place */ - addHookPost("pc->dropitem",my_pc_dropitem_post); + addHookPost("pc->dropitem",my_pc_dropitem_post); +} +/* triggered when server starts loading, before any server-specific data is set */ +HPExport void server_preinit (void) { + /* makes map server listen to mysetting:value in any "battleconf" file (including imported or custom ones) */ + /* value is not limited to numbers, its passed to our plugins handler (parse_my_setting) as const char *, + * and thus can be manipulated at will */ + addBattleConf("my_setting",parse_my_setting); } /* run when server is ready (online) */ HPExport void server_online (void) { -- cgit v1.2.3-70-g09d2 From 38f6b2c68c59d3ed2e3fc6d4d75907939c4fdf61 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 17 Dec 2013 23:02:13 -0200 Subject: Speed up of several procedures that rely on ERS, _mreallocz ('z'ero) Made Possible Thanks to the Woonderful Haruna! <3 Commit also fixes an inconsistency in the ERS, where it'd start with clear memory but would use garbage upon resizing, also implements a new ERS option that clears entries as soon as pass by ers_free, so that they'll be all shinny for when ers_alloc reuses them. Signed-off-by: shennetsind --- src/common/HPM.c | 4 ++++ src/common/db.c | 6 +++--- src/common/ers.c | 4 ++++ src/common/ers.h | 9 +++++---- src/common/malloc.c | 33 +++++++++++++++++++++++++++++++++ src/common/malloc.h | 4 +++- src/map/map.c | 4 ++-- src/map/mapreg_sql.c | 2 +- src/map/mob.c | 3 +-- src/map/script.c | 3 +-- src/map/skill.c | 9 +++------ 11 files changed, 60 insertions(+), 21 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 8e41e5838..426fac94a 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -533,6 +533,9 @@ void* HPM_calloc(size_t num, size_t size, const char *file, int line, const char void* HPM_realloc(void *p, size_t size, const char *file, int line, const char *func) { return iMalloc->realloc(p,size,HPM_file2ptr(file),line,func); } +void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char *func) { + return iMalloc->reallocz(p,size,HPM_file2ptr(file),line,func); +} char* HPM_astrdup(const char *p, const char *file, int line, const char *func) { return iMalloc->astrdup(p,HPM_file2ptr(file),line,func); } @@ -705,6 +708,7 @@ void hpm_init(void) { HPMiMalloc->malloc = HPM_mmalloc; HPMiMalloc->calloc = HPM_calloc; HPMiMalloc->realloc = HPM_realloc; + HPMiMalloc->reallocz = HPM_reallocz; HPMiMalloc->astrdup = HPM_astrdup; sscanf(HPM_VERSION, "%u.%u", &HPM->version[0], &HPM->version[1]); diff --git a/src/common/db.c b/src/common/db.c index ba3fef97b..efe7ca8b2 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -2446,7 +2446,7 @@ DBMap* db_alloc(const char *file, const char *func, int line, DBType type, DBOpt db->free_lock = 0; /* Other */ snprintf(ers_name, 50, "db_alloc:nodes:%s:%s:%d",func,file,line); - db->nodes = ers_new(sizeof(struct dbn),ers_name,ERS_OPT_WAIT|ERS_OPT_FREE_NAME); + db->nodes = ers_new(sizeof(struct dbn),ers_name,ERS_OPT_WAIT|ERS_OPT_FREE_NAME|ERS_OPT_CLEAN); db->cmp = DB->default_cmp(type); db->hash = DB->default_hash(type); db->release = DB->default_release(type, options); @@ -2609,8 +2609,8 @@ void* db_data2ptr(DBData *data) * @see #db_final(void) */ void db_init(void) { - db_iterator_ers = ers_new(sizeof(struct DBIterator_impl),"db.c::db_iterator_ers",ERS_OPT_NONE); - db_alloc_ers = ers_new(sizeof(struct DBMap_impl),"db.c::db_alloc_ers",ERS_OPT_NONE); + db_iterator_ers = ers_new(sizeof(struct DBIterator_impl),"db.c::db_iterator_ers",ERS_OPT_CLEAN); + db_alloc_ers = ers_new(sizeof(struct DBMap_impl),"db.c::db_alloc_ers",ERS_OPT_CLEAN); ers_chunk_size(db_alloc_ers, 50); DB_COUNTSTAT(db_init); } diff --git a/src/common/ers.c b/src/common/ers.c index 22269a51f..a7dad49ab 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -40,6 +40,7 @@ * @see common#ers.h * \*****************************************************************************/ #include +#include #include "../common/cbasetypes.h" #include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree @@ -238,6 +239,9 @@ static void ers_obj_free_entry(ERS self, void *entry) return; } + if( instance->Options & ERS_OPT_CLEAN ) + memset((unsigned char*)reuse + sizeof(struct ers_list), 0, instance->Cache->ObjectSize - sizeof(struct ers_list)); + reuse->Next = instance->Cache->ReuseList; instance->Cache->ReuseList = reuse; instance->Count--; diff --git a/src/common/ers.h b/src/common/ers.h index 4ff2a6230..e63711b81 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -71,10 +71,11 @@ #endif /* not ERS_ALIGN_ENTRY */ enum ERSOptions { - ERS_OPT_NONE = 0x0, - ERS_OPT_CLEAR = 0x1,/* silently clears any entries left in the manager upon destruction */ - ERS_OPT_WAIT = 0x2,/* wait for entries to come in order to list! */ - ERS_OPT_FREE_NAME = 0x4,/* name is dynamic memory, and should be freed */ + ERS_OPT_NONE = 0x0, + ERS_OPT_CLEAR = 0x1,/* silently clears any entries left in the manager upon destruction */ + ERS_OPT_WAIT = 0x2,/* wait for entries to come in order to list! */ + ERS_OPT_FREE_NAME = 0x4,/* name is dynamic memory, and should be freed */ + ERS_OPT_CLEAN = 0x8,/* clears used memory upon ers_free so that its all new to be reused on the next alloc */ }; /** diff --git a/src/common/malloc.c b/src/common/malloc.c index 23e28a65f..875b87a15 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -369,6 +369,37 @@ void* _mrealloc(void *memblock, size_t size, const char *file, int line, const c } } +/* a _mrealloc clone with the difference it 'z'eroes the newly created memory */ +void* _mreallocz(void *memblock, size_t size, const char *file, int line, const char *func ) { + size_t old_size; + void *p = NULL; + + if(memblock == NULL) { + p = iMalloc->malloc(size,file,line,func); + memset(p,0,size); + return p; + } + + old_size = ((struct unit_head *)((char *)memblock - sizeof(struct unit_head) + sizeof(long)))->size; + if( old_size == 0 ) { + old_size = ((struct unit_head_large *)((char *)memblock - sizeof(struct unit_head_large) + sizeof(long)))->size; + } + if(old_size > size) { + // Size reduction - return> as it is (negligence) + return memblock; + } else { + // Size Large + p = iMalloc->malloc(size,file,line,func); + if(p != NULL) { + memcpy(p,memblock,old_size); + memset(p+old_size,0,size-old_size); + } + iMalloc->free(memblock,file,line,func); + return p; + } +} + + char* _mstrdup(const char *p, const char *file, int line, const char *func ) { if(p == NULL) { @@ -822,12 +853,14 @@ void malloc_defaults(void) { iMalloc->malloc = _mmalloc; iMalloc->calloc = _mcalloc; iMalloc->realloc = _mrealloc; + iMalloc->reallocz= _mreallocz; iMalloc->astrdup = _mstrdup; iMalloc->free = _mfree; #else iMalloc->malloc = aMalloc_; iMalloc->calloc = aCalloc_; iMalloc->realloc = aRealloc_; + iMalloc->reallocz= aRealloc_;/* not using memory manager huhum o.o perhaps we could still do something about */ iMalloc->astrdup = aStrdup_; iMalloc->free = aFree_; #endif diff --git a/src/common/malloc.h b/src/common/malloc.h index cd0ef238b..19b5213bb 100644 --- a/src/common/malloc.h +++ b/src/common/malloc.h @@ -33,6 +33,7 @@ # define aMalloc(n) (iMalloc->malloc((n),ALC_MARK)) # define aCalloc(m,n) (iMalloc->calloc((m),(n),ALC_MARK)) # define aRealloc(p,n) (iMalloc->realloc((p),(n),ALC_MARK)) +# define aReallocz(p,n) (iMalloc->reallocz((p),(n),ALC_MARK)) # define aStrdup(p) (iMalloc->astrdup((p),ALC_MARK)) # define aFree(p) (iMalloc->free((p),ALC_MARK)) @@ -54,7 +55,7 @@ ////////////// Others ////////////////////////// // should be merged with any of above later #define CREATE(result, type, number) ((result) = (type *) aCalloc((number), sizeof(type))) -#define RECREATE(result, type, number) ((result) = (type *) aRealloc((result), sizeof(type) * (number))) +#define RECREATE(result, type, number) ((result) = (type *) aReallocz((result), sizeof(type) * (number))) //////////////////////////////////////////////// @@ -73,6 +74,7 @@ struct malloc_interface { void* (*malloc )(size_t size, const char *file, int line, const char *func); void* (*calloc )(size_t num, size_t size, const char *file, int line, const char *func); void* (*realloc )(void *p, size_t size, const char *file, int line, const char *func); + void* (*reallocz)(void *p, size_t size, const char *file, int line, const char *func); char* (*astrdup )(const char *p, const char *file, int line, const char *func); void (*free )(void *p, const char *file, int line, const char *func); /* */ diff --git a/src/map/map.c b/src/map/map.c index 3a018828a..7ff4ebcc5 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5551,9 +5551,9 @@ int do_init(int argc, char *argv[]) map->iwall_db = strdb_alloc(DB_OPT_RELEASE_DATA,2*NAME_LENGTH+2+1); // [Zephyrus] Invisible Walls map->zone_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, MAP_ZONE_NAME_LENGTH); - map->iterator_ers = ers_new(sizeof(struct s_mapiterator),"map.c::map_iterator_ers",ERS_OPT_NONE); + map->iterator_ers = ers_new(sizeof(struct s_mapiterator),"map.c::map_iterator_ers",ERS_OPT_CLEAN); - map->flooritem_ers = ers_new(sizeof(struct flooritem_data),"map.c::map_flooritem_ers",ERS_OPT_NONE); + map->flooritem_ers = ers_new(sizeof(struct flooritem_data),"map.c::map_flooritem_ers",ERS_OPT_CLEAN); ers_chunk_size(map->flooritem_ers, 100); if (!minimal) { diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index c94e42d5d..6a13ef2a0 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -291,7 +291,7 @@ void mapreg_final(void) { void mapreg_init(void) { mapreg->db = idb_alloc(DB_OPT_BASE); mapreg->str_db = idb_alloc(DB_OPT_BASE); - mapreg->ers = ers_new(sizeof(struct mapreg_save), "mapreg_sql.c::mapreg_ers", ERS_OPT_NONE); + mapreg->ers = ers_new(sizeof(struct mapreg_save), "mapreg_sql.c::mapreg_ers", ERS_OPT_CLEAN); mapreg->load(); diff --git a/src/map/mob.c b/src/map/mob.c index 90a967d61..d919e7478 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1768,7 +1768,6 @@ int mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { *------------------------------------------*/ struct item_drop* mob_setdropitem(int nameid, int qty, struct item_data *data) { struct item_drop *drop = ers_alloc(item_drop_ers, struct item_drop); - memset(&drop->item_data, 0, sizeof(struct item)); drop->item_data.nameid = nameid; drop->item_data.amount = qty; drop->item_data.identify = data ? itemdb->isidentified2(data) : itemdb->isidentified(nameid); @@ -4642,7 +4641,7 @@ int do_init_mob(bool minimal) { memset(mob->db_data,0,sizeof(mob->db_data)); //Clear the array mob->db_data[0] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns mob->makedummymobdb(0); //The first time this is invoked, it creates the dummy mob - item_drop_ers = ers_new(sizeof(struct item_drop),"mob.c::item_drop_ers",ERS_OPT_NONE); + item_drop_ers = ers_new(sizeof(struct item_drop),"mob.c::item_drop_ers",ERS_OPT_CLEAN); item_drop_list_ers = ers_new(sizeof(struct item_drop_list),"mob.c::item_drop_list_ers",ERS_OPT_NONE); mob->load(minimal); diff --git a/src/map/script.c b/src/map/script.c index aa8ac7f63..074348ef0 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2940,7 +2940,6 @@ struct script_state* script_alloc_state(struct script_code* rootscript, int pos, struct script_state* st; st = ers_alloc(script->st_ers, struct script_state); - memset(st, 0, sizeof(struct script_state)); st->stack = ers_alloc(script->stack_ers, struct script_stack); st->stack->sp = 0; st->stack->sp_max = 64; @@ -4013,7 +4012,7 @@ void do_init_script(bool minimal) { script->userfunc_db = strdb_alloc(DB_OPT_DUP_KEY,0); script->autobonus_db = strdb_alloc(DB_OPT_DUP_KEY,0); - script->st_ers = ers_new(sizeof(struct script_state), "script.c::st_ers", ERS_OPT_NONE); + script->st_ers = ers_new(sizeof(struct script_state), "script.c::st_ers", ERS_OPT_CLEAN); script->stack_ers = ers_new(sizeof(struct script_stack), "script.c::script_stack", ERS_OPT_NONE); ers_chunk_size(script->st_ers, 10); diff --git a/src/map/skill.c b/src/map/skill.c index 6893a9f57..71e343db0 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -17141,10 +17141,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick) if( !(cd = idb_get(skill->cd_db,sd->status.char_id)) ) {// create a new skill cooldown object for map storage cd = ers_alloc(skill->cd_ers, struct skill_cd); - - cd->cursor = 0; - memset(cd->entry, 0, sizeof(cd->entry)); - + idb_put( skill->cd_db, sd->status.char_id, cd ); } else { int i; @@ -18215,9 +18212,9 @@ int do_init_skill(bool minimal) { skill->cd_db = idb_alloc(DB_OPT_BASE); skill->usave_db = idb_alloc(DB_OPT_RELEASE_DATA); - skill->unit_ers = ers_new(sizeof(struct skill_unit_group),"skill.c::skill_unit_ers",ERS_OPT_NONE); + skill->unit_ers = ers_new(sizeof(struct skill_unit_group),"skill.c::skill_unit_ers",ERS_OPT_CLEAN); skill->timer_ers = ers_new(sizeof(struct skill_timerskill),"skill.c::skill_timer_ers",ERS_OPT_NONE); - skill->cd_ers = ers_new(sizeof(struct skill_cd),"skill.c::skill_cd_ers",ERS_OPT_CLEAR); + skill->cd_ers = ers_new(sizeof(struct skill_cd),"skill.c::skill_cd_ers",ERS_OPT_CLEAR|ERS_OPT_CLEAN); skill->cd_entry_ers = ers_new(sizeof(struct skill_cd_entry),"skill.c::skill_cd_entry_ers",ERS_OPT_CLEAR); ers_chunk_size(skill->cd_ers, 25); -- cgit v1.2.3-70-g09d2 From a9cc02e1dea69e14a1b1e3d1cf27aaa271ac0b4b Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 18 Jan 2014 18:34:21 -0200 Subject: Libconfig Interfaced Ready for plugin use. Thanks to Haruna Signed-off-by: shennetsind --- src/common/HPM.c | 23 +++---- src/common/conf.c | 158 +++++++++++++++++++++++++++++++------------ src/common/conf.h | 92 +++++++++++++++++++++++-- src/common/core.c | 2 + src/map/atcommand.c | 40 +++++------ src/map/battleground.c | 50 +++++++------- src/map/clif.c | 73 ++++++++++---------- src/map/itemdb.c | 178 ++++++++++++++++++++++++------------------------- src/map/map.c | 160 ++++++++++++++++++++++---------------------- src/map/pc.c | 28 ++++---- src/map/pc_groups.c | 72 ++++++++++---------- src/plugins/db2sql.c | 23 +++---- 12 files changed, 525 insertions(+), 374 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 426fac94a..e31437b72 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -261,21 +261,21 @@ void hplugins_config_read(void) { fclose(fp); } - if (conf_read_file(&plugins_conf, config_filename)) + if (libconfig->read_file(&plugins_conf, config_filename)) return; if( HPM->symbol_defaults_sub ) HPM->symbol_defaults_sub(); - plist = config_lookup(&plugins_conf, "plugins_list"); + plist = libconfig->lookup(&plugins_conf, "plugins_list"); if (plist != NULL) { - int length = config_setting_length(plist), i; + int length = libconfig->setting_length(plist), i; char filename[60]; for(i = 0; i < length; i++) { - if( !strcmpi(config_setting_get_string_elem(plist,i),"HPMHooking") ) {//must load it first + if( !strcmpi(libconfig->setting_get_string_elem(plist,i),"HPMHooking") ) {//must load it first struct hplugin *plugin; - snprintf(filename, 60, "plugins/%s%s", config_setting_get_string_elem(plist,i), DLL_EXT); + snprintf(filename, 60, "plugins/%s%s", libconfig->setting_get_string_elem(plist,i), DLL_EXT); if( ( plugin = HPM->load(filename) ) ) { bool (*func)(bool *fr); bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); @@ -289,12 +289,12 @@ void hplugins_config_read(void) { } } for(i = 0; i < length; i++) { - if( strcmpi(config_setting_get_string_elem(plist,i),"HPMHooking") ) {//now all others - snprintf(filename, 60, "plugins/%s%s", config_setting_get_string_elem(plist,i), DLL_EXT); + if( strcmpi(libconfig->setting_get_string_elem(plist,i),"HPMHooking") ) {//now all others + snprintf(filename, 60, "plugins/%s%s", libconfig->setting_get_string_elem(plist,i), DLL_EXT); HPM->load(filename); } } - config_destroy(&plugins_conf); + libconfig->destroy(&plugins_conf); } if( HPM->plugin_count ) @@ -688,11 +688,8 @@ void hplugins_share_defaults(void) { HPM->share(SQL,"SQL"); /* timer */ HPM->share(timer,"timer"); - /* libconfig (temp) */ - HPM->share(config_setting_lookup_string,"config_setting_lookup_string"); - HPM->share(config_setting_lookup_int,"config_setting_lookup_int"); - HPM->share(config_setting_get_member,"config_setting_get_member"); - HPM->share(config_setting_length,"config_setting_length"); + /* libconfig */ + HPM->share(libconfig,"libconfig"); } void hpm_init(void) { diff --git a/src/common/conf.c b/src/common/conf.c index 813069ac4..b816b2f7f 100644 --- a/src/common/conf.c +++ b/src/common/conf.c @@ -7,13 +7,16 @@ #include "../common/showmsg.h" // ShowError -int conf_read_file(config_t *config, const char *config_filename) -{ - config_init(config); - if (!config_read_file(config, config_filename)) { +/* interface source */ +struct libconfig_interface libconfig_s; + + +int conf_read_file(config_t *config, const char *config_filename) { + libconfig->init(config); + if (!libconfig->read_file_src(config, config_filename)) { ShowError("%s:%d - %s\n", config_error_file(config), config_error_line(config), config_error_text(config)); - config_destroy(config); + libconfig->destroy(config); return 1; } return 0; @@ -22,71 +25,63 @@ int conf_read_file(config_t *config, const char *config_filename) // // Functions to copy settings from libconfig/contrib // -static void config_setting_copy_simple(config_setting_t *parent, const config_setting_t *src); -static void config_setting_copy_elem(config_setting_t *parent, const config_setting_t *src); -static void config_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src); -int config_setting_copy(config_setting_t *parent, const config_setting_t *src); - -void config_setting_copy_simple(config_setting_t *parent, const config_setting_t *src) -{ +void config_setting_copy_simple(config_setting_t *parent, const config_setting_t *src) { if (config_setting_is_aggregate(src)) { - config_setting_copy_aggregate(parent, src); + libconfig->setting_copy_aggregate(parent, src); } else { config_setting_t *set; - if( config_setting_get_member(parent, config_setting_name(src)) != NULL ) + if( libconfig->setting_get_member(parent, config_setting_name(src)) != NULL ) return; - if ((set = config_setting_add(parent, config_setting_name(src), config_setting_type(src))) == NULL) + if ((set = libconfig->setting_add(parent, config_setting_name(src), config_setting_type(src))) == NULL) return; if (CONFIG_TYPE_INT == config_setting_type(src)) { - config_setting_set_int(set, config_setting_get_int(src)); - config_setting_set_format(set, src->format); + libconfig->setting_set_int(set, libconfig->setting_get_int(src)); + libconfig->setting_set_format(set, src->format); } else if (CONFIG_TYPE_INT64 == config_setting_type(src)) { - config_setting_set_int64(set, config_setting_get_int64(src)); - config_setting_set_format(set, src->format); + libconfig->setting_set_int64(set, libconfig->setting_get_int64(src)); + libconfig->setting_set_format(set, src->format); } else if (CONFIG_TYPE_FLOAT == config_setting_type(src)) { - config_setting_set_float(set, config_setting_get_float(src)); + libconfig->setting_set_float(set, libconfig->setting_get_float(src)); } else if (CONFIG_TYPE_STRING == config_setting_type(src)) { - config_setting_set_string(set, config_setting_get_string(src)); + libconfig->setting_set_string(set, libconfig->setting_get_string(src)); } else if (CONFIG_TYPE_BOOL == config_setting_type(src)) { - config_setting_set_bool(set, config_setting_get_bool(src)); + libconfig->setting_set_bool(set, libconfig->setting_get_bool(src)); } } } -void config_setting_copy_elem(config_setting_t *parent, const config_setting_t *src) -{ +void config_setting_copy_elem(config_setting_t *parent, const config_setting_t *src) { config_setting_t *set = NULL; if (config_setting_is_aggregate(src)) - config_setting_copy_aggregate(parent, src); + libconfig->setting_copy_aggregate(parent, src); else if (CONFIG_TYPE_INT == config_setting_type(src)) { - set = config_setting_set_int_elem(parent, -1, config_setting_get_int(src)); - config_setting_set_format(set, src->format); + set = libconfig->setting_set_int_elem(parent, -1, libconfig->setting_get_int(src)); + libconfig->setting_set_format(set, src->format); } else if (CONFIG_TYPE_INT64 == config_setting_type(src)) { - set = config_setting_set_int64_elem(parent, -1, config_setting_get_int64(src)); - config_setting_set_format(set, src->format); + set = libconfig->setting_set_int64_elem(parent, -1, libconfig->setting_get_int64(src)); + libconfig->setting_set_format(set, src->format); } else if (CONFIG_TYPE_FLOAT == config_setting_type(src)) { - config_setting_set_float_elem(parent, -1, config_setting_get_float(src)); + libconfig->setting_set_float_elem(parent, -1, libconfig->setting_get_float(src)); } else if (CONFIG_TYPE_STRING == config_setting_type(src)) { - config_setting_set_string_elem(parent, -1, config_setting_get_string(src)); + libconfig->setting_set_string_elem(parent, -1, libconfig->setting_get_string(src)); } else if (CONFIG_TYPE_BOOL == config_setting_type(src)) { - config_setting_set_bool_elem(parent, -1, config_setting_get_bool(src)); + libconfig->setting_set_bool_elem(parent, -1, libconfig->setting_get_bool(src)); } } -void config_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src) -{ +void config_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src) { config_setting_t *newAgg; int i, n; - if( config_setting_get_member(parent, config_setting_name(src)) != NULL ) + if( libconfig->setting_get_member(parent, config_setting_name(src)) != NULL ) return; - newAgg = config_setting_add(parent, config_setting_name(src), config_setting_type(src)); + newAgg = libconfig->setting_add(parent, config_setting_name(src), config_setting_type(src)); if (newAgg == NULL) return; @@ -95,22 +90,101 @@ void config_setting_copy_aggregate(config_setting_t *parent, const config_settin for (i = 0; i < n; i++) { if (config_setting_is_group(src)) { - config_setting_copy_simple(newAgg, config_setting_get_elem(src, i)); + libconfig->setting_copy_simple(newAgg, libconfig->setting_get_elem(src, i)); } else { - config_setting_copy_elem(newAgg, config_setting_get_elem(src, i)); + libconfig->setting_copy_elem(newAgg, libconfig->setting_get_elem(src, i)); } } } -int config_setting_copy(config_setting_t *parent, const config_setting_t *src) -{ +int config_setting_copy(config_setting_t *parent, const config_setting_t *src) { + if (!config_setting_is_group(parent) && !config_setting_is_list(parent)) return CONFIG_FALSE; if (config_setting_is_aggregate(src)) { - config_setting_copy_aggregate(parent, src); + libconfig->setting_copy_aggregate(parent, src); } else { - config_setting_copy_simple(parent, src); + libconfig->setting_copy_simple(parent, src); } return CONFIG_TRUE; } + +void libconfig_defaults(void) { + libconfig = &libconfig_s; + + libconfig->read = config_read; + libconfig->write = config_write; + /* */ + libconfig->set_auto_convert = config_set_auto_convert; + libconfig->get_auto_convert = config_get_auto_convert; + /* */ + libconfig->read_string = config_read_string; + libconfig->read_file_src = config_read_file; + libconfig->write_file = config_write_file; + /* */ + libconfig->set_destructor = config_set_destructor; + libconfig->set_include_dir = config_set_include_dir; + /* */ + libconfig->init = config_init; + libconfig->destroy = config_destroy; + /* */ + libconfig->setting_get_int = config_setting_get_int; + libconfig->setting_get_int64 = config_setting_get_int64; + libconfig->setting_get_float = config_setting_get_float; + libconfig->setting_get_bool = config_setting_get_bool; + libconfig->setting_get_string = config_setting_get_string; + /* */ + libconfig->setting_lookup_int = config_setting_lookup_int; + libconfig->setting_lookup_int64 = config_setting_lookup_int64; + libconfig->setting_lookup_float = config_setting_lookup_float; + libconfig->setting_lookup_bool = config_setting_lookup_bool; + libconfig->setting_lookup_string = config_setting_lookup_string; + /* */ + libconfig->setting_set_int = config_setting_set_int; + libconfig->setting_set_int64 = config_setting_set_int64; + libconfig->setting_set_bool = config_setting_set_bool; + libconfig->setting_set_string = config_setting_set_string; + /* */ + libconfig->setting_set_format = config_setting_set_format; + libconfig->setting_get_format = config_setting_get_format; + /* */ + libconfig->setting_get_int_elem = config_setting_get_int_elem; + libconfig->setting_get_int64_elem = config_setting_get_int64_elem; + libconfig->setting_get_float_elem = config_setting_get_float_elem; + libconfig->setting_get_bool_elem = config_setting_get_bool_elem; + libconfig->setting_get_string_elem = config_setting_get_string_elem; + /* */ + libconfig->setting_set_int_elem = config_setting_set_int_elem; + libconfig->setting_set_int64_elem = config_setting_set_int64_elem; + libconfig->setting_set_float_elem = config_setting_set_float_elem; + libconfig->setting_set_bool_elem = config_setting_set_bool_elem; + libconfig->setting_set_string_elem = config_setting_set_string_elem; + /* */ + libconfig->setting_index = config_setting_index; + libconfig->setting_length = config_setting_length; + /* */ + libconfig->setting_get_elem = config_setting_get_elem; + libconfig->setting_get_member = config_setting_get_member; + /* */ + libconfig->setting_add = config_setting_add; + libconfig->setting_remove = config_setting_remove; + libconfig->setting_remove_elem = config_setting_remove_elem; + /* */ + libconfig->setting_set_hook = config_setting_set_hook; + /* */ + libconfig->lookup = config_lookup; + libconfig->lookup_from = config_lookup_from; + /* */ + libconfig->lookup_int = config_lookup_int; + libconfig->lookup_int64 = config_lookup_int64; + libconfig->lookup_float = config_lookup_float; + libconfig->lookup_bool = config_lookup_bool; + libconfig->lookup_string = config_lookup_string; + /* those are custom and are from src/common/conf.c */ + libconfig->read_file = conf_read_file; + libconfig->setting_copy_simple = config_setting_copy_simple; + libconfig->setting_copy_elem = config_setting_copy_elem; + libconfig->setting_copy_aggregate = config_setting_copy_aggregate; + libconfig->setting_copy = config_setting_copy; +} diff --git a/src/common/conf.h b/src/common/conf.h index d223505db..05e2b1ada 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #ifndef _CONF_H_ #define _CONF_H_ @@ -7,7 +8,90 @@ #include "../common/cbasetypes.h" #include "../../3rdparty/libconfig/libconfig.h" -int conf_read_file(config_t *config, const char *config_filename); -int config_setting_copy(config_setting_t *parent, const config_setting_t *src); +/** + * The libconfig interface -- specially for plugins, but we enforce it throughought the core to be consistent + **/ +struct libconfig_interface { + int (*read) (config_t *config, FILE *stream); + void (*write) (const config_t *config, FILE *stream); + /* */ + void (*set_auto_convert) (config_t *config, int flag); + int (*get_auto_convert) (const config_t *config); + /* */ + int (*read_string) (config_t *config, const char *str); + int (*read_file_src) (config_t *config, const char *filename); + int (*write_file) (config_t *config, const char *filename); + + void (*set_destructor) (config_t *config, void (*destructor)(void *)); + void (*set_include_dir) (config_t *config, const char *include_dir); + + void (*init) (config_t *config); + void (*destroy) (config_t *config); + + int (*setting_get_int) (const config_setting_t *setting); + long long (*setting_get_int64) (const config_setting_t *setting); + double (*setting_get_float) (const config_setting_t *setting); + + int (*setting_get_bool) (const config_setting_t *setting); + + const char * (*setting_get_string) (const config_setting_t *setting); + + int (*setting_lookup_int) (const config_setting_t *setting, const char *name, int *value); + int (*setting_lookup_int64) (const config_setting_t *setting, const char *name, long long *value); + int (*setting_lookup_float) (const config_setting_t *setting, const char *name, double *value); + int (*setting_lookup_bool) (const config_setting_t *setting, const char *name, int *value); + int (*setting_lookup_string) (const config_setting_t *setting, const char *name, const char **value); + int (*setting_set_int) (config_setting_t *setting ,int value); + int (*setting_set_int64) (config_setting_t *setting, long long value); + int (*setting_set_float) (config_setting_t *setting, double value); + int (*setting_set_bool) (config_setting_t *setting, int value); + int (*setting_set_string) (config_setting_t *setting, const char *value); + + int (*setting_set_format) (config_setting_t *setting, short format); + short (*setting_get_format) (const config_setting_t *setting); + + int (*setting_get_int_elem) (const config_setting_t *setting, int idx); + long long (*setting_get_int64_elem) (const config_setting_t *setting, int idx); + double (*setting_get_float_elem) (const config_setting_t *setting, int idx); + int (*setting_get_bool_elem) (const config_setting_t *setting, int idx); + const char * (*setting_get_string_elem) (const config_setting_t *setting, int idx); + config_setting_t * (*setting_set_int_elem) (config_setting_t *setting, int idx, int value); + config_setting_t * (*setting_set_int64_elem) (config_setting_t *setting, int idx, long long value); + config_setting_t * (*setting_set_float_elem) (config_setting_t *setting, int idx, double value); + config_setting_t * (*setting_set_bool_elem) (config_setting_t *setting, int idx, int value); + config_setting_t * (*setting_set_string_elem) (config_setting_t *setting, int idx, const char *value); + + int (*setting_index) (const config_setting_t *setting); + int (*setting_length) (const config_setting_t *setting); + + config_setting_t * (*setting_get_elem) (const config_setting_t *setting, unsigned int idx); + config_setting_t * (*setting_get_member) (const config_setting_t *setting, const char *name); + + config_setting_t * (*setting_add) (config_setting_t *parent, const char *name, int type); + int (*setting_remove) (config_setting_t *parent, const char *name); + + int (*setting_remove_elem) (config_setting_t *parent, unsigned int idx); + void (*setting_set_hook) (config_setting_t *setting, void *hook); + + config_setting_t * (*lookup) (const config_t *config, const char *path); + config_setting_t * (*lookup_from) (config_setting_t *setting, const char *path); + int (*lookup_int) (const config_t *config, const char *path, int *value); + int (*lookup_int64) (const config_t *config, const char *path, long long *value); + int (*lookup_float) (const config_t *config, const char *path, double *value); + int (*lookup_bool) (const config_t *config, const char *path, int *value); + int (*lookup_string) (const config_t *config, const char *path, const char **value); + + /* those are custom and are from src/common/conf.c */ + /* Functions to copy settings from libconfig/contrib */ + int (*read_file) (config_t *config, const char *config_filename); + void (*setting_copy_simple) (config_setting_t *parent, const config_setting_t *src); + void (*setting_copy_elem) (config_setting_t *parent, const config_setting_t *src); + void (*setting_copy_aggregate) (config_setting_t *parent, const config_setting_t *src); + int (*setting_copy) (config_setting_t *parent, const config_setting_t *src); +}; + +struct libconfig_interface *libconfig; + +void libconfig_defaults(void); #endif // _CONF_H_ diff --git a/src/common/core.c b/src/common/core.c index 8178a48a5..5c1e58801 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -19,6 +19,7 @@ #include "../config/core.h" #include "../common/HPM.h" #include "../common/utils.h" + #include "../common/conf.h" #endif #include @@ -282,6 +283,7 @@ void core_defaults(void) { strlib_defaults(); malloc_defaults(); #ifndef MINICORE + libconfig_defaults(); sql_defaults(); timer_defaults(); db_defaults(); diff --git a/src/map/atcommand.c b/src/map/atcommand.c index e5d14fc21..3cdfb0e29 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3544,19 +3544,19 @@ ACMD(reloadskilldb) ACMD(reloadatcommand) { config_t run_test; - if (conf_read_file(&run_test, "conf/groups.conf")) { + if (libconfig->read_file(&run_test, "conf/groups.conf")) { clif->message(fd, msg_txt(1036)); // Error reading groups.conf, reload failed. return false; } - config_destroy(&run_test); + libconfig->destroy(&run_test); - if (conf_read_file(&run_test, map->ATCOMMAND_CONF_FILENAME)) { + if (libconfig->read_file(&run_test, map->ATCOMMAND_CONF_FILENAME)) { clif->message(fd, msg_txt(1037)); // Error reading atcommand.conf, reload failed. return false; } - config_destroy(&run_test); + libconfig->destroy(&run_test); atcommand->doload(); pcg->reload(); @@ -9959,11 +9959,11 @@ void atcommand_config_read(const char* config_filename) { const char *symbol = NULL; int num_aliases = 0; - if (conf_read_file(&atcommand_config, config_filename)) + if (libconfig->read_file(&atcommand_config, config_filename)) return; // Command symbols - if (config_lookup_string(&atcommand_config, "atcommand_symbol", &symbol)) { + if (libconfig->lookup_string(&atcommand_config, "atcommand_symbol", &symbol)) { if (ISPRINT(*symbol) && // no control characters *symbol != '/' && // symbol of client commands *symbol != '%' && // symbol of party chat @@ -9972,7 +9972,7 @@ void atcommand_config_read(const char* config_filename) { atcommand->at_symbol = *symbol; } - if (config_lookup_string(&atcommand_config, "charcommand_symbol", &symbol)) { + if (libconfig->lookup_string(&atcommand_config, "charcommand_symbol", &symbol)) { if (ISPRINT(*symbol) && // no control characters *symbol != '/' && // symbol of client commands *symbol != '%' && // symbol of party chat @@ -9982,10 +9982,10 @@ void atcommand_config_read(const char* config_filename) { } // Command aliases - aliases = config_lookup(&atcommand_config, "aliases"); + aliases = libconfig->lookup(&atcommand_config, "aliases"); if (aliases != NULL) { int i = 0; - int count = config_setting_length(aliases); + int count = libconfig->setting_length(aliases); for (i = 0; i < count; ++i) { config_setting_t *command; @@ -9993,7 +9993,7 @@ void atcommand_config_read(const char* config_filename) { int j = 0, alias_count = 0; AtCommandInfo *commandinfo = NULL; - command = config_setting_get_elem(aliases, i); + command = libconfig->setting_get_elem(aliases, i); if (config_setting_type(command) != CONFIG_TYPE_ARRAY) continue; commandname = config_setting_name(command); @@ -10001,9 +10001,9 @@ void atcommand_config_read(const char* config_filename) { ShowConfigWarning(command, "atcommand_config_read: can not set alias for non-existent command %s", commandname); continue; } - alias_count = config_setting_length(command); + alias_count = libconfig->setting_length(command); for (j = 0; j < alias_count; ++j) { - const char *alias = config_setting_get_string_elem(command, j); + const char *alias = libconfig->setting_get_string_elem(command, j); if (alias != NULL) { AliasInfo *alias_info; if (strdb_exists(atcommand->alias_db, alias)) { @@ -10020,17 +10020,17 @@ void atcommand_config_read(const char* config_filename) { } } - nolog = config_lookup(&atcommand_config, "nolog"); + nolog = libconfig->lookup(&atcommand_config, "nolog"); if (nolog != NULL) { int i = 0; - int count = config_setting_length(nolog); + int count = libconfig->setting_length(nolog); for (i = 0; i < count; ++i) { config_setting_t *command; const char *commandname = NULL; AtCommandInfo *commandinfo = NULL; - command = config_setting_get_elem(nolog, i); + command = libconfig->setting_get_elem(nolog, i); commandname = config_setting_name(command); if ( !( commandinfo = atcommand_exists(commandname) ) ) { ShowConfigWarning(command, "atcommand_config_read: can not disable logging for non-existent command %s", commandname); @@ -10042,9 +10042,9 @@ void atcommand_config_read(const char* config_filename) { // Commands help // We only check if all commands exist - help = config_lookup(&atcommand_config, "help"); + help = libconfig->lookup(&atcommand_config, "help"); if (help != NULL) { - int count = config_setting_length(help); + int count = libconfig->setting_length(help); int i; for (i = 0; i < count; ++i) { @@ -10052,13 +10052,13 @@ void atcommand_config_read(const char* config_filename) { const char *commandname; AtCommandInfo *commandinfo = NULL; - command = config_setting_get_elem(help, i); + command = libconfig->setting_get_elem(help, i); commandname = config_setting_name(command); if ( !( commandinfo = atcommand_exists(commandname) ) ) ShowConfigWarning(command, "atcommand_config_read: command %s does not exist", commandname); else { if( commandinfo->help == NULL ) { - const char *str = config_setting_get_string(command); + const char *str = libconfig->setting_get_string(command); size_t len = strlen(str); commandinfo->help = aMalloc( len * sizeof(char) ); safestrncpy(commandinfo->help, str, len); @@ -10069,7 +10069,7 @@ void atcommand_config_read(const char* config_filename) { ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' command aliases in '"CL_WHITE"%s"CL_RESET"'.\n", num_aliases, config_filename); - config_destroy(&atcommand_config); + libconfig->destroy(&atcommand_config); return; } diff --git a/src/map/battleground.c b/src/map/battleground.c index ab44b0953..65f475124 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -257,34 +257,34 @@ void bg_config_read(void) { config_setting_t *data = NULL; const char *config_filename = "conf/battlegrounds.conf"; // FIXME hardcoded name - if (conf_read_file(&bg_conf, config_filename)) + if (libconfig->read_file(&bg_conf, config_filename)) return; - data = config_lookup(&bg_conf, "battlegrounds"); + data = libconfig->lookup(&bg_conf, "battlegrounds"); if (data != NULL) { - config_setting_t *settings = config_setting_get_elem(data, 0); + config_setting_t *settings = libconfig->setting_get_elem(data, 0); config_setting_t *arenas; const char *delay_var; int i, arena_count = 0, offline = 0; - if( !config_setting_lookup_string(settings, "global_delay_var", &delay_var) ) + if( !libconfig->setting_lookup_string(settings, "global_delay_var", &delay_var) ) delay_var = "BG_Delay_Tick"; safestrncpy(bg->gdelay_var, delay_var, BG_DELAY_VAR_LENGTH); - config_setting_lookup_int(settings, "maximum_afk_seconds", &bg->mafksec); + libconfig->setting_lookup_int(settings, "maximum_afk_seconds", &bg->mafksec); - config_setting_lookup_bool(settings, "feature_off", &offline); + libconfig->setting_lookup_bool(settings, "feature_off", &offline); if( offline == 0 ) bg->queue_on = true; - if( (arenas = config_setting_get_member(settings, "arenas")) != NULL ) { - arena_count = config_setting_length(arenas); + if( (arenas = libconfig->setting_get_member(settings, "arenas")) != NULL ) { + arena_count = libconfig->setting_length(arenas); CREATE( bg->arena, struct bg_arena *, arena_count ); for(i = 0; i < arena_count; i++) { - config_setting_t *arena = config_setting_get_elem(arenas, i); + config_setting_t *arena = libconfig->setting_get_elem(arenas, i); config_setting_t *reward; const char *aName, *aEvent, *aDelayVar; int minLevel = 0, maxLevel = 0; @@ -295,18 +295,18 @@ void bg_config_read(void) { bg->arena[i] = NULL; - if( !config_setting_lookup_string(arena, "name", &aName) ) { + if( !libconfig->setting_lookup_string(arena, "name", &aName) ) { ShowError("bg_config_read: failed to find 'name' for arena #%d\n",i); continue; } - if( !config_setting_lookup_string(arena, "event", &aEvent) ) { + if( !libconfig->setting_lookup_string(arena, "event", &aEvent) ) { ShowError("bg_config_read: failed to find 'event' for arena #%d\n",i); continue; } - config_setting_lookup_int(arena, "minLevel", &minLevel); - config_setting_lookup_int(arena, "maxLevel", &maxLevel); + libconfig->setting_lookup_int(arena, "minLevel", &minLevel); + libconfig->setting_lookup_int(arena, "maxLevel", &maxLevel); if( minLevel < 0 ) { ShowWarning("bg_config_read: invalid %d value for arena '%s' minLevel\n",minLevel,aName); @@ -317,14 +317,14 @@ void bg_config_read(void) { maxLevel = MAX_LEVEL; } - if( !(reward = config_setting_get_member(arena, "reward")) ) { + if( !(reward = libconfig->setting_get_member(arena, "reward")) ) { ShowError("bg_config_read: failed to find 'reward' for arena '%s'/#%d\n",aName,i); continue; } - config_setting_lookup_int(reward, "win", &prizeWin); - config_setting_lookup_int(reward, "loss", &prizeLoss); - config_setting_lookup_int(reward, "draw", &prizeDraw); + libconfig->setting_lookup_int(reward, "win", &prizeWin); + libconfig->setting_lookup_int(reward, "loss", &prizeLoss); + libconfig->setting_lookup_int(reward, "draw", &prizeDraw); if( prizeWin < 0 ) { ShowWarning("bg_config_read: invalid %d value for arena '%s' reward:win\n",prizeWin,aName); @@ -339,9 +339,9 @@ void bg_config_read(void) { prizeDraw = 0; } - config_setting_lookup_int(arena, "minPlayers", &minPlayers); - config_setting_lookup_int(arena, "maxPlayers", &maxPlayers); - config_setting_lookup_int(arena, "minTeamPlayers", &minTeamPlayers); + libconfig->setting_lookup_int(arena, "minPlayers", &minPlayers); + libconfig->setting_lookup_int(arena, "maxPlayers", &maxPlayers); + libconfig->setting_lookup_int(arena, "minTeamPlayers", &minTeamPlayers); if( minPlayers < 0 ) { ShowWarning("bg_config_read: invalid %d value for arena '%s' minPlayers\n",minPlayers,aName); @@ -356,20 +356,20 @@ void bg_config_read(void) { minTeamPlayers = 0; } - if( !config_setting_lookup_string(arena, "delay_var", &aDelayVar) ) { + if( !libconfig->setting_lookup_string(arena, "delay_var", &aDelayVar) ) { ShowError("bg_config_read: failed to find 'delay_var' for arena '%s'/#%d\n",aName,i); continue; } - config_setting_lookup_int(arena, "maxDuration", &maxDuration); + libconfig->setting_lookup_int(arena, "maxDuration", &maxDuration); if( maxDuration < 0 ) { ShowWarning("bg_config_read: invalid %d value for arena '%s' maxDuration\n",maxDuration,aName); maxDuration = 30; } - config_setting_lookup_int(arena, "fillDuration", &fillup_duration); - config_setting_lookup_int(arena, "pGameDuration", &pregame_duration); + libconfig->setting_lookup_int(arena, "fillDuration", &fillup_duration); + libconfig->setting_lookup_int(arena, "pGameDuration", &pregame_duration); if( fillup_duration < 20 ) { ShowWarning("bg_config_read: invalid %d value for arena '%s' fillDuration, minimum has to be 20, defaulting to 20.\n",fillup_duration,aName); @@ -408,7 +408,7 @@ void bg_config_read(void) { bg->arenas = arena_count; } - config_destroy(&bg_conf); + libconfig->destroy(&bg_conf); } } struct bg_arena *bg_name2arena (char *name) { diff --git a/src/map/clif.c b/src/map/clif.c index 7157914df..af328e7a7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2624,13 +2624,13 @@ void read_channels_config(void) { config_setting_t *chsys = NULL; const char *config_filename = "conf/channels.conf"; // FIXME hardcoded name - if (conf_read_file(&channels_conf, config_filename)) + if (libconfig->read_file(&channels_conf, config_filename)) return; - chsys = config_lookup(&channels_conf, "chsys"); + chsys = libconfig->lookup(&channels_conf, "chsys"); if (chsys != NULL) { - config_setting_t *settings = config_setting_get_elem(chsys, 0); + config_setting_t *settings = libconfig->setting_get_elem(chsys, 0); config_setting_t *channels; config_setting_t *colors; int i,k; @@ -2642,21 +2642,21 @@ void read_channels_config(void) { allow_user_channel_creation = 0, irc_enabled = 0; - if( !config_setting_lookup_string(settings, "map_local_channel_name", &local_name) ) + if( !libconfig->setting_lookup_string(settings, "map_local_channel_name", &local_name) ) local_name = "map"; safestrncpy(hChSys.local_name, local_name, HCHSYS_NAME_LENGTH); - if( !config_setting_lookup_string(settings, "ally_channel_name", &ally_name) ) + if( !libconfig->setting_lookup_string(settings, "ally_channel_name", &ally_name) ) ally_name = "ally"; safestrncpy(hChSys.ally_name, ally_name, HCHSYS_NAME_LENGTH); - if( !config_setting_lookup_string(settings, "irc_channel_name", &irc_name) ) + if( !libconfig->setting_lookup_string(settings, "irc_channel_name", &irc_name) ) irc_name = "irc"; safestrncpy(hChSys.irc_name, irc_name, HCHSYS_NAME_LENGTH); - config_setting_lookup_bool(settings, "map_local_channel", &local_enabled); - config_setting_lookup_bool(settings, "ally_channel_enabled", &ally_enabled); - config_setting_lookup_bool(settings, "irc_channel_enabled", &irc_enabled); + libconfig->setting_lookup_bool(settings, "map_local_channel", &local_enabled); + libconfig->setting_lookup_bool(settings, "ally_channel_enabled", &ally_enabled); + libconfig->setting_lookup_bool(settings, "irc_channel_enabled", &irc_enabled); if( local_enabled ) hChSys.local = true; @@ -2671,7 +2671,7 @@ void read_channels_config(void) { const char *irc_server, *irc_channel, *irc_nick, *irc_nick_pw; int irc_use_ghost = 0; - if( config_setting_lookup_string(settings, "irc_channel_network", &irc_server) ) { + if( libconfig->setting_lookup_string(settings, "irc_channel_network", &irc_server) ) { if( !strstr(irc_server,":") ) { hChSys.irc = false; ShowWarning("channels.conf : network port wasn't found in 'irc_channel_network', disabling irc channel...\n"); @@ -2695,13 +2695,13 @@ void read_channels_config(void) { hChSys.irc = false; ShowWarning("channels.conf : irc channel enabled but irc_channel_network wasn't found, disabling irc channel...\n"); } - if( config_setting_lookup_string(settings, "irc_channel_channel", &irc_channel) ) + if( libconfig->setting_lookup_string(settings, "irc_channel_channel", &irc_channel) ) safestrncpy(hChSys.irc_channel, irc_channel, 50); else { hChSys.irc = false; ShowWarning("channels.conf : irc channel enabled but irc_channel_channel wasn't found, disabling irc channel...\n"); } - if( config_setting_lookup_string(settings, "irc_channel_nick", &irc_nick) ) { + if( libconfig->setting_lookup_string(settings, "irc_channel_nick", &irc_nick) ) { if( strcmpi(irc_nick,"Hercules_chSysBot") == 0 ) { sprintf(hChSys.irc_nick, "Hercules_chSysBot%d",rand()%777); } else @@ -2710,7 +2710,7 @@ void read_channels_config(void) { hChSys.irc = false; ShowWarning("channels.conf : irc channel enabled but irc_channel_nick wasn't found, disabling irc channel...\n"); } - if( config_setting_lookup_string(settings, "irc_channel_nick_pw", &irc_nick_pw) ) { + if( libconfig->setting_lookup_string(settings, "irc_channel_nick_pw", &irc_nick_pw) ) { safestrncpy(hChSys.irc_nick_pw, irc_nick_pw, 30); config_setting_lookup_bool(settings, "irc_channel_use_ghost", &irc_use_ghost); hChSys.irc_use_ghost = irc_use_ghost; @@ -2718,37 +2718,37 @@ void read_channels_config(void) { } - config_setting_lookup_bool(settings, "map_local_channel_autojoin", &local_autojoin); - config_setting_lookup_bool(settings, "ally_channel_autojoin", &ally_autojoin); + libconfig->setting_lookup_bool(settings, "map_local_channel_autojoin", &local_autojoin); + libconfig->setting_lookup_bool(settings, "ally_channel_autojoin", &ally_autojoin); if( local_autojoin ) hChSys.local_autojoin = true; if( ally_autojoin ) hChSys.ally_autojoin = true; - config_setting_lookup_bool(settings, "allow_user_channel_creation", &allow_user_channel_creation); + libconfig->setting_lookup_bool(settings, "allow_user_channel_creation", &allow_user_channel_creation); if( allow_user_channel_creation ) hChSys.allow_user_channel_creation = true; - if( (colors = config_setting_get_member(settings, "colors")) != NULL ) { - int color_count = config_setting_length(colors); + if( (colors = libconfig->setting_get_member(settings, "colors")) != NULL ) { + int color_count = libconfig->setting_length(colors); CREATE( hChSys.colors, unsigned int, color_count ); CREATE( hChSys.colors_name, char *, color_count ); for(i = 0; i < color_count; i++) { - config_setting_t *color = config_setting_get_elem(colors, i); + config_setting_t *color = libconfig->setting_get_elem(colors, i); CREATE( hChSys.colors_name[i], char, HCHSYS_NAME_LENGTH ); safestrncpy(hChSys.colors_name[i], config_setting_name(color), HCHSYS_NAME_LENGTH); - hChSys.colors[i] = (unsigned int)strtoul(config_setting_get_string_elem(colors,i),NULL,0); + hChSys.colors[i] = (unsigned int)strtoul(libconfig->setting_get_string_elem(colors,i),NULL,0); hChSys.colors[i] = (hChSys.colors[i] & 0x0000FF) << 16 | (hChSys.colors[i] & 0x00FF00) | (hChSys.colors[i] & 0xFF0000) >> 16;//RGB to BGR } hChSys.colors_count = color_count; } - config_setting_lookup_string(settings, "map_local_channel_color", &local_color); + libconfig->setting_lookup_string(settings, "map_local_channel_color", &local_color); for (k = 0; k < hChSys.colors_count; k++) { if( strcmpi(hChSys.colors_name[k],local_color) == 0 ) @@ -2762,7 +2762,7 @@ void read_channels_config(void) { hChSys.local = false; } - config_setting_lookup_string(settings, "ally_channel_color", &ally_color); + libconfig->setting_lookup_string(settings, "ally_channel_color", &ally_color); for (k = 0; k < hChSys.colors_count; k++) { if( strcmpi(hChSys.colors_name[k],ally_color) == 0 ) @@ -2776,7 +2776,7 @@ void read_channels_config(void) { hChSys.ally = false; } - config_setting_lookup_string(settings, "irc_channel_color", &irc_color); + libconfig->setting_lookup_string(settings, "irc_channel_color", &irc_color); for (k = 0; k < hChSys.colors_count; k++) { if( strcmpi(hChSys.colors_name[k],irc_color) == 0 ) @@ -2801,13 +2801,13 @@ void read_channels_config(void) { ircbot->channel = chd; } - if( (channels = config_setting_get_member(settings, "default_channels")) != NULL ) { - int channel_count = config_setting_length(channels); + if( (channels = libconfig->setting_get_member(settings, "default_channels")) != NULL ) { + int channel_count = libconfig->setting_length(channels); for(i = 0; i < channel_count; i++) { - config_setting_t *channel = config_setting_get_elem(channels, i); + config_setting_t *channel = libconfig->setting_get_elem(channels, i); const char *name = config_setting_name(channel); - const char *color = config_setting_get_string_elem(channels,i); + const char *color = libconfig->setting_get_string_elem(channels,i); struct hChSysCh *chd; for (k = 0; k < hChSys.colors_count; k++) { @@ -2833,7 +2833,7 @@ void read_channels_config(void) { } ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' channels in '"CL_WHITE"%s"CL_RESET"'.\n", db_size(clif->channel_db), config_filename); - config_destroy(&channels_conf); + libconfig->destroy(&channels_conf); } } @@ -17378,32 +17378,33 @@ void clif_cashshop_db(void) { config_setting_t *cashshop = NULL, *cats = NULL; const char *config_filename = "db/cashshop_db.conf"; // FIXME hardcoded name int i, item_count_t = 0; + for( i = 0; i < CASHSHOP_TAB_MAX; i++ ) { CREATE(clif->cs.data[i], struct hCSData *, 1); clif->cs.item_count[i] = 0; } - if (conf_read_file(&cashshop_conf, config_filename)) { + if (libconfig->read_file(&cashshop_conf, config_filename)) { ShowError("can't read %s\n", config_filename); return; } - cashshop = config_lookup(&cashshop_conf, "cash_shop"); + cashshop = libconfig->lookup(&cashshop_conf, "cash_shop"); - if( cashshop != NULL && (cats = config_setting_get_elem(cashshop, 0)) != NULL ) { + if( cashshop != NULL && (cats = libconfig->setting_get_elem(cashshop, 0)) != NULL ) { for(i = 0; i < CASHSHOP_TAB_MAX; i++) { config_setting_t *cat; char entry_name[10]; sprintf(entry_name,"cat_%d",i); - if( (cat = config_setting_get_member(cats, entry_name)) != NULL ) { - int k, item_count = config_setting_length(cat); + if( (cat = libconfig->setting_get_member(cats, entry_name)) != NULL ) { + int k, item_count = libconfig->setting_length(cat); for(k = 0; k < item_count; k++) { - config_setting_t *entry = config_setting_get_elem(cat,k); + config_setting_t *entry = libconfig->setting_get_elem(cat,k); const char *name = config_setting_name(entry); - int price = config_setting_get_int(entry); + int price = libconfig->setting_get_int(entry); struct item_data * data = NULL; if( price < 1 ) { @@ -17434,7 +17435,7 @@ void clif_cashshop_db(void) { } } - config_destroy(&cashshop_conf); + libconfig->destroy(&cashshop_conf); } ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", item_count_t, config_filename); } diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 3bed3e03d..6db503214 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -642,18 +642,18 @@ void itemdb_read_groups(void) { int i = 0, count = 0, c; unsigned int *gsize = NULL; - if (conf_read_file(&item_group_conf, config_filename)) { + if (libconfig->read_file(&item_group_conf, config_filename)) { ShowError("can't read %s\n", config_filename); return; } - gsize = aMalloc( config_setting_length(item_group_conf.root) * sizeof(unsigned int) ); + gsize = aMalloc( libconfig->setting_length(item_group_conf.root) * sizeof(unsigned int) ); - for(i = 0; i < config_setting_length(item_group_conf.root); i++) + for(i = 0; i < libconfig->setting_length(item_group_conf.root); i++) gsize[i] = 0; i = 0; - while( (itg = config_setting_get_elem(item_group_conf.root,i++)) ) { + while( (itg = libconfig->setting_get_elem(item_group_conf.root,i++)) ) { const char *name = config_setting_name(itg); if( !itemdb->name2id(name) ) { @@ -664,9 +664,9 @@ void itemdb_read_groups(void) { } c = 0; - while( (it = config_setting_get_elem(itg,c++)) ) { + while( (it = libconfig->setting_get_elem(itg,c++)) ) { if( config_setting_is_list(it) ) - gsize[ i - 1 ] += config_setting_get_int_elem(it,1); + gsize[ i - 1 ] += libconfig->setting_get_int_elem(it,1); else gsize[ i - 1 ] += 1; } @@ -674,10 +674,10 @@ void itemdb_read_groups(void) { } i = 0; - CREATE(itemdb->groups, struct item_group, config_setting_length(item_group_conf.root)); - itemdb->group_count = (unsigned short)config_setting_length(item_group_conf.root); + CREATE(itemdb->groups, struct item_group, libconfig->setting_length(item_group_conf.root)); + itemdb->group_count = (unsigned short)libconfig->setting_length(item_group_conf.root); - while( (itg = config_setting_get_elem(item_group_conf.root,i++)) ) { + while( (itg = libconfig->setting_get_elem(item_group_conf.root,i++)) ) { struct item_data *data = itemdb->name2id(config_setting_name(itg)); int ecount = 0; @@ -688,13 +688,13 @@ void itemdb_read_groups(void) { CREATE(itemdb->groups[count].nameid, unsigned short, gsize[ count ] + 1); c = 0; - while( (it = config_setting_get_elem(itg,c++)) ) { + while( (it = libconfig->setting_get_elem(itg,c++)) ) { int repeat = 1; if( config_setting_is_list(it) ) { - itname = config_setting_get_string_elem(it,0); - repeat = config_setting_get_int_elem(it,1); + itname = libconfig->setting_get_string_elem(it,0); + repeat = libconfig->setting_get_int_elem(it,1); } else - itname = config_setting_get_string_elem(itg,c - 1); + itname = libconfig->setting_get_string_elem(itg,c - 1); if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) { if( !( data = itemdb->exists(atoi(itname+2)) ) ) @@ -716,7 +716,7 @@ void itemdb_read_groups(void) { count++; } - config_destroy(&item_group_conf); + libconfig->destroy(&item_group_conf); aFree(gsize); ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename); @@ -934,18 +934,18 @@ void itemdb_read_packages(void) { return; } - if (conf_read_file(&item_packages_conf, config_filename)) { + if (libconfig->read_file(&item_packages_conf, config_filename)) { ShowError("can't read %s\n", config_filename); return; } - must = aMalloc( config_setting_length(item_packages_conf.root) * sizeof(unsigned int) ); - random = aMalloc( config_setting_length(item_packages_conf.root) * sizeof(unsigned int) ); - rgroup = aMalloc( config_setting_length(item_packages_conf.root) * sizeof(unsigned int) ); - rgroups = aMalloc( config_setting_length(item_packages_conf.root) * sizeof(unsigned int *) ); + must = aMalloc( libconfig->setting_length(item_packages_conf.root) * sizeof(unsigned int) ); + random = aMalloc( libconfig->setting_length(item_packages_conf.root) * sizeof(unsigned int) ); + rgroup = aMalloc( libconfig->setting_length(item_packages_conf.root) * sizeof(unsigned int) ); + rgroups = aMalloc( libconfig->setting_length(item_packages_conf.root) * sizeof(unsigned int *) ); - for(i = 0; i < config_setting_length(item_packages_conf.root); i++) { + for(i = 0; i < libconfig->setting_length(item_packages_conf.root); i++) { must[i] = 0; random[i] = 0; rgroup[i] = 0; @@ -954,22 +954,22 @@ void itemdb_read_packages(void) { /* validate tree, drop poisonous fruits! */ i = 0; - while( (itg = config_setting_get_elem(item_packages_conf.root,i++)) ) { + while( (itg = libconfig->setting_get_elem(item_packages_conf.root,i++)) ) { const char *name = config_setting_name(itg); if( !itemdb->name2id(name) ) { ShowWarning("itemdb_read_packages: unknown package item '%s', skipping..\n",name); - config_setting_remove(item_packages_conf.root, name); + libconfig->setting_remove(item_packages_conf.root, name); --i; continue; } c = 0; - while( (it = config_setting_get_elem(itg,c++)) ) { + while( (it = libconfig->setting_get_elem(itg,c++)) ) { int rval = 0; - if( !( t = config_setting_get_member(it, "Random") ) || (rval = config_setting_get_int(t)) < 0 ) { + if( !( t = libconfig->setting_get_member(it, "Random") ) || (rval = libconfig->setting_get_int(t)) < 0 ) { ShowWarning("itemdb_read_packages: invalid 'Random' value (%d) for item '%s' in package '%s', defaulting to must!\n",rval,config_setting_name(it),name); - config_setting_remove(it, config_setting_name(it)); + libconfig->setting_remove(it, config_setting_name(it)); --c; continue; } @@ -991,7 +991,7 @@ void itemdb_read_packages(void) { prev[i] = NULL; } - for(i = 0; i < config_setting_length(item_packages_conf.root); i++ ) { + for(i = 0; i < libconfig->setting_length(item_packages_conf.root); i++ ) { rgroups[i] = aMalloc( rgroup[i] * sizeof(unsigned int) ); for( c = 0; c < rgroup[i]; c++ ) { rgroups[i][c] = 0; @@ -1000,22 +1000,22 @@ void itemdb_read_packages(void) { /* grab the known sizes */ i = 0; - while( (itg = config_setting_get_elem(item_packages_conf.root,i++)) ) { + while( (itg = libconfig->setting_get_elem(item_packages_conf.root,i++)) ) { c = 0; - while( (it = config_setting_get_elem(itg,c++)) ) { + while( (it = libconfig->setting_get_elem(itg,c++)) ) { int rval = 0; - if( ( t = config_setting_get_member(it, "Random")) && ( rval = config_setting_get_int(t) ) > 0 ) { + if( ( t = libconfig->setting_get_member(it, "Random")) && ( rval = libconfig->setting_get_int(t) ) > 0 ) { rgroups[i - 1][rval - 1] += 1; } } } - CREATE(itemdb->packages, struct item_package, config_setting_length(item_packages_conf.root)); - itemdb->package_count = (unsigned short)config_setting_length(item_packages_conf.root); + CREATE(itemdb->packages, struct item_package, libconfig->setting_length(item_packages_conf.root)); + itemdb->package_count = (unsigned short)libconfig->setting_length(item_packages_conf.root); /* write */ i = 0; - while( (itg = config_setting_get_elem(item_packages_conf.root,i++)) ) { + while( (itg = libconfig->setting_get_elem(item_packages_conf.root,i++)) ) { struct item_data *data = itemdb->name2id(config_setting_name(itg)); int r = 0, m = 0; @@ -1045,7 +1045,7 @@ void itemdb_read_packages(void) { CREATE(itemdb->packages[count].must_items, struct item_package_must_entry, itemdb->packages[count].must_qty); c = 0; - while( (it = config_setting_get_elem(itg,c++)) ) { + while( (it = libconfig->setting_get_elem(itg,c++)) ) { int icount = 1, expire = 0, rate = 10000, gid = 0; bool announce = false, named = false; @@ -1057,30 +1057,30 @@ void itemdb_read_packages(void) { } else if( !( data = itemdb->name2id(itname) ) ) ShowWarning("itemdb_read_packages: unknown item '%s' in package '%s'!\n",itname,config_setting_name(itg)); - if( ( t = config_setting_get_member(it, "Count")) ) - icount = config_setting_get_int(t); + if( ( t = libconfig->setting_get_member(it, "Count")) ) + icount = libconfig->setting_get_int(t); - if( ( t = config_setting_get_member(it, "Expire")) ) - expire = config_setting_get_int(t); + if( ( t = libconfig->setting_get_member(it, "Expire")) ) + expire = libconfig->setting_get_int(t); - if( ( t = config_setting_get_member(it, "Rate")) ) { - if( (rate = (unsigned short)config_setting_get_int(t)) > 10000 ) { + if( ( t = libconfig->setting_get_member(it, "Rate")) ) { + if( (rate = (unsigned short)libconfig->setting_get_int(t)) > 10000 ) { ShowWarning("itemdb_read_packages: invalid rate (%d) for item '%s' in package '%s'!\n",rate,itname,config_setting_name(itg)); rate = 10000; } } - if( ( t = config_setting_get_member(it, "Announce")) && config_setting_get_bool(t) ) + if( ( t = libconfig->setting_get_member(it, "Announce")) && libconfig->setting_get_bool(t) ) announce = true; - if( ( t = config_setting_get_member(it, "Named")) && config_setting_get_bool(t) ) + if( ( t = libconfig->setting_get_member(it, "Named")) && libconfig->setting_get_bool(t) ) named = true; - if( !( t = config_setting_get_member(it, "Random") ) ) { + if( !( t = libconfig->setting_get_member(it, "Random") ) ) { ShowWarning("itemdb_read_packages: missing 'Random' field for item '%s' in package '%s', defaulting to must!\n",itname,config_setting_name(itg)); gid = 0; } else - gid = config_setting_get_int(t); + gid = libconfig->setting_get_int(t); if( gid == 0 ) { itemdb->packages[count].must_items[m].id = data ? data->nameid : 0; @@ -1131,14 +1131,14 @@ void itemdb_read_packages(void) { aFree(must); aFree(random); - for(i = 0; i < config_setting_length(item_packages_conf.root); i++ ) { + for(i = 0; i < libconfig->setting_length(item_packages_conf.root); i++ ) { aFree(rgroups[i]); } aFree(rgroups); aFree(rgroup); aFree(prev); - config_destroy(&item_packages_conf); + libconfig->destroy(&item_packages_conf); if( HCache->enabled ) itemdb->write_cached_packages(config_filename); @@ -1156,26 +1156,26 @@ void itemdb_read_chains(void) { #endif int i = 0, count = 0; - if (conf_read_file(&item_chain_conf, config_filename)) { + if (libconfig->read_file(&item_chain_conf, config_filename)) { ShowError("can't read %s\n", config_filename); return; } - CREATE(itemdb->chains, struct item_chain, config_setting_length(item_chain_conf.root)); - itemdb->chain_count = (unsigned short)config_setting_length(item_chain_conf.root); + CREATE(itemdb->chains, struct item_chain, libconfig->setting_length(item_chain_conf.root)); + itemdb->chain_count = (unsigned short)libconfig->setting_length(item_chain_conf.root); - while( (itc = config_setting_get_elem(item_chain_conf.root,i++)) ) { + while( (itc = libconfig->setting_get_elem(item_chain_conf.root,i++)) ) { struct item_data *data = NULL; struct item_chain_entry *prev = NULL; const char *name = config_setting_name(itc); int c = 0; script->set_constant2(name,i-1,0); - itemdb->chains[count].qty = (unsigned short)config_setting_length(itc); + itemdb->chains[count].qty = (unsigned short)libconfig->setting_length(itc); - CREATE(itemdb->chains[count].items, struct item_chain_entry, config_setting_length(itc)); + CREATE(itemdb->chains[count].items, struct item_chain_entry, libconfig->setting_length(itc)); - while( (entry = config_setting_get_elem(itc,c++)) ) { + while( (entry = libconfig->setting_get_elem(itc,c++)) ) { const char *itname = config_setting_name(entry); if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) { if( !( data = itemdb->exists(atoi(itname+2)) ) ) @@ -1187,7 +1187,7 @@ void itemdb_read_chains(void) { prev->next = &itemdb->chains[count].items[c - 1]; itemdb->chains[count].items[c - 1].id = data ? data->nameid : 0; - itemdb->chains[count].items[c - 1].rate = data ? config_setting_get_int(entry) : 0; + itemdb->chains[count].items[c - 1].rate = data ? libconfig->setting_get_int(entry) : 0; prev = &itemdb->chains[count].items[c - 1]; } @@ -1198,7 +1198,7 @@ void itemdb_read_chains(void) { count++; } - config_destroy(&item_chain_conf); + libconfig->destroy(&item_chain_conf); if( !script->get_constant("ITMCHAIN_ORE",&i) ) ShowWarning("itemdb_read_chains: failed to find 'ITMCHAIN_ORE' chain to link to cache!\n"); @@ -1781,13 +1781,13 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source) * OnUnequipScript: <" OnUnequip Script "> * Inherit: inherit or override */ - if( !config_setting_lookup_int(it, "Id", &i32) ) { + if( !libconfig->setting_lookup_int(it, "Id", &i32) ) { ShowWarning("itemdb_readdb_libconfig_sub: Invalid or missing id in \"%s\", entry #%d, skipping.\n", source, n); return 0; } id.nameid = (uint16)i32; - if( (t = config_setting_get_member(it, "Inherit")) && (inherit = config_setting_get_bool(t)) ) { + if( (t = libconfig->setting_get_member(it, "Inherit")) && (inherit = libconfig->setting_get_bool(t)) ) { if( !itemdb->exists(id.nameid) ) { ShowWarning("itemdb_readdb_libconfig_sub: Trying to inherit nonexistent item %d, default values will be used instead.\n", id.nameid); inherit = false; @@ -1798,7 +1798,7 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source) } } - if( !config_setting_lookup_string(it, "AegisName", &str) || !*str ) { + if( !libconfig->setting_lookup_string(it, "AegisName", &str) || !*str ) { if( !inherit ) { ShowWarning("itemdb_readdb_libconfig_sub: Missing AegisName in item %d of \"%s\", skipping.\n", id.nameid, source); return 0; @@ -1807,7 +1807,7 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source) safestrncpy(id.name, str, sizeof(id.name)); } - if( !config_setting_lookup_string(it, "Name", &str) || !*str ) { + if( !libconfig->setting_lookup_string(it, "Name", &str) || !*str ) { if( !inherit ) { ShowWarning("itemdb_readdb_libconfig_sub: Missing Name in item %d of \"%s\", skipping.\n", id.nameid, source); return 0; @@ -1816,86 +1816,86 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source) safestrncpy(id.jname, str, sizeof(id.jname)); } - if( config_setting_lookup_int(it, "Type", &i32) ) + if( libconfig->setting_lookup_int(it, "Type", &i32) ) id.type = i32; else if( !inherit ) id.type = IT_UNKNOWN; - if( config_setting_lookup_int(it, "Buy", &i32) ) + if( libconfig->setting_lookup_int(it, "Buy", &i32) ) id.value_buy = i32; else if( !inherit ) id.value_buy = -1; - if( config_setting_lookup_int(it, "Sell", &i32) ) + if( libconfig->setting_lookup_int(it, "Sell", &i32) ) id.value_sell = i32; else if( !inherit ) id.value_sell = -1; - if( config_setting_lookup_int(it, "Weight", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Weight", &i32) && i32 >= 0 ) id.weight = i32; - if( config_setting_lookup_int(it, "Atk", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Atk", &i32) && i32 >= 0 ) id.atk = i32; - if( config_setting_lookup_int(it, "Matk", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Matk", &i32) && i32 >= 0 ) id.matk = i32; - if( config_setting_lookup_int(it, "Def", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Def", &i32) && i32 >= 0 ) id.def = i32; - if( config_setting_lookup_int(it, "Range", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Range", &i32) && i32 >= 0 ) id.range = i32; - if( config_setting_lookup_int(it, "Slots", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Slots", &i32) && i32 >= 0 ) id.slot = i32; - if( config_setting_lookup_int(it, "Job", &i32) ) // This is an unsigned value, do not check for >= 0 + if( libconfig->setting_lookup_int(it, "Job", &i32) ) // This is an unsigned value, do not check for >= 0 itemdb->jobid2mapid(id.class_base, (unsigned int)i32); else if( !inherit ) itemdb->jobid2mapid(id.class_base, UINT_MAX); - if( config_setting_lookup_int(it, "Upper", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Upper", &i32) && i32 >= 0 ) id.class_upper = (unsigned int)i32; else if( !inherit ) id.class_upper = ITEMUPPER_ALL; - if( config_setting_lookup_int(it, "Gender", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Gender", &i32) && i32 >= 0 ) id.sex = i32; else if( !inherit ) id.sex = 2; - if( config_setting_lookup_int(it, "Loc", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "Loc", &i32) && i32 >= 0 ) id.equip = i32; - if( config_setting_lookup_int(it, "WeaponLv", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "WeaponLv", &i32) && i32 >= 0 ) id.wlv = i32; - if( (t = config_setting_get_member(it, "EquipLv")) ) { + if( (t = libconfig->setting_get_member(it, "EquipLv")) ) { if( config_setting_is_aggregate(t) ) { - if( config_setting_length(t) >= 2 ) - id.elvmax = config_setting_get_int_elem(t, 1); - if( config_setting_length(t) >= 1 ) - id.elv = config_setting_get_int_elem(t, 0); + if( libconfig->setting_length(t) >= 2 ) + id.elvmax = libconfig->setting_get_int_elem(t, 1); + if( libconfig->setting_length(t) >= 1 ) + id.elv = libconfig->setting_get_int_elem(t, 0); } else { - id.elv = config_setting_get_int(t); + id.elv = libconfig->setting_get_int(t); } } - if( (t = config_setting_get_member(it, "Refine")) ) - id.flag.no_refine = config_setting_get_bool(t) ? 0 : 1; + if( (t = libconfig->setting_get_member(it, "Refine")) ) + id.flag.no_refine = libconfig->setting_get_bool(t) ? 0 : 1; - if( config_setting_lookup_int(it, "View", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(it, "View", &i32) && i32 >= 0 ) id.look = i32; - if( (t = config_setting_get_member(it, "BindOnEquip")) ) - id.flag.bindonequip = config_setting_get_bool(t) ? 1 : 0; + if( (t = libconfig->setting_get_member(it, "BindOnEquip")) ) + id.flag.bindonequip = libconfig->setting_get_bool(t) ? 1 : 0; - if( config_setting_lookup_string(it, "Script", &str) ) + if( libconfig->setting_lookup_string(it, "Script", &str) ) id.script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL; - if( config_setting_lookup_string(it, "OnEquipScript", &str) ) + if( libconfig->setting_lookup_string(it, "OnEquipScript", &str) ) id.equip_script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL; - if( config_setting_lookup_string(it, "OnUnequipScript", &str) ) + if( libconfig->setting_lookup_string(it, "OnUnequipScript", &str) ) id.unequip_script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL; return itemdb->validate_entry(&id, n, source); @@ -1917,12 +1917,12 @@ int itemdb_readdb_libconfig(const char *filename) { sprintf(filepath, "%s/%s", map->db_path, filename); memset(&duplicate,0,sizeof(duplicate)); - if( conf_read_file(&item_db_conf, filepath) || !(itdb = config_setting_get_member(item_db_conf.root, "item_db")) ) { + if( libconfig->read_file(&item_db_conf, filepath) || !(itdb = libconfig->setting_get_member(item_db_conf.root, "item_db")) ) { ShowError("can't read %s\n", filepath); return 0; } - while( (it = config_setting_get_elem(itdb,i++)) ) { + while( (it = libconfig->setting_get_elem(itdb,i++)) ) { int nameid = itemdb->readdb_libconfig_sub(it, i-1, filename); if( !nameid ) @@ -1936,7 +1936,7 @@ int itemdb_readdb_libconfig(const char *filename) { } else duplicate[nameid] = true; } - config_destroy(&item_db_conf); + libconfig->destroy(&item_db_conf); ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename); return count; diff --git a/src/map/map.c b/src/map/map.c index 5344d11bf..052d589b4 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -4577,10 +4577,10 @@ void read_map_zone_db(void) { #else const char *config_filename = "db/pre-re/map_zone_db.conf"; // FIXME hardcoded name #endif - if (conf_read_file(&map_zone_db, config_filename)) + if (libconfig->read_file(&map_zone_db, config_filename)) return; - zones = config_lookup(&map_zone_db, "zones"); + zones = libconfig->lookup(&map_zone_db, "zones"); if (zones != NULL) { struct map_zone_data *zone; @@ -4597,16 +4597,16 @@ void read_map_zone_db(void) { disabled_commands_count = 0, capped_skills_count = 0; enum map_zone_skill_subtype subtype; - zone_count = config_setting_length(zones); + zone_count = libconfig->setting_length(zones); for (i = 0; i < zone_count; ++i) { bool is_all = false; - zone_e = config_setting_get_elem(zones, i); + zone_e = libconfig->setting_get_elem(zones, i); - if (!config_setting_lookup_string(zone_e, "name", &zonename)) { + if (!libconfig->setting_lookup_string(zone_e, "name", &zonename)) { ShowError("map_zone_db: missing zone name, skipping... (%s:%d)\n", config_setting_source_file(zone_e), config_setting_source_line(zone_e)); - config_setting_remove_elem(zones,i);/* remove from the tree */ + libconfig->setting_remove_elem(zones,i);/* remove from the tree */ --zone_count; --i; continue; @@ -4614,7 +4614,7 @@ void read_map_zone_db(void) { if( strdb_exists(map->zone_db, zonename) ) { ShowError("map_zone_db: duplicate zone name '%s', skipping...\n",zonename); - config_setting_remove_elem(zones,i);/* remove from the tree */ + libconfig->setting_remove_elem(zones,i);/* remove from the tree */ --zone_count; --i; continue; @@ -4634,31 +4634,31 @@ void read_map_zone_db(void) { } safestrncpy(zone->name, zonename, MAP_ZONE_NAME_LENGTH); - if( (skills = config_setting_get_member(zone_e, "disabled_skills")) != NULL ) { - disabled_skills_count = config_setting_length(skills); + if( (skills = libconfig->setting_get_member(zone_e, "disabled_skills")) != NULL ) { + disabled_skills_count = libconfig->setting_length(skills); /* validate */ - for(h = 0; h < config_setting_length(skills); h++) { - config_setting_t *skillinfo = config_setting_get_elem(skills, h); + for(h = 0; h < libconfig->setting_length(skills); h++) { + config_setting_t *skillinfo = libconfig->setting_get_elem(skills, h); name = config_setting_name(skillinfo); if( !map->zone_str2skillid(name) ) { ShowError("map_zone_db: unknown skill (%s) in disabled_skills for zone '%s', skipping skill...\n",name,zone->name); - config_setting_remove_elem(skills,h); + libconfig->setting_remove_elem(skills,h); --disabled_skills_count; --h; continue; } - if( !map->zone_bl_type(config_setting_get_string_elem(skills,h),&subtype) )/* we dont remove it from the three due to inheritance */ + if( !map->zone_bl_type(libconfig->setting_get_string_elem(skills,h),&subtype) )/* we dont remove it from the three due to inheritance */ --disabled_skills_count; } /* all ok, process */ CREATE( zone->disabled_skills, struct map_zone_disabled_skill_entry *, disabled_skills_count ); - for(h = 0, v = 0; h < config_setting_length(skills); h++) { - config_setting_t *skillinfo = config_setting_get_elem(skills, h); + for(h = 0, v = 0; h < libconfig->setting_length(skills); h++) { + config_setting_t *skillinfo = libconfig->setting_get_elem(skills, h); struct map_zone_disabled_skill_entry * entry; enum bl_type type; name = config_setting_name(skillinfo); - if( (type = map->zone_bl_type(config_setting_get_string_elem(skills,h),&subtype)) ) { /* only add if enabled */ + if( (type = map->zone_bl_type(libconfig->setting_get_string_elem(skills,h),&subtype)) ) { /* only add if enabled */ CREATE( entry, struct map_zone_disabled_skill_entry, 1 ); entry->nameid = map->zone_str2skillid(name); @@ -4672,28 +4672,28 @@ void read_map_zone_db(void) { zone->disabled_skills_count = disabled_skills_count; } - if( (items = config_setting_get_member(zone_e, "disabled_items")) != NULL ) { - disabled_items_count = config_setting_length(items); + if( (items = libconfig->setting_get_member(zone_e, "disabled_items")) != NULL ) { + disabled_items_count = libconfig->setting_length(items); /* validate */ - for(h = 0; h < config_setting_length(items); h++) { - config_setting_t *item = config_setting_get_elem(items, h); + for(h = 0; h < libconfig->setting_length(items); h++) { + config_setting_t *item = libconfig->setting_get_elem(items, h); name = config_setting_name(item); if( !map->zone_str2itemid(name) ) { ShowError("map_zone_db: unknown item (%s) in disabled_items for zone '%s', skipping item...\n",name,zone->name); - config_setting_remove_elem(items,h); + libconfig->setting_remove_elem(items,h); --disabled_items_count; --h; continue; } - if( !config_setting_get_bool(item) )/* we dont remove it from the three due to inheritance */ + if( !libconfig->setting_get_bool(item) )/* we dont remove it from the three due to inheritance */ --disabled_items_count; } /* all ok, process */ CREATE( zone->disabled_items, int, disabled_items_count ); - for(h = 0, v = 0; h < config_setting_length(items); h++) { - config_setting_t *item = config_setting_get_elem(items, h); + for(h = 0, v = 0; h < libconfig->setting_length(items); h++) { + config_setting_t *item = libconfig->setting_get_elem(items, h); - if( config_setting_get_bool(item) ) { /* only add if enabled */ + if( libconfig->setting_get_bool(item) ) { /* only add if enabled */ name = config_setting_name(item); zone->disabled_items[v++] = map->zone_str2itemid(name); } @@ -4702,14 +4702,14 @@ void read_map_zone_db(void) { zone->disabled_items_count = disabled_items_count; } - if( (mapflags = config_setting_get_member(zone_e, "mapflags")) != NULL ) { - mapflags_count = config_setting_length(mapflags); + if( (mapflags = libconfig->setting_get_member(zone_e, "mapflags")) != NULL ) { + mapflags_count = libconfig->setting_length(mapflags); /* mapflags are not validated here, so we save all anyway */ CREATE( zone->mapflags, char *, mapflags_count ); for(h = 0; h < mapflags_count; h++) { CREATE( zone->mapflags[h], char, MAP_ZONE_MAPFLAG_LENGTH ); - name = config_setting_get_string_elem(mapflags, h); + name = libconfig->setting_get_string_elem(mapflags, h); safestrncpy(zone->mapflags[h], name, MAP_ZONE_MAPFLAG_LENGTH); @@ -4717,31 +4717,31 @@ void read_map_zone_db(void) { zone->mapflags_count = mapflags_count; } - if( (commands = config_setting_get_member(zone_e, "disabled_commands")) != NULL ) { - disabled_commands_count = config_setting_length(commands); + if( (commands = libconfig->setting_get_member(zone_e, "disabled_commands")) != NULL ) { + disabled_commands_count = libconfig->setting_length(commands); /* validate */ - for(h = 0; h < config_setting_length(commands); h++) { - config_setting_t *command = config_setting_get_elem(commands, h); + for(h = 0; h < libconfig->setting_length(commands); h++) { + config_setting_t *command = libconfig->setting_get_elem(commands, h); name = config_setting_name(command); if( !atcommand->exists(name) ) { ShowError("map_zone_db: unknown command '%s' in disabled_commands for zone '%s', skipping entry...\n",name,zone->name); - config_setting_remove_elem(commands,h); + libconfig->setting_remove_elem(commands,h); --disabled_commands_count; --h; continue; } - if( !config_setting_get_int(command) )/* we dont remove it from the three due to inheritance */ + if( !libconfig->setting_get_int(command) )/* we dont remove it from the three due to inheritance */ --disabled_commands_count; } /* all ok, process */ CREATE( zone->disabled_commands, struct map_zone_disabled_command_entry *, disabled_commands_count ); - for(h = 0, v = 0; h < config_setting_length(commands); h++) { - config_setting_t *command = config_setting_get_elem(commands, h); + for(h = 0, v = 0; h < libconfig->setting_length(commands); h++) { + config_setting_t *command = libconfig->setting_get_elem(commands, h); struct map_zone_disabled_command_entry * entry; int group_lv; name = config_setting_name(command); - if( (group_lv = config_setting_get_int(command)) ) { /* only add if enabled */ + if( (group_lv = libconfig->setting_get_int(command)) ) { /* only add if enabled */ CREATE( entry, struct map_zone_disabled_command_entry, 1 ); entry->cmd = atcommand->exists(name)->func; @@ -4753,35 +4753,35 @@ void read_map_zone_db(void) { zone->disabled_commands_count = disabled_commands_count; } - if( (caps = config_setting_get_member(zone_e, "skill_damage_cap")) != NULL ) { - capped_skills_count = config_setting_length(caps); + if( (caps = libconfig->setting_get_member(zone_e, "skill_damage_cap")) != NULL ) { + capped_skills_count = libconfig->setting_length(caps); /* validate */ - for(h = 0; h < config_setting_length(caps); h++) { - config_setting_t *cap = config_setting_get_elem(caps, h); + for(h = 0; h < libconfig->setting_length(caps); h++) { + config_setting_t *cap = libconfig->setting_get_elem(caps, h); name = config_setting_name(cap); if( !map->zone_str2skillid(name) ) { ShowError("map_zone_db: unknown skill (%s) in skill_damage_cap for zone '%s', skipping skill...\n",name,zone->name); - config_setting_remove_elem(caps,h); + libconfig->setting_remove_elem(caps,h); --capped_skills_count; --h; continue; } - if( !map->zone_bl_type(config_setting_get_string_elem(cap,1),&subtype) )/* we dont remove it from the three due to inheritance */ + if( !map->zone_bl_type(libconfig->setting_get_string_elem(cap,1),&subtype) )/* we dont remove it from the three due to inheritance */ --capped_skills_count; } /* all ok, process */ CREATE( zone->capped_skills, struct map_zone_skill_damage_cap_entry *, capped_skills_count ); - for(h = 0, v = 0; h < config_setting_length(caps); h++) { - config_setting_t *cap = config_setting_get_elem(caps, h); + for(h = 0, v = 0; h < libconfig->setting_length(caps); h++) { + config_setting_t *cap = libconfig->setting_get_elem(caps, h); struct map_zone_skill_damage_cap_entry * entry; enum bl_type type; name = config_setting_name(cap); - if( (type = map->zone_bl_type(config_setting_get_string_elem(cap,1),&subtype)) ) { /* only add if enabled */ + if( (type = map->zone_bl_type(libconfig->setting_get_string_elem(cap,1),&subtype)) ) { /* only add if enabled */ CREATE( entry, struct map_zone_skill_damage_cap_entry, 1 ); entry->nameid = map->zone_str2skillid(name); - entry->cap = config_setting_get_int_elem(cap,0); + entry->cap = libconfig->setting_get_int_elem(cap,0); entry->type = type; entry->subtype = subtype; zone->capped_skills[v++] = entry; @@ -4801,24 +4801,24 @@ void read_map_zone_db(void) { config_setting_t *new_entry = NULL; int inherit_count; - zone_e = config_setting_get_elem(zones, i); - config_setting_lookup_string(zone_e, "name", &zonename); + zone_e = libconfig->setting_get_elem(zones, i); + libconfig->setting_lookup_string(zone_e, "name", &zonename); if( strncmpi(zonename,MAP_ZONE_ALL_NAME,MAP_ZONE_NAME_LENGTH) == 0 ) { continue;/* all zone doesn't inherit anything (if it did, everything would link to each other and boom endless loop) */ } - if( (inherit_tree = config_setting_get_member(zone_e, "inherit")) != NULL ) { + if( (inherit_tree = libconfig->setting_get_member(zone_e, "inherit")) != NULL ) { /* append global zone to this */ - new_entry = config_setting_add(inherit_tree,MAP_ZONE_ALL_NAME,CONFIG_TYPE_STRING); - config_setting_set_string(new_entry,MAP_ZONE_ALL_NAME); + new_entry = libconfig->setting_add(inherit_tree,MAP_ZONE_ALL_NAME,CONFIG_TYPE_STRING); + libconfig->setting_set_string(new_entry,MAP_ZONE_ALL_NAME); } else { /* create inherit member and add global zone to it */ - inherit_tree = config_setting_add(zone_e, "inherit",CONFIG_TYPE_ARRAY); - new_entry = config_setting_add(inherit_tree,MAP_ZONE_ALL_NAME,CONFIG_TYPE_STRING); - config_setting_set_string(new_entry,MAP_ZONE_ALL_NAME); + inherit_tree = libconfig->setting_add(zone_e, "inherit",CONFIG_TYPE_ARRAY); + new_entry = libconfig->setting_add(inherit_tree,MAP_ZONE_ALL_NAME,CONFIG_TYPE_STRING); + libconfig->setting_set_string(new_entry,MAP_ZONE_ALL_NAME); } - inherit_count = config_setting_length(inherit_tree); + inherit_count = libconfig->setting_length(inherit_tree); for(h = 0; h < inherit_count; h++) { struct map_zone_data *izone; /* inherit zone */ int disabled_skills_count_i = 0; /* disabled skill count from inherit zone */ @@ -4828,8 +4828,8 @@ void read_map_zone_db(void) { int capped_skills_count_i = 0; /* skill capped count from inherit zone */ int j; - name = config_setting_get_string_elem(inherit_tree, h); - config_setting_lookup_string(zone_e, "name", &zonename);/* will succeed for we validated it earlier */ + name = libconfig->setting_get_string_elem(inherit_tree, h); + libconfig->setting_lookup_string(zone_e, "name", &zonename);/* will succeed for we validated it earlier */ if( !(izone = strdb_get(map->zone_db, name)) ) { ShowError("map_zone_db: Unknown zone '%s' being inherit by zone '%s', skipping...\n",name,zonename); @@ -4851,13 +4851,13 @@ void read_map_zone_db(void) { /* process everything to override, paying attention to config_setting_get_bool */ if( disabled_skills_count_i ) { - if( (skills = config_setting_get_member(zone_e, "disabled_skills")) == NULL ) - skills = config_setting_add(zone_e, "disabled_skills",CONFIG_TYPE_GROUP); - disabled_skills_count = config_setting_length(skills); + if( (skills = libconfig->setting_get_member(zone_e, "disabled_skills")) == NULL ) + skills = libconfig->setting_add(zone_e, "disabled_skills",CONFIG_TYPE_GROUP); + disabled_skills_count = libconfig->setting_length(skills); for(j = 0; j < disabled_skills_count_i; j++) { int k; for(k = 0; k < disabled_skills_count; k++) { - config_setting_t *skillinfo = config_setting_get_elem(skills, k); + config_setting_t *skillinfo = libconfig->setting_get_elem(skills, k); if( map->zone_str2skillid(config_setting_name(skillinfo)) == izone->disabled_skills[j]->nameid ) { break; } @@ -4874,18 +4874,18 @@ void read_map_zone_db(void) { } if( disabled_items_count_i ) { - if( (items = config_setting_get_member(zone_e, "disabled_items")) == NULL ) - items = config_setting_add(zone_e, "disabled_items",CONFIG_TYPE_GROUP); - disabled_items_count = config_setting_length(items); + if( (items = libconfig->setting_get_member(zone_e, "disabled_items")) == NULL ) + items = libconfig->setting_add(zone_e, "disabled_items",CONFIG_TYPE_GROUP); + disabled_items_count = libconfig->setting_length(items); for(j = 0; j < disabled_items_count_i; j++) { int k; for(k = 0; k < disabled_items_count; k++) { - config_setting_t *item = config_setting_get_elem(items, k); + config_setting_t *item = libconfig->setting_get_elem(items, k); name = config_setting_name(item); if( map->zone_str2itemid(name) == izone->disabled_items[j] ) { - if( config_setting_get_bool(item) ) + if( libconfig->setting_get_bool(item) ) continue; break; } @@ -4898,13 +4898,13 @@ void read_map_zone_db(void) { } if( mapflags_count_i ) { - if( (mapflags = config_setting_get_member(zone_e, "mapflags")) == NULL ) - mapflags = config_setting_add(zone_e, "mapflags",CONFIG_TYPE_ARRAY); - mapflags_count = config_setting_length(mapflags); + if( (mapflags = libconfig->setting_get_member(zone_e, "mapflags")) == NULL ) + mapflags = libconfig->setting_add(zone_e, "mapflags",CONFIG_TYPE_ARRAY); + mapflags_count = libconfig->setting_length(mapflags); for(j = 0; j < mapflags_count_i; j++) { int k; for(k = 0; k < mapflags_count; k++) { - name = config_setting_get_string_elem(mapflags, k); + name = libconfig->setting_get_string_elem(mapflags, k); if( strcmpi(name,izone->mapflags[j]) == 0 ) { break; @@ -4919,14 +4919,14 @@ void read_map_zone_db(void) { } if( disabled_commands_count_i ) { - if( (commands = config_setting_get_member(zone_e, "disabled_commands")) == NULL ) - commands = config_setting_add(zone_e, "disabled_commands",CONFIG_TYPE_GROUP); + if( (commands = libconfig->setting_get_member(zone_e, "disabled_commands")) == NULL ) + commands = libconfig->setting_add(zone_e, "disabled_commands",CONFIG_TYPE_GROUP); - disabled_commands_count = config_setting_length(commands); + disabled_commands_count = libconfig->setting_length(commands); for(j = 0; j < disabled_commands_count_i; j++) { int k; for(k = 0; k < disabled_commands_count; k++) { - config_setting_t *command = config_setting_get_elem(commands, k); + config_setting_t *command = libconfig->setting_get_elem(commands, k); if( atcommand->exists(config_setting_name(command))->func == izone->disabled_commands[j]->cmd ) { break; } @@ -4943,14 +4943,14 @@ void read_map_zone_db(void) { } if( capped_skills_count_i ) { - if( (caps = config_setting_get_member(zone_e, "skill_damage_cap")) == NULL ) - caps = config_setting_add(zone_e, "skill_damage_cap",CONFIG_TYPE_GROUP); + if( (caps = libconfig->setting_get_member(zone_e, "skill_damage_cap")) == NULL ) + caps = libconfig->setting_add(zone_e, "skill_damage_cap",CONFIG_TYPE_GROUP); - capped_skills_count = config_setting_length(caps); + capped_skills_count = libconfig->setting_length(caps); for(j = 0; j < capped_skills_count_i; j++) { int k; for(k = 0; k < capped_skills_count; k++) { - config_setting_t *cap = config_setting_get_elem(caps, k); + config_setting_t *cap = libconfig->setting_get_elem(caps, k); if( map->zone_str2skillid(config_setting_name(cap)) == izone->capped_skills[j]->nameid ) { break; } @@ -4972,7 +4972,7 @@ void read_map_zone_db(void) { ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' zones in '"CL_WHITE"%s"CL_RESET"'.\n", zone_count, config_filename); /* not supposed to go in here but in skill_final whatever */ - config_destroy(&map_zone_db); + libconfig->destroy(&map_zone_db); } } diff --git a/src/map/pc.c b/src/map/pc.c index cc2566a6e..f96b70cdb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9746,14 +9746,14 @@ void pc_read_skill_tree(void) { { "Rebellion", JOB_REBELLION }, }; - if (conf_read_file(&skill_tree_conf, config_filename)) { + if (libconfig->read_file(&skill_tree_conf, config_filename)) { ShowError("can't read %s\n", config_filename); return; } jnamelen = ARRAYLENGTH(jnames); - while( (skt = config_setting_get_elem(skill_tree_conf.root,i++)) ) { + while( (skt = libconfig->setting_get_elem(skill_tree_conf.root,i++)) ) { int k, idx; const char *name = config_setting_name(skt); @@ -9765,12 +9765,12 @@ void pc_read_skill_tree(void) { } - if( ( skills = config_setting_get_member(skt,"skills") ) ) { + if( ( skills = libconfig->setting_get_member(skt,"skills") ) ) { int c = 0; idx = pc->class2idx(jnames[k].id); - while( ( sk = config_setting_get_elem(skills,c++) ) ) { + while( ( sk = libconfig->setting_get_elem(skills,c++) ) ) { const char *sk_name = config_setting_name(sk); int skill_id; @@ -9790,23 +9790,23 @@ void pc_read_skill_tree(void) { if( config_setting_is_group(sk) ) { int max = 0, jlevel = 0; - config_setting_lookup_int(sk, "MaxLevel", &max); - config_setting_lookup_int(sk, "MinJobLevel", &jlevel); + libconfig->setting_lookup_int(sk, "MaxLevel", &max); + libconfig->setting_lookup_int(sk, "MinJobLevel", &jlevel); pc->skill_tree[idx][skidx].max = (unsigned char)max; pc->skill_tree[idx][skidx].joblv = (unsigned char)jlevel; - rlen = config_setting_length(sk); + rlen = libconfig->setting_length(sk); offset += jlevel ? 2 : 1; } else { - pc->skill_tree[idx][skidx].max = (unsigned char)config_setting_get_int(sk); + pc->skill_tree[idx][skidx].max = (unsigned char)libconfig->setting_get_int(sk); pc->skill_tree[idx][skidx].joblv = 0; } for( h = offset; h < rlen && h < MAX_PC_SKILL_REQUIRE; h++ ) { - config_setting_t *rsk = config_setting_get_elem(sk,h); + config_setting_t *rsk = libconfig->setting_get_elem(sk,h); if( rsk && ( rskid = skill->name2id(config_setting_name(rsk)) ) ) { pc->skill_tree[idx][skidx].need[h].id = rskid; pc->skill_tree[idx][skidx].need[h].idx = skill->get_index(rskid); - pc->skill_tree[idx][skidx].need[h].lv = (unsigned char)config_setting_get_int(rsk); + pc->skill_tree[idx][skidx].need[h].lv = (unsigned char)libconfig->setting_get_int(rsk); } else if( rsk ) { ShowWarning("pc_read_skill_tree: unknown requirement '%s' for '%s' in '%s'\n",config_setting_name(rsk),sk_name,name); } else { @@ -9822,7 +9822,7 @@ void pc_read_skill_tree(void) { } i = 0; - while( (skt = config_setting_get_elem(skill_tree_conf.root,i++)) ) { + while( (skt = libconfig->setting_get_elem(skill_tree_conf.root,i++)) ) { int k, idx, v = 0; const char *name = config_setting_name(skt); const char *iname; @@ -9836,8 +9836,8 @@ void pc_read_skill_tree(void) { } idx = pc->class2idx(jnames[k].id); - if( ( inherit = config_setting_get_member(skt,"inherit") ) ) { - while( ( iname = config_setting_get_string_elem(inherit, v++) ) ) { + if( ( inherit = libconfig->setting_get_member(skt,"inherit") ) ) { + while( ( iname = libconfig->setting_get_string_elem(inherit, v++) ) ) { int b = 0, a, d, f, fidx; ARR_FIND(0, jnamelen, b, strcmpi(jnames[b].name,iname) == 0 ); @@ -9869,7 +9869,7 @@ void pc_read_skill_tree(void) { } - config_destroy(&skill_tree_conf); + libconfig->destroy(&skill_tree_conf); /* lets update all players skill tree */ iter = mapit_getallusers(); diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index 4ddb95c9b..906462c7e 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -49,26 +49,26 @@ static void read_config(void) { const char *config_filename = "conf/groups.conf"; // FIXME hardcoded name int group_count = 0; - if (conf_read_file(&pc_group_config, config_filename)) + if (libconfig->read_file(&pc_group_config, config_filename)) return; - groups = config_lookup(&pc_group_config, "groups"); + groups = libconfig->lookup(&pc_group_config, "groups"); if (groups != NULL) { GroupSettings *group_settings = NULL; DBIterator *iter = NULL; int i, loop = 0; - group_count = config_setting_length(groups); + group_count = libconfig->setting_length(groups); for (i = 0; i < group_count; ++i) { int id = 0, level = 0; const char *groupname = NULL; int log_commands = 0; - config_setting_t *group = config_setting_get_elem(groups, i); + config_setting_t *group = libconfig->setting_get_elem(groups, i); - if (!config_setting_lookup_int(group, "id", &id)) { + if (!libconfig->setting_lookup_int(group, "id", &id)) { ShowConfigWarning(group, "pc_groups:read_config: \"groups\" list member #%d has undefined id, removing...", i); - config_setting_remove_elem(groups, i); + libconfig->setting_remove_elem(groups, i); --i; --group_count; continue; @@ -76,16 +76,16 @@ static void read_config(void) { if (pcg->exists(id)) { ShowConfigWarning(group, "pc_groups:read_config: duplicate group id %d, removing...", i); - config_setting_remove_elem(groups, i); + libconfig->setting_remove_elem(groups, i); --i; --group_count; continue; } - config_setting_lookup_int(group, "level", &level); - config_setting_lookup_bool(group, "log_commands", &log_commands); + libconfig->setting_lookup_int(group, "level", &level); + libconfig->setting_lookup_bool(group, "log_commands", &log_commands); - if (!config_setting_lookup_string(group, "name", &groupname)) { + if (!libconfig->setting_lookup_string(group, "name", &groupname)) { char temp[20]; config_setting_t *name = NULL; snprintf(temp, sizeof(temp), "Group %d", id); @@ -97,12 +97,12 @@ static void read_config(void) { --group_count; continue; } - config_setting_lookup_string(group, "name", &groupname); // Retrieve the pointer + libconfig->setting_lookup_string(group, "name", &groupname); // Retrieve the pointer } if (name2group(groupname) != NULL) { ShowConfigWarning(group, "pc_groups:read_config: duplicate group name %s, removing...", groupname); - config_setting_remove_elem(groups, i); + libconfig->setting_remove_elem(groups, i); --i; --group_count; continue; @@ -113,9 +113,9 @@ static void read_config(void) { group_settings->level = level; group_settings->name = aStrdup(groupname); group_settings->log_commands = (bool)log_commands; - group_settings->inherit = config_setting_get_member(group, "inherit"); - group_settings->commands = config_setting_get_member(group, "commands"); - group_settings->permissions = config_setting_get_member(group, "permissions"); + group_settings->inherit = libconfig->setting_get_member(group, "inherit"); + group_settings->commands = libconfig->setting_get_member(group, "commands"); + group_settings->permissions = libconfig->setting_get_member(group, "permissions"); group_settings->inheritance_done = false; group_settings->root = group; group_settings->index = i; @@ -124,7 +124,7 @@ static void read_config(void) { idb_put(pcg->db, id, group_settings); } - group_count = config_setting_length(groups); // Save number of groups + group_count = libconfig->setting_length(groups); // Save number of groups assert(group_count == db_size(pcg->db)); // Check if all commands and permissions exist @@ -135,15 +135,15 @@ static void read_config(void) { // Make sure there is "commands" group if (commands == NULL) - commands = group_settings->commands = config_setting_add(group_settings->root, "commands", CONFIG_TYPE_GROUP); - count = config_setting_length(commands); + commands = group_settings->commands = libconfig->setting_add(group_settings->root, "commands", CONFIG_TYPE_GROUP); + count = libconfig->setting_length(commands); for (i = 0; i < count; ++i) { - config_setting_t *command = config_setting_get_elem(commands, i); + config_setting_t *command = libconfig->setting_get_elem(commands, i); const char *name = config_setting_name(command); if (!atcommand->exists(name)) { ShowConfigWarning(command, "pc_groups:read_config: non-existent command name '%s', removing...", name); - config_setting_remove(commands, name); + libconfig->setting_remove(commands, name); --i; --count; } @@ -151,18 +151,18 @@ static void read_config(void) { // Make sure there is "permissions" group if (permissions == NULL) - permissions = group_settings->permissions = config_setting_add(group_settings->root, "permissions", CONFIG_TYPE_GROUP); - count = config_setting_length(permissions); + permissions = group_settings->permissions = libconfig->setting_add(group_settings->root, "permissions", CONFIG_TYPE_GROUP); + count = libconfig->setting_length(permissions); for(i = 0; i < count; ++i) { - config_setting_t *permission = config_setting_get_elem(permissions, i); + config_setting_t *permission = libconfig->setting_get_elem(permissions, i); const char *name = config_setting_name(permission); int j; ARR_FIND(0, pcg->permission_count, j, strcmp(pcg->permissions[j].name, name) == 0); if (j == pcg->permission_count) { ShowConfigWarning(permission, "pc_groups:read_config: non-existent permission name '%s', removing...", name); - config_setting_remove(permissions, name); + libconfig->setting_remove(permissions, name); --i; --count; } @@ -184,7 +184,7 @@ static void read_config(void) { continue; if ((inherit = group_settings->inherit) == NULL || - (inherit_count = config_setting_length(inherit)) <= 0) { // this group does not inherit from others + (inherit_count = libconfig->setting_length(inherit)) <= 0) { // this group does not inherit from others ++i; group_settings->inheritance_done = true; continue; @@ -192,16 +192,16 @@ static void read_config(void) { for (j = 0; j < inherit_count; ++j) { GroupSettings *inherited_group = NULL; - const char *groupname = config_setting_get_string_elem(inherit, j); + const char *groupname = libconfig->setting_get_string_elem(inherit, j); if (groupname == NULL) { ShowConfigWarning(inherit, "pc_groups:read_config: \"inherit\" array member #%d is not a name, removing...", j); - config_setting_remove_elem(inherit,j); + libconfig->setting_remove_elem(inherit,j); continue; } if ((inherited_group = name2group(groupname)) == NULL) { ShowConfigWarning(inherit, "pc_groups:read_config: non-existent group name \"%s\", removing...", groupname); - config_setting_remove_elem(inherit,j); + libconfig->setting_remove_elem(inherit,j); continue; } if (!inherited_group->inheritance_done) @@ -209,15 +209,15 @@ static void read_config(void) { // Copy settings (commands/permissions) that are not defined yet if (inherited_group->commands != NULL) { - int k = 0, commands_count = config_setting_length(inherited_group->commands); + int k = 0, commands_count = libconfig->setting_length(inherited_group->commands); for (k = 0; k < commands_count; ++k) - config_setting_copy(commands, config_setting_get_elem(inherited_group->commands, k)); + libconfig->setting_copy(commands, libconfig->setting_get_elem(inherited_group->commands, k)); } if (inherited_group->permissions != NULL) { - int k = 0, permissions_count = config_setting_length(inherited_group->permissions); + int k = 0, permissions_count = libconfig->setting_length(inherited_group->permissions); for (k = 0; k < permissions_count; ++k) - config_setting_copy(permissions, config_setting_get_elem(inherited_group->permissions, k)); + libconfig->setting_copy(permissions, libconfig->setting_get_elem(inherited_group->permissions, k)); } ++done; // copied commands and permissions from one of inherited groups @@ -241,12 +241,12 @@ static void read_config(void) { iter = db_iterator(pcg->db); for (group_settings = dbi_first(iter); dbi_exists(iter); group_settings = dbi_next(iter)) { config_setting_t *permissions = group_settings->permissions; - int count = config_setting_length(permissions); + int count = libconfig->setting_length(permissions); for (i = 0; i < count; ++i) { - config_setting_t *perm = config_setting_get_elem(permissions, i); + config_setting_t *perm = libconfig->setting_get_elem(permissions, i); const char *name = config_setting_name(perm); - int val = config_setting_get_bool(perm); + int val = libconfig->setting_get_bool(perm); int j; if (val == 0) // does not have this permission @@ -282,7 +282,7 @@ static void read_config(void) { ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' groups in '"CL_WHITE"%s"CL_RESET"'.\n", group_count, config_filename); // All data is loaded now, discard config - config_destroy(&pc_group_config); + libconfig->destroy(&pc_group_config); } /** diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 58dee4306..e72d47b80 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -34,10 +34,6 @@ struct { bool torun = false; int (*itemdb_readdb_libconfig_sub) (config_setting_t *it, int n, const char *source); -int (*h_config_setting_lookup_string) (const config_setting_t *setting, const char *name, const char **value); -int (*h_config_setting_lookup_int) (const config_setting_t *setting, const char *name, int *value); -config_setting_t *(*h_config_setting_get_member) (const config_setting_t *setting, const char *name); -int (*h_config_setting_length) (const config_setting_t *setting); void hstr(const char *str) { if( strlen(str) > tosql.buf[3].len ) { @@ -60,18 +56,18 @@ int db2sql(config_setting_t *entry, int n, const char *source) { SQL->EscapeString(NULL, e_name, it->name); SQL->EscapeString(NULL, e_jname, it->jname); - if( it->script ) { h_config_setting_lookup_string(entry, "Script", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[0].len ) { tosql.buf[0].len = tosql.buf[0].len + strlen(str) + 1000; RECREATE(tosql.buf[0].p,char,tosql.buf[0].len); } SQL->EscapeString(NULL, tosql.buf[0].p, str); } - if( it->equip_script ) { h_config_setting_lookup_string(entry, "OnEquipScript", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[1].len ) { tosql.buf[1].len = tosql.buf[1].len + strlen(str) + 1000; RECREATE(tosql.buf[1].p,char,tosql.buf[1].len); } SQL->EscapeString(NULL, tosql.buf[1].p, str); } - if( it->unequip_script ) { h_config_setting_lookup_string(entry, "OnUnequipScript", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[2].len ) { tosql.buf[2].len = tosql.buf[2].len + strlen(str) + 1000; RECREATE(tosql.buf[2].p,char,tosql.buf[2].len); } SQL->EscapeString(NULL, tosql.buf[2].p, str); } + if( it->script ) { libconfig->setting_lookup_string(entry, "Script", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[0].len ) { tosql.buf[0].len = tosql.buf[0].len + strlen(str) + 1000; RECREATE(tosql.buf[0].p,char,tosql.buf[0].len); } SQL->EscapeString(NULL, tosql.buf[0].p, str); } + if( it->equip_script ) { libconfig->setting_lookup_string(entry, "OnEquipScript", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[1].len ) { tosql.buf[1].len = tosql.buf[1].len + strlen(str) + 1000; RECREATE(tosql.buf[1].p,char,tosql.buf[1].len); } SQL->EscapeString(NULL, tosql.buf[1].p, str); } + if( it->unequip_script ) { libconfig->setting_lookup_string(entry, "OnUnequipScript", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[2].len ) { tosql.buf[2].len = tosql.buf[2].len + strlen(str) + 1000; RECREATE(tosql.buf[2].p,char,tosql.buf[2].len); } SQL->EscapeString(NULL, tosql.buf[2].p, str); } - if( h_config_setting_lookup_int(entry, "Job", &i32) ) // This is an unsigned value, do not check for >= 0 + if( libconfig->setting_lookup_int(entry, "Job", &i32) ) // This is an unsigned value, do not check for >= 0 ui32 = (unsigned int)i32; else ui32 = UINT_MAX; job = ui32; - if( h_config_setting_lookup_int(entry, "Upper", &i32) && i32 >= 0 ) + if( libconfig->setting_lookup_int(entry, "Upper", &i32) && i32 >= 0 ) ui32 = (unsigned int)i32; else ui32 = ITEMUPPER_ALL; @@ -79,7 +75,7 @@ int db2sql(config_setting_t *entry, int n, const char *source) { upper = ui32; /* check if we have the equip_level_max, if so we send it -- otherwise we send NULL */ - if( (t = h_config_setting_get_member(entry, "EquipLv")) && config_setting_is_aggregate(t) && h_config_setting_length(t) >= 2 ) + if( (t = libconfig->setting_get_member(entry, "EquipLv")) && config_setting_is_aggregate(t) && libconfig->setting_length(t) >= 2 ) fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%s','%s','%s');\n", tosql.db_name,it->nameid,e_name,e_jname,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,job,upper,it->sex,it->equip,it->wlv,it->elv,it->elvmax,it->flag.no_refine?0:1,it->look,it->flag.bindonequip?1:0,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:""); else @@ -192,16 +188,13 @@ void db2sql_arg(char *param) { map->minimal = torun = true; } HPExport void server_preinit (void) { - h_config_setting_lookup_string = GET_SYMBOL("config_setting_lookup_string"); - h_config_setting_lookup_int = GET_SYMBOL("config_setting_lookup_int"); - h_config_setting_get_member = GET_SYMBOL("config_setting_get_member"); - h_config_setting_length = GET_SYMBOL("config_setting_length"); - SQL = GET_SYMBOL("SQL"); itemdb = GET_SYMBOL("itemdb"); map = GET_SYMBOL("map"); strlib = GET_SYMBOL("strlib"); iMalloc = GET_SYMBOL("iMalloc"); + libconfig = GET_SYMBOL("libconfig"); + addArg("--db2sql",false,db2sql_arg,NULL); } -- cgit v1.2.3-70-g09d2 From 14f84fc044754d22740905b7fa90022b4a04b0d8 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 18 Jan 2014 19:30:11 -0200 Subject: Socket interfaced We designed this one with having as little changes required elsewhere in mind, thus the way most socket-related things are called has not changed. Plugins may now take a greater advantage of the socket features. Signed-off-by: shennetsind --- src/char/char.c | 24 ++++----- src/common/HPM.c | 6 +-- src/common/core.c | 9 ++-- src/common/socket.c | 135 +++++++++++++++++++++++++++++++++---------------- src/common/socket.h | 142 ++++++++++++++++++++++++++++++---------------------- src/common/strlib.h | 1 + src/common/timer.c | 2 +- src/common/timer.h | 2 +- src/map/atcommand.c | 2 +- src/map/chrif.c | 10 ++-- src/map/chrif.h | 2 +- src/map/clif.c | 32 ++++++------ src/map/map.c | 10 ++-- src/map/mob.c | 2 +- src/map/pc.c | 2 +- src/map/pc.h | 2 +- src/map/script.c | 2 +- src/map/unit.c | 2 +- 18 files changed, 227 insertions(+), 160 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index a6588dc09..efe02031f 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2109,8 +2109,8 @@ void disconnect_player(int account_id) struct char_session_data* sd; // disconnect player if online on char-server - ARR_FIND( 0, fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == account_id ); - if( i < fd_max ) + ARR_FIND( 0, sockt->fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == account_id ); + if( i < sockt->fd_max ) set_eof(i); } @@ -2228,7 +2228,7 @@ int parse_fromlogin(int fd) { loginif_on_disconnect(); return 0; } else if ( session[fd]->flag.ping ) {/* we've reached stall time */ - if( DIFF_TICK(last_tick, session[fd]->rdata_tick) > (stall_time * 2) ) {/* we can't wait any longer */ + if( DIFF_TICK(sockt->last_tick, session[fd]->rdata_tick) > (sockt->stall_time * 2) ) {/* we can't wait any longer */ set_eof(fd); return 0; } else if( session[fd]->flag.ping != 2 ) { /* we haven't sent ping out yet */ @@ -2334,8 +2334,8 @@ int parse_fromlogin(int fd) { return 0; // find the authenticated session with this account id - ARR_FIND( 0, fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->auth && sd->account_id == RFIFOL(fd,2) ); - if( i < fd_max ) { + ARR_FIND( 0, sockt->fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->auth && sd->account_id == RFIFOL(fd,2) ); + if( i < sockt->fd_max ) { memcpy(sd->email, RFIFOP(fd,6), 40); sd->expiration_time = (time_t)RFIFOL(fd,46); sd->group_id = RFIFOB(fd,50); @@ -2512,8 +2512,8 @@ int parse_fromlogin(int fd) { {// Manual kick from char server. struct char_session_data *tsd; int i; - ARR_FIND( 0, fd_max, i, session[i] && (tsd = (struct char_session_data*)session[i]->session_data) && tsd->account_id == aid ); - if( i < fd_max ) + ARR_FIND( 0, sockt->fd_max, i, session[i] && (tsd = (struct char_session_data*)session[i]->session_data) && tsd->account_id == aid ); + if( i < sockt->fd_max ) { WFIFOHEAD(i,3); WFIFOW(i,0) = 0x81; @@ -2885,7 +2885,7 @@ int parse_frommap(int fd) case 0x2b0a: if( RFIFOREST(fd) < RFIFOW(fd, 2) ) return 0; - socket_datasync(fd, false); + sockt->datasync(fd, false); RFIFOSKIP(fd,RFIFOW(fd,2)); break; @@ -4609,7 +4609,7 @@ int parse_char(int fd) realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK); char_mapif_init(fd); } - socket_datasync(fd, true); + sockt->datasync(fd, true); RFIFOSKIP(fd,60); } @@ -5304,11 +5304,11 @@ int do_init(int argc, char **argv) { mmo_char_sql_init(); char_read_fame_list(); //Read fame lists. - if ((naddr_ != 0) && (!login_ip || !char_ip)) { + if ((sockt->naddr_ != 0) && (!login_ip || !char_ip)) { char ip_str[16]; - ip2str(addr_[0], ip_str); + ip2str(sockt->addr_[0], ip_str); - if (naddr_ > 1) + if (sockt->naddr_ > 1) ShowStatus("Multiple interfaces detected.. using %s as our IP address\n", ip_str); else ShowStatus("Defaulting to %s as our IP address\n", ip_str); diff --git a/src/common/HPM.c b/src/common/HPM.c index e31437b72..cb70ddcd7 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -675,11 +675,7 @@ void hplugins_share_defaults(void) { HPM->share(DB, "DB"); HPM->share(HPMiMalloc, "iMalloc"); /* socket */ - HPM->share(RFIFOSKIP,"RFIFOSKIP"); - HPM->share(WFIFOSET,"WFIFOSET"); - HPM->share(do_close,"do_close"); - HPM->share(make_connection,"make_connection"); - //session,fd_max and addr_ are shared from within socket.c + HPM->share(sockt,"sockt"); /* strlib */ HPM->share(strlib,"strlib"); HPM->share(sv,"sv"); diff --git a/src/common/core.c b/src/common/core.c index 5c1e58801..86634ec4b 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -287,6 +287,7 @@ void core_defaults(void) { sql_defaults(); timer_defaults(); db_defaults(); + socket_defaults(); #endif } /*====================================== @@ -350,14 +351,14 @@ int main (int argc, char **argv) { HPM->init(); #endif - socket_init(); + sockt->init(); do_init(argc,argv); {// Main runtime cycle int next; while (runflag != CORE_ST_STOP) { - next = timer->do_timer(timer->gettick_nocache()); - do_sockets(next); + next = timer->perform(timer->gettick_nocache()); + sockt->perform(next); } } @@ -368,7 +369,7 @@ int main (int argc, char **argv) { HPM->final(); #endif timer->final(); - socket_final(); + sockt->final(); DB->final(); rathread_final(); #endif diff --git a/src/common/socket.c b/src/common/socket.c index 95333cdce..9a61b0827 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -10,6 +10,9 @@ #include "../common/strlib.h" #include "../config/core.h" #include "../common/HPM.h" + +#define _H_SOCKET_C_ + #include "socket.h" #include @@ -43,6 +46,19 @@ #endif #endif +/** + * Socket Interface Source + **/ +struct socket_interface sockt_s; + +#ifdef SEND_SHORTLIST + // Add a fd to the shortlist so that it'll be recognized as a fd that needs + // sending done on it. + void send_shortlist_add_fd(int fd); + // Do pending network sends (and eof handling) from the shortlist. + void send_shortlist_do_sends(); +#endif + ///////////////////////////////////////////////////////////////////// #if defined(WIN32) ///////////////////////////////////////////////////////////////////// @@ -212,12 +228,6 @@ char* sErr(int code) #endif fd_set readfds; -int fd_max; -time_t last_tick; -time_t stall_time = 60; - -uint32 addr_[16]; // ip addresses of local host (host byte order) -int naddr_ = 0; // # of ip addresses // Maximum packet size in bytes, which the client is able to handle. // Larger packets cause a buffer overflow and stack corruption. @@ -328,7 +338,7 @@ void setsocketopts(int fd, struct hSockOpt *opt) { *--------------------------------------*/ void set_eof(int fd) { - if( session_isActive(fd) ) + if( sockt->session_isActive(fd) ) { #ifdef SEND_SHORTLIST // Add this socket to the shortlist for eof handling. @@ -342,7 +352,7 @@ int recv_to_fifo(int fd) { ssize_t len; - if( !session_isActive(fd) ) + if( !sockt->session_isActive(fd) ) return -1; len = sRecv(fd, (char *) session[fd]->rdata + session[fd]->rdata_size, (int)RFIFOSPACE(fd), 0); @@ -363,7 +373,7 @@ int recv_to_fifo(int fd) } session[fd]->rdata_size += len; - session[fd]->rdata_tick = last_tick; + session[fd]->rdata_tick = sockt->last_tick; #ifdef SHOW_SERVER_STATS socket_data_i += len; socket_data_qi += len; @@ -379,7 +389,7 @@ int send_from_fifo(int fd) { ssize_t len; - if( !session_isValid(fd) ) + if( !sockt->session_isValid(fd) ) return -1; if( session[fd]->wdata_size == 0 ) @@ -431,8 +441,8 @@ void flush_fifo(int fd) void flush_fifos(void) { int i; - for(i = 1; i < fd_max; i++) - flush_fifo(i); + for(i = 1; i < sockt->fd_max; i++) + sockt->flush_fifo(i); } /*====================================== @@ -466,12 +476,12 @@ int connect_client(int listen_fd) { #ifndef MINICORE if( ip_rules && !connect_check(ntohl(client_address.sin_addr.s_addr)) ) { - do_close(fd); + sockt->close(fd); return -1; } #endif - if( fd_max <= fd ) fd_max = fd + 1; + if( sockt->fd_max <= fd ) sockt->fd_max = fd + 1; sFD_SET(fd,&readfds); create_session(fd, recv_to_fifo, send_from_fifo, default_func_parse); @@ -521,7 +531,7 @@ int make_listen_bind(uint32 ip, uint16 port) exit(EXIT_FAILURE); } - if(fd_max <= fd) fd_max = fd + 1; + if(sockt->fd_max <= fd) sockt->fd_max = fd + 1; sFD_SET(fd, &readfds); create_session(fd, connect_client, null_send, null_parse); @@ -566,13 +576,13 @@ int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { if( result == SOCKET_ERROR ) { if( !( opt && opt->silent ) ) ShowError("make_connection: connect failed (socket #%d, %s)!\n", fd, error_msg()); - do_close(fd); + sockt->close(fd); return -1; } //Now the socket can be made non-blocking. [Skotlex] set_nonblocking(fd, 1); - if (fd_max <= fd) fd_max = fd + 1; + if (sockt->fd_max <= fd) sockt->fd_max = fd + 1; sFD_SET(fd,&readfds); create_session(fd, recv_to_fifo, send_from_fifo, default_func_parse); @@ -591,7 +601,7 @@ static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseF session[fd]->func_recv = func_recv; session[fd]->func_send = func_send; session[fd]->func_parse = func_parse; - session[fd]->rdata_tick = last_tick; + session[fd]->rdata_tick = sockt->last_tick; session[fd]->session_data = NULL; session[fd]->hdata = NULL; session[fd]->hdatac = 0; @@ -600,7 +610,7 @@ static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseF static void delete_session(int fd) { - if( session_isValid(fd) ) { + if( sockt->session_isValid(fd) ) { unsigned int i; #ifdef SHOW_SERVER_STATS socket_data_qi -= session[fd]->rdata_size - session[fd]->rdata_pos; @@ -625,7 +635,7 @@ static void delete_session(int fd) int realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { - if( !session_isValid(fd) ) + if( !sockt->session_isValid(fd) ) return 0; if( session[fd]->max_rdata != rfifo_size && session[fd]->rdata_size < rfifo_size) { @@ -644,7 +654,7 @@ int realloc_writefifo(int fd, size_t addition) { size_t newsize; - if( !session_isValid(fd) ) // might not happen + if( !sockt->session_isValid(fd) ) // might not happen return 0; if( session[fd]->wdata_size + addition > session[fd]->max_wdata ) @@ -672,7 +682,7 @@ int RFIFOSKIP(int fd, size_t len) { struct socket_data *s; - if ( !session_isActive(fd) ) + if ( !sockt->session_isActive(fd) ) return 0; s = session[fd]; @@ -695,7 +705,7 @@ int WFIFOSET(int fd, size_t len) size_t newreserve; struct socket_data* s = session[fd]; - if( !session_isValid(fd) || s->wdata == NULL ) + if( !sockt->session_isValid(fd) || s->wdata == NULL ) return 0; // we have written len bytes to the buffer already before calling WFIFOSET @@ -771,7 +781,7 @@ int do_sockets(int next) #ifdef SEND_SHORTLIST send_shortlist_do_sends(); #else - for (i = 1; i < fd_max; i++) + for (i = 1; i < sockt->fd_max; i++) { if(!session[i]) continue; @@ -786,7 +796,7 @@ int do_sockets(int next) timeout.tv_usec = next%1000*1000; memcpy(&rfd, &readfds, sizeof(rfd)); - ret = sSelect(fd_max, &rfd, NULL, NULL, &timeout); + ret = sSelect(sockt->fd_max, &rfd, NULL, NULL, &timeout); if( ret == SOCKET_ERROR ) { @@ -798,7 +808,7 @@ int do_sockets(int next) return 0; // interrupted by a signal, just loop and try again } - last_tick = time(NULL); + sockt->last_tick = time(NULL); #if defined(WIN32) // on windows, enumerating all members of the fd_set is way faster if we access the internals @@ -810,7 +820,7 @@ int do_sockets(int next) } #else // otherwise assume that the fd_set is a bit-array and enumerate it in a standard way - for( i = 1; ret && i < fd_max; ++i ) + for( i = 1; ret && i < sockt->fd_max; ++i ) { if(sFD_ISSET(i,&rfd) && session[i]) { @@ -824,7 +834,7 @@ int do_sockets(int next) #ifdef SEND_SHORTLIST send_shortlist_do_sends(); #else - for (i = 1; i < fd_max; i++) + for (i = 1; i < sockt->fd_max; i++) { if(!session[i]) continue; @@ -840,12 +850,12 @@ int do_sockets(int next) #endif // parse input data on each socket - for(i = 1; i < fd_max; i++) + for(i = 1; i < sockt->fd_max; i++) { if(!session[i]) continue; - if (session[i]->rdata_tick && DIFF_TICK(last_tick, session[i]->rdata_tick) > stall_time) { + if (session[i]->rdata_tick && DIFF_TICK(sockt->last_tick, session[i]->rdata_tick) > sockt->stall_time) { if( session[i]->flag.server ) {/* server is special */ if( session[i]->flag.ping != 2 )/* only update if necessary otherwise it'd resend the ping unnecessarily */ session[i]->flag.ping = 1; @@ -873,7 +883,7 @@ int do_sockets(int next) } #ifdef SHOW_SERVER_STATS - if (last_tick != socket_data_last_tick) + if (sockt->last_tick != socket_data_last_tick) { char buf[1024]; @@ -883,7 +893,7 @@ int do_sockets(int next) #else ShowMessage("\033[s\033[1;1H\033[2K%s\033[u", buf); #endif - socket_data_last_tick = last_tick; + socket_data_last_tick = sockt->last_tick; socket_data_i = socket_data_ci = 0; socket_data_o = socket_data_co = 0; } @@ -1148,9 +1158,9 @@ int socket_config_read(const char* cfgName) continue; if (!strcmpi(w1, "stall_time")) { - stall_time = atoi(w2); - if( stall_time < 3 ) - stall_time = 3;/* a minimum is required to refrain it from killing itself */ + sockt->stall_time = atoi(w2); + if( sockt->stall_time < 3 ) + sockt->stall_time = 3;/* a minimum is required to refrain it from killing itself */ } #ifndef MINICORE else if (!strcmpi(w1, "enable_ip_rules")) { @@ -1218,9 +1228,9 @@ void socket_final(void) aFree(access_deny); #endif - for( i = 1; i < fd_max; i++ ) + for( i = 1; i < sockt->fd_max; i++ ) if(session[i]) - do_close(i); + sockt->close(i); // session[0] ‚̃_ƒ~[ƒf[ƒ^‚ðíœ aFree(session[0]->rdata); @@ -1382,7 +1392,7 @@ void socket_init(void) #endif // Get initial local ips - naddr_ = socket_getips(addr_,16); + sockt->naddr_ = socket_getips(sockt->addr_,16); sFD_ZERO(&readfds); #if defined(SEND_SHORTLIST) @@ -1394,7 +1404,7 @@ void socket_init(void) socket_config_read(SOCKET_CONF_FILENAME); // initialise last send-receive tick - last_tick = time(NULL); + sockt->last_tick = time(NULL); // session[0] is now currently used for disconnected sessions of the map server, and as such, // should hold enough buffer (it is a vacuum so to speak) as it is never flushed. [Skotlex] @@ -1411,8 +1421,6 @@ void socket_init(void) /* Hercules Plugin Manager */ HPM->share(session,"session"); - HPM->share(&fd_max,"fd_max"); - HPM->share(addr_,"addr"); } bool session_isValid(int fd) @@ -1422,7 +1430,7 @@ bool session_isValid(int fd) bool session_isActive(int fd) { - return ( session_isValid(fd) && !session[fd]->flag.eof ); + return ( sockt->session_isValid(fd) && !session[fd]->flag.eof ); } // Resolves hostname into a numeric ip. @@ -1526,7 +1534,7 @@ void send_shortlist_add_fd(int fd) int i; int bit; - if( !session_isValid(fd) ) + if( !sockt->session_isValid(fd) ) return;// out of range i = fd/32; @@ -1595,3 +1603,44 @@ void send_shortlist_do_sends() } } #endif + +void socket_defaults(void) { + sockt = &sockt_s; + + sockt->fd_max = 0; + /* */ + sockt->stall_time = 60; + sockt->last_tick = 0; + /* */ + memset(&sockt->addr_, 0, sizeof(sockt->addr_)); + sockt->naddr_ = 0; + /* */ + sockt->init = socket_init; + sockt->final = socket_final; + /* */ + sockt->perform = do_sockets; + /* */ + sockt->datasync = socket_datasync; + /* */ + sockt->make_listen_bind = make_listen_bind; + sockt->make_connection = make_connection; + sockt->realloc_fifo = realloc_fifo; + sockt->realloc_writefifo = realloc_writefifo; + sockt->WFIFOSET = WFIFOSET; + sockt->RFIFOSKIP = RFIFOSKIP; + sockt->close = do_close; + /* */ + sockt->session_isValid = session_isValid; + sockt->session_isActive = session_isActive; + /* */ + sockt->flush_fifo = flush_fifo; + sockt->flush_fifos = flush_fifos; + sockt->set_nonblocking = set_nonblocking; + sockt->set_defaultparse = set_defaultparse; + sockt->host2ip = host2ip; + sockt->ip2str = ip2str; + sockt->str2ip = str2ip; + sockt->ntows = ntows; + sockt->getips = socket_getips; + sockt->set_eof = set_eof; +} diff --git a/src/common/socket.h b/src/common/socket.h index 02817f653..6879d2e90 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -107,73 +107,93 @@ struct hSockOpt { unsigned int setTimeo : 1; }; -// Data prototype declaration - -struct socket_data **session; - -extern int fd_max; - -extern time_t last_tick; -extern time_t stall_time; - -////////////////////////////////// -// some checking on sockets -extern bool session_isValid(int fd); -extern bool session_isActive(int fd); -////////////////////////////////// - -// Function prototype declaration - -int make_listen_bind(uint32 ip, uint16 port); -int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt); -int realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size); -int realloc_writefifo(int fd, size_t addition); -int WFIFOSET(int fd, size_t len); -int RFIFOSKIP(int fd, size_t len); - -int do_sockets(int next); -void do_close(int fd); -void socket_init(void); -void socket_final(void); - -extern void flush_fifo(int fd); -extern void flush_fifos(void); -extern void set_nonblocking(int fd, unsigned long yes); - -void set_defaultparse(ParseFunc defaultparse); +/// Use a shortlist of sockets instead of iterating all sessions for sockets +/// that have data to send or need eof handling. +/// Adapted to use a static array instead of a linked list. +/// +/// @author Buuyo-tama +#define SEND_SHORTLIST -// hostname/ip conversion functions -uint32 host2ip(const char* hostname); -const char* ip2str(uint32 ip, char ip_str[16]); -uint32 str2ip(const char* ip_str); // Note: purposely returns four comma-separated arguments #define CONVIP(ip) ((ip)>>24)&0xFF,((ip)>>16)&0xFF,((ip)>>8)&0xFF,((ip)>>0)&0xFF #define MAKEIP(a,b,c,d) ((uint32)( ( ( (a)&0xFF ) << 24 ) | ( ( (b)&0xFF ) << 16 ) | ( ( (c)&0xFF ) << 8 ) | ( ( (d)&0xFF ) << 0 ) )) -uint16 ntows(uint16 netshort); - -int socket_getips(uint32* ips, int max); - -extern uint32 addr_[16]; // ip addresses of local host (host byte order) -extern int naddr_; // # of ip addresses -void set_eof(int fd); - -/* [Ind/Hercules] - socket_datasync */ -void socket_datasync(int fd, bool send); +/** + * This stays out of the interface. + **/ +struct socket_data **session; -/// Use a shortlist of sockets instead of iterating all sessions for sockets -/// that have data to send or need eof handling. -/// Adapted to use a static array instead of a linked list. -/// -/// @author Buuyo-tama -#define SEND_SHORTLIST +/** + * Socket.c interface, mostly for reading however. + **/ +struct socket_interface { + int fd_max; + /* */ + time_t stall_time; + time_t last_tick; + /* */ + uint32 addr_[16]; // ip addresses of local host (host byte order) + int naddr_; // # of ip addresses + /* */ + void (*init) (void); + void (*final) (void); + /* */ + int (*perform) (int next); + /* [Ind/Hercules] - socket_datasync */ + void (*datasync) (int fd, bool send); + /* */ + int (*make_listen_bind) (uint32 ip, uint16 port); + int (*make_connection) (uint32 ip, uint16 port, struct hSockOpt *opt); + int (*realloc_fifo) (int fd, unsigned int rfifo_size, unsigned int wfifo_size); + int (*realloc_writefifo) (int fd, size_t addition); + int (*WFIFOSET) (int fd, size_t len); + int (*RFIFOSKIP) (int fd, size_t len); + void (*close) (int fd); + /* */ + bool (*session_isValid) (int fd); + bool (*session_isActive) (int fd); + /* */ + void (*flush_fifo) (int fd); + void (*flush_fifos) (void); + void (*set_nonblocking) (int fd, unsigned long yes); + void (*set_defaultparse) (ParseFunc defaultparse); + /* hostname/ip conversion functions */ + uint32 (*host2ip) (const char* hostname); + const char * (*ip2str) (uint32 ip, char ip_str[16]); + uint32 (*str2ip) (const char* ip_str); + /* */ + uint16 (*ntows) (uint16 netshort); + /* */ + int (*getips) (uint32* ips, int max); + /* */ + void (*set_eof) (int fd); +}; -#ifdef SEND_SHORTLIST -// Add a fd to the shortlist so that it'll be recognized as a fd that needs -// sending done on it. -void send_shortlist_add_fd(int fd); -// Do pending network sends (and eof handling) from the shortlist. -void send_shortlist_do_sends(); -#endif +struct socket_interface *sockt; + +void socket_defaults(void); + +/* the purpose of these macros is simply to not make calling them be an annoyance */ +#ifndef _H_SOCKET_C_ + #define make_listen_bind(ip, port) ( sockt->make_listen_bind(ip, port) ) + #define make_connection(ip, port, opt) ( sockt->make_connection(ip, port, opt) ) + #define realloc_fifo(fd, rfifo_size, wfifo_size) ( sockt->realloc_fifo(fd, rfifo_size, wfifo_size) ) + #define realloc_writefifo(fd, addition) ( sockt->realloc_writefifo(fd, addition) ) + #define WFIFOSET(fd, len) ( sockt->WFIFOSET(fd, len) ) + #define RFIFOSKIP(fd, len) ( sockt->RFIFOSKIP(fd, len) ) + #define do_close(fd) ( sockt->close(fd) ) + #define session_isValid(fd) ( sockt->session_isValid(fd) ) + #define session_isActive(fd) ( sockt->session_isActive(fd) ) + #define flush_fifo(fd) ( sockt->flush_fifo(fd) ) + #define flush_fifos() ( sockt->flush_fifos() ) + #define set_nonblocking(fd, yes) ( sockt->set_nonblocking(fd, yes) ) + #define set_defaultparse(defaultparse) ( sockt->set_defaultparse(defaultparse) ) + #define host2ip(hostname) ( sockt->host2ip(hostname) ) + #define ip2str(ip, ip_str) ( sockt->ip2str(ip, ip_str) ) + #define str2ip(ip_str) ( sockt->str2ip(ip_str) ) + #define ntows(netshort) ( sockt->ntows(netshort) ) + #define getips(ips, max) ( sockt->getips(ips, max) ) + #define set_eof(fd) ( sockt->set_eof(fd) ) +#endif /* _H_SOCKET_C_ */ #endif /* _SOCKET_H_ */ diff --git a/src/common/strlib.h b/src/common/strlib.h index d1aea8cac..5336260f6 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -190,4 +190,5 @@ void strlib_defaults(void); #define strline(str,pos) (strlib->strline((str),(pos))) #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) #endif /* STRLIB_C */ + #endif /* _STRLIB_H_ */ diff --git a/src/common/timer.c b/src/common/timer.c index 7f9e20dad..526854582 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -468,7 +468,7 @@ void timer_defaults(void) { timer->addtick = timer_addtick; timer->settick = timer_settick; timer->get_uptime = timer_get_uptime; - timer->do_timer = do_timer; + timer->perform = do_timer; timer->init = timer_init; timer->final = timer_final; } diff --git a/src/common/timer.h b/src/common/timer.h index 9aa29861e..af1a2b036 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -56,7 +56,7 @@ struct timer_interface { unsigned long (*get_uptime) (void); - int (*do_timer) (int64 tick); + int (*perform) (int64 tick); void (*init) (void); void (*final) (void); }; diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 3cdfb0e29..0cb552bd0 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9847,7 +9847,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message } if( battle_config.idletime_criteria & BCIDLE_ATCOMMAND ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; //Clearing these to be used once more. memset(command, '\0', sizeof(command)); diff --git a/src/map/chrif.c b/src/map/chrif.c index 0a3fb0ad2..3dc35fc68 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -426,7 +426,7 @@ void chrif_connectack(int fd) { guild->castle_map_init(); } - socket_datasync(fd, true); + sockt->datasync(fd, true); chrif->skillid2idx(fd); } @@ -1251,7 +1251,7 @@ bool chrif_char_offline_nsd(int account_id, int char_id) { /*========================================= * Tell char-server to reset all chars offline [Wizputer] *-----------------------------------------*/ -bool chrif_flush_fifo(void) { +bool chrif_flush(void) { chrif_check(false); set_nonblocking(chrif->fd, 0); @@ -1372,7 +1372,7 @@ int chrif_parse(int fd) { chrif->on_disconnect(); return 0; } else if ( session[fd]->flag.ping ) {/* we've reached stall time */ - if( DIFF_TICK(last_tick, session[fd]->rdata_tick) > (stall_time * 2) ) {/* we can't wait any longer */ + if( DIFF_TICK(sockt->last_tick, session[fd]->rdata_tick) > (sockt->stall_time * 2) ) {/* we can't wait any longer */ set_eof(fd); return 0; } else if( session[fd]->flag.ping != 2 ) { /* we haven't sent ping out yet */ @@ -1423,7 +1423,7 @@ int chrif_parse(int fd) { case 0x2b04: chrif->recvmap(fd); break; case 0x2b06: chrif->changemapserverack(RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOL(fd,14), RFIFOW(fd,18), RFIFOW(fd,20), RFIFOW(fd,22), RFIFOL(fd,24), RFIFOW(fd,28)); break; case 0x2b09: map->addnickdb(RFIFOL(fd,2), (char*)RFIFOP(fd,6)); break; - case 0x2b0a: socket_datasync(fd, false); break; + case 0x2b0a: sockt->datasync(fd, false); break; case 0x2b0d: chrif->changedsex(fd); break; case 0x2b0f: chrif->char_ask_name_answer(RFIFOL(fd,2), (char*)RFIFOP(fd,6), RFIFOW(fd,30), RFIFOW(fd,32)); break; case 0x2b12: chrif->divorceack(RFIFOL(fd,2), RFIFOL(fd,6)); break; @@ -1692,7 +1692,7 @@ void chrif_defaults(void) { chrif->removefriend = chrif_removefriend; chrif->send_report = chrif_send_report; - chrif->flush_fifo = chrif_flush_fifo; + chrif->flush = chrif_flush; chrif->skillid2idx = chrif_skillid2idx; chrif->sd_to_auth = chrif_sd_to_auth; diff --git a/src/map/chrif.h b/src/map/chrif.h index 7e7aa43cd..163fdf670 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -104,7 +104,7 @@ struct chrif_interface { bool (*removefriend) (int char_id, int friend_id); void (*send_report) (char* buf, int len); - bool (*flush_fifo) (void); + bool (*flush) (void); void (*skillid2idx) (int fd); bool (*sd_to_auth) (TBL_PC* sd, enum sd_state state); diff --git a/src/map/clif.c b/src/map/clif.c index af328e7a7..975a5aa01 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9708,7 +9708,7 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) //Set last idle time... [Skotlex] if( battle_config.idletime_criteria & BCIDLE_WALK ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; unit->walktoxy(&sd->bl, x, y, 4); } @@ -9859,7 +9859,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) } if( battle_config.idletime_criteria & BCIDLE_CHAT ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; if( sd->gcbind ) { clif->chsys_send(sd->gcbind,sd,message); @@ -10024,7 +10024,7 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd) sd->emotionlasttime = time(NULL); if( battle_config.idletime_criteria & BCIDLE_EMOTION ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; if(battle_config.client_reshuffle_dice && emoticon>=E_DICE1 && emoticon<=E_DICE6) {// re-roll dice emoticon = rnd()%6+E_DICE1; @@ -10099,7 +10099,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, pc->delinvincibletimer(sd); if( battle_config.idletime_criteria & BCIDLE_ATTACK ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; unit->attack(&sd->bl, target_id, action_type != 0); break; case 0x02: // sitdown @@ -10124,7 +10124,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, break; if( battle_config.idletime_criteria & BCIDLE_SIT ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; pc_setsit(sd); skill->sit(sd,1); @@ -10138,7 +10138,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, } if( battle_config.idletime_criteria & BCIDLE_SIT ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; pc->setstand(sd); skill->sit(sd,0); @@ -10332,7 +10332,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) } if( battle_config.idletime_criteria & BCIDLE_CHAT ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; // Chat logging type 'W' / Whisper logs->chat(LOG_CHAT_WHISPER, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, target, message); @@ -10552,7 +10552,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd) break; if( battle_config.idletime_criteria & BCIDLE_DROPITEM ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; return; } @@ -10580,7 +10580,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) //Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex] if( battle_config.idletime_criteria & BCIDLE_USEITEM ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; n = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2; if(n <0 || n >= MAX_INVENTORY) @@ -10627,7 +10627,7 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd) { } if( battle_config.idletime_criteria & BCIDLE_USEITEM ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; //Client doesn't send the position for ammo. if(sd->inventory_data[p->index]->type == IT_AMMO) @@ -10747,7 +10747,7 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd) index = RFIFOW(fd,2)-2; if( battle_config.idletime_criteria & BCIDLE_USEITEM ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; pc->unequipitem(sd,index,1); } @@ -11297,7 +11297,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) // Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex] if( battle_config.idletime_criteria & BCIDLE_USESKILLTOID ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; if( sd->npc_id || sd->state.workinprogress&1 ){ #ifdef RENEWAL @@ -11398,7 +11398,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski //Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex] if( battle_config.idletime_criteria & BCIDLE_USESKILLTOPOS ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; if( skill->not_ok(skill_id, sd) ) return; @@ -12154,7 +12154,7 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd) } if( battle_config.idletime_criteria & BCIDLE_CHAT ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; party->send_message(sd, text, textlen); } @@ -13214,7 +13214,7 @@ void clif_parse_GuildMessage(int fd, struct map_session_data* sd) } if( battle_config.idletime_criteria & BCIDLE_CHAT ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; if( sd->bg_id ) bg->send_message(sd, text, textlen); @@ -16203,7 +16203,7 @@ void clif_parse_BattleChat(int fd, struct map_session_data* sd) } if( battle_config.idletime_criteria & BCIDLE_CHAT ) - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; bg->send_message(sd, text, textlen); } diff --git a/src/map/map.c b/src/map/map.c index 052d589b4..8301caa5b 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5113,7 +5113,7 @@ void do_final(void) map->id_db->foreach(map->id_db,map->cleanup_db_sub); chrif->char_reset_offline(); - chrif->flush_fifo(); + chrif->flush(); atcommand->final(); battle->final(); @@ -5200,7 +5200,7 @@ void do_abort(void) } ShowError("Server received crash signal! Attempting to save all online characters!\n"); map->foreachpc(map->abort_sub); - chrif->flush_fifo(); + chrif->flush(); } /*====================================================== @@ -5524,13 +5524,13 @@ int do_init(int argc, char *argv[]) if (!map->ip_set || !map->char_ip_set) { char ip_str[16]; - ip2str(addr_[0], ip_str); + ip2str(sockt->addr_[0], ip_str); ShowWarning("Not all IP addresses in /conf/map-server.conf configured, autodetecting...\n"); - if (naddr_ == 0) + if (sockt->naddr_ == 0) ShowError("Unable to determine your IP address...\n"); - else if (naddr_ > 1) + else if (sockt->naddr_ > 1) ShowNotice("Multiple interfaces detected...\n"); ShowInfo("Defaulting to %s as our IP address\n", ip_str); diff --git a/src/map/mob.c b/src/map/mob.c index 6a8aa5f03..dab7b99ac 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1825,7 +1825,7 @@ void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct ite if( sd && (drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid)) - && (battle_config.idle_no_autoloot == 0 || DIFF_TICK(last_tick, sd->idletime) < battle_config.idle_no_autoloot) + && (battle_config.idle_no_autoloot == 0 || DIFF_TICK(sockt->last_tick, sd->idletime) < battle_config.idle_no_autoloot) && (battle_config.homunculus_autoloot?1:!flag) #ifdef AUTOLOOT_DISTANCE && sd->bl.m == md->bl.m diff --git a/src/map/pc.c b/src/map/pc.c index f96b70cdb..b6c354189 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1035,7 +1035,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim sd->cansendmail_tick = tick; sd->hchsysch_tick = tick; - sd->idletime = last_tick; + sd->idletime = sockt->last_tick; for(i = 0; i < MAX_SPIRITBALL; i++) sd->spirit_timer[i] = INVALID_TIMER; diff --git a/src/map/pc.h b/src/map/pc.h index f64b20945..487266646 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -585,7 +585,7 @@ enum equip_pos { #define pc_setsit(sd) ( (sd)->state.dead_sit = (sd)->vd.dead_sit = 2 ) #define pc_isdead(sd) ( (sd)->state.dead_sit == 1 ) #define pc_issit(sd) ( (sd)->vd.dead_sit == 2 ) -#define pc_isidle(sd) ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(last_tick, (sd)->idletime) >= battle_config.idle_no_share ) +#define pc_isidle(sd) ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(sockt->last_tick, (sd)->idletime) >= battle_config.idle_no_share ) #define pc_istrading(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading ) #define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend ) diff --git a/src/map/script.c b/src/map/script.c index 75469a345..8e8f89727 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -15044,7 +15044,7 @@ BUILDIN(checkidle) { sd = script->rid2sd(st); if (sd) - script_pushint(st, DIFF_TICK32(last_tick, sd->idletime)); // TODO: change this to int64 when we'll support 64 bit script values + script_pushint(st, DIFF_TICK32(sockt->last_tick, sd->idletime)); // TODO: change this to int64 when we'll support 64 bit script values else script_pushint(st, 0); diff --git a/src/map/unit.c b/src/map/unit.c index d801a72f0..af52e6dfb 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1918,7 +1918,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) { if(ud->state.attack_continue) { if( src->type == BL_PC && battle_config.idletime_criteria & BCIDLE_ATTACK ) - ((TBL_PC*)src)->idletime = last_tick; + ((TBL_PC*)src)->idletime = sockt->last_tick; ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0); } -- cgit v1.2.3-70-g09d2 From acc992ac2838f6380ebf2b2f8a514e86c2b750d9 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 19 Jan 2014 02:58:36 -0200 Subject: HPM Custom Data Struct Expansion: map/instance/party/guild As requested by the community in http://hercules.ws/board/topic/3832-hpm-custom-data-struct-for-instance-data-guild-data-and-party-data/ Signed-off-by: shennetsind --- src/common/HPM.c | 16 +++++++++------- src/common/HPM.h | 2 +- src/common/HPMi.h | 20 ++++++++++++++++++++ src/common/mmo.h | 12 +++++++++--- src/map/HPMmap.c | 23 +++++++++++++++++++---- src/map/HPMmap.h | 2 +- src/map/guild.c | 20 ++++++++++++++++++++ src/map/instance.c | 13 +++++++++++++ src/map/instance.h | 4 ++++ src/map/map.c | 8 ++++++++ src/map/map.h | 4 ++++ src/map/npc.h | 1 + src/map/party.c | 27 +++++++++++++++++++++++++-- src/map/party.h | 6 ++++++ 14 files changed, 140 insertions(+), 18 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index cb70ddcd7..1edf24901 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -316,19 +316,21 @@ CPCMD(plugins) { void hplugins_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { /* record address */ switch( type ) { + /* core-handled */ case HPDT_SESSION: ret->HPDataSRCPtr = (void**)(&((struct socket_data *)ptr)->hdata); ret->hdatac = &((struct socket_data *)ptr)->hdatac; break; /* goes to sub */ - case HPDT_MSD: - case HPDT_NPCD: - if( HPM->grabHPDataSub ) - HPM->grabHPDataSub(ret,type,ptr); - else - ShowError("HPM:grabHPData failed, type %d needs sub-handler!\n",type); - break; default: + if( HPM->grabHPDataSub ) { + if( HPM->grabHPDataSub(ret,type,ptr) ) + return; + else { + ShowError("HPM:HPM:grabHPData failed, unknown type %d!\n",type); + } + } else + ShowError("HPM:grabHPData failed, type %d needs sub-handler!\n",type); ret->HPDataSRCPtr = NULL; ret->hdatac = NULL; return; diff --git a/src/common/HPM.h b/src/common/HPM.h index 1f2ba4648..393f8f819 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -143,7 +143,7 @@ struct HPM_interface { int (*arg_db_clear_sub) (DBKey key, DBData *data, va_list args); void (*grabHPData) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); /* for server-specific HPData e.g. map_session_data */ - void (*grabHPDataSub) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); + bool (*grabHPDataSub) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); /* for custom config parsing */ bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point); } HPM_s; diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 78a3a9ab5..fdb6ccf52 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -82,6 +82,10 @@ enum HPluginDataTypes { HPDT_SESSION, HPDT_MSD, HPDT_NPCD, + HPDT_MAP, + HPDT_INSTANCE, + HPDT_GUILD, + HPDT_PARTY, }; /* used in macros and conf storage */ @@ -111,6 +115,22 @@ enum HPluginConfType { #define addToNPCD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_NPCD,HPMi->pid,(ptr),(data),(index),(autofree))) #define getFromNPCD(ptr,index) (HPMi->getFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index))) #define removeFromNPCD(ptr,index) (HPMi->removeFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index))) +/* map_data */ +#define addToMAPD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_MAP,HPMi->pid,(ptr),(data),(index),(autofree))) +#define getFromMAPD(ptr,index) (HPMi->getFromHPData(HPDT_MAP,HPMi->pid,(ptr),(index))) +#define removeFromMAPD(ptr,index) (HPMi->removeFromHPData(HPDT_MAP,HPMi->pid,(ptr),(index))) +/* party_data */ +#define addToPAD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_PARTY,HPMi->pid,(ptr),(data),(index),(autofree))) +#define getFromPAD(ptr,index) (HPMi->getFromHPData(HPDT_PARTY,HPMi->pid,(ptr),(index))) +#define removeFromPAD(ptr,index) (HPMi->removeFromHPData(HPDT_PARTY,HPMi->pid,(ptr),(index))) +/* guild */ +#define addToGLD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_GUILD,HPMi->pid,(ptr),(data),(index),(autofree))) +#define getFromGLD(ptr,index) (HPMi->getFromHPData(HPDT_GUILD,HPMi->pid,(ptr),(index))) +#define removeFromGLD(ptr,index) (HPMi->removeFromHPData(HPDT_GUILD,HPMi->pid,(ptr),(index))) +/* instance_data */ +#define addToINSTD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(data),(index),(autofree))) +#define getFromINSTD(ptr,index) (HPMi->getFromHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(index))) +#define removeFromINSTD(ptr,index) (HPMi->removeFromHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(index))) /* HPMi->addCommand */ #define addAtcommand(cname,funcname) \ diff --git a/src/common/mmo.h b/src/common/mmo.h index 7350de443..670c2f7f7 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -178,6 +178,8 @@ #define EL_CLASS_BASE 2114 #define EL_CLASS_MAX (EL_CLASS_BASE+MAX_ELEMENTAL_CLASS-1) +struct HPluginData; + enum item_types { IT_HEALING = 0, IT_UNKNOWN, //1 @@ -498,7 +500,7 @@ struct party { unsigned char count; //Count of online characters. unsigned exp : 1, item : 2; //&1: Party-Share (round-robin), &2: pickup style: shared. - struct party_member member[MAX_PARTY]; + struct party_member member[MAX_PARTY]; }; struct map_session_data; @@ -553,13 +555,17 @@ struct guild { struct guild_expulsion expulsion[MAX_GUILDEXPULSION]; struct guild_skill skill[MAX_GUILDSKILL]; - /* TODO: still used for something?|: */ - unsigned short save_flag; // for TXT saving + /* used on char.c to state what kind of data is being saved/processed */ + unsigned short save_flag; short *instance; unsigned short instances; struct hChSysCh *channel; + + /* HPM Custom Struct */ + struct HPluginData **hdata; + unsigned int hdatac; }; struct guild_castle { diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 9c09a7ad1..4b1338b8d 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -46,7 +46,7 @@ struct HPM_atcommand_list { struct HPM_atcommand_list *atcommand_list = NULL; unsigned int atcommand_list_items = 0; -void HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { +bool HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { /* record address */ switch( type ) { case HPDT_MSD: @@ -57,11 +57,26 @@ void HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataType ret->HPDataSRCPtr = (void**)(&((struct npc_data *)ptr)->hdata); ret->hdatac = &((struct npc_data *)ptr)->hdatac; break; + case HPDT_MAP: + ret->HPDataSRCPtr = (void**)(&((struct map_data *)ptr)->hdata); + ret->hdatac = &((struct map_data *)ptr)->hdatac; + break; + case HPDT_PARTY: + ret->HPDataSRCPtr = (void**)(&((struct party_data *)ptr)->hdata); + ret->hdatac = &((struct party_data *)ptr)->hdatac; + break; + case HPDT_GUILD: + ret->HPDataSRCPtr = (void**)(&((struct guild *)ptr)->hdata); + ret->hdatac = &((struct guild *)ptr)->hdatac; + break; + case HPDT_INSTANCE: + ret->HPDataSRCPtr = (void**)(&((struct instance_data *)ptr)->hdata); + ret->hdatac = &((struct instance_data *)ptr)->hdatac; + break; default: - ret->HPDataSRCPtr = NULL; - ret->hdatac = NULL; - return; + return false; } + return true; } void HPM_map_plugin_load_sub(struct hplugin *plugin) { diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h index f86f02eb9..ff8cf4c74 100644 --- a/src/map/HPMmap.h +++ b/src/map/HPMmap.h @@ -11,7 +11,7 @@ struct hplugin; struct map_session_data; -void HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); +bool HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); bool HPM_map_add_atcommand(char *name, AtCommandFunc func); void HPM_map_atcommands(void); diff --git a/src/map/guild.c b/src/map/guild.c index 909c360a8..d13c681bb 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -11,6 +11,7 @@ #include "../common/ers.h" #include "../common/strlib.h" #include "../common/utils.h" +#include "../common/HPM.h" #include "map.h" #include "guild.h" @@ -1758,6 +1759,16 @@ int guild_broken(int guild_id,int flag) } if( g->instance ) aFree(g->instance); + + for( i = 0; i < g->hdatac; i++ ) { + if( g->hdata[i]->flag.free ) { + aFree(g->hdata[i]->data); + } + aFree(g->hdata[i]); + } + if( g->hdata ) + aFree(g->hdata); + idb_remove(guild->db,guild_id); return 0; } @@ -2228,6 +2239,7 @@ void do_init_guild(bool minimal) { void do_final_guild(void) { DBIterator *iter = db_iterator(guild->db); struct guild *g; + int i; for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) ) { if( g->channel != NULL ) @@ -2236,6 +2248,14 @@ void do_final_guild(void) { aFree(g->instance); g->instance = NULL; } + for( i = 0; i < g->hdatac; i++ ) { + if( g->hdata[i]->flag.free ) { + aFree(g->hdata[i]->data); + } + aFree(g->hdata[i]); + } + if( g->hdata ) + aFree(g->hdata); } dbi_destroy(iter); diff --git a/src/map/instance.c b/src/map/instance.c index 7c092e6cb..a111751d0 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -11,6 +11,7 @@ #include "../common/strlib.h" #include "../common/utils.h" #include "../common/db.h" +#include "../common/HPM.h" #include "clif.h" #include "instance.h" @@ -568,6 +569,18 @@ void instance_destroy(int instance_id) { instance->list[instance_id].map = NULL; instance->list[instance_id].state = INSTANCE_FREE; instance->list[instance_id].num_map = 0; + + for( j = 0; j < instance->list[instance_id].hdatac; j++ ) { + if( instance->list[instance_id].hdata[j]->flag.free ) { + aFree(instance->list[instance_id].hdata[j]->data); + } + aFree(instance->list[instance_id].hdata[j]); + } + if( instance->list[instance_id].hdata ) + aFree(instance->list[instance_id].hdata); + + instance->list[instance_id].hdata = NULL; + instance->list[instance_id].hdatac = 0; } /*-------------------------------------- diff --git a/src/map/instance.h b/src/map/instance.h index ddca3e36b..764a55b2b 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -45,6 +45,10 @@ struct instance_data { unsigned int original_progress_timeout; struct point respawn;/* reload spawn */ + + /* HPM Custom Struct */ + struct HPluginData **hdata; + unsigned int hdatac; }; struct instance_interface { diff --git a/src/map/map.c b/src/map/map.c index bb9e53cdb..07881ea56 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3116,6 +3116,14 @@ void do_final_maps(void) { if( map->list[i].qi_data ) aFree(map->list[i].qi_data); + for( v = 0; v < map->list[i].hdatac; v++ ) { + if( map->list[i].hdata[v]->flag.free ) { + aFree(map->list[i].hdata[v]->data); + } + aFree(map->list[i].hdata[v]); + } + if( map->list[i].hdata ) + aFree(map->list[i].hdata); } map->zone_db_clear(); diff --git a/src/map/map.h b/src/map/map.h index a39cc7f86..130b181da 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -712,6 +712,10 @@ struct map_data { /* speeds up clif_updatestatus processing by causing hpmeter to run only when someone with the permission can view it */ unsigned short hpmeter_visible; + + /* HPM Custom Struct */ + struct HPluginData **hdata; + unsigned int hdatac; }; /// Stores information about a remote map (for multi-mapserver setups). diff --git a/src/map/npc.h b/src/map/npc.h index df3c1729b..266d174fb 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -326,6 +326,7 @@ struct npc_chat_interface *npc_chat; /** * pcre interface (libpcre) * so that plugins may share and take advantage of the core's pcre + * should be moved into core/perhaps its own file once hpm is enhanced for login/char **/ struct pcre_interface { pcre *(*compile) (const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr); diff --git a/src/map/party.c b/src/map/party.c index 7af6acff5..9f144297d 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -11,6 +11,7 @@ #include "../common/showmsg.h" #include "../common/utils.h" #include "../common/strlib.h" +#include "../common/HPM.h" #include "party.h" #include "atcommand.h" //msg_txt() @@ -94,8 +95,21 @@ TBL_PC* party_sd_check(int party_id, int account_id, int char_id) { int party_db_final(DBKey key, DBData *data, va_list ap) { struct party_data *p; - if( ( p = DB->data2ptr(data) ) && p->instance ) - aFree(p->instance); + if( ( p = DB->data2ptr(data) ) ) { + int j; + + if( p->instance ) + aFree(p->instance); + + for( j = 0; j < p->hdatac; j++ ) { + if( p->hdata[j]->flag.free ) { + aFree(p->hdata[j]->data); + } + aFree(p->hdata[j]); + } + if( p->hdata ) + aFree(p->hdata); + } return 0; } @@ -591,6 +605,15 @@ int party_broken(int party_id) if( p->instance ) aFree(p->instance); + + for( j = 0; j < p->hdatac; j++ ) { + if( p->hdata[j]->flag.free ) { + aFree(p->hdata[j]->data); + } + aFree(p->hdata[j]); + } + if( p->hdata ) + aFree(p->hdata); idb_remove(party->db,party_id); return 0; diff --git a/src/map/party.h b/src/map/party.h index 0041b1462..051c98af2 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -14,6 +14,8 @@ #define PARTY_BOOKING_JOBS 6 #define PARTY_BOOKING_RESULTS 10 +struct HPluginData; + struct party_member_data { struct map_session_data *sd; unsigned int hp; //For HP,x,y refreshing. @@ -32,6 +34,10 @@ struct party_data { unsigned snovice :1; //There's a Super Novice unsigned tk : 1; //There's a taekwon } state; + + /* HPM Custom Struct */ + struct HPluginData **hdata; + unsigned int hdatac; }; #define PB_NOTICE_LENGTH (36 + 1) -- cgit v1.2.3-70-g09d2 From d33469689ea8e671fa0d525d54bce6932dfe9107 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 2 Feb 2014 15:02:14 -0200 Subject: Introducing HPM Datacheck http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/ Signed-off-by: shennetsind --- src/char/char.h | 6 ++-- src/char/int_auction.h | 6 ++-- src/char/int_elemental.h | 6 ++-- src/char/int_guild.h | 6 ++-- src/char/int_homun.h | 6 ++-- src/char/int_mail.h | 6 ++-- src/char/int_mercenary.h | 6 ++-- src/char/int_party.h | 6 ++-- src/char/int_pet.h | 6 ++-- src/char/int_quest.h | 6 ++-- src/char/int_storage.h | 6 ++-- src/char/inter.h | 6 ++-- src/char/pincode.h | 6 ++-- src/common/HPM.c | 26 ++++++++++++++++++ src/common/HPM.h | 8 ++++-- src/common/HPMi.h | 15 ++++++---- src/common/atomic.h | 6 ++-- src/common/cbasetypes.h | 6 ++-- src/common/conf.h | 6 ++-- src/common/console.h | 6 ++-- src/common/core.h | 6 ++-- src/common/db.h | 6 ++-- src/common/des.h | 6 ++-- src/common/ers.h | 6 ++-- src/common/grfio.h | 6 ++-- src/common/malloc.h | 6 ++-- src/common/mapindex.h | 6 ++-- src/common/md5calc.h | 6 ++-- src/common/mmo.h | 6 ++-- src/common/mutex.h | 6 ++-- src/common/nullpo.h | 6 ++-- src/common/random.h | 6 ++-- src/common/showmsg.h | 6 ++-- src/common/socket.h | 6 ++-- src/common/spinlock.h | 6 ++-- src/common/strlib.h | 6 ++-- src/common/thread.h | 6 ++-- src/common/timer.h | 8 ++++-- src/common/utils.h | 6 ++-- src/config/const.h | 7 +++-- src/login/account.h | 6 ++-- src/login/ipban.h | 6 ++-- src/login/login.h | 6 ++-- src/login/loginlog.h | 6 ++-- src/map/HPMmap.c | 71 ++++++++++++++++++++++++++++++++++++++++-------- src/map/HPMmap.h | 10 +++++-- src/map/atcommand.h | 6 ++-- src/map/battle.h | 6 ++-- src/map/battleground.h | 6 ++-- src/map/buyingstore.h | 6 ++-- src/map/chat.h | 6 ++-- src/map/chrif.h | 6 ++-- src/map/clif.h | 6 ++-- src/map/date.h | 6 ++-- src/map/duel.h | 6 ++-- src/map/elemental.h | 6 ++-- src/map/guild.h | 6 ++-- src/map/homunculus.h | 6 ++-- src/map/instance.h | 6 ++-- src/map/intif.h | 6 ++-- src/map/irc-bot.h | 6 ++-- src/map/itemdb.h | 6 ++-- src/map/log.h | 6 ++-- src/map/mail.h | 6 ++-- src/map/map.c | 2 ++ src/map/map.h | 6 ++-- src/map/mapreg.h | 6 ++-- src/map/mercenary.h | 6 ++-- src/map/mob.h | 6 ++-- src/map/npc.h | 6 ++-- src/map/packets.h | 6 ++-- src/map/packets_struct.h | 6 ++-- src/map/party.h | 6 ++-- src/map/path.h | 6 ++-- src/map/pc.h | 7 +++-- src/map/pc_groups.h | 6 ++-- src/map/pet.h | 6 ++-- src/map/quest.h | 6 ++-- src/map/script.h | 6 ++-- src/map/searchstore.h | 6 ++-- src/map/skill.h | 6 ++-- src/map/status.h | 6 ++-- src/map/storage.h | 6 ++-- src/map/trade.h | 7 +++-- src/map/unit.h | 11 ++++---- src/map/vending.h | 6 ++-- 86 files changed, 357 insertions(+), 265 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.h b/src/char/char.h index 3e3774c1f..06c0556c5 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CHAR_SQL_H_ -#define _CHAR_SQL_H_ +#ifndef _COMMON_CHAR_H_ +#define _COMMON_CHAR_H_ #include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST @@ -121,4 +121,4 @@ void global_accreg_to_login_start (int account_id, int char_id); void global_accreg_to_login_send (void); void global_accreg_to_login_add (const char *key, unsigned int index, intptr_t val, bool is_string); -#endif /* _CHAR_SQL_H_ */ +#endif /* _COMMON_CHAR_H_ */ diff --git a/src/char/int_auction.h b/src/char/int_auction.h index bf26b152c..f10794f73 100644 --- a/src/char/int_auction.h +++ b/src/char/int_auction.h @@ -1,12 +1,12 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_AUCTION_SQL_H_ -#define _INT_AUCTION_SQL_H_ +#ifndef _CHAR_INT_AUCTION_H_ +#define _CHAR_INT_AUCTION_H_ int inter_auction_parse_frommap(int fd); int inter_auction_sql_init(void); void inter_auction_sql_final(void); -#endif /* _INT_AUCTION_SQL_H_ */ +#endif /* _CHAR_INT_AUCTION_H_ */ diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index 7eb5c2958..c90891fc4 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_ELEMENTAL_SQL_H_ -#define _INT_ELEMENTAL_SQL_H_ +#ifndef _CHAR_INT_ELEMENTAL_H_ +#define _CHAR_INT_ELEMENTAL_H_ struct s_elemental; @@ -12,4 +12,4 @@ int inter_elemental_parse_frommap(int fd); bool mapif_elemental_delete(int ele_id); -#endif /* _INT_ELEMENTAL_SQL_H_ */ +#endif /* _CHAR_INT_ELEMENTAL_H_ */ diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 47c42dcc5..4eb7d310b 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_GUILD_SQL_H_ -#define _INT_GUILD_SQL_H_ +#ifndef _CHAR_INT_GUILD_H_ +#define _CHAR_INT_GUILD_H_ enum { GS_BASIC = 0x0001, @@ -34,4 +34,4 @@ int inter_guild_charname_changed(int guild_id,int account_id, int char_id, char int inter_guild_CharOnline(int char_id, int guild_id); int inter_guild_CharOffline(int char_id, int guild_id); -#endif /* _INT_GUILD_SQL_H_ */ +#endif /* _CHAR_INT_GUILD_H_ */ diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 1c0d76269..561dc848f 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_HOMUN_SQL_H_ -#define _INT_HOMUN_SQL_H_ +#ifndef _CHAR_INT_HOMUN_H_ +#define _CHAR_INT_HOMUN_H_ struct s_homunculus; @@ -15,4 +15,4 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd); bool mapif_homunculus_delete(int homun_id); bool mapif_homunculus_rename(char *name); -#endif /* _INT_HOMUN_SQL_H_ */ +#endif /* _CHAR_INT_HOMUN_H_ */ diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 77db51e5b..7c06cdc1f 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_MAIL_SQL_H_ -#define _INT_MAIL_SQL_H_ +#ifndef _CHAR_INT_MAIL_H_ +#define _CHAR_INT_MAIL_H_ int inter_mail_parse_frommap(int fd); void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); @@ -13,4 +13,4 @@ void inter_mail_sql_final(void); int mail_savemessage(struct mail_message* msg); void mapif_Mail_new(struct mail_message *msg); -#endif /* _INT_MAIL_SQL_H_ */ +#endif /* _CHAR_INT_MAIL_H_ */ diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index 01e4a841f..b614b8cf7 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_MERCENARY_SQL_H_ -#define _INT_MERCENARY_SQL_H_ +#ifndef _CHAR_INT_MERCENARY_H_ +#define _CHAR_INT_MERCENARY_H_ struct s_mercenary; @@ -17,4 +17,4 @@ bool mercenary_owner_delete(int char_id); bool mapif_mercenary_delete(int merc_id); -#endif /* _INT_MERCENARY_SQL_H_ */ +#endif /* _CHAR_INT_MERCENARY_H_ */ diff --git a/src/char/int_party.h b/src/char/int_party.h index d8cdcdc6a..84f00635a 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_PARTY_SQL_H_ -#define _INT_PARTY_SQL_H_ +#ifndef _CHAR_INT_PARTY_H_ +#define _CHAR_INT_PARTY_H_ //Party Flags on what to save/delete. enum { @@ -23,4 +23,4 @@ int inter_party_leave(int party_id,int account_id, int char_id); int inter_party_CharOnline(int char_id, int party_id); int inter_party_CharOffline(int char_id, int party_id); -#endif /* _INT_PARTY_SQL_H_ */ +#endif /* _CHAR_INT_PARTY_H_ */ diff --git a/src/char/int_pet.h b/src/char/int_pet.h index 733468c77..a16cb7a37 100644 --- a/src/char/int_pet.h +++ b/src/char/int_pet.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_PET_SQL_H_ -#define _INT_PET_SQL_H_ +#ifndef _CHAR_INT_PET_H_ +#define _CHAR_INT_PET_H_ struct s_pet; @@ -18,4 +18,4 @@ int inter_pet_sql_init(void); //Exported for use in the TXT-SQL converter. int inter_pet_tosql(int pet_id, struct s_pet *p); -#endif /* _INT_PET_SQL_H_ */ +#endif /* _CHAR_INT_PET_H_ */ diff --git a/src/char/int_quest.h b/src/char/int_quest.h index b0403f436..6267c74ad 100644 --- a/src/char/int_quest.h +++ b/src/char/int_quest.h @@ -1,10 +1,10 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _QUEST_H_ -#define _QUEST_H_ +#ifndef _CHAR_QUEST_H_ +#define _CHAR_QUEST_H_ int inter_quest_parse_frommap(int fd); -#endif +#endif /* _CHAR_QUEST_H_ */ diff --git a/src/char/int_storage.h b/src/char/int_storage.h index 811608f82..1693499a5 100644 --- a/src/char/int_storage.h +++ b/src/char/int_storage.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _INT_STORAGE_SQL_H_ -#define _INT_STORAGE_SQL_H_ +#ifndef _CHAR_INT_STORAGE_H_ +#define _CHAR_INT_STORAGE_H_ struct storage_data; struct guild_storage; @@ -19,4 +19,4 @@ int storage_fromsql(int account_id, struct storage_data* p); int storage_tosql(int account_id,struct storage_data *p); int guild_storage_tosql(int guild_id, struct guild_storage *p); -#endif /* _INT_STORAGE_SQL_H_ */ +#endif /* _CHAR_INT_STORAGE_H_ */ diff --git a/src/char/inter.h b/src/char/inter.h index 9b958dc72..2c07b20e2 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _INTER_SQL_H_ -#define _INTER_SQL_H_ +#ifndef _CHAR_INTER_H_ +#define _CHAR_INTER_H_ struct accreg; #include "../common/sql.h" @@ -41,4 +41,4 @@ uint64 inter_chk_lastuid(int8 flag, uint64 value); #define updateLastUid(val_) #endif -#endif /* _INTER_SQL_H_ */ +#endif /* _CHAR_INTER_H_ */ diff --git a/src/char/pincode.h b/src/char/pincode.h index a17f70de5..3b71eec7c 100644 --- a/src/char/pincode.h +++ b/src/char/pincode.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _PINCODE_H_ -#define _PINCODE_H_ +#ifndef _CHAR_PINCODE_H_ +#define _CHAR_PINCODE_H_ #include "char.h" @@ -40,4 +40,4 @@ struct pincode_interface *pincode; void pincode_defaults(void); -#endif /* _PINCODE_H_ */ +#endif /* _CHAR_PINCODE_H_ */ diff --git a/src/common/HPM.c b/src/common/HPM.c index 1edf24901..cf296e593 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -116,6 +116,8 @@ struct hplugin *hplugin_load(const char* filename) { bool anyEvent = false; void **import_symbol_ref; Sql **sql_handle; + unsigned int *HPMDataCheckLen; + struct s_HPMDataCheck *HPMDataCheck; if( HPM->exists(filename) ) { ShowWarning("HPM:plugin_load: attempting to load duplicate '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); @@ -203,6 +205,24 @@ struct hplugin *hplugin_load(const char* filename) { if( !HPM->populate(plugin,filename) ) return NULL; + if( !( HPMDataCheckLen = plugin_import(plugin->dll, "HPMDataCheckLen", unsigned int *) ) ) { + ShowWarning("HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h, skipping...\n", filename); + HPM->unload(plugin); + return NULL; + } + + if( !( HPMDataCheck = plugin_import(plugin->dll, "HPMDataCheck", struct s_HPMDataCheck *) ) ) { + ShowWarning("HPM:plugin_load: failed to retrieve 'HPMDataCheck' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h, skipping...\n", filename); + HPM->unload(plugin); + return NULL; + } + + if( !HPM->DataCheck(HPMDataCheck,*HPMDataCheckLen,plugin->info->name) ) { + ShowWarning("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' failed DataCheck, out of sync from the core (recompile plugin), skipping...\n", filename); + HPM->unload(plugin); + return NULL; + } + /* id */ plugin->hpi->pid = plugin->idx; /* core */ @@ -255,6 +275,11 @@ void hplugins_config_read(void) { const char *config_filename = "conf/plugins.conf"; // FIXME hardcoded name FILE *fp; + if( !HPM->DataCheck ) { + ShowError("HPM:config_read: HPM->DataCheck not set! Failure\n"); + return; + } + /* yes its ugly, its temporary and will be gone as soon as the new inter-server.conf is set */ if( (fp = fopen("conf/import/plugins.conf","r")) ) { config_filename = "conf/import/plugins.conf"; @@ -829,4 +854,5 @@ void hpm_defaults(void) { HPM->grabHPData = hplugins_grabHPData; HPM->grabHPDataSub = NULL; HPM->parseConf = hplugins_parse_conf; + HPM->DataCheck = NULL; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 393f8f819..52ad24a03 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _HPM_H_ -#define _HPM_H_ +#ifndef _COMMON_HPM_H_ +#define _COMMON_HPM_H_ #include "../common/cbasetypes.h" #include "../common/HPMi.h" @@ -146,10 +146,12 @@ struct HPM_interface { bool (*grabHPDataSub) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); /* for custom config parsing */ bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point); + /* validates plugin data */ + bool (*DataCheck) (struct s_HPMDataCheck *src, unsigned int size, char *name); } HPM_s; struct HPM_interface *HPM; void hpm_defaults(void); -#endif /* _HPM_H_ */ +#endif /* _COMMON_HPM_H_ */ diff --git a/src/common/HPMi.h b/src/common/HPMi.h index fdb6ccf52..b33ad955c 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _HPMi_H_ -#define _HPMi_H_ +#ifndef _COMMON_HPMi_H_ +#define _COMMON_HPMi_H_ #include "../common/cbasetypes.h" #include "../common/core.h" @@ -20,7 +20,7 @@ struct map_session_data; #define HPExport #endif -#ifndef _SHOWMSG_H_ +#ifndef _COMMON_SHOWMSG_H_ HPExport void (*ShowMessage) (const char *, ...); HPExport void (*ShowStatus) (const char *, ...); HPExport void (*ShowSQL) (const char *, ...); @@ -45,6 +45,11 @@ struct hplugin_info { char* req_version; }; +struct s_HPMDataCheck { + char *name; + unsigned int size; +}; + HPExport void *(*import_symbol) (char *name, unsigned int pID); HPExport Sql *mysql_handle; @@ -187,8 +192,8 @@ HPExport struct HPMi_interface { /* pc group permission */ void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask); } HPMi_s; -#ifndef _HPM_H_ +#ifndef _COMMON_HPM_H_ HPExport struct HPMi_interface *HPMi; #endif -#endif /* _HPMi_H_ */ +#endif /* _COMMON_HPMi_H_ */ diff --git a/src/common/atomic.h b/src/common/atomic.h index 5a2ddb4f0..c2227a9d4 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -1,8 +1,8 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _rA_ATOMIC_H_ -#define _rA_ATOMIC_H_ +#ifndef _COMMON_ATOMIC_H_ +#define _COMMON_ATOMIC_H_ // Atomic Operations // (Interlocked CompareExchange, Add .. and so on ..) @@ -144,4 +144,4 @@ static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){ #endif //endif compiler decission -#endif +#endif /* _COMMON_ATOMIC_H_ */ diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 977897506..654334a9b 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -1,5 +1,5 @@ -#ifndef _CBASETYPES_H_ -#define _CBASETYPES_H_ +#ifndef _COMMON_CBASETYPES_H_ +#define _COMMON_CBASETYPES_H_ /* +--------+-----------+--------+---------+ * | ILP32 | LP64 | ILP64 | (LL)P64 | @@ -431,4 +431,4 @@ void SET_FUNCPOINTER(T1& var, T2 p) #endif -#endif /* _CBASETYPES_H_ */ +#endif /* _COMMON_CBASETYPES_H_ */ diff --git a/src/common/conf.h b/src/common/conf.h index 05e2b1ada..9aff3df47 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CONF_H_ -#define _CONF_H_ +#ifndef _COMMON_CONF_H_ +#define _COMMON_CONF_H_ #include "../common/cbasetypes.h" #include "../../3rdparty/libconfig/libconfig.h" @@ -94,4 +94,4 @@ struct libconfig_interface *libconfig; void libconfig_defaults(void); -#endif // _CONF_H_ +#endif // _COMMON_CONF_H_ diff --git a/src/common/console.h b/src/common/console.h index 1beed964a..513c769ff 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _CONSOLE_H_ -#define _CONSOLE_H_ +#ifndef _COMMON_CONSOLE_H_ +#define _COMMON_CONSOLE_H_ #include "../common/thread.h" #include "../common/mutex.h" @@ -72,4 +72,4 @@ struct console_interface *console; void console_defaults(void); -#endif /* _CONSOLE_H_ */ +#endif /* _COMMON_CONSOLE_H_ */ diff --git a/src/common/core.h b/src/common/core.h index 8fdcdcfc3..72f956e1d 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CORE_H_ -#define _CORE_H_ +#ifndef _COMMON_CORE_H_ +#define _COMMON_CORE_H_ #include "../common/db.h" #include "../common/mmo.h" @@ -50,4 +50,4 @@ enum E_CORE_ST { /// If NULL, runflag is set to CORE_ST_STOP instead. extern void (*shutdown_callback)(void); -#endif /* _CORE_H_ */ +#endif /* _COMMON_CORE_H_ */ diff --git a/src/common/db.h b/src/common/db.h index c00489b93..67abe6f19 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -39,8 +39,8 @@ * @encoding US-ASCII * * @see common#db.c * \*****************************************************************************/ -#ifndef _DB_H_ -#define _DB_H_ +#ifndef _COMMON_DB_H_ +#define _COMMON_DB_H_ #include "../common/cbasetypes.h" #include @@ -1548,4 +1548,4 @@ void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...); -#endif /* _DB_H_ */ +#endif /* _COMMON_DB_H_ */ diff --git a/src/common/des.h b/src/common/des.h index e42136436..3f55448ba 100644 --- a/src/common/des.h +++ b/src/common/des.h @@ -1,7 +1,7 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _DES_H_ -#define _DES_H_ +#ifndef _COMMON_DES_H_ +#define _COMMON_DES_H_ /// One 64-bit block. @@ -12,4 +12,4 @@ void des_decrypt_block(BIT64* block); void des_decrypt(unsigned char* data, size_t size); -#endif // _DES_H_ +#endif // _COMMON_DES_H_ diff --git a/src/common/ers.h b/src/common/ers.h index d74ee02a5..4dae19f3b 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -37,8 +37,8 @@ * @author Flavio @ Amazon Project * * @encoding US-ASCII * \*****************************************************************************/ -#ifndef _ERS_H_ -#define _ERS_H_ +#ifndef _COMMON_ERS_H_ +#define _COMMON_ERS_H_ #include "../common/cbasetypes.h" @@ -180,4 +180,4 @@ void ers_report(void); void ers_force_destroy_all(void); #endif /* DISABLE_ERS / not DISABLE_ERS */ -#endif /* _ERS_H_ */ +#endif /* _COMMON_ERS_H_ */ diff --git a/src/common/grfio.h b/src/common/grfio.h index a88b20393..4f5d0d6bc 100644 --- a/src/common/grfio.h +++ b/src/common/grfio.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _GRFIO_H_ -#define _GRFIO_H_ +#ifndef _COMMON_GRFIO_H_ +#define _COMMON_GRFIO_H_ void grfio_init(const char* fname); void grfio_final(void); @@ -14,4 +14,4 @@ unsigned long grfio_crc32(const unsigned char *buf, unsigned int len); int decode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen); int encode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen); -#endif /* _GRFIO_H_ */ +#endif /* _COMMON_GRFIO_H_ */ diff --git a/src/common/malloc.h b/src/common/malloc.h index 19b5213bb..7309bb0f7 100644 --- a/src/common/malloc.h +++ b/src/common/malloc.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _MALLOC_H_ -#define _MALLOC_H_ +#ifndef _COMMON_MALLOC_H_ +#define _COMMON_MALLOC_H_ #include "../common/cbasetypes.h" @@ -88,4 +88,4 @@ struct malloc_interface { void memmgr_report (int extra); struct malloc_interface *iMalloc; -#endif /* _MALLOC_H_ */ +#endif /* _COMMON_MALLOC_H_ */ diff --git a/src/common/mapindex.h b/src/common/mapindex.h index 98150f441..fa9b9e920 100644 --- a/src/common/mapindex.h +++ b/src/common/mapindex.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAPINDEX_H_ -#define _MAPINDEX_H_ +#ifndef _COMMON_MAPINDEX_H_ +#define _COMMON_MAPINDEX_H_ #include "../common/db.h" #include "../common/mmo.h" @@ -90,4 +90,4 @@ struct mapindex_interface *mapindex; void mapindex_defaults(void); -#endif /* _MAPINDEX_H_ */ +#endif /* _COMMON_MAPINDEX_H_ */ diff --git a/src/common/md5calc.h b/src/common/md5calc.h index 323affa2c..d0caf6787 100644 --- a/src/common/md5calc.h +++ b/src/common/md5calc.h @@ -1,8 +1,8 @@ -#ifndef _MD5CALC_H_ -#define _MD5CALC_H_ +#ifndef _COMMON_MD5CALC_H_ +#define _COMMON_MD5CALC_H_ void MD5_String(const char * string, char * output); void MD5_Binary(const char * string, unsigned char * output); void MD5_Salt(unsigned int len, char * output); -#endif /* _MD5CALC_H_ */ +#endif /* _COMMON_MD5CALC_H_ */ diff --git a/src/common/mmo.h b/src/common/mmo.h index 573962601..2b66c516c 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MMO_H_ -#define _MMO_H_ +#ifndef _COMMON_MMO_H_ +#define _COMMON_MMO_H_ #include "cbasetypes.h" #include "../common/db.h" @@ -886,4 +886,4 @@ enum e_pc_reg_loading { #error MAX_ZENY is too big #endif -#endif /* _MMO_H_ */ +#endif /* _COMMON_MMO_H_ */ diff --git a/src/common/mutex.h b/src/common/mutex.h index 1999627cd..eeb24e6ff 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -1,8 +1,8 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _rA_MUTEX_H_ -#define _rA_MUTEX_H_ +#ifndef _COMMON_MUTEX_H_ +#define _COMMON_MUTEX_H_ typedef struct ramutex *ramutex; // Mutex @@ -89,4 +89,4 @@ void racond_signal( racond c ); void racond_broadcast( racond c ); -#endif +#endif /* _COMMON_MUTEX_H_ */ diff --git a/src/common/nullpo.h b/src/common/nullpo.h index 581252cca..fb1cf0feb 100644 --- a/src/common/nullpo.h +++ b/src/common/nullpo.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef COMMON_NULLPO_H -#define COMMON_NULLPO_H +#ifndef _COMMON_NULLPO_H_ +#define _COMMON_NULLPO_H_ #include "../common/cbasetypes.h" @@ -125,4 +125,4 @@ void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title); -#endif /* COMMON_NULLPO_H */ +#endif /* _COMMON_NULLPO_H_ */ diff --git a/src/common/random.h b/src/common/random.h index 43dfd36c0..ab83fb4d4 100644 --- a/src/common/random.h +++ b/src/common/random.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _RANDOM_H_ -#define _RANDOM_H_ +#ifndef _COMMON_RANDOM_H_ +#define _COMMON_RANDOM_H_ #include "../common/cbasetypes.h" @@ -15,4 +15,4 @@ int32 rnd_value(int32 min, int32 max);// [min, max] double rnd_uniform(void);// [0.0, 1.0) double rnd_uniform53(void);// [0.0, 1.0) -#endif /* _RANDOM_H_ */ +#endif /* _COMMON_RANDOM_H_ */ diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 01eae4480..b59214ab0 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _SHOWMSG_H_ -#define _SHOWMSG_H_ +#ifndef _COMMON_SHOWMSG_H_ +#define _COMMON_SHOWMSG_H_ #ifndef _HPMi_H_ #include "../../3rdparty/libconfig/libconfig.h" @@ -104,4 +104,4 @@ extern void ClearScreen(void); #endif extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap); -#endif /* _SHOWMSG_H_ */ +#endif /* _COMMON_SHOWMSG_H_ */ diff --git a/src/common/socket.h b/src/common/socket.h index 6879d2e90..ca9141716 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _SOCKET_H_ -#define _SOCKET_H_ +#ifndef _COMMON_SOCKET_H_ +#define _COMMON_SOCKET_H_ #include "../common/cbasetypes.h" @@ -196,4 +196,4 @@ void socket_defaults(void); #define set_eof(fd) ( sockt->set_eof(fd) ) #endif /* _H_SOCKET_C_ */ -#endif /* _SOCKET_H_ */ +#endif /* _COMMON_SOCKET_H_ */ diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 9b9e4ce94..29fbb355b 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -1,6 +1,6 @@ #pragma once -#ifndef _rA_SPINLOCK_H_ -#define _rA_SPINLOCK_H_ +#ifndef _COMMON_SPINLOCK_H_ +#define _COMMON_SPINLOCK_H_ // // CAS based Spinlock Implementation @@ -101,4 +101,4 @@ static forceinline void LeaveSpinLock(PSPIN_LOCK lck){ -#endif +#endif /* _COMMON_SPINLOCK_H_ */ diff --git a/src/common/strlib.h b/src/common/strlib.h index 7a1066401..10844d257 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _STRLIB_H_ -#define _STRLIB_H_ +#ifndef _COMMON_STRLIB_H_ +#define _COMMON_STRLIB_H_ #include "../common/cbasetypes.h" #include @@ -191,4 +191,4 @@ void strlib_defaults(void); #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) #endif /* STRLIB_C */ -#endif /* _STRLIB_H_ */ +#endif /* _COMMON_STRLIB_H_ */ diff --git a/src/common/thread.h b/src/common/thread.h index a5a66e954..d6b2bbc6e 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -2,8 +2,8 @@ // For more information, see LICENCE in the main folder #pragma once -#ifndef _rA_THREAD_H_ -#define _rA_THREAD_H_ +#ifndef _COMMON_THREAD_H_ +#define _COMMON_THREAD_H_ #include "../common/cbasetypes.h" @@ -116,4 +116,4 @@ void rathread_init(); void rathread_final(); -#endif +#endif /* _COMMON_THREAD_H_ */ diff --git a/src/common/timer.h b/src/common/timer.h index af1a2b036..ab3ffc21f 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -1,8 +1,10 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _TIMER_H_ -#define _TIMER_H_ + +#ifndef _COMMON_TIMER_H_ +#define _COMMON_TIMER_H_ + #include "../common/cbasetypes.h" #define DIFF_TICK(a,b) ((a)-(b)) @@ -65,4 +67,4 @@ struct timer_interface *timer; void timer_defaults(void); -#endif /* _TIMER_H_ */ +#endif /* _COMMON_TIMER_H_ */ diff --git a/src/common/utils.h b/src/common/utils.h index 719e1e533..68dd01ac4 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _UTILS_H_ -#define _UTILS_H_ +#ifndef _COMMON_UTILS_H_ +#define _COMMON_UTILS_H_ #include "../common/cbasetypes.h" #include // FILE* @@ -54,4 +54,4 @@ struct HCache_interface *HCache; void HCache_defaults(void); -#endif /* _UTILS_H_ */ +#endif /* _COMMON_UTILS_H_ */ diff --git a/src/config/const.h b/src/config/const.h index fc82d66f9..6557cb987 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -1,8 +1,9 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _H_CONSTANTS_ -#define _H_CONSTANTS_ + +#ifndef _CONFIG_CONSTANTS_H_ +#define _CONFIG_CONSTANTS_H_ /** * Hercules configuration file (http://hercules.ws) @@ -117,4 +118,4 @@ /** * End of File **/ -#endif /* _H_CONSTANTS_ */ +#endif /* _CONFIG_CONSTANTS_H_ */ diff --git a/src/login/account.h b/src/login/account.h index 74a9e9626..234e7c0c1 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef __ACCOUNT_H_INCLUDED__ -#define __ACCOUNT_H_INCLUDED__ +#ifndef _LOGIN_ACCOUNT_H_ +#define _LOGIN_ACCOUNT_H_ #include "../common/cbasetypes.h" #include "../common/mmo.h" // ACCOUNT_REG2_NUM @@ -139,4 +139,4 @@ Sql *account_db_sql_up(AccountDB* self); void mmo_send_accreg2(AccountDB* self, int fd, int account_id, int char_id); void mmo_save_accreg2(AccountDB* self, int fd, int account_id, int char_id); -#endif // __ACCOUNT_H_INCLUDED__ +#endif /* _LOGIN_ACCOUNT_H_ */ diff --git a/src/login/ipban.h b/src/login/ipban.h index b2a1a7d9e..e6851d8dd 100644 --- a/src/login/ipban.h +++ b/src/login/ipban.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef __IPBAN_H_INCLUDED__ -#define __IPBAN_H_INCLUDED__ +#ifndef _LOGIN_IPBAN_H_ +#define _LOGIN_IPBAN_H_ #include "../common/cbasetypes.h" @@ -22,4 +22,4 @@ void ipban_log(uint32 ip); bool ipban_config_read(const char* key, const char* value); -#endif // __IPBAN_H_INCLUDED__ +#endif /* _LOGIN_IPBAN_H_ */ diff --git a/src/login/login.h b/src/login/login.h index d6a021125..14c361a15 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _LOGIN_H_ -#define _LOGIN_H_ +#ifndef _LOGIN_LOGIN_H_ +#define _LOGIN_LOGIN_H_ #include "../common/mmo.h" // NAME_LENGTH,SEX_* #include "../common/core.h" // CORE_ST_LAST @@ -100,4 +100,4 @@ extern struct mmo_char_server server[MAX_SERVERS]; extern struct Login_Config login_config; -#endif /* _LOGIN_H_ */ +#endif /* _LOGIN_LOGIN_H_ */ diff --git a/src/login/loginlog.h b/src/login/loginlog.h index a1ffaae85..730fb6e62 100644 --- a/src/login/loginlog.h +++ b/src/login/loginlog.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef __LOGINLOG_H_INCLUDED__ -#define __LOGINLOG_H_INCLUDED__ +#ifndef _LOGIN_LOGINLOG_H_ +#define _LOGIN_LOGINLOG_H_ unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes); @@ -12,4 +12,4 @@ bool loginlog_final(void); bool loginlog_config_read(const char* w1, const char* w2); -#endif // __LOGINLOG_H_INCLUDED__ +#endif /* _LOGIN_LOGINLOG_H_ */ diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 4b1338b8d..1688f37ce 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -34,6 +34,8 @@ #include #include +#include "../plugins/HPMDataCheck.h" + struct HPM_atcommand_list { //tracking currently not enabled // - requires modifying how plugins calls atcommand creation @@ -46,6 +48,11 @@ struct HPM_atcommand_list { struct HPM_atcommand_list *atcommand_list = NULL; unsigned int atcommand_list_items = 0; +/** + * (char*) data name -> (unsigned int) HPMDataCheck[] index + **/ +DBMap *datacheck_db; + bool HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { /* record address */ switch( type ) { @@ -113,20 +120,28 @@ void HPM_map_atcommands(void) { } } -void HPM_map_do_final(void) { - unsigned char i; +/** + * Called by HPM->DataCheck on a plugins incoming data, ensures data structs in use are matching! + **/ +bool HPM_map_DataCheck (struct s_HPMDataCheck *src, unsigned int size, char *name) { + unsigned int i, j; - if( atcommand_list ) - aFree(atcommand_list); - /** - * why is pcg->HPM being cleared here? because PCG's do_final is not final, - * is used on reload, and would thus cause plugin-provided permissions to go away - **/ - for( i = 0; i < pcg->HPMpermissions_count; i++ ) { - aFree(pcg->HPMpermissions[i].name); + for(i = 0; i < size; i++) { + + if( !strdb_exists(datacheck_db, src[i].name) ) { + ShowError("HPMDataCheck:%s: '%s' was not found\n",name,src[i].name); + return false; + } else { + j = strdb_uiget(datacheck_db, src[i].name);/* not double lookup; exists sets cache to found data */ + ShowDebug("Testing[%s/%s] %u vs %u\n",src[i].name,HPMDataCheck[j].name,src[i].size,HPMDataCheck[j].size); + if( src[i].size != HPMDataCheck[j].size ) { + ShowWarning("HPMDataCheck:%s: '%s' size mismatch %u != %u\n",name,src[i].name,src[i].size,HPMDataCheck[j].size); + return false; + } + } } - if( pcg->HPMpermissions ) - aFree(pcg->HPMpermissions); + + return true; } /** @@ -141,3 +156,35 @@ void HPM_map_add_group_permission(unsigned int pluginID, char *name, unsigned in pcg->HPMpermissions[index].name = aStrdup(name); pcg->HPMpermissions[index].mask = mask; } + +void HPM_map_do_init(void) { + unsigned int i; + + /** + * Populates datacheck_db for easy lookup later on + **/ + datacheck_db = strdb_alloc(DB_OPT_BASE,0); + + for(i = 0; i < HPMDataCheckLen; i++) { + strdb_uiput(datacheck_db, HPMDataCheck[i].name, i); + } + +} + +void HPM_map_do_final(void) { + unsigned char i; + + if( atcommand_list ) + aFree(atcommand_list); + /** + * why is pcg->HPM being cleared here? because PCG's do_final is not final, + * is used on reload, and would thus cause plugin-provided permissions to go away + **/ + for( i = 0; i < pcg->HPMpermissions_count; i++ ) { + aFree(pcg->HPMpermissions[i].name); + } + if( pcg->HPMpermissions ) + aFree(pcg->HPMpermissions); + + db_destroy(datacheck_db); +} diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h index ff8cf4c74..f291575fb 100644 --- a/src/map/HPMmap.h +++ b/src/map/HPMmap.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#ifndef _HPM_MAP_ -#define _HPM_MAP_ +#ifndef _MAP_HPMMAP_H_ +#define _MAP_HPMMAP_H_ #include "../common/cbasetypes.h" #include "../map/atcommand.h" @@ -22,4 +22,8 @@ void HPM_map_do_final(void); void HPM_map_add_group_permission(unsigned int pluginID, char *name, unsigned int *mask); -#endif /* _HPM_MAP_ */ +bool HPM_map_DataCheck(struct s_HPMDataCheck *src, unsigned int size, char *name); + +void HPM_map_do_init(void); + +#endif /* _MAP_HPMMAP_H_ */ diff --git a/src/map/atcommand.h b/src/map/atcommand.h index f95940924..39f7cc2b2 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _ATCOMMAND_H_ -#define _ATCOMMAND_H_ +#ifndef _MAP_ATCOMMAND_H_ +#define _MAP_ATCOMMAND_H_ #include "../common/conf.h" #include "../common/db.h" @@ -121,4 +121,4 @@ void atcommand_defaults(void); /* stay here */ #define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) -#endif /* _ATCOMMAND_H_ */ +#endif /* _MAP_ATCOMMAND_H_ */ diff --git a/src/map/battle.h b/src/map/battle.h index 98f2e37e8..0fcef7292 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _BATTLE_H_ -#define _BATTLE_H_ +#ifndef _MAP_BATTLE_H_ +#define _MAP_BATTLE_H_ #include "../common/cbasetypes.h" #include "map.h" //ELE_MAX @@ -596,4 +596,4 @@ struct battle_interface { struct battle_interface *battle; void battle_defaults(void); -#endif /* _BATTLE_H_ */ +#endif /* _MAP_BATTLE_H_ */ diff --git a/src/map/battleground.h b/src/map/battleground.h index 4aeb9f879..ed7347566 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _BATTLEGROUND_H_ -#define _BATTLEGROUND_H_ +#ifndef _MAP_BATTLEGROUND_H_ +#define _MAP_BATTLEGROUND_H_ #include "../common/mmo.h" // struct party #include "clif.h" @@ -112,4 +112,4 @@ struct battleground_interface *bg; void battleground_defaults(void); -#endif /* _BATTLEGROUND_H_ */ +#endif /* _MAP_BATTLEGROUND_H_ */ diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index b0db40661..5141a1013 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _BUYINGSTORE_H_ -#define _BUYINGSTORE_H_ +#ifndef _MAP_BUYINGSTORE_H_ +#define _MAP_BUYINGSTORE_H_ /** * Declarations @@ -70,4 +70,4 @@ struct buyingstore_interface *buyingstore; void buyingstore_defaults (void); -#endif // _BUYINGSTORE_H_ +#endif // _MAP_BUYINGSTORE_H_ diff --git a/src/map/chat.h b/src/map/chat.h index fcbadf008..71e5a11ec 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CHAT_H_ -#define _CHAT_H_ +#ifndef _MAP_CHAT_H_ +#define _MAP_CHAT_H_ #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE @@ -55,4 +55,4 @@ struct chat_interface *chat; void chat_defaults(void); -#endif /* _CHAT_H_ */ +#endif /* _MAP_CHAT_H_ */ diff --git a/src/map/chrif.h b/src/map/chrif.h index 163fdf670..59e45a2ea 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CHRIF_H_ -#define _CHRIF_H_ +#ifndef _MAP_CHRIF_H_ +#define _MAP_CHRIF_H_ #include "../common/cbasetypes.h" #include @@ -148,4 +148,4 @@ void chrif_defaults(void); // There's no need for another function when a simple macro can do exactly the same effect #define chrif_char_offline(x) chrif->char_offline_nsd((x)->status.account_id,(x)->status.char_id) -#endif /* _CHRIF_H_ */ +#endif /* _MAP_CHRIF_H_ */ diff --git a/src/map/clif.h b/src/map/clif.h index 6405bbd3e..1e0319b7b 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _CLIF_H_ -#define _CLIF_H_ +#ifndef _MAP_CLIF_H_ +#define _MAP_CLIF_H_ #include "../common/cbasetypes.h" #include "../common/db.h" @@ -1275,4 +1275,4 @@ struct clif_interface *clif; void clif_defaults(void); -#endif /* _CLIF_H_ */ +#endif /* _MAP_CLIF_H_ */ diff --git a/src/map/date.h b/src/map/date.h index cc19d88d1..02238d7ea 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -1,8 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#ifndef _DATE_H_ -#define _DATE_H_ +#ifndef _MAP_DATE_H_ +#define _MAP_DATE_H_ int date_get_year(void); int date_get_month(void); @@ -15,4 +15,4 @@ int is_day_of_sun(void); int is_day_of_moon(void); int is_day_of_star(void); -#endif /* _DATE_H_ */ +#endif /* _MAP_DATE_H_ */ diff --git a/src/map/duel.h b/src/map/duel.h index d60c9531a..5405d2eee 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _DUEL_H_ -#define _DUEL_H_ +#ifndef _MAP_DUEL_H_ +#define _MAP_DUEL_H_ struct duel { int members_count; @@ -42,4 +42,4 @@ struct duel_interface *duel; void duel_defaults(void); -#endif /* _DUEL_H_ */ +#endif /* _MAP_DUEL_H_ */ diff --git a/src/map/elemental.h b/src/map/elemental.h index 830a6a577..6d04a41a5 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _ELEMENTAL_H_ -#define _ELEMENTAL_H_ +#ifndef _MAP_ELEMENTAL_H_ +#define _MAP_ELEMENTAL_H_ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data @@ -120,4 +120,4 @@ struct elemental_interface *elemental; void elemental_defaults(void); -#endif /* _ELEMENTAL_H_ */ +#endif /* _MAP_ELEMENTAL_H_ */ diff --git a/src/map/guild.h b/src/map/guild.h index 7878d75c3..b03bd664d 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _GUILD_H_ -#define _GUILD_H_ +#ifndef _MAP_GUILD_H_ +#define _MAP_GUILD_H_ //#include "../common/mmo.h" #include "map.h" // NAME_LENGTH @@ -173,4 +173,4 @@ struct guild_interface *guild; void guild_defaults(void); -#endif /* _GUILD_H_ */ +#endif /* _MAP_GUILD_H_ */ diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 117f9da8e..db250f511 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _HOMUNCULUS_H_ -#define _HOMUNCULUS_H_ +#ifndef _MAP_HOMUNCULUS_H_ +#define _MAP_HOMUNCULUS_H_ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data @@ -146,4 +146,4 @@ struct homunculus_interface *homun; void homunculus_defaults(void); -#endif /* _HOMUNCULUS_H_ */ +#endif /* _MAP_HOMUNCULUS_H_ */ diff --git a/src/map/instance.h b/src/map/instance.h index 764a55b2b..66a7d0d6c 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _INSTANCE_H_ -#define _INSTANCE_H_ +#ifndef _MAP_INSTANCE_H_ +#define _MAP_INSTANCE_H_ #define INSTANCE_NAME_LENGTH (60+1) @@ -82,4 +82,4 @@ struct instance_interface *instance; void instance_defaults(void); -#endif +#endif /* _MAP_INSTANCE_H_ */ diff --git a/src/map/intif.h b/src/map/intif.h index f0bb5c16e..290dcfcdc 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _INTIF_H_ -#define _INFIF_H_ +#ifndef _MAP_INTIF_H_ +#define _MAP_INTIF_H_ /** @@ -183,4 +183,4 @@ struct intif_interface *intif; void intif_defaults(void); -#endif /* _INTIF_H_ */ +#endif /* _MAP_INTIF_H_ */ diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index 7d6a19eba..c15a5d46a 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -3,8 +3,8 @@ // Base Author: shennetsind @ http://hercules.ws -#ifndef _IRC_BOT_H_ -#define _IRC_BOT_H_ +#ifndef _MAP_IRC_BOT_H_ +#define _MAP_IRC_BOT_H_ #define IRC_NICK_LENGTH 40 #define IRC_IDENT_LENGTH 40 @@ -61,4 +61,4 @@ struct irc_bot_interface *ircbot; void ircbot_defaults(void); -#endif /* _IRC_BOT_H_ */ +#endif /* _MAP_IRC_BOT_H_ */ diff --git a/src/map/itemdb.h b/src/map/itemdb.h index b3ff606df..74ced13e0 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _ITEMDB_H_ -#define _ITEMDB_H_ +#ifndef _MAP_ITEMDB_H_ +#define _MAP_ITEMDB_H_ #include "../common/db.h" #include "../common/mmo.h" // ITEM_NAME_LENGTH @@ -582,4 +582,4 @@ struct itemdb_interface *itemdb; void itemdb_defaults(void); -#endif /* _ITEMDB_H_ */ +#endif /* _MAP_ITEMDB_H_ */ diff --git a/src/map/log.h b/src/map/log.h index 9864a54d7..b2cb92c20 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _LOG_H_ -#define _LOG_H_ +#ifndef _MAP_LOG_H_ +#define _MAP_LOG_H_ #include "../common/cbasetypes.h" #include "../common/sql.h" @@ -134,4 +134,4 @@ struct log_interface *logs; void log_defaults(void); -#endif /* _LOG_H_ */ +#endif /* _MAP_LOG_H_ */ diff --git a/src/map/mail.h b/src/map/mail.h index b2b9048cb..8df537ff3 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAIL_H_ -#define _MAIL_H_ +#ifndef _MAP_MAIL_H_ +#define _MAP_MAIL_H_ #include "../common/mmo.h" @@ -23,4 +23,4 @@ struct mail_interface *mail; void mail_defaults(void); -#endif /* _MAIL_H_ */ +#endif /* _MAP_MAIL_H_ */ diff --git a/src/map/map.c b/src/map/map.c index 33721b028..2be61587f 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5447,6 +5447,8 @@ int do_init(int argc, char *argv[]) map_load_defaults(); + HPM_map_do_init(); + HPM->DataCheck = HPM_map_DataCheck; HPM->load_sub = HPM_map_plugin_load_sub; HPM->symbol_defaults_sub = map_hp_symbols; HPM->grabHPDataSub = HPM_map_grabHPData; diff --git a/src/map/map.h b/src/map/map.h index 130b181da..8faf6388e 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAP_H_ -#define _MAP_H_ +#ifndef _MAP_MAP_H_ +#define _MAP_MAP_H_ #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST @@ -1066,4 +1066,4 @@ struct map_interface *map; void map_defaults(void); -#endif /* _MAP_H_ */ +#endif /* _MAP_MAP_H_ */ diff --git a/src/map/mapreg.h b/src/map/mapreg.h index 157e634cc..c92b6f602 100644 --- a/src/map/mapreg.h +++ b/src/map/mapreg.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MAPREG_H_ -#define _MAPREG_H_ +#ifndef _MAP_MAPREG_H_ +#define _MAP_MAPREG_H_ #include "../common/cbasetypes.h" #include "../common/db.h" @@ -51,4 +51,4 @@ struct mapreg_interface *mapreg; void mapreg_defaults(void); -#endif /* _MAPREG_H_ */ +#endif /* _MAP_MAPREG_H_ */ diff --git a/src/map/mercenary.h b/src/map/mercenary.h index 3f2214b65..dd9266b2e 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -1,8 +1,8 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MERCENARY_H_ -#define _MERCENARY_H_ +#ifndef _MAP_MERCENARY_H_ +#define _MAP_MERCENARY_H_ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data @@ -98,4 +98,4 @@ struct mercenary_interface *mercenary; void mercenary_defaults(void); -#endif /* _MERCENARY_H_ */ +#endif /* _MAP_MERCENARY_H_ */ diff --git a/src/map/mob.h b/src/map/mob.h index 9321cb4fd..80175b1db 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _MOB_H_ -#define _MOB_H_ +#ifndef _MAP_MOB_H_ +#define _MAP_MOB_H_ #include "../common/mmo.h" // struct item #include "guild.h" // struct guardian_data @@ -364,4 +364,4 @@ struct mob_interface *mob; void mob_defaults(void); -#endif /* _MOB_H_ */ +#endif /* _MAP_MOB_H_ */ diff --git a/src/map/npc.h b/src/map/npc.h index 266d174fb..719974ac4 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _NPC_H_ -#define _NPC_H_ +#ifndef _MAP_NPC_H_ +#define _MAP_NPC_H_ #include "map.h" // struct block_list #include "status.h" // struct status_change @@ -346,4 +346,4 @@ struct pcre_interface *libpcre; void npc_chat_defaults(void); #endif -#endif /* _NPC_H_ */ +#endif /* _MAP_NPC_H_ */ diff --git a/src/map/packets.h b/src/map/packets.h index cea916f6d..4cf6f6d6a 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -3,8 +3,8 @@ //Included directly by clif.h in packet_loaddb() -#ifndef _PACKETS_H_ -#define _PACKETS_H_ +#ifndef _MAP_PACKETS_H_ +#define _MAP_PACKETS_H_ #ifndef packet #define packet(a,b,...) @@ -2693,4 +2693,4 @@ packet(0x020d,-1); packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3); #endif -#endif /* _PACKETS_H_ */ +#endif /* _MAP_PACKETS_H_ */ diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 1156f4465..4a599463a 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3,8 +3,8 @@ /* Hercules Renewal: Phase Two http://hercules.ws/board/topic/383-hercules-renewal-phase-two/ */ -#ifndef _PACKETS_STRUCT_H_ -#define _PACKETS_STRUCT_H_ +#ifndef _MAP_PACKETS_STRUCT_H_ +#define _MAP_PACKETS_STRUCT_H_ #include "../common/mmo.h" @@ -945,4 +945,4 @@ struct packet_npc_market_open { #pragma pack(pop) #endif // not NetBSD < 6 / Solaris -#endif /* _PACKETS_STRUCT_H_ */ +#endif /* _MAP_PACKETS_STRUCT_H_ */ diff --git a/src/map/party.h b/src/map/party.h index 051c98af2..05b5309e6 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _PARTY_H_ -#define _PARTY_H_ +#ifndef _MAP_PARTY_H_ +#define _MAP_PARTY_H_ #include "../common/mmo.h" // struct party #include "../config/core.h" @@ -141,4 +141,4 @@ struct party_interface *party; void party_defaults(void); -#endif /* _PARTY_H_ */ +#endif /* _MAP_PARTY_H_ */ diff --git a/src/map/path.h b/src/map/path.h index a889a6409..0b67a0120 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _PATH_H_ -#define _PATH_H_ +#ifndef _MAP_PATH_H_ +#define _MAP_PATH_H_ #include "map.h" // enum cell_chk @@ -46,4 +46,4 @@ struct path_interface *path; void path_defaults(void); -#endif /* _PATH_H_ */ +#endif /* _MAP_PATH_H_ */ diff --git a/src/map/pc.h b/src/map/pc.h index 487266646..03b3ddca0 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -1,8 +1,9 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _PC_H_ -#define _PC_H_ + +#ifndef _MAP_PC_H_ +#define _MAP_PC_H_ #include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus #include "../common/ers.h" @@ -1044,4 +1045,4 @@ struct pc_interface *pc; void pc_defaults(void); -#endif /* _PC_H_ */ +#endif /* _MAP_PC_H_ */ diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 3396512ea..5c03f999f 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _PC_GROUPS_H_ -#define _PC_GROUPS_H_ +#ifndef _MAP_PC_GROUPS_H_ +#define _MAP_PC_GROUPS_H_ /// PC permissions enum e_pc_permission { @@ -92,4 +92,4 @@ struct pc_groups_interface *pcg; void pc_groups_defaults(void); -#endif // _PC_GROUPS_H_ +#endif /* _MAP_PC_GROUPS_H_ */ diff --git a/src/map/pet.h b/src/map/pet.h index f1a219700..537a50c4b 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _PET_H_ -#define _PET_H_ +#ifndef _MAP_PET_H_ +#define _MAP_PET_H_ #define MAX_PET_DB 300 #define MAX_PETLOOT_SIZE 30 @@ -152,4 +152,4 @@ struct pet_interface *pet; void pet_defaults(void); -#endif /* _PET_H_ */ +#endif /* _MAP_PET_H_ */ diff --git a/src/map/quest.h b/src/map/quest.h index 28815a6c3..e01e35619 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _QUEST_H_ -#define _QUEST_H_ +#ifndef _MAP_QUEST_H_ +#define _MAP_QUEST_H_ #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 @@ -48,4 +48,4 @@ struct quest_interface *quest; void quest_defaults(void); -#endif +#endif /* _MAP_QUEST_H_ */ diff --git a/src/map/script.h b/src/map/script.h index 97db2a775..b7e9e5741 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _SCRIPT_H_ -#define _SCRIPT_H_ +#ifndef _MAP_SCRIPT_H_ +#define _MAP_SCRIPT_H_ #include "../common/strlib.h" //StringBuf #include "../common/cbasetypes.h" @@ -700,4 +700,4 @@ struct script_interface *script; void script_defaults(void); -#endif /* _SCRIPT_H_ */ +#endif /* _MAP_SCRIPT_H_ */ diff --git a/src/map/searchstore.h b/src/map/searchstore.h index d7a327181..827e39053 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _SEARCHSTORE_H_ -#define _SEARCHSTORE_H_ +#ifndef _MAP_SEARCHSTORE_H_ +#define _MAP_SEARCHSTORE_H_ /** * Defines @@ -93,4 +93,4 @@ struct searchstore_interface *searchstore; void searchstore_defaults (void); -#endif // _SEARCHSTORE_H_ +#endif /* _MAP_SEARCHSTORE_H_ */ diff --git a/src/map/skill.h b/src/map/skill.h index 28cb548d2..78829f17e 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _SKILL_H_ -#define _SKILL_H_ +#ifndef _MAP_SKILL_H_ +#define _MAP_SKILL_H_ #include "../common/mmo.h" // MAX_SKILL, struct square #include "../common/db.h" @@ -2015,4 +2015,4 @@ struct skill_interface *skill; void skill_defaults(void); -#endif /* _SKILL_H_ */ +#endif /* _MAP_SKILL_H_ */ diff --git a/src/map/status.h b/src/map/status.h index f319b1506..d3148b4e0 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _STATUS_H_ -#define _STATUS_H_ +#ifndef _MAP_STATUS_H_ +#define _MAP_STATUS_H_ #include "../common/mmo.h" @@ -2012,4 +2012,4 @@ struct status_interface *status; void status_defaults(void); -#endif /* _STATUS_H_ */ +#endif /* _MAP_STATUS_H_ */ diff --git a/src/map/storage.h b/src/map/storage.h index 8a10c9f3b..8f9f904f6 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _STORAGE_H_ -#define _STORAGE_H_ +#ifndef _MAP_STORAGE_H_ +#define _MAP_STORAGE_H_ struct storage_data; struct guild_storage; @@ -59,4 +59,4 @@ struct guild_storage_interface *gstorage; void storage_defaults(void); void gstorage_defaults(void); -#endif /* _STORAGE_H_ */ +#endif /* _MAP_STORAGE_H_ */ diff --git a/src/map/trade.h b/src/map/trade.h index d0b900504..f2c0d4622 100644 --- a/src/map/trade.h +++ b/src/map/trade.h @@ -2,10 +2,11 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _TRADE_H_ -#define _TRADE_H_ +#ifndef _MAP_TRADE_H_ +#define _MAP_TRADE_H_ //Max distance from traders to enable a trade to take place. +//TODO: battle_config candidate? #define TRADE_DISTANCE 2 struct map_session_data; @@ -26,4 +27,4 @@ struct trade_interface *trade; void trade_defaults(void); -#endif /* _TRADE_H_ */ +#endif /* _MAP_TRADE_H_ */ diff --git a/src/map/unit.h b/src/map/unit.h index a2d743875..33fa4e052 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -1,8 +1,9 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams -#ifndef _UNIT_H_ -#define _UNIT_H_ +#ifndef _MAP_UNIT_H_ +#define _MAP_UNIT_H_ //#include "map.h" struct block_list; @@ -125,4 +126,4 @@ struct unit_interface *unit; void unit_defaults(void); -#endif /* _UNIT_H_ */ +#endif /* _MAP_UNIT_H_ */ diff --git a/src/map/vending.h b/src/map/vending.h index b760bf064..b2ba22955 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -2,8 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifndef _VENDING_H_ -#define _VENDING_H_ +#ifndef _MAP_VENDING_H_ +#define _MAP_VENDING_H_ #include "../common/cbasetypes.h" #include "../common/db.h" @@ -35,4 +35,4 @@ struct vending_interface *vending; void vending_defaults(void); -#endif /* _VENDING_H_ */ +#endif /* _MAP_VENDING_H_ */ -- cgit v1.2.3-70-g09d2 From 50bc76c412b6618d90fdbdb24d43da2bda0525a2 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 3 Feb 2014 14:09:58 -0200 Subject: Fixed Bug 7333 Zones are now able to merge during runtime. Special Thanks to Haru, kyeme. http://hercules.ws/board/tracker/issue-7333-map-zone-db/ Signed-off-by: shennetsind --- src/common/HPM.c | 11 +++--- src/map/HPMmap.c | 1 - src/map/map.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- src/map/map.h | 6 ++- src/map/npc.c | 17 +++++--- 5 files changed, 137 insertions(+), 16 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index cf296e593..bd2ce93ab 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -217,7 +217,7 @@ struct hplugin *hplugin_load(const char* filename) { return NULL; } - if( !HPM->DataCheck(HPMDataCheck,*HPMDataCheckLen,plugin->info->name) ) { + if( HPM->DataCheck && !HPM->DataCheck(HPMDataCheck,*HPMDataCheckLen,plugin->info->name) ) { ShowWarning("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' failed DataCheck, out of sync from the core (recompile plugin), skipping...\n", filename); HPM->unload(plugin); return NULL; @@ -275,10 +275,11 @@ void hplugins_config_read(void) { const char *config_filename = "conf/plugins.conf"; // FIXME hardcoded name FILE *fp; - if( !HPM->DataCheck ) { - ShowError("HPM:config_read: HPM->DataCheck not set! Failure\n"); - return; - } +// uncomment once login/char support is wrapped up +// if( !HPM->DataCheck ) { +// ShowError("HPM:config_read: HPM->DataCheck not set! Failure\n"); +// return; +// } /* yes its ugly, its temporary and will be gone as soon as the new inter-server.conf is set */ if( (fp = fopen("conf/import/plugins.conf","r")) ) { diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 1688f37ce..a67acfd16 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -133,7 +133,6 @@ bool HPM_map_DataCheck (struct s_HPMDataCheck *src, unsigned int size, char *nam return false; } else { j = strdb_uiget(datacheck_db, src[i].name);/* not double lookup; exists sets cache to found data */ - ShowDebug("Testing[%s/%s] %u vs %u\n",src[i].name,HPMDataCheck[j].name,src[i].size,HPMDataCheck[j].size); if( src[i].size != HPMDataCheck[j].size ) { ShowWarning("HPMDataCheck:%s: '%s' size mismatch %u != %u\n",name,src[i].name,src[i].size,HPMDataCheck[j].size); return false; diff --git a/src/map/map.c b/src/map/map.c index 2be61587f..74b81f467 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3675,14 +3675,115 @@ int map_sql_close(void) return 0; } +/** + * Merges two zones into a new one + * @param main the zone whose data must override the others upon conflict, + * e.g. enabling pvp on a town means that main is the pvp zone, while "other" is the towns previous zone + * + * @return the newly created zone from merging main and other + **/ +struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone_data *other) { + char newzone[MAP_ZONE_NAME_LENGTH]; + struct map_zone_data *zone = NULL; + int cursor, i; + + sprintf(newzone, "%s+%s",main->name,other->name); + + if( (zone = strdb_get(map->zone_db, newzone)) ) + return zone;/* this zone has already been merged */ + + CREATE(zone, struct map_zone_data, 1); + + safestrncpy(zone->name, newzone, MAP_ZONE_NAME_LENGTH); + + zone->disabled_skills_count = main->disabled_skills_count + other->disabled_skills_count; + zone->disabled_items_count = main->disabled_items_count + other->disabled_items_count; + zone->mapflags_count = main->mapflags_count + other->mapflags_count; + zone->disabled_commands_count = main->disabled_commands_count + other->disabled_commands_count; + zone->capped_skills_count = main->capped_skills_count + other->capped_skills_count; + + CREATE(zone->disabled_skills, struct map_zone_disabled_skill_entry *, zone->disabled_skills_count ); + + for(i = 0, cursor = 0; i < main->disabled_skills_count; i++, cursor++ ) { + CREATE(zone->disabled_skills[cursor], struct map_zone_disabled_skill_entry, 1 ); + memcpy(zone->disabled_skills[cursor], main->disabled_skills[i], sizeof(struct map_zone_disabled_skill_entry)); + } + + for(i = 0; i < other->disabled_skills_count; i++, cursor++ ) { + CREATE(zone->disabled_skills[cursor], struct map_zone_disabled_skill_entry, 1 ); + memcpy(zone->disabled_skills[cursor], other->disabled_skills[i], sizeof(struct map_zone_disabled_skill_entry)); + } + + CREATE(zone->disabled_items, int, zone->disabled_items_count ); + + for(i = 0, cursor = 0; i < main->disabled_items_count; i++, cursor++ ) { + zone->disabled_items[cursor] = main->disabled_items[i]; + } + + for(i = 0; i < other->disabled_items_count; i++, cursor++ ) { + zone->disabled_items[cursor] = other->disabled_items[i]; + } + + CREATE(zone->mapflags, char *, zone->mapflags_count ); + + for(i = 0, cursor = 0; i < main->mapflags_count; i++, cursor++ ) { + CREATE(zone->mapflags[cursor], char, MAP_ZONE_MAPFLAG_LENGTH ); + safestrncpy(zone->mapflags[cursor], main->mapflags[i], MAP_ZONE_MAPFLAG_LENGTH); + } + + for(i = 0; i < other->mapflags_count; i++, cursor++ ) { + CREATE(zone->mapflags[cursor], char, MAP_ZONE_MAPFLAG_LENGTH ); + safestrncpy(zone->mapflags[cursor], other->mapflags[i], MAP_ZONE_MAPFLAG_LENGTH); + } + + CREATE(zone->disabled_commands, struct map_zone_disabled_command_entry *, zone->disabled_commands_count); + + for(i = 0, cursor = 0; i < main->disabled_commands_count; i++, cursor++ ) { + CREATE(zone->disabled_commands[cursor], struct map_zone_disabled_command_entry, 1); + memcpy(zone->disabled_commands[cursor], main->disabled_commands[i], sizeof(struct map_zone_disabled_command_entry)); + } + + for(i = 0; i < other->disabled_commands_count; i++, cursor++ ) { + CREATE(zone->disabled_commands[cursor], struct map_zone_disabled_command_entry, 1); + memcpy(zone->disabled_commands[cursor], other->disabled_commands[i], sizeof(struct map_zone_disabled_command_entry)); + } + + CREATE(zone->capped_skills, struct map_zone_skill_damage_cap_entry *, zone->capped_skills_count); + + + for(i = 0, cursor = 0; i < main->capped_skills_count; i++, cursor++ ) { + CREATE(zone->capped_skills[cursor], struct map_zone_skill_damage_cap_entry, 1); + memcpy(zone->capped_skills[cursor], main->disabled_commands[i], sizeof(struct map_zone_skill_damage_cap_entry)); + } + + for(i = 0; i < other->capped_skills_count; i++, cursor++ ) { + CREATE(zone->capped_skills[cursor], struct map_zone_skill_damage_cap_entry, 1); + memcpy(zone->capped_skills[cursor], other->capped_skills[i], sizeof(struct map_zone_skill_damage_cap_entry)); + } + + zone->info.special = 2; + + strdb_put(map->zone_db, newzone, zone); + + return zone; +} + void map_zone_change2(int m, struct map_zone_data *zone) { char empty[1] = "\0"; - map->list[m].prev_zone = map->list[m].zone; - + if( map->list[m].zone == zone ) + return; + + if( map->list[m].zone->info.special != 2 ) /* we don't update it for merged zones! */ + map->list[m].prev_zone = map->list[m].zone; + if( map->list[m].zone_mf_count ) map->zone_remove(m); + if( zone->info.special ) { + zone = map->merge_zone(zone,map->list[m].prev_zone); + } + map->zone_apply(m,zone,empty,empty,empty); } /* when changing from a mapflag to another during runtime */ @@ -4640,7 +4741,7 @@ void read_map_zone_db(void) { zone->disabled_skills_count = 0; zone->disabled_items_count = 0; } - safestrncpy(zone->name, zonename, MAP_ZONE_NAME_LENGTH); + safestrncpy(zone->name, zonename, MAP_ZONE_NAME_LENGTH/2); if( (skills = libconfig->setting_get_member(zone_e, "disabled_skills")) != NULL ) { disabled_skills_count = libconfig->setting_length(skills); @@ -4981,6 +5082,14 @@ void read_map_zone_db(void) { ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' zones in '"CL_WHITE"%s"CL_RESET"'.\n", zone_count, config_filename); /* not supposed to go in here but in skill_final whatever */ libconfig->destroy(&map_zone_db); + + /* post-load processing */ + if( (zone = strdb_get(map->zone_db, MAP_ZONE_PVP_NAME)) ) + zone->info.special = 1; + if( (zone = strdb_get(map->zone_db, MAP_ZONE_GVG_NAME)) ) + zone->info.special = 1; + if( (zone = strdb_get(map->zone_db, MAP_ZONE_BG_NAME)) ) + zone->info.special = 1; } } @@ -5943,6 +6052,8 @@ void map_defaults(void) { map->add_questinfo = map_add_questinfo; map->remove_questinfo = map_remove_questinfo; + map->merge_zone = map_merge_zone; + /** * mapit interface **/ @@ -5956,4 +6067,5 @@ void map_defaults(void) { mapit->next = mapit_next; mapit->prev = mapit_prev; mapit->exists = mapit_exists; + } diff --git a/src/map/map.h b/src/map/map.h index 8faf6388e..a4e9499b3 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -531,7 +531,7 @@ struct map_zone_skill_damage_cap_entry { enum map_zone_skill_subtype subtype; }; -#define MAP_ZONE_NAME_LENGTH 30 +#define MAP_ZONE_NAME_LENGTH 60 #define MAP_ZONE_ALL_NAME "All" #define MAP_ZONE_NORMAL_NAME "Normal" #define MAP_ZONE_PVP_NAME "PvP" @@ -552,6 +552,9 @@ struct map_zone_data { int disabled_commands_count; struct map_zone_skill_damage_cap_entry **capped_skills; int capped_skills_count; + struct { + unsigned int special : 2;/* 1: whether this is a mergeable zone; 2: whether it is a merged zone */ + } info; }; struct map_drop_list { @@ -1060,6 +1063,7 @@ struct map_interface { int (*get_new_bonus_id) (void); void (*add_questinfo) (int m, struct questinfo *qi); bool (*remove_questinfo) (int m, struct npc_data *nd); + struct map_zone_data *(*merge_zone) (struct map_zone_data *main, struct map_zone_data *other); }; struct map_interface *map; diff --git a/src/map/npc.c b/src/map/npc.c index 458fc52ed..36efc7267 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3173,12 +3173,17 @@ void npc_unsetcells(struct npc_data* nd) { int16 m = nd->bl.m, x = nd->bl.x, y = nd->bl.y, xs, ys; int i,j, x0, x1, y0, y1; - if (nd->subtype == WARP) { - xs = nd->u.warp.xs; - ys = nd->u.warp.ys; - } else { - xs = nd->u.scr.xs; - ys = nd->u.scr.ys; + switch(nd->subtype) { + case WARP: + xs = nd->u.warp.xs; + ys = nd->u.warp.ys; + break; + case SCRIPT: + xs = nd->u.scr.xs; + ys = nd->u.scr.ys; + break; + default: + return; // Other types doesn't have touch area } if (m < 0 || xs < 0 || ys < 0 || map->list[m].cell == (struct mapcell *)0xdeadbeaf) -- cgit v1.2.3-70-g09d2 From 7dd4dafae93c8560cb3e2dd78b9806f36f3ee0ca Mon Sep 17 00:00:00 2001 From: Matej Pristak Date: Thu, 6 Mar 2014 23:10:42 +0100 Subject: When working with packets with variable length (defined with -1 length) in HPM, we are leaving these in stack when the size of packet exceeds declared size due to this line. This was probably meant as if( packet_declared_size > packet_actual_size ) do_not_parse_it_yet, but was doing the opposite. --- src/common/HPM.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 src/common/HPM.c (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c old mode 100644 new mode 100755 index bd2ce93ab..a25a17782 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -512,7 +512,7 @@ unsigned char hplugins_parse_packets(int fd, enum HPluginPacketHookingPoints poi short length; if( (length = packet->len) == -1 ) { - if( (length = RFIFOW(fd, 2)) < (int)RFIFOREST(fd) ) + if( (length = RFIFOW(fd, 2)) > (int)RFIFOREST(fd) ) return 2; } -- cgit v1.2.3-70-g09d2 From b389ec3d1184bc0566e92d69fe0bd1250eae27fb Mon Sep 17 00:00:00 2001 From: Matej Pristak Date: Sun, 9 Mar 2014 18:59:43 +0100 Subject: fixing permission from commit 7dd4daf --- src/common/HPM.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/common/HPM.c (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c old mode 100755 new mode 100644 -- cgit v1.2.3-70-g09d2 From ab878900afdb9c9caa58b7f84f0a12b6283edf2b Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 11 Mar 2014 04:19:59 +0100 Subject: Added --load-plugin commandline argument Signed-off-by: Haru --- src/char/char.c | 2 +- src/common/HPM.c | 9 +++++++-- src/common/HPM.h | 2 +- src/login/login.c | 2 +- src/map/map.c | 23 +++++++++++++++++++++-- 5 files changed, 31 insertions(+), 7 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index a42524444..bf19a0012 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -5393,7 +5393,7 @@ int do_init(int argc, char **argv) { online_char_db = idb_alloc(DB_OPT_RELEASE_DATA); HPM->share(sql_handle,"sql_handle"); - HPM->config_read(); + HPM->config_read(NULL, 0); HPM->event(HPET_INIT); mmo_char_sql_init(); diff --git a/src/common/HPM.c b/src/common/HPM.c index a25a17782..971eb83bd 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -269,11 +269,12 @@ void hplugin_unload(struct hplugin* plugin) { } } -void hplugins_config_read(void) { +void hplugins_config_read(const char * const *extra_plugins, int extra_plugins_count) { config_t plugins_conf; config_setting_t *plist = NULL; const char *config_filename = "conf/plugins.conf"; // FIXME hardcoded name FILE *fp; + int i; // uncomment once login/char support is wrapped up // if( !HPM->DataCheck ) { @@ -294,9 +295,13 @@ void hplugins_config_read(void) { HPM->symbol_defaults_sub(); plist = libconfig->lookup(&plugins_conf, "plugins_list"); + for (i = 0; i < extra_plugins_count; i++) { + config_setting_t *entry = libconfig->setting_add(plist, NULL, CONFIG_TYPE_STRING); + config_setting_set_string(entry, extra_plugins[i]); + } if (plist != NULL) { - int length = libconfig->setting_length(plist), i; + int length = libconfig->setting_length(plist); char filename[60]; for(i = 0; i < length; i++) { if( !strcmpi(libconfig->setting_get_string_elem(plist,i),"HPMHooking") ) {//must load it first diff --git a/src/common/HPM.h b/src/common/HPM.h index 52ad24a03..b466cb4f3 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -131,7 +131,7 @@ struct HPM_interface { void *(*import_symbol) (char *name, unsigned int pID); void (*share) (void *, char *); void (*symbol_defaults) (void); - void (*config_read) (void); + void (*config_read) (const char * const *extra_plugins, int extra_plugins_count); bool (*populate) (struct hplugin *plugin,const char *filename); void (*symbol_defaults_sub) (void);//TODO drop char *(*pid2name) (unsigned int pid); diff --git a/src/login/login.c b/src/login/login.c index 252031bb8..cb30de2f3 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1821,7 +1821,7 @@ int do_init(int argc, char** argv) } HPM->share(account_db_sql_up(accounts),"sql_handle"); - HPM->config_read(); + HPM->config_read(NULL, 0); HPM->event(HPET_INIT); // server port open & binding diff --git a/src/map/map.c b/src/map/map.c index a7e83cae3..b2d50292e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5356,6 +5356,7 @@ void map_helpscreen(bool do_exit) ShowInfo(" --inter-config Alternative inter-server configuration.\n"); ShowInfo(" --log-config Alternative logging configuration.\n"); ShowInfo(" --script-check Tests a script for errors, without running the server.\n"); + ShowInfo(" --load-plugin Loads an additional plugin (can be repeated).\n"); HPM->arg_help();/* display help for commands implemented thru HPM */ if( do_exit ) exit(EXIT_SUCCESS); @@ -5566,7 +5567,8 @@ int do_init(int argc, char *argv[]) { bool minimal = false; char *scriptcheck = NULL; - int i; + int i, extra_plugins_count = 0; + const char **extra_plugins = NULL; #ifdef GCOLLECT GC_enable_incremental(); @@ -5579,7 +5581,21 @@ int do_init(int argc, char *argv[]) HPM->load_sub = HPM_map_plugin_load_sub; HPM->symbol_defaults_sub = map_hp_symbols; HPM->grabHPDataSub = HPM_map_grabHPData; - HPM->config_read(); + for( i = 1; i < argc; i++ ) { + const char* arg = argv[i]; + if( strcmp(arg, "--load-plugin") == 0 ) { + if( map->arg_next_value(arg, i, argc, true) ) { + RECREATE(extra_plugins, const char *, ++extra_plugins_count); + extra_plugins[extra_plugins_count-1] = argv[++i]; + } + } + } + HPM->config_read(extra_plugins, extra_plugins_count); + if (extra_plugins) { + aFree(extra_plugins); + extra_plugins = NULL; + extra_plugins_count = 0; + } HPM->event(HPET_PRE_INIT); @@ -5629,6 +5645,9 @@ int do_init(int argc, char *argv[]) runflag = CORE_ST_STOP; if( map->arg_next_value(arg, i, argc, true) ) scriptcheck = argv[++i]; + } else if( strcmp(arg, "load-plugin") == 0 ) { + if( map->arg_next_value(arg, i, argc, true) ) + i++; } else { ShowError("Unknown option '%s'.\n", argv[i]); exit(EXIT_FAILURE); -- cgit v1.2.3-70-g09d2 From 7b12dd06420fae973fbcc2f81f5d385e59788c78 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 18 Oct 2013 13:21:34 +0200 Subject: Added sysinfo (System Information) functionalities - More informative messages are displayed during startup, to make it easier to identify what system and environment Hercules is running. - Git/SVN revision detection is improved, separating the source version (cached at compile time) from the runtime version, in case the user updated their working copy without recompiling the server. Git version detection is also more reliable, in case a non-default branch is used. - The get_revision script command has been removed (as it was useless to begin with, after the switch to git). An alternative will be provided later, for feature-probing purposes. - The patch was tested under Linux (Gentoo / gcc 4.7 on i686 and x86_64, Debian 6 / gcc 4.4 on i686, Raspbian / gcc 4.6 on armv6l, CentOS 5 / gcc 4.1 on i686, CentOS 6 / gcc 4.4 on x86_64, Linux Mint 15 / gcc 4.7 on x86_64, OS X Mountain Lion / clang 5.0 and gcc 4.8 on x86_64, Cygwin-NT-5.1/gcc 4.8 on i686, FreeBSD 8 / gcc 4.2 on i386, FreeBSD 9 / gcc 4.2 on amd64, FreeBSD 10 / clang 3.3 on amd64, NetBSD 5 / gcc 4.1 on i386, NetBSD 6 / gcc 4.5 on amd64, OpenBSD 5 / gcc 4.2 on amd64, Solaris 11 / gcc 4.5 on i86pc, Windows 7 / Visual Studio 2012 on x86, Windows 8 / Visual Studio 2010 on WOW64, Windows 8.1 / Visual Studio 2013 on WOW64. Signed-off-by: Haru --- .gitignore | 2 +- 3rdparty/libconfig/Makefile.in | 2 + 3rdparty/mt19937ar/Makefile.in | 2 + Makefile.in | 29 +- conf/messages.conf | 7 +- script-checker | 14 +- src/char/Makefile.in | 9 +- src/common/HPM.c | 2 - src/common/Makefile.in | 24 +- src/common/console.c | 15 +- src/common/core.c | 151 +---- src/common/core.h | 2 - src/common/malloc.c | 8 +- src/common/sysinfo.c | 1022 ++++++++++++++++++++++++++++++++ src/common/sysinfo.h | 62 ++ src/login/Makefile.in | 9 +- src/map/Makefile.in | 9 +- src/map/atcommand.c | 18 +- src/map/battle.c | 8 +- src/map/map.c | 3 - src/map/pc.c | 10 +- src/map/script.c | 17 +- src/plugins/Makefile.in | 5 +- src/test/Makefile.in | 25 +- src/tool/Makefile.in | 29 +- sysinfogen.sh | 259 ++++++++ tools/HPMHookGen/Makefile.in | 6 +- vcproj-10/char-server.vcxproj | 2 + vcproj-10/char-server.vcxproj.filters | 6 + vcproj-10/login-server.vcxproj | 2 + vcproj-10/login-server.vcxproj.filters | 6 + vcproj-10/map-server.vcxproj | 2 + vcproj-10/map-server.vcxproj.filters | 6 + vcproj-10/mapcache.vcxproj | 2 + vcproj-10/mapcache.vcxproj.filters | 6 + vcproj-11/char-server.vcxproj | 2 + vcproj-11/char-server.vcxproj.filters | 6 + vcproj-11/login-server.vcxproj | 2 + vcproj-11/login-server.vcxproj.filters | 6 + vcproj-11/map-server.vcxproj | 2 + vcproj-11/map-server.vcxproj.filters | 6 + vcproj-11/mapcache.vcxproj | 2 + vcproj-11/mapcache.vcxproj.filters | 6 + vcproj-12/char-server.vcxproj | 2 + vcproj-12/char-server.vcxproj.filters | 6 + vcproj-12/login-server.vcxproj | 2 + vcproj-12/login-server.vcxproj.filters | 6 + vcproj-12/map-server.vcxproj | 2 + vcproj-12/map-server.vcxproj.filters | 6 + vcproj-12/mapcache.vcxproj | 2 + vcproj-12/mapcache.vcxproj.filters | 6 + vcproj-9/char-server.vcproj | 8 + vcproj-9/login-server.vcproj | 8 + vcproj-9/map-server.vcproj | 8 + vcproj-9/mapcache.vcproj | 8 + 55 files changed, 1638 insertions(+), 239 deletions(-) create mode 100644 src/common/sysinfo.c create mode 100644 src/common/sysinfo.h create mode 100755 sysinfogen.sh (limited to 'src/common/HPM.c') diff --git a/.gitignore b/.gitignore index c43c27e31..69782bcd1 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,7 @@ Thumbs.db /src/common/Makefile /src/common/obj_all /src/common/obj_sql -/src/common/svnversion.h +/src/common/sysinfo.inc # /src/login/ /src/login/Makefile diff --git a/3rdparty/libconfig/Makefile.in b/3rdparty/libconfig/Makefile.in index 88c5eba96..e27aab30a 100644 --- a/3rdparty/libconfig/Makefile.in +++ b/3rdparty/libconfig/Makefile.in @@ -1,3 +1,5 @@ +# Copyright (c) Hercules Dev Team, licensed under GNU GPL. +# See the LICENSE file LIBCONFIG_OBJ = libconfig.o grammar.o scanctx.o scanner.o strbuf.o LIBCONFIG_H = libconfig.h grammar.h parsectx.h scanctx.h scanner.h strbuf.h wincompat.h diff --git a/3rdparty/mt19937ar/Makefile.in b/3rdparty/mt19937ar/Makefile.in index 5d8e19994..61f0556be 100644 --- a/3rdparty/mt19937ar/Makefile.in +++ b/3rdparty/mt19937ar/Makefile.in @@ -1,3 +1,5 @@ +# Copyright (c) Hercules Dev Team, licensed under GNU GPL. +# See the LICENSE file MT19937AR_OBJ = mt19937ar.o MT19937AR_H = mt19937ar.h diff --git a/Makefile.in b/Makefile.in index d61a885b4..e987c713f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,14 +1,17 @@ +# Copyright (c) Hercules Dev Team, licensed under GNU GPL. +# See the LICENSE file + @SET_MAKE@ HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - ALL_DEPENDS=common_sql login_sql char_sql map_sql tools | import - SQL_DEPENDS=common_sql login_sql char_sql map_sql | import - COMMON_SQL_DEPENDS=mt19937ar libconfig - LOGIN_SQL_DEPENDS=mt19937ar libconfig common_sql - CHAR_SQL_DEPENDS=mt19937ar libconfig common_sql - MAP_SQL_DEPENDS=mt19937ar libconfig common_sql - TOOLS_DEPENDS=mt19937ar libconfig common_sql + ALL_DEPENDS=common_sql login_sql char_sql map_sql tools sysinfo | import + SQL_DEPENDS=common_sql login_sql char_sql map_sql sysinfo | import + COMMON_SQL_DEPENDS=mt19937ar libconfig sysinfo + LOGIN_SQL_DEPENDS=mt19937ar libconfig common_sql sysinfo + CHAR_SQL_DEPENDS=mt19937ar libconfig common_sql sysinfo + MAP_SQL_DEPENDS=mt19937ar libconfig common_sql sysinfo + TOOLS_DEPENDS=mt19937ar libconfig common_sql sysinfo else ALL_DEPENDS=needs_mysql SQL_DEPENDS=needs_mysql @@ -51,6 +54,7 @@ export CC clean \ buildclean \ distclean \ + sysinfo \ hooks \ help @@ -140,6 +144,14 @@ clean buildclean: $(MF_TARGETS) distclean: clean @-rm -f $(MF_TARGETS) config.status config.log +sysinfo: + @./sysinfogen.sh src/common/sysinfo_new.inc @CFLAGS@ + @if cmp -s src/common/sysinfo.inc src/common/sysinfo_new.inc; then \ + rm src/common/sysinfo_new.inc ; \ + else \ + mv src/common/sysinfo_new.inc src/common/sysinfo.inc ; \ + fi + help: Makefile @echo "most common targets are 'all' 'sql' 'clean' 'plugins' 'help'" @echo "possible targets are:" @@ -161,8 +173,9 @@ help: Makefile @echo "'buildclean' - cleans build temporary (object) files, without deleting the" @echo " executables" @echo "'distclean' - cleans files generated by ./configure" + @echo "'sysinfo' - re-generates the System Info include" ifeq ($(HAVE_PERL)$(HAVE_DOXYGEN),yesyes) - @echo "'hooks' - re-generates the definitions for the HPM Hooking plugin" + @echo "'hooks' - re-generates the definitions for the HPM" endif @echo "'help' - outputs this message" diff --git a/conf/messages.conf b/conf/messages.conf index 2eba688cd..2f6a98882 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -1223,12 +1223,11 @@ 1289: %s spawns in: 1290: This monster does not spawn normally. -//1291-1293 FREE +//1291-1294 FREE // @version -1294: SVN r%s -1295: Git Hash '%s' -1296: Cannot determine version. +1295: %s revision '%s' (src) / '%s' (scripts) +1296: Hercules %d-bit for %s // @mutearea 1297: Please enter a time in minutes (usage: @mutearea/@stfu + + + + diff --git a/vcproj-9/login-server.vcproj b/vcproj-9/login-server.vcproj index 1031d2237..58ccfda89 100644 --- a/vcproj-9/login-server.vcproj +++ b/vcproj-9/login-server.vcproj @@ -390,6 +390,14 @@ RelativePath="..\src\common\strlib.h" > + + + + diff --git a/vcproj-9/map-server.vcproj b/vcproj-9/map-server.vcproj index 81d39e48f..5456d74b1 100644 --- a/vcproj-9/map-server.vcproj +++ b/vcproj-9/map-server.vcproj @@ -443,6 +443,14 @@ RelativePath="..\src\common\strlib.h" > + + + + diff --git a/vcproj-9/mapcache.vcproj b/vcproj-9/mapcache.vcproj index a9d230b36..70a0ac4a2 100644 --- a/vcproj-9/mapcache.vcproj +++ b/vcproj-9/mapcache.vcproj @@ -270,6 +270,14 @@ RelativePath="..\src\common\strlib.h" > + + + + -- cgit v1.2.3-70-g09d2 From 4f0b43cba1f72600ec9618e0dc07ed2282bbfc10 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 19 Apr 2014 13:08:57 +0200 Subject: Added sysinfo to the exported HPM symbols Signed-off-by: Haru --- src/common/HPM.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 6d2c45641..9ffce87de 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -13,6 +13,7 @@ #include "../common/console.h" #include "../common/strlib.h" #include "../common/sql.h" +#include "../common/sysinfo.h" #include "HPM.h" #include @@ -717,6 +718,8 @@ void hplugins_share_defaults(void) { HPM->share(timer,"timer"); /* libconfig */ HPM->share(libconfig,"libconfig"); + /* sysinfo */ + HPM->share(sysinfo,"sysinfo"); } void hpm_init(void) { -- cgit v1.2.3-70-g09d2 From b6b3f58795288701d0e162d43fa6f0a47af913b3 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 4 May 2014 06:13:56 +0200 Subject: Fixed order of includes in all source files - Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru --- src/char/char.c | 44 +++++----- src/char/char.h | 1 - src/char/int_auction.c | 25 +++--- src/char/int_elemental.c | 22 +++-- src/char/int_elemental.h | 2 +- src/char/int_guild.c | 24 ++--- src/char/int_guild.h | 3 - src/char/int_homun.c | 21 +++-- src/char/int_homun.h | 2 + src/char/int_mail.c | 20 +++-- src/char/int_mail.h | 3 + src/char/int_mercenary.c | 22 +++-- src/char/int_mercenary.h | 4 +- src/char/int_party.c | 25 +++--- src/char/int_party.h | 2 - src/char/int_pet.c | 22 +++-- src/char/int_quest.c | 22 ++--- src/char/int_storage.c | 22 +++-- src/char/inter.c | 43 ++++----- src/char/inter.h | 5 +- src/char/pincode.c | 11 ++- src/common/HPM.c | 31 ++++--- src/common/HPM.h | 6 +- src/common/HPMi.h | 16 +--- src/common/cbasetypes.h | 6 ++ src/common/conf.c | 3 + src/common/conf.h | 1 + src/common/console.c | 223 ++++++++++++++++++++++++----------------------- src/common/console.h | 21 +++-- src/common/core.c | 38 ++++---- src/common/core.h | 3 +- src/common/db.c | 10 ++- src/common/db.h | 3 +- src/common/des.c | 7 +- src/common/ers.c | 8 +- src/common/grfio.c | 17 ++-- src/common/malloc.c | 11 ++- src/common/mapindex.c | 15 ++-- src/common/md5calc.c | 8 +- src/common/mmo.h | 6 +- src/common/mutex.c | 5 +- src/common/mutex.h | 1 + src/common/nullpo.c | 6 +- src/common/random.c | 18 ++-- src/common/showmsg.c | 17 ++-- src/common/showmsg.h | 23 +++-- src/common/socket.c | 64 +++++++------- src/common/socket.h | 12 +-- src/common/spinlock.h | 9 +- src/common/sql.c | 12 ++- src/common/sql.h | 3 +- src/common/strlib.c | 13 +-- src/common/strlib.h | 15 ++-- src/common/sysinfo.c | 32 +++++-- src/common/sysinfo.h | 16 ---- src/common/thread.c | 31 ++++--- src/common/thread.h | 1 - src/common/timer.c | 19 ++-- src/common/utils.c | 36 ++++---- src/common/utils.h | 3 +- src/config/const.h | 7 -- src/config/renewal.h | 1 + src/login/account.h | 1 + src/login/account_sql.c | 17 ++-- src/login/ipban_sql.c | 14 +-- src/login/login.c | 21 +++-- src/login/login.h | 2 +- src/login/loginlog.h | 2 +- src/login/loginlog_sql.c | 9 +- src/map/HPMmap.c | 42 ++++----- src/map/atcommand.c | 67 +++++++------- src/map/atcommand.h | 2 +- src/map/battle.c | 61 +++++++------ src/map/battle.h | 2 +- src/map/battleground.c | 33 +++---- src/map/battleground.h | 2 +- src/map/buyingstore.c | 17 ++-- src/map/buyingstore.h | 5 ++ src/map/chat.c | 23 ++--- src/map/chat.h | 5 +- src/map/chrif.c | 35 ++++---- src/map/chrif.h | 4 +- src/map/clif.c | 83 +++++++++--------- src/map/clif.h | 9 +- src/map/date.c | 6 +- src/map/date.h | 2 + src/map/duel.c | 10 ++- src/map/duel.h | 4 + src/map/elemental.c | 54 ++++++------ src/map/elemental.h | 1 + src/map/guild.c | 47 +++++----- src/map/guild.h | 16 +--- src/map/homunculus.c | 56 ++++++------ src/map/homunculus.h | 3 +- src/map/instance.c | 34 ++++---- src/map/instance.h | 3 + src/map/intif.c | 51 ++++++----- src/map/intif.h | 13 +-- src/map/irc-bot.c | 22 ++--- src/map/irc-bot.h | 2 + src/map/itemdb.c | 27 +++--- src/map/itemdb.h | 5 +- src/map/log.c | 23 ++--- src/map/log.h | 5 +- src/map/mail.c | 16 ++-- src/map/mail.h | 6 +- src/map/map.c | 96 ++++++++++---------- src/map/map.h | 9 +- src/map/mapreg_sql.c | 14 +-- src/map/mercenary.c | 54 ++++++------ src/map/mercenary.h | 1 + src/map/mob.c | 69 ++++++++------- src/map/mob.h | 9 +- src/map/npc.c | 57 ++++++------ src/map/npc.h | 4 +- src/map/npc_chat.c | 26 +++--- src/map/party.c | 43 ++++----- src/map/party.h | 7 +- src/map/path.c | 17 ++-- src/map/path.h | 1 + src/map/pc.c | 59 +++++++------ src/map/pc.h | 29 +++--- src/map/pc_groups.c | 14 +-- src/map/pc_groups.h | 4 + src/map/pet.c | 48 +++++----- src/map/pet.h | 10 ++- src/map/quest.c | 45 +++++----- src/map/quest.h | 4 + src/map/script.c | 79 +++++++++-------- src/map/script.h | 12 +-- src/map/searchstore.c | 11 ++- src/map/searchstore.h | 6 ++ src/map/skill.c | 64 +++++++------- src/map/skill.h | 14 +-- src/map/status.c | 59 +++++++------ src/map/status.h | 16 ++-- src/map/storage.c | 32 +++---- src/map/storage.h | 5 +- src/map/trade.c | 24 ++--- src/map/unit.c | 63 ++++++------- src/map/unit.h | 12 ++- src/map/vending.c | 27 +++--- src/map/vending.h | 1 + src/tool/mapcache.c | 14 +-- 144 files changed, 1676 insertions(+), 1367 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index 77e393c0d..6c0902644 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2,7 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "char.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "int_elemental.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_party.h" +#include "int_storage.h" +#include "inter.h" +#include "pincode.h" +#include "../common/HPM.h" #include "../common/cbasetypes.h" +#include "../common/console.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -13,25 +36,6 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/console.h" -#include "../common/HPM.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_elemental.h" -#include "int_party.h" -#include "int_storage.h" -#include "char.h" -#include "inter.h" -#include "pincode.h" - -#include -#include -#include -#include -#include -#include -#include // private declarations #define CHAR_CONF_NAME "conf/char-server.conf" @@ -5497,7 +5501,7 @@ int do_init(int argc, char **argv) { Sql_HerculesUpdateCheck(sql_handle); #ifdef CONSOLE_INPUT - console->setSQL(sql_handle); + console->input->setSQL(sql_handle); #endif ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); diff --git a/src/char/char.h b/src/char/char.h index 2928929de..09a78f6b9 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -5,7 +5,6 @@ #ifndef _COMMON_CHAR_H_ #define _COMMON_CHAR_H_ -#include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/db.h" diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 924930867..886b5be26 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -2,22 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" +#define HERCULES_CORE + +#include "int_auction.h" + +#include +#include +#include + +#include "char.h" +#include "int_mail.h" +#include "inter.h" #include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_mail.h" -#include "int_auction.h" - -#include -#include -#include static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data* diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c index ed0c2a9ed..3a36e75a2 100644 --- a/src/char/int_elemental.c +++ b/src/char/int_elemental.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_elemental.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + bool mapif_elemental_save(struct s_elemental* ele) { bool flag = true; diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index c90891fc4..c869e6fc2 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -4,7 +4,7 @@ #ifndef _CHAR_INT_ELEMENTAL_H_ #define _CHAR_INT_ELEMENTAL_H_ -struct s_elemental; +#include "../common/cbasetypes.h" void inter_elemental_sql_init(void); void inter_elemental_sql_final(void); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 895cbbb94..ffbe48e10 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -2,21 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // DBPATH +#include "int_guild.h" + +#include +#include +#include + +#include "char.h" +#include "inter.h" #include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/socket.h" #include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" +#include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_guild.h" - -#include -#include -#include #define GS_MEMBER_UNMODIFIED 0x00 #define GS_MEMBER_MODIFIED 0x01 diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 4eb7d310b..5e657ff06 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -20,9 +20,6 @@ enum { GS_REMOVE = 0x8000, }; -struct guild; -struct guild_castle; - int inter_guild_parse_frommap(int fd); int inter_guild_sql_init(void); void inter_guild_sql_final(void); diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 143277f05..795a6b927 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -2,20 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_homun.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" int inter_homunculus_sql_init(void) { diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 561dc848f..9477f4f03 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -4,6 +4,8 @@ #ifndef _CHAR_INT_HOMUN_H_ #define _CHAR_INT_HOMUN_H_ +#include "../common/cbasetypes.h" + struct s_homunculus; int inter_homunculus_sql_init(void); diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 826771676..86a36d59f 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "int_mail.h" + +#include +#include +#include + +#include "char.h" +#include "inter.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" - -#include -#include -#include static int mail_fromsql(int char_id, struct mail_data* md) { diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 7c06cdc1f..824ba48a3 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -4,6 +4,9 @@ #ifndef _CHAR_INT_MAIL_H_ #define _CHAR_INT_MAIL_H_ +struct item; +struct mail_message; + int inter_mail_parse_frommap(int fd); void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c index aecb3844a..1dffb656c 100644 --- a/src/char/int_mercenary.c +++ b/src/char/int_mercenary.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_mercenary.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + bool mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { char* data; diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index b614b8cf7..195a83b34 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -4,7 +4,9 @@ #ifndef _CHAR_INT_MERCENARY_H_ #define _CHAR_INT_MERCENARY_H_ -struct s_mercenary; +#include "../common/cbasetypes.h" + +struct mmo_charstatus; int inter_mercenary_sql_init(void); void inter_mercenary_sql_final(void); diff --git a/src/char/int_party.c b/src/char/int_party.c index 7c328c452..3e4a743d6 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -2,23 +2,26 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/socket.h" -#include "../common/showmsg.h" -#include "../common/mapindex.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + #include "int_party.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" + struct party_data { struct party party; unsigned int min_lv, max_lv; diff --git a/src/char/int_party.h b/src/char/int_party.h index 84f00635a..098c1e9a9 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -14,8 +14,6 @@ enum { PS_BREAK = 0x20, //Specify that this party must be deleted. }; -struct party; - int inter_party_parse_frommap(int fd); int inter_party_sql_init(void); void inter_party_sql_final(void); diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 25f00e6f0..29c40eff9 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_pet.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + struct s_pet *pet_pt; //--------------------------------------------------------- diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 061dd89d9..61b43c57d 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -2,23 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "int_quest.h" + +#include +#include +#include + +#include "char.h" +#include "inter.h" #include "../common/db.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_quest.h" - -#include -#include -#include - /** * Loads the entire questlog for a character. * diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 966e61bb3..bf7b76da0 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" // StringBuf -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "../config/core.h" // GP_BOUND_ITEMS +#include "int_storage.h" #include -#include #include +#include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" // StringBuf #define STORAGE_MEMINC 16 diff --git a/src/char/inter.c b/src/char/inter.c index c48b26fdd..8b6368e9d 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -2,33 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "char.h" +#define HERCULES_CORE + #include "inter.h" -#include "int_party.h" -#include "int_guild.h" -#include "int_storage.h" -#include "int_pet.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_mail.h" -#include "int_auction.h" -#include "int_quest.h" -#include "int_elemental.h" +#include #include -#include #include -#include - +#include #include // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool] +#include "char.h" +#include "int_auction.h" +#include "int_elemental.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mail.h" +#include "int_mercenary.h" +#include "int_party.h" +#include "int_pet.h" +#include "int_quest.h" +#include "int_storage.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" #define WISDATA_TTL (60*1000) //Wis data Time To Live (60 seconds) #define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis diff --git a/src/char/inter.h b/src/char/inter.h index 25b0c2a96..5e655237e 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -5,9 +5,10 @@ #ifndef _CHAR_INTER_H_ #define _CHAR_INTER_H_ -struct accreg; -#include "../common/sql.h" #include "char.h" +#include "../common/sql.h" + +struct accreg; int inter_init_sql(const char *file); void inter_final(void); diff --git a/src/char/pincode.c b/src/char/pincode.c index d51953448..59182f12d 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "pincode.h" + +#include + +#include "char.h" #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/strlib.h" -#include "char.h" -#include "pincode.h" - -#include int enabled = PINCODE_OK; int changetime = 0; diff --git a/src/common/HPM.c b/src/common/HPM.c index 9ffce87de..00b92dc60 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -1,26 +1,31 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "HPM.h" + +#include +#include +#include + #include "../common/cbasetypes.h" -#include "../common/mmo.h" +#include "../common/conf.h" +#include "../common/console.h" #include "../common/core.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/timer.h" -#include "../common/conf.h" -#include "../common/utils.h" -#include "../common/console.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/sysinfo.h" -#include "HPM.h" +#include "../common/timer.h" +#include "../common/utils.h" -#include -#include -#include #ifndef WIN32 -#include +# include #endif struct malloc_interface iMalloc_HPM; @@ -686,7 +691,7 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po void hplugins_share_defaults(void) { /* console */ #ifdef CONSOLE_INPUT - HPM->share(console->addCommand,"addCPCommand"); + HPM->share(console->input->addCommand,"addCPCommand"); #endif /* our own */ HPM->share(hplugins_addpacket,"addPacket"); @@ -755,7 +760,7 @@ void hpm_init(void) { HPM->symbol_defaults(); #ifdef CONSOLE_INPUT - console->addCommand("plugins",CPCMD_A(plugins)); + console->input->addCommand("plugins",CPCMD_A(plugins)); #endif return; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 0f0df4cda..9c176cfd6 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -4,8 +4,12 @@ #ifndef _COMMON_HPM_H_ #define _COMMON_HPM_H_ -#include "../common/cbasetypes.h" +#ifndef HERCULES_CORE +#error You should never include HPM.h from a plugin. +#endif + #include "../common/HPMi.h" +#include "../common/cbasetypes.h" #ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 19206aeca..b98e87d90 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -5,8 +5,8 @@ #define _COMMON_HPMI_H_ #include "../common/cbasetypes.h" -#include "../common/core.h" #include "../common/console.h" +#include "../common/core.h" #include "../common/sql.h" struct script_state; @@ -20,18 +20,6 @@ struct map_session_data; #define HPExport #endif -#ifndef _COMMON_SHOWMSG_H_ - HPExport void (*ShowMessage) (const char *, ...); - HPExport void (*ShowStatus) (const char *, ...); - HPExport void (*ShowSQL) (const char *, ...); - HPExport void (*ShowInfo) (const char *, ...); - HPExport void (*ShowNotice) (const char *, ...); - HPExport void (*ShowWarning) (const char *, ...); - HPExport void (*ShowDebug) (const char *, ...); - HPExport void (*ShowError) (const char *, ...); - HPExport void (*ShowFatalError) (const char *, ...); -#endif - /* after */ #include "../common/showmsg.h" @@ -192,7 +180,7 @@ HPExport struct HPMi_interface { /* pc group permission */ void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask); } HPMi_s; -#ifndef _COMMON_HPM_H_ +#ifndef HERCULES_CORE HPExport struct HPMi_interface *HPMi; #endif diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index f44e80413..da0d6b307 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -442,5 +442,11 @@ void SET_FUNCPOINTER(T1& var, T2 p) #define SET_FUNCPOINTER(var,p) ((var) = (p)) #endif +/* pointer size fix which fixes several gcc warnings */ +#ifdef __64BIT__ + #define __64BPTRSIZE(y) ((intptr)(y)) +#else + #define __64BPTRSIZE(y) (y) +#endif #endif /* _COMMON_CBASETYPES_H_ */ diff --git a/src/common/conf.c b/src/common/conf.c index b816b2f7f..46a034497 100644 --- a/src/common/conf.c +++ b/src/common/conf.c @@ -2,7 +2,10 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + #include "conf.h" + #include "../../3rdparty/libconfig/libconfig.h" #include "../common/showmsg.h" // ShowError diff --git a/src/common/conf.h b/src/common/conf.h index 9aff3df47..e5b637e47 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -6,6 +6,7 @@ #define _COMMON_CONF_H_ #include "../common/cbasetypes.h" + #include "../../3rdparty/libconfig/libconfig.h" /** diff --git a/src/common/console.c b/src/common/console.c index d8f352c8a..6a82db555 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -2,42 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT, MAX_CONSOLE_INPUT +#include "console.h" + +#include +#include + #include "../common/cbasetypes.h" -#include "../common/showmsg.h" #include "../common/core.h" +#include "../common/showmsg.h" #include "../common/sysinfo.h" -#include "../config/core.h" -#include "console.h" #ifndef MINICORE - #include "../common/ers.h" - #include "../common/malloc.h" - #include "../common/atomic.h" - #include "../common/spinlock.h" - #include "../common/thread.h" - #include "../common/mutex.h" - #include "../common/timer.h" - #include "../common/strlib.h" - #include "../common/sql.h" +# include "../common/atomic.h" +# include "../common/ers.h" +# include "../common/malloc.h" +# include "../common/mutex.h" +# include "../common/spinlock.h" +# include "../common/sql.h" +# include "../common/strlib.h" +# include "../common/thread.h" +# include "../common/timer.h" #endif -#include -#include #if !defined(WIN32) - #include - #include +# include +# include #else - #include "../common/winapi.h" // Console close event handling +# include "../common/winapi.h" // Console close event handling +# ifdef CONSOLE_INPUT +# include /* _kbhit() */ +# endif #endif +struct console_interface console_s; #ifdef CONSOLE_INPUT - #if defined(WIN32) - #include /* _kbhit() */ - #endif +struct console_input_interface console_input_s; #endif -struct console_interface console_s; - /*====================================== * CORE : Display title *--------------------------------------*/ @@ -116,12 +120,12 @@ CPCMD_C(mem_report,server) { **/ CPCMD(help) { unsigned int i = 0; - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( console->cmd_list[i]->next_count ) { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->cmd_list[i]->cmd); - console->parse_list_subs(console->cmd_list[i],2); + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( console->input->cmd_list[i]->next_count ) { + ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->input->cmd_list[i]->cmd); + console->input->parse_list_subs(console->input->cmd_list[i],2); } else { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->cmd_list[i]->cmd); + ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->input->cmd_list[i]->cmd); } } } @@ -144,7 +148,7 @@ CPCMD_C(skip,update) { ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n"); return; } - Sql_HerculesUpdateSkip(console->SQL, line); + Sql_HerculesUpdateSkip(console->input->SQL, line); } /** @@ -206,7 +210,7 @@ void console_load_defaults(void) { unsigned int i, len = ARRAYLENGTH(default_list); struct CParseEntry *cmd; - RECREATE(console->cmds,struct CParseEntry *, len); + RECREATE(console->input->cmds,struct CParseEntry *, len); for(i = 0; i < len; i++) { CREATE(cmd, struct CParseEntry, 1); @@ -220,12 +224,12 @@ void console_load_defaults(void) { cmd->next_count = 0; - console->cmd_count++; - console->cmds[i] = cmd; + console->input->cmd_count++; + console->input->cmds[i] = cmd; default_list[i].self = cmd; if( !default_list[i].connect ) { - RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); - console->cmd_list[console->cmd_list_count - 1] = cmd; + RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); + console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; } } @@ -233,11 +237,11 @@ void console_load_defaults(void) { unsigned int k; if( !default_list[i].connect ) continue; - for(k = 0; k < console->cmd_count; k++) { - if( strcmpi(default_list[i].connect,console->cmds[k]->cmd) == 0 ) { + for(k = 0; k < console->input->cmd_count; k++) { + if( strcmpi(default_list[i].connect,console->input->cmds[k]->cmd) == 0 ) { cmd = default_list[i].self; - RECREATE(console->cmds[k]->u.next, struct CParseEntry *, ++console->cmds[k]->next_count); - console->cmds[k]->u.next[console->cmds[k]->next_count - 1] = cmd; + RECREATE(console->input->cmds[k]->u.next, struct CParseEntry *, ++console->input->cmds[k]->next_count); + console->input->cmds[k]->u.next[console->input->cmds[k]->next_count - 1] = cmd; break; } } @@ -256,23 +260,23 @@ void console_parse_create(char *name, CParseFunc func) { safestrncpy(sublist, name, CP_CMD_LENGTH * 5); tok = strtok(sublist,":"); - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->cmd_list_count ) { - RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); + if( i == console->input->cmd_list_count ) { + RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); CREATE(cmd, struct CParseEntry, 1); safestrncpy(cmd->cmd, tok, CP_CMD_LENGTH); cmd->next_count = 0; - console->cmds[console->cmd_count - 1] = cmd; - RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); - console->cmd_list[console->cmd_list_count - 1] = cmd; - i = console->cmd_list_count - 1; + console->input->cmds[console->input->cmd_count - 1] = cmd; + RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); + console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; + i = console->input->cmd_list_count - 1; } - cmd = console->cmd_list[i]; + cmd = console->input->cmd_list[i]; while( ( tok = strtok(NULL, ":") ) != NULL ) { for(i = 0; i < cmd->next_count; i++) { @@ -281,13 +285,13 @@ void console_parse_create(char *name, CParseFunc func) { } if ( i == cmd->next_count ) { - RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); - CREATE(console->cmds[console->cmd_count-1], struct CParseEntry, 1); - safestrncpy(console->cmds[console->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); - console->cmds[console->cmd_count-1]->next_count = 0; + RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); + CREATE(console->input->cmds[console->input->cmd_count-1], struct CParseEntry, 1); + safestrncpy(console->input->cmds[console->input->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); + console->input->cmds[console->input->cmd_count-1]->next_count = 0; RECREATE(cmd->u.next, struct CParseEntry *, ++cmd->next_count); - cmd->u.next[cmd->next_count - 1] = console->cmds[console->cmd_count-1]; - cmd = console->cmds[console->cmd_count-1]; + cmd->u.next[cmd->next_count - 1] = console->input->cmds[console->input->cmd_count-1]; + cmd = console->input->cmds[console->input->cmd_count-1]; continue; } @@ -302,7 +306,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd); ShowInfo("%s subs\n",msg); - console->parse_list_subs(cmd->u.next[i],depth + 1); + console->input->parse_list_subs(cmd->u.next[i],depth + 1); } else { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " %s",cmd->u.next[i]->cmd); @@ -320,21 +324,21 @@ void console_parse_sub(char *line) { memcpy(bline, line, 200); tok = strtok(line, " "); - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->cmd_list_count ) { + if( i == console->input->cmd_list_count ) { ShowError("'"CL_WHITE"%s"CL_RESET"' is not a known command, type '"CL_WHITE"help"CL_RESET"' to list all commands\n",line); return; } - cmd = console->cmd_list[i]; + cmd = console->input->cmd_list[i]; len += snprintf(sublist,CP_CMD_LENGTH * 5,"%s", cmd->cmd) + 1; - if( cmd->next_count == 0 && console->cmd_list[i]->u.func ) { + if( cmd->next_count == 0 && console->input->cmd_list[i]->u.func ) { char *r = NULL; if( (tok = strtok(NULL, " ")) ) { r = bline; @@ -351,7 +355,7 @@ void console_parse_sub(char *line) { if( strcmpi("help",tok) == 0 ) { if( cmd->next_count ) { ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",sublist); - console->parse_list_subs(cmd,2); + console->input->parse_list_subs(cmd,2); } else { ShowError("'"CL_WHITE"%s"CL_RESET"' doesn't possess any subcommands\n",sublist); } @@ -392,95 +396,95 @@ void console_parse(char* line) { } void *cThread_main(void *x) { - while( console->ptstate ) {/* loopx */ - if( console->key_pressed() ) { + while( console->input->ptstate ) {/* loopx */ + if( console->input->key_pressed() ) { char input[MAX_CONSOLE_INPUT]; - console->parse(input); + console->input->parse(input); if( input[0] != '\0' ) {/* did we get something? */ - EnterSpinLock(&console->ptlock); + EnterSpinLock(&console->input->ptlock); if( cinput.count == CONSOLE_PARSE_SIZE ) { - LeaveSpinLock(&console->ptlock); + LeaveSpinLock(&console->input->ptlock); continue;/* drop */ } safestrncpy(cinput.queue[cinput.count++],input,MAX_CONSOLE_INPUT); - LeaveSpinLock(&console->ptlock); + LeaveSpinLock(&console->input->ptlock); } } - ramutex_lock( console->ptmutex ); - racond_wait( console->ptcond, console->ptmutex, -1 ); - ramutex_unlock( console->ptmutex ); + ramutex_lock( console->input->ptmutex ); + racond_wait( console->input->ptcond, console->input->ptmutex, -1 ); + ramutex_unlock( console->input->ptmutex ); } return NULL; } int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { int i; - EnterSpinLock(&console->ptlock); + EnterSpinLock(&console->input->ptlock); for(i = 0; i < cinput.count; i++) { - console->parse_sub(cinput.queue[i]); + console->input->parse_sub(cinput.queue[i]); } cinput.count = 0; - LeaveSpinLock(&console->ptlock); - racond_signal(console->ptcond); + LeaveSpinLock(&console->input->ptlock); + racond_signal(console->input->ptcond); return 0; } void console_parse_final(void) { - if( console->ptstate ) { - InterlockedDecrement(&console->ptstate); - racond_signal(console->ptcond); + if( console->input->ptstate ) { + InterlockedDecrement(&console->input->ptstate); + racond_signal(console->input->ptcond); /* wait for thread to close */ - rathread_wait(console->pthread, NULL); + rathread_wait(console->input->pthread, NULL); - racond_destroy(console->ptcond); - ramutex_destroy(console->ptmutex); + racond_destroy(console->input->ptcond); + ramutex_destroy(console->input->ptmutex); } } void console_parse_init(void) { cinput.count = 0; - console->ptstate = 1; + console->input->ptstate = 1; - InitializeSpinLock(&console->ptlock); + InitializeSpinLock(&console->input->ptlock); - console->ptmutex = ramutex_create(); - console->ptcond = racond_create(); + console->input->ptmutex = ramutex_create(); + console->input->ptcond = racond_create(); - if( (console->pthread = rathread_create(console->pthread_main, NULL)) == NULL ){ + if( (console->input->pthread = rathread_create(console->input->pthread_main, NULL)) == NULL ){ ShowFatalError("console_parse_init: failed to spawn console_parse thread.\n"); exit(EXIT_FAILURE); } - timer->add_func_list(console->parse_timer, "console_parse_timer"); - timer->add_interval(timer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ + timer->add_func_list(console->input->parse_timer, "console_parse_timer"); + timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } void console_setSQL(Sql *SQL_handle) { - console->SQL = SQL_handle; + console->input->SQL = SQL_handle; } #endif /* CONSOLE_INPUT */ void console_init (void) { #ifdef CONSOLE_INPUT - console->cmd_count = console->cmd_list_count = 0; - console->load_defaults(); - console->parse_init(); + console->input->cmd_count = console->input->cmd_list_count = 0; + console->input->load_defaults(); + console->input->parse_init(); #endif } void console_final(void) { #ifdef CONSOLE_INPUT unsigned int i; - console->parse_final(); - for( i = 0; i < console->cmd_count; i++ ) { - if( console->cmds[i]->next_count ) - aFree(console->cmds[i]->u.next); - aFree(console->cmds[i]); + console->input->parse_final(); + for( i = 0; i < console->input->cmd_count; i++ ) { + if( console->input->cmds[i]->next_count ) + aFree(console->input->cmds[i]->u.next); + aFree(console->input->cmds[i]); } - aFree(console->cmds); - aFree(console->cmd_list); + aFree(console->input->cmds); + aFree(console->input->cmd_list); #endif } void console_defaults(void) { @@ -489,17 +493,20 @@ void console_defaults(void) { console->final = console_final; console->display_title = display_title; #ifdef CONSOLE_INPUT - console->parse_init = console_parse_init; - console->parse_final = console_parse_final; - console->parse_timer = console_parse_timer; - console->pthread_main = cThread_main; - console->parse = console_parse; - console->parse_sub = console_parse_sub; - console->key_pressed = console_parse_key_pressed; - console->load_defaults = console_load_defaults; - console->parse_list_subs = console_parse_list_subs; - console->addCommand = console_parse_create; - console->setSQL = console_setSQL; - console->SQL = NULL; + console->input = &console_input_s; + console->input->parse_init = console_parse_init; + console->input->parse_final = console_parse_final; + console->input->parse_timer = console_parse_timer; + console->input->pthread_main = cThread_main; + console->input->parse = console_parse; + console->input->parse_sub = console_parse_sub; + console->input->key_pressed = console_parse_key_pressed; + console->input->load_defaults = console_load_defaults; + console->input->parse_list_subs = console_parse_list_subs; + console->input->addCommand = console_parse_create; + console->input->setSQL = console_setSQL; + console->input->SQL = NULL; +#else + console->input = NULL; #endif } diff --git a/src/common/console.h b/src/common/console.h index 3d19ddc9d..d2c58f978 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -4,11 +4,13 @@ #ifndef _COMMON_CONSOLE_H_ #define _COMMON_CONSOLE_H_ -#include "../common/thread.h" +#include "../config/core.h" // MAX_CONSOLE_INPUT + +#include "../common/cbasetypes.h" #include "../common/mutex.h" #include "../common/spinlock.h" #include "../common/sql.h" -#include "../config/core.h" +#include "../common/thread.h" /** * Queue Max @@ -47,11 +49,8 @@ struct { unsigned short count; } cinput; -struct console_interface { - void (*init) (void); - void (*final) (void); - void (*display_title) (void); #ifdef CONSOLE_INPUT +struct console_input_interface { /* vars */ SPIN_LOCK ptlock;/* parse thread lock */ rAthread pthread;/* parse thread */ @@ -77,7 +76,17 @@ struct console_interface { void (*parse_list_subs) (struct CParseEntry *cmd, unsigned char depth); void (*addCommand) (char *name, CParseFunc func); void (*setSQL) (Sql *SQL_handle); +}; +#else +struct console_input_interface; #endif + +struct console_interface { + void (*init) (void); + void (*final) (void); + void (*display_title) (void); + + struct console_input_interface *input; }; struct console_interface *console; diff --git a/src/common/core.c b/src/common/core.c index 49b272488..85f824866 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -2,36 +2,40 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/strlib.h" +#define HERCULES_CORE + +#include "../config/core.h" #include "core.h" + +#include "../common/cbasetypes.h" #include "../common/console.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" #include "../common/sysinfo.h" #ifndef MINICORE - #include "../common/db.h" - #include "../common/socket.h" - #include "../common/timer.h" - #include "../common/thread.h" - #include "../common/sql.h" - #include "../config/core.h" - #include "../common/HPM.h" - #include "../common/utils.h" - #include "../common/conf.h" - #include "../common/ers.h" +# include "../common/HPM.h" +# include "../common/conf.h" +# include "../common/db.h" +# include "../common/ers.h" +# include "../common/socket.h" +# include "../common/sql.h" +# include "../common/thread.h" +# include "../common/timer.h" +# include "../common/utils.h" #endif +#include #include #include -#include #include #ifndef _WIN32 -#include +# include #else -#include "../common/winapi.h" // Console close event handling +# include "../common/winapi.h" // Console close event handling #endif /// Called when a terminate signal is received. diff --git a/src/common/core.h b/src/common/core.h index e9f7c5961..ba75e6b01 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -7,11 +7,10 @@ #include "../common/db.h" #include "../common/mmo.h" -#include "../config/core.h" /* so that developers with --enable-debug can raise signals from any section of the code they'd like */ #ifdef DEBUG - #include +# include #endif extern int arg_c; diff --git a/src/common/db.c b/src/common/db.c index 8d6b08815..1781aa96f 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -67,14 +67,18 @@ * @encoding US-ASCII * @see #db.h \*****************************************************************************/ + +#define HERCULES_CORE + +#include "db.h" + #include #include -#include "db.h" -#include "../common/mmo.h" +#include "../common/ers.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" -#include "../common/ers.h" #include "../common/strlib.h" /*****************************************************************************\ diff --git a/src/common/db.h b/src/common/db.h index 67abe6f19..0d2548806 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -42,9 +42,10 @@ #ifndef _COMMON_DB_H_ #define _COMMON_DB_H_ -#include "../common/cbasetypes.h" #include +#include "../common/cbasetypes.h" + /*****************************************************************************\ * (1) Section with public typedefs, enums, unions, structures and defines. * * DBRelease - Enumeration of release options. * diff --git a/src/common/des.c b/src/common/des.c index ed6d098dc..7f952be76 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -1,8 +1,11 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/cbasetypes.h" -#include "../common/des.h" +#define HERCULES_CORE + +#include "des.h" + +#include "../common/cbasetypes.h" /// DES (Data Encryption Standard) algorithm, modified version. /// @see http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=5099. diff --git a/src/common/ers.c b/src/common/ers.c index 5a3d7314a..d9895e4f2 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -39,14 +39,18 @@ * @encoding US-ASCII * * @see common#ers.h * \*****************************************************************************/ + +#define HERCULES_CORE + +#include "ers.h" + #include #include #include "../common/cbasetypes.h" #include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree -#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL #include "../common/nullpo.h" -#include "ers.h" +#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL #ifndef DISABLE_ERS diff --git a/src/common/grfio.c b/src/common/grfio.c index bde0ed720..1111fb3f3 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -2,13 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/des.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/nullpo.h" +#define HERCULES_CORE + #include "grfio.h" #include @@ -17,6 +12,14 @@ #include #include +#include "../common/cbasetypes.h" +#include "../common/des.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" + //---------------------------- // file entry table struct //---------------------------- diff --git a/src/common/malloc.c b/src/common/malloc.c index 5b39cbab6..13cf0b5ce 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/malloc.h" -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/sysinfo.h" +#define HERCULES_CORE + +#include "malloc.h" #include #include #include #include +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/sysinfo.h" + struct malloc_interface iMalloc_s; ////////////// Memory Libraries ////////////////// diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 3128a3cb0..5c69c7063 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/db.h" +#define HERCULES_CORE + #include "mapindex.h" -#include #include #include +#include + +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" /* mapindex.c interface source */ struct mapindex_interface mapindex_s; diff --git a/src/common/md5calc.c b/src/common/md5calc.c index 05fde42cc..e7b506e27 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -6,11 +6,15 @@ * ***********************************************************/ -#include "../common/random.h" +#define HERCULES_CORE + #include "md5calc.h" -#include + #include #include +#include + +#include "../common/random.h" #ifndef UINT_MAX #define UINT_MAX 4294967295U diff --git a/src/common/mmo.h b/src/common/mmo.h index d535d2874..1d826463e 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -5,10 +5,11 @@ #ifndef _COMMON_MMO_H_ #define _COMMON_MMO_H_ -#include "cbasetypes.h" -#include "../common/db.h" #include +#include "../common/cbasetypes.h" +#include "../common/db.h" + // server->client protocol version // 0 - pre-? // 1 - ? - 0x196 @@ -96,6 +97,7 @@ //Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default ) #define MAX_BANK_ZENY 2100000000 +#define MAX_LEVEL 175 #define MAX_FAME 1000000000 #define MAX_CART 100 #define MAX_SKILL 1478 diff --git a/src/common/mutex.c b/src/common/mutex.c index 0668dbc41..12524c3b7 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -1,6 +1,10 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "mutex.h" + #ifdef WIN32 #include "../common/winapi.h" #else @@ -13,7 +17,6 @@ #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/timer.h" -#include "../common/mutex.h" struct ramutex{ #ifdef WIN32 diff --git a/src/common/mutex.h b/src/common/mutex.h index eeb24e6ff..3b83b66d6 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -4,6 +4,7 @@ #ifndef _COMMON_MUTEX_H_ #define _COMMON_MUTEX_H_ +#include "../common/cbasetypes.h" typedef struct ramutex *ramutex; // Mutex typedef struct racond *racond; // Condition Var diff --git a/src/common/nullpo.c b/src/common/nullpo.c index 1cb471aff..1891835f1 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -2,10 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "nullpo.h" + #include #include #include -#include "../common/nullpo.h" + #include "../common/showmsg.h" /** diff --git a/src/common/random.c b/src/common/random.c index e46c52cad..7019a31f3 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -1,17 +1,23 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "random.h" + +#include // time + +#include // init_genrand, genrand_int32, genrand_res53 + #include "../common/showmsg.h" #include "../common/timer.h" // gettick -#include "random.h" + #if defined(WIN32) - #include "../common/winapi.h" +# include "../common/winapi.h" #elif defined(HAVE_GETPID) || defined(HAVE_GETTID) - #include - #include +# include +# include #endif -#include // time -#include // init_genrand, genrand_int32, genrand_res53 /// Initializes the random number generator with an appropriate seed. diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 14342fe5e..1dbcba282 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -2,23 +2,26 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/strlib.h" // StringBuf +#define HERCULES_CORE + #include "showmsg.h" -#include "core.h" //[Ind] - For SERVER_TYPE +#include #include +#include // atexit #include -#include #include -#include // atexit #include "../../3rdparty/libconfig/libconfig.h" +#include "../common/cbasetypes.h" +#include "../common/core.h" //[Ind] - For SERVER_TYPE +#include "../common/strlib.h" // StringBuf + #ifdef WIN32 -#include "../common/winapi.h" +# include "../common/winapi.h" #else // not WIN32 -#include +# include #endif // WIN32 #if defined(DEBUGLOGMAP) diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 49fbc34fb..5b32f39ae 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -5,12 +5,14 @@ #ifndef _COMMON_SHOWMSG_H_ #define _COMMON_SHOWMSG_H_ -#ifndef _COMMON_HPMI_H_ - #include "../../3rdparty/libconfig/libconfig.h" -#endif - #include +#ifdef HERCULES_CORE +# include "../../3rdparty/libconfig/libconfig.h" +#else +# include "../common/HPMi.h" +#endif + // for help with the console colors look here: // http://www.edoceo.com/liberum/?doc=printf-with-color // some code explanation (used here): @@ -90,7 +92,7 @@ enum msg_type { }; extern void ClearScreen(void); -#ifndef _COMMON_HPMI_H_ +#ifdef HERCULES_CORE extern void ShowMessage(const char *, ...); extern void ShowStatus(const char *, ...); extern void ShowSQL(const char *, ...); @@ -101,7 +103,18 @@ extern void ClearScreen(void); extern void ShowError(const char *, ...); extern void ShowFatalError(const char *, ...); extern void ShowConfigWarning(config_setting_t *config, const char *string, ...); +#else + HPExport void (*ShowMessage) (const char *, ...); + HPExport void (*ShowStatus) (const char *, ...); + HPExport void (*ShowSQL) (const char *, ...); + HPExport void (*ShowInfo) (const char *, ...); + HPExport void (*ShowNotice) (const char *, ...); + HPExport void (*ShowWarning) (const char *, ...); + HPExport void (*ShowDebug) (const char *, ...); + HPExport void (*ShowError) (const char *, ...); + HPExport void (*ShowFatalError) (const char *, ...); #endif + extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap); #endif /* _COMMON_SHOWMSG_H_ */ diff --git a/src/common/socket.c b/src/common/socket.c index 35d350e95..3738f2c2a 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -2,48 +2,50 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../config/core.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // SHOW_SERVER_STATS #define _H_SOCKET_C_ - #include "socket.h" +#undef _H_SOCKET_C_ #include #include #include #include +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" + #ifdef WIN32 - #include "../common/winapi.h" +# include "../common/winapi.h" #else - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - - #ifndef SIOCGIFCONF - #include // SIOCGIFCONF on Solaris, maybe others? [Shinomori] - #endif - #ifndef FIONBIO - #include // FIONBIO on Solaris [FlavioJS] - #endif - - #ifdef HAVE_SETRLIMIT - #include - #endif +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# ifndef SIOCGIFCONF +# include // SIOCGIFCONF on Solaris, maybe others? [Shinomori] +# endif +# ifndef FIONBIO +# include // FIONBIO on Solaris [FlavioJS] +# endif + +# ifdef HAVE_SETRLIMIT +# include +# endif #endif /** diff --git a/src/common/socket.h b/src/common/socket.h index 75adde4cf..804b9284f 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -5,19 +5,19 @@ #ifndef _COMMON_SOCKET_H_ #define _COMMON_SOCKET_H_ +#include + #include "../common/cbasetypes.h" #ifdef WIN32 - #include "../common/winapi.h" +# include "../common/winapi.h" typedef long in_addr_t; #else - #include - #include - #include +# include +# include +# include #endif -#include - struct HPluginData; #define FIFOSIZE_SERVERLINK 256*1024 diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 29fbb355b..0058e1d83 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -1,4 +1,3 @@ -#pragma once #ifndef _COMMON_SPINLOCK_H_ #define _COMMON_SPINLOCK_H_ @@ -15,14 +14,14 @@ // // +#include "../common/atomic.h" +#include "../common/cbasetypes.h" +#include "../common/thread.h" + #ifdef WIN32 #include "../common/winapi.h" #endif -#include "../common/cbasetypes.h" -#include "../common/atomic.h" -#include "../common/thread.h" - #ifdef WIN32 typedef struct __declspec( align(64) ) SPIN_LOCK{ diff --git a/src/common/sql.c b/src/common/sql.c index 79ccc8e92..aeb56bff0 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "sql.h" + +#include // strtoul +#include // strlen/strnlen/memcpy/memset + #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "sql.h" #ifdef WIN32 -#include "../common/winapi.h" +# include "../common/winapi.h" // Needed before mysql.h #endif #include -#include // strlen/strnlen/memcpy/memset -#include // strtoul void hercules_mysql_error_handler(unsigned int ecode); diff --git a/src/common/sql.h b/src/common/sql.h index 1fb436853..807e0843c 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -5,10 +5,9 @@ #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ -#include "../common/cbasetypes.h" #include // va_list - +#include "../common/cbasetypes.h" // Return codes #define SQL_ERROR (-1) diff --git a/src/common/strlib.c b/src/common/strlib.c index 361595b07..e2e802915 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#define STRLIB_C +#define HERCULES_CORE + +#define _H_STRLIB_C_ #include "strlib.h" +#undef _H_STRLIB_C_ +#include #include #include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" #define J_MAX_MALLOC_SIZE 65535 diff --git a/src/common/strlib.h b/src/common/strlib.h index 10844d257..decf661a6 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -5,15 +5,16 @@ #ifndef _COMMON_STRLIB_H_ #define _COMMON_STRLIB_H_ -#include "../common/cbasetypes.h" #include +#include "../common/cbasetypes.h" + #ifndef __USE_GNU - #define __USE_GNU // required to enable strnlen on some platforms - #include - #undef __USE_GNU +# define __USE_GNU // required to enable strnlen on some platforms +# include +# undef __USE_GNU #else - #include +# include #endif #ifdef WIN32 @@ -165,7 +166,7 @@ struct sv_interface *sv; void strlib_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ -#ifndef STRLIB_C +#ifndef _H_STRLIB_C_ #define jstrescape(pt) (strlib->jstrescape(pt)) #define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt))) #define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size))) @@ -189,6 +190,6 @@ void strlib_defaults(void); #define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__)) #define strline(str,pos) (strlib->strline((str),(pos))) #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) -#endif /* STRLIB_C */ +#endif /* _H_STRLIB_C_ */ #endif /* _COMMON_STRLIB_H_ */ diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index a56896458..3fdfadb41 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -4,23 +4,39 @@ /// See sysinfo.h for a description of this file -#define _COMMON_SYSINFO_P_ +#define HERCULES_CORE + #include "sysinfo.h" -#undef _COMMON_SYSINFO_P_ + +#include // fopen +#include // atoi #include "../common/cbasetypes.h" #include "../common/core.h" -#include "../common/strlib.h" #include "../common/malloc.h" +#include "../common/strlib.h" #ifdef WIN32 -#include -#include // strlen +# include // strlen +# include #else -#include +# include #endif -#include // fopen -#include // atoi + +/// Private interface fields +struct sysinfo_private { + char *platform; + char *osversion; + char *cpu; + int cpucores; + char *arch; + char *compiler; + char *cflags; + char *vcstype_name; + int vcstype; + char *vcsrevision_src; + char *vcsrevision_scripts; +}; /// sysinfo.c interface source struct sysinfo_interface sysinfo_s; diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h index 17faac26b..c0c4d276a 100644 --- a/src/common/sysinfo.h +++ b/src/common/sysinfo.h @@ -13,23 +13,7 @@ #include "../common/cbasetypes.h" -#ifdef _COMMON_SYSINFO_P_ -struct sysinfo_private { - char *platform; - char *osversion; - char *cpu; - int cpucores; - char *arch; - char *compiler; - char *cflags; - char *vcstype_name; - int vcstype; - char *vcsrevision_src; - char *vcsrevision_scripts; -}; -#else struct sysinfo_private; -#endif /** * sysinfo.c interface diff --git a/src/common/thread.c b/src/common/thread.c index 4d110f2dd..4f73aa9b3 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -6,24 +6,27 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "thread.h" + +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" + #ifdef WIN32 -#include "../common/winapi.h" -#define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) -#define __thread __declspec( thread ) +# include "../common/winapi.h" +# define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) +# define __thread __declspec( thread ) #else -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include #endif -#include "cbasetypes.h" -#include "malloc.h" -#include "showmsg.h" -#include "thread.h" - // When Compiling using MSC (on win32..) we know we have support in any case! #ifdef _MSC_VER #define HAS_TLS diff --git a/src/common/thread.h b/src/common/thread.h index d6b2bbc6e..887c03179 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -1,7 +1,6 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#pragma once #ifndef _COMMON_THREAD_H_ #define _COMMON_THREAD_H_ diff --git a/src/common/timer.c b/src/common/timer.c index 526854582..10f14b0f2 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -2,11 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/utils.h" +#define HERCULES_CORE + #include "timer.h" #include @@ -14,11 +11,17 @@ #include #include +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/utils.h" + #ifdef WIN32 -#include "../common/winapi.h" // GetTickCount() +# include "../common/winapi.h" // GetTickCount() #else -#include -#include // struct timeval, gettimeofday() +# include // struct timeval, gettimeofday() +# include #endif struct timer_interface timer_s; diff --git a/src/common/utils.c b/src/common/utils.c index 47747dd32..84925f707 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2,33 +2,35 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/core.h" -#include "socket.h" +#define HERCULES_CORE + #include "utils.h" -#include +#include // floor() #include +#include #include #include -#include // floor() +#include // cache purposes [Ind/Hercules] + +#include "../common/cbasetypes.h" +#include "../common/core.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" #ifdef WIN32 - #include "../common/winapi.h" - #ifndef F_OK - #define F_OK 0x0 - #endif /* F_OK */ +# include "../common/winapi.h" +# ifndef F_OK +# define F_OK 0x0 +# endif /* F_OK */ #else - #include - #include - #include +# include +# include +# include #endif -#include // cache purposes [Ind/Hercules] - struct HCache_interface HCache_s; /// Dumps given buffer into file pointed to by a handle. diff --git a/src/common/utils.h b/src/common/utils.h index f89546b8a..823651163 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -5,10 +5,11 @@ #ifndef _COMMON_UTILS_H_ #define _COMMON_UTILS_H_ -#include "../common/cbasetypes.h" #include // FILE* #include +#include "../common/cbasetypes.h" + /* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */ #define HCACHE_KEY 'k' diff --git a/src/config/const.h b/src/config/const.h index 6557cb987..f9baa4d7d 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -52,13 +52,6 @@ #define DEFTYPE_MAX CHAR_MAX #endif -/* pointer size fix which fixes several gcc warnings */ -#ifdef __64BIT__ - #define __64BPTRSIZE(y) ((intptr)(y)) -#else - #define __64BPTRSIZE(y) (y) -#endif - /* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ #ifdef RENEWAL #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 ) diff --git a/src/config/renewal.h b/src/config/renewal.h index 36615d63b..36bdd3958 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -74,5 +74,6 @@ #define RENEWAL_ASPD #endif // DISABLE_RENEWAL +#undef DISABLE_RENEWAL #endif // _CONFIG_RENEWAL_H_ diff --git a/src/login/account.h b/src/login/account.h index 234e7c0c1..329ae31c8 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -7,6 +7,7 @@ #include "../common/cbasetypes.h" #include "../common/mmo.h" // ACCOUNT_REG2_NUM +#include "../common/sql.h" // Sql typedef struct AccountDB AccountDB; typedef struct AccountDBIterator AccountDBIterator; diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 1483196ab..2e4ed7ab9 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -2,17 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "account.h" + +#include +#include + +#include "../common/console.h" #include "../common/malloc.h" #include "../common/mmo.h" #include "../common/showmsg.h" +#include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "../common/console.h" -#include "../common/socket.h" -#include "account.h" -#include -#include /// global defines #define ACCOUNT_SQL_DB_VERSION 20110114 @@ -652,7 +657,7 @@ Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; Sql_HerculesUpdateCheck(db->accounts); #ifdef CONSOLE_INPUT - console->setSQL(db->accounts); + console->input->setSQL(db->accounts); #endif return db->accounts; } diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c index 74f45e418..081f28d84 100644 --- a/src/login/ipban_sql.c +++ b/src/login/ipban_sql.c @@ -2,6 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "ipban.h" + +#include +#include + +#include "login.h" +#include "loginlog.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -9,11 +18,6 @@ #include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "login.h" -#include "ipban.h" -#include "loginlog.h" -#include -#include // global sql settings static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/login/login.c b/src/login/login.c index af59fcf38..cb46e0226 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -2,6 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "login.h" + +#include +#include +#include + +#include "account.h" +#include "ipban.h" +#include "loginlog.h" +#include "../common/HPM.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -12,15 +24,6 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/HPM.h" -#include "account.h" -#include "ipban.h" -#include "login.h" -#include "loginlog.h" - -#include -#include -#include struct Login_Config login_config; diff --git a/src/login/login.h b/src/login/login.h index 14c361a15..e77b96a0e 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -5,8 +5,8 @@ #ifndef _LOGIN_LOGIN_H_ #define _LOGIN_LOGIN_H_ -#include "../common/mmo.h" // NAME_LENGTH,SEX_* #include "../common/core.h" // CORE_ST_LAST +#include "../common/mmo.h" // NAME_LENGTH,SEX_* enum E_LOGINSERVER_ST { diff --git a/src/login/loginlog.h b/src/login/loginlog.h index 730fb6e62..a86ad431c 100644 --- a/src/login/loginlog.h +++ b/src/login/loginlog.h @@ -4,6 +4,7 @@ #ifndef _LOGIN_LOGINLOG_H_ #define _LOGIN_LOGINLOG_H_ +#include "../common/cbasetypes.h" unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes); void login_log(uint32 ip, const char* username, int rcode, const char* message); @@ -11,5 +12,4 @@ bool loginlog_init(void); bool loginlog_final(void); bool loginlog_config_read(const char* w1, const char* w2); - #endif /* _LOGIN_LOGINLOG_H_ */ diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 231ac783b..2cbc02c93 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -2,13 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "loginlog.h" + +#include +#include // exit + #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" -#include -#include // exit // global sql settings (in ipban_sql.c) static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 061479d87..cb8c979c6 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -1,25 +1,15 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/HPM.h" -#include "../common/conf.h" -#include "../common/db.h" -#include "../common/des.h" -#include "../common/ers.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/socket.h" -#include "../common/strlib.h" - +#define HERCULES_CORE #include "HPMmap.h" -#include "pc.h" -#include "map.h" -// +#include +#include +#include +#include + #include "atcommand.h" #include "battle.h" #include "battleground.h" @@ -37,12 +27,14 @@ #include "itemdb.h" #include "log.h" #include "mail.h" +#include "map.h" #include "mapreg.h" #include "mercenary.h" #include "mob.h" #include "npc.h" #include "party.h" #include "path.h" +#include "pc.h" #include "pc_groups.h" #include "pet.h" #include "quest.h" @@ -54,11 +46,19 @@ #include "trade.h" #include "unit.h" #include "vending.h" - -#include -#include -#include -#include +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" #include "../common/HPMDataCheck.h" diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 5fd0faf86..df3be40a5 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2,57 +2,60 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/sysinfo.h" +#define HERCULES_CORE +#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_CARTS, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP #include "atcommand.h" + +#include +#include +#include +#include + #include "battle.h" #include "chat.h" -#include "clif.h" #include "chrif.h" +#include "clif.h" #include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" #include "intif.h" #include "itemdb.h" #include "log.h" +#include "mail.h" #include "map.h" -#include "pc.h" -#include "pc_groups.h" // groupid2name -#include "status.h" -#include "skill.h" +#include "mapreg.h" +#include "mercenary.h" #include "mob.h" #include "npc.h" -#include "pet.h" -#include "homunculus.h" -#include "mail.h" -#include "mercenary.h" -#include "elemental.h" #include "party.h" -#include "guild.h" +#include "pc.h" +#include "pc_groups.h" // groupid2name +#include "pet.h" +#include "quest.h" #include "script.h" +#include "searchstore.h" +#include "skill.h" +#include "status.h" #include "storage.h" #include "trade.h" #include "unit.h" -#include "mapreg.h" -#include "quest.h" -#include "searchstore.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/core.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" #include "HPMmap.h" -#include -#include -#include -#include - struct atcommand_interface atcommand_s; static char atcmd_output[CHAT_SIZE_MAX]; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index bc4ab30a3..c8a1863af 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -5,9 +5,9 @@ #ifndef _MAP_ATCOMMAND_H_ #define _MAP_ATCOMMAND_H_ +#include "pc_groups.h" #include "../common/conf.h" #include "../common/db.h" -#include "pc_groups.h" /** * Declarations diff --git a/src/map/battle.c b/src/map/battle.c index 9089b7102..0865ee4ba 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2,41 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/random.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/sysinfo.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "pc.h" -#include "status.h" -#include "skill.h" -#include "homunculus.h" -#include "mercenary.h" -#include "elemental.h" -#include "mob.h" -#include "itemdb.h" -#include "clif.h" -#include "pet.h" -#include "guild.h" -#include "party.h" +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT #include "battle.h" -#include "battleground.h" -#include "chrif.h" +#include #include #include #include -#include + +#include "battleground.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "itemdb.h" +#include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" +#include "skill.h" +#include "status.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" struct Battle_Config battle_config; struct battle_interface battle_s; diff --git a/src/map/battle.h b/src/map/battle.h index 88038ddb4..fbe097c78 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -5,8 +5,8 @@ #ifndef _MAP_BATTLE_H_ #define _MAP_BATTLE_H_ -#include "../common/cbasetypes.h" #include "map.h" //ELE_MAX +#include "../common/cbasetypes.h" /** * Declarations diff --git a/src/map/battleground.c b/src/map/battleground.c index 68539e25d..a7169de0e 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -2,29 +2,32 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/conf.h" +#define HERCULES_CORE #include "battleground.h" + +#include +#include + #include "battle.h" #include "clif.h" +#include "homunculus.h" #include "map.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" // struct mob_data #include "npc.h" -#include "pc.h" #include "party.h" +#include "pc.h" #include "pet.h" -#include "homunculus.h" -#include "mercenary.h" -#include "mapreg.h" - -#include -#include +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct battleground_interface bg_s; diff --git a/src/map/battleground.h b/src/map/battleground.h index 05c4eb060..ec0a86f14 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -5,9 +5,9 @@ #ifndef _MAP_BATTLEGROUND_H_ #define _MAP_BATTLEGROUND_H_ -#include "../common/mmo.h" // struct party #include "clif.h" #include "guild.h" +#include "../common/mmo.h" // struct party /** * Defines diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 2a15e66fc..80264b30d 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -2,18 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" // ARR_FIND -#include "../common/showmsg.h" // ShowWarning -#include "../common/socket.h" // RBUF* -#include "../common/strlib.h" // safestrncpy +#define HERCULES_CORE + +#include "buyingstore.h" // struct s_buyingstore + #include "atcommand.h" // msg_txt #include "battle.h" // battle_config.* -#include "buyingstore.h" // struct s_buyingstore +#include "chrif.h" #include "clif.h" // clif->buyingstore_* #include "log.h" // log_pick_pc, log_zeny #include "pc.h" // struct map_session_data -#include "chrif.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" // ARR_FIND +#include "../common/showmsg.h" // ShowWarning +#include "../common/socket.h" // RBUF* +#include "../common/strlib.h" // safestrncpy struct buyingstore_interface buyingstore_s; diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 5141a1013..914631872 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -5,6 +5,11 @@ #ifndef _MAP_BUYINGSTORE_H_ #define _MAP_BUYINGSTORE_H_ +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_SLOTS + +struct map_session_data; + /** * Declarations **/ diff --git a/src/map/chat.c b/src/map/chat.c index 08fc4a575..c9d3e6d46 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -2,12 +2,13 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "chat.h" + +#include +#include + #include "atcommand.h" // msg_txt() #include "battle.h" // struct battle_config #include "clif.h" @@ -15,10 +16,12 @@ #include "npc.h" // npc_event_do() #include "pc.h" #include "skill.h" // ext_skill_unit_onplace() -#include "chat.h" - -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" struct chat_interface chat_s; diff --git a/src/map/chat.h b/src/map/chat.h index b0c6cd905..cbc2a391e 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -6,9 +6,12 @@ #define _MAP_CHAT_H_ #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE +#include "../common/cbasetypes.h" +#include "../common/db.h" -struct map_session_data; struct chat_data; +struct map_session_data; +struct npc_data; #define MAX_CHAT_USERS 20 diff --git a/src/map/chrif.c b/src/map/chrif.c index 99a1935fd..81e2d387c 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,15 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/ers.h" -#include "../common/HPM.h" +#define HERCULES_CORE + +#include "../config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT +#include "chrif.h" + +#include +#include +#include +#include +#include #include "map.h" #include "battle.h" @@ -25,15 +26,17 @@ #include "instance.h" #include "mercenary.h" #include "elemental.h" -#include "chrif.h" #include "quest.h" #include "storage.h" - -#include -#include -#include -#include -#include +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct chrif_interface chrif_s; diff --git a/src/map/chrif.h b/src/map/chrif.h index 25e955604..84efc66d3 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -5,9 +5,11 @@ #ifndef _MAP_CHRIF_H_ #define _MAP_CHRIF_H_ -#include "../common/cbasetypes.h" #include + #include "map.h" //TBL_stuff +#include "../common/cbasetypes.h" +#include "../common/db.h" struct status_change_entry; diff --git a/src/map/clif.c b/src/map/clif.c index 062a437a2..1da6070e8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2,56 +2,59 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/conf.h" -#include "../common/HPM.h" +#define HERCULES_CORE + +#include "../config/core.h" // ANTI_MAYAP_CHEAT, NEW_CARTS, RENEWAL, SECURE_NPCTIMEOUT +#include "clif.h" + +#include +#include +#include +#include +#include -#include "map.h" -#include "chrif.h" -#include "pc.h" -#include "status.h" -#include "npc.h" -#include "itemdb.h" -#include "chat.h" -#include "trade.h" -#include "storage.h" -#include "script.h" -#include "skill.h" #include "atcommand.h" -#include "intif.h" #include "battle.h" #include "battleground.h" -#include "mob.h" -#include "party.h" -#include "unit.h" +#include "chat.h" +#include "chrif.h" +#include "elemental.h" #include "guild.h" -#include "vending.h" -#include "pet.h" #include "homunculus.h" #include "instance.h" -#include "mercenary.h" -#include "elemental.h" +#include "intif.h" +#include "irc-bot.h" +#include "itemdb.h" #include "log.h" -#include "clif.h" #include "mail.h" +#include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "pet.h" #include "quest.h" -#include "irc-bot.h" - -#include -#include -#include -#include -#include +#include "script.h" +#include "skill.h" +#include "status.h" +#include "storage.h" +#include "trade.h" +#include "unit.h" +#include "vending.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct clif_interface clif_s; diff --git a/src/map/clif.h b/src/map/clif.h index bbe07b718..f54c4afce 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -5,13 +5,13 @@ #ifndef _MAP_CLIF_H_ #define _MAP_CLIF_H_ +#include + +#include "map.h" +#include "packets_struct.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/mmo.h" -#include "../common/socket.h" -#include "../map/map.h" -#include "../map/packets_struct.h" -#include /** * Declarations @@ -20,7 +20,6 @@ struct item; struct item_data; struct storage_data; struct guild_storage; -struct block_list; struct unit_data; struct map_session_data; struct homun_data; diff --git a/src/map/date.c b/src/map/date.c index f38ead858..975a00c50 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -1,10 +1,14 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/cbasetypes.h" +#define HERCULES_CORE + #include "date.h" + #include +#include "../common/cbasetypes.h" + int date_get_year(void) { time_t t; diff --git a/src/map/date.h b/src/map/date.h index 46f0d86c3..b3ed59b2f 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -4,6 +4,8 @@ #ifndef _MAP_DATE_H_ #define _MAP_DATE_H_ +#include "../common/cbasetypes.h" + int date_get_year(void); int date_get_month(void); int date_get_day(void); diff --git a/src/map/duel.c b/src/map/duel.c index af2741f77..a423ef240 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -2,18 +2,20 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" +#define HERCULES_CORE -#include "atcommand.h" // msg_txt -#include "clif.h" #include "duel.h" -#include "pc.h" #include #include #include #include +#include "atcommand.h" // msg_txt +#include "clif.h" +#include "pc.h" +#include "../common/cbasetypes.h" + /*========================================== * Duel organizing functions [LuzZza] *------------------------------------------*/ diff --git a/src/map/duel.h b/src/map/duel.h index 5405d2eee..956aed36d 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -5,6 +5,10 @@ #ifndef _MAP_DUEL_H_ #define _MAP_DUEL_H_ +#include "../common/cbasetypes.h" + +struct map_session_data; + struct duel { int members_count; int invites_count; diff --git a/src/map/elemental.c b/src/map/elemental.c index f335600d6..323df41e1 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -2,42 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/random.h" -#include "../common/strlib.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "elemental.h" + +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" -#include "elemental.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct elemental_interface elemental_s; diff --git a/src/map/elemental.h b/src/map/elemental.h index 6d04a41a5..aa27aadc9 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -7,6 +7,7 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data +#include "../common/mmo.h" // NAME_LENGTH /** * Defines diff --git a/src/map/guild.c b/src/map/guild.c index fa5805c8b..69f67238d 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2,35 +2,38 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" +#include "../config/core.h" // GP_BOUND_ITEMS #include "guild.h" -#include "storage.h" -#include "battle.h" -#include "npc.h" -#include "pc.h" -#include "status.h" -#include "mob.h" -#include "intif.h" -#include "clif.h" -#include "skill.h" -#include "log.h" -#include "instance.h" #include #include #include +#include "battle.h" +#include "clif.h" +#include "instance.h" +#include "intif.h" +#include "log.h" +#include "map.h" +#include "mob.h" +#include "npc.h" +#include "pc.h" +#include "skill.h" +#include "status.h" +#include "storage.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" + struct guild_interface guild_s; /*========================================== diff --git a/src/map/guild.h b/src/map/guild.h index b03bd664d..34e27a56c 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -5,18 +5,10 @@ #ifndef _MAP_GUILD_H_ #define _MAP_GUILD_H_ -//#include "../common/mmo.h" -#include "map.h" // NAME_LENGTH - -/** - * Declarations - **/ -struct guild; -struct guild_member; -struct guild_position; -struct guild_castle; -struct map_session_data; -struct mob_data; +#include "map.h" // EVENT_NAME_LENGTH, TBL_PC +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" /** * Defines diff --git a/src/map/homunculus.c b/src/map/homunculus.c index ff9f7a5b1..b6a83d1cb 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -2,43 +2,45 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "../config/core.h" // DBPATH +#include "homunculus.h" + +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" - -#include "homunculus.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct homunculus_interface homunculus_s; diff --git a/src/map/homunculus.h b/src/map/homunculus.h index e6d59e30e..9eef6af5b 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -5,9 +5,10 @@ #ifndef _MAP_HOMUNCULUS_H_ #define _MAP_HOMUNCULUS_H_ +#include "pc.h" #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "pc.h" +#include "../common/mmo.h" #define MAX_HOM_SKILL_REQUIRE 5 #define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX) diff --git a/src/map/instance.c b/src/map/instance.c index caf622b3d..5789d7dd6 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -2,30 +2,32 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/db.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "clif.h" #include "instance.h" -#include "map.h" -#include "npc.h" -#include "party.h" -#include "pc.h" +#include #include #include #include -#include #include +#include "clif.h" +#include "map.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" + struct instance_interface instance_s; /// Checks whether given instance id is valid or not. diff --git a/src/map/instance.h b/src/map/instance.h index 712a0f141..ae649eda7 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -6,8 +6,11 @@ #define _MAP_INSTANCE_H_ #include "script.h" // struct reg_db +#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct point + struct block_list; +struct map_session_data; #define INSTANCE_NAME_LENGTH (60+1) diff --git a/src/map/intif.c b/src/map/intif.c index 6bd24368a..383150fbc 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1,37 +1,40 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "map.h" +#define HERCULES_CORE + +#include "../config/core.h" // GP_BOUND_ITEMS +#include "intif.h" + +#include +#include +#include +#include +#include +#include + +#include "atcommand.h" #include "battle.h" #include "chrif.h" #include "clif.h" -#include "pc.h" -#include "intif.h" -#include "log.h" -#include "storage.h" -#include "party.h" +#include "elemental.h" #include "guild.h" -#include "pet.h" -#include "atcommand.h" -#include "mercenary.h" #include "homunculus.h" -#include "elemental.h" +#include "log.h" #include "mail.h" +#include "map.h" +#include "mercenary.h" +#include "party.h" +#include "pc.h" +#include "pet.h" #include "quest.h" - -#include -#include -#include -#include -#include -#include - +#include "storage.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct intif_interface intif_s; diff --git a/src/map/intif.h b/src/map/intif.h index 290dcfcdc..b6ee727f3 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -5,19 +5,22 @@ #ifndef _MAP_INTIF_H_ #define _MAP_INTIF_H_ +#include "../common/cbasetypes.h" /** * Declarations **/ -struct party_member; +struct auction_data; struct guild_member; struct guild_position; -struct s_pet; +struct guild_storage; +struct mail_message; +struct map_session_data; +struct party_member; +struct s_elemental; struct s_homunculus; struct s_mercenary; -struct s_elemental; -struct mail_message; -struct auction_data; +struct s_pet; /** * Defines diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index ff28082e7..6f016697f 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -2,23 +2,25 @@ // See the LICENSE file // Base Author: shennetsind @ http://hercules.ws -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/random.h" +#define HERCULES_CORE -#include "map.h" -#include "pc.h" -#include "clif.h" #include "irc-bot.h" #include #include #include +#include "clif.h" +#include "map.h" +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" + //#define IRCBOT_DEBUG struct irc_bot_interface irc_bot_s; diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index c15a5d46a..60f03fca5 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -6,6 +6,8 @@ #ifndef _MAP_IRC_BOT_H_ #define _MAP_IRC_BOT_H_ +#include "../common/cbasetypes.h" + #define IRC_NICK_LENGTH 40 #define IRC_IDENT_LENGTH 40 #define IRC_HOST_LENGTH 63 diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 5eeb90be5..1981f435c 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2,23 +2,28 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" +#define HERCULES_CORE + +#include "../config/core.h" // DBPATH, RENEWAL #include "itemdb.h" -#include "map.h" -#include "battle.h" // struct battle_config -#include "script.h" // item script processing -#include "pc.h" // W_MUSICAL, W_WHIP #include #include #include +#include "battle.h" // struct battle_config +#include "map.h" +#include "mob.h" // MAX_MOB_DB +#include "pc.h" // W_MUSICAL, W_WHIP +#include "script.h" // item script processing +#include "../common/conf.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" + struct itemdb_interface itemdb_s; /** diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 77fb2e2ec..12766b288 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -5,9 +5,12 @@ #ifndef _MAP_ITEMDB_H_ #define _MAP_ITEMDB_H_ +#include "map.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" #include "../common/db.h" #include "../common/mmo.h" // ITEM_NAME_LENGTH -#include "map.h" +#include "../common/sql.h" /** * Declarations diff --git a/src/map/log.c b/src/map/log.c index 19a98f34b..523ef1d65 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -2,22 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/sql.h" // SQL_INNODB -#include "../common/strlib.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "battle.h" -#include "itemdb.h" +#define HERCULES_CORE + #include "log.h" -#include "map.h" -#include "mob.h" -#include "pc.h" #include #include #include +#include "battle.h" +#include "itemdb.h" +#include "map.h" +#include "mob.h" +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/sql.h" // SQL_INNODB +#include "../common/strlib.h" + struct log_interface log_s; /// obtain log type character for item/zeny logs diff --git a/src/map/log.h b/src/map/log.h index b2cb92c20..ecfedeac2 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -11,11 +11,10 @@ /** * Declarations **/ -struct block_list; -struct map_session_data; -struct mob_data; struct item; struct item_data; +struct map_session_data; +struct mob_data; /** * Defines diff --git a/src/map/mail.c b/src/map/mail.c index 371aa892f..7ba7d7470 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -2,19 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#define HERCULES_CORE #include "mail.h" -#include "atcommand.h" -#include "itemdb.h" -#include "clif.h" -#include "pc.h" -#include "log.h" #include #include +#include "atcommand.h" +#include "clif.h" +#include "itemdb.h" +#include "log.h" +#include "pc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" + struct mail_interface mail_s; void mail_clear(struct map_session_data *sd) diff --git a/src/map/mail.h b/src/map/mail.h index 8df537ff3..30b032ef4 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -5,7 +5,11 @@ #ifndef _MAP_MAIL_H_ #define _MAP_MAIL_H_ -#include "../common/mmo.h" +#include "../common/cbasetypes.h" + +struct item; +struct mail_message; +struct map_session_data; struct mail_interface { void (*clear) (struct map_session_data *sd); diff --git a/src/map/map.c b/src/map/map.c index 24a07699f..bccb51d7e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2,62 +2,66 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/core.h" -#include "../common/timer.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/socket.h" // WFIFO*() -#include "../common/showmsg.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/console.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL #include "map.h" -#include "path.h" + +#include +#include +#include +#include +#include + +#include "HPMmap.h" +#include "atcommand.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" #include "chrif.h" #include "clif.h" #include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" #include "intif.h" +#include "irc-bot.h" +#include "itemdb.h" +#include "log.h" +#include "mail.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" #include "npc.h" +#include "npc.h" // npc_setcells(), npc_unsetcells() +#include "party.h" +#include "path.h" #include "pc.h" +#include "pet.h" +#include "quest.h" +#include "script.h" +#include "skill.h" #include "status.h" -#include "mob.h" -#include "npc.h" // npc_setcells(), npc_unsetcells() -#include "chat.h" -#include "itemdb.h" #include "storage.h" -#include "skill.h" #include "trade.h" -#include "party.h" #include "unit.h" -#include "battle.h" -#include "battleground.h" -#include "quest.h" -#include "script.h" -#include "mapreg.h" -#include "guild.h" -#include "pet.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "elemental.h" -#include "atcommand.h" -#include "log.h" -#include "mail.h" -#include "irc-bot.h" -#include "HPMmap.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/console.h" +#include "../common/core.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // WFIFO*() +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" -#include -#include -#include -#include -#include #ifndef _WIN32 #include #endif @@ -5480,8 +5484,8 @@ void map_cp_defaults(void) { map->cpsd->bl.y = MAP_DEFAULT_Y; map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT); - console->addCommand("gm:info",CPCMD_A(gm_position)); - console->addCommand("gm:use",CPCMD_A(gm_use)); + console->input->addCommand("gm:info",CPCMD_A(gm_position)); + console->input->addCommand("gm:use",CPCMD_A(gm_use)); #endif } /* Hercules Plugin Mananger */ @@ -5837,7 +5841,7 @@ int do_init(int argc, char *argv[]) Sql_HerculesUpdateCheck(map->mysql_handle); #ifdef CONSOLE_INPUT - console->setSQL(map->mysql_handle); + console->input->setSQL(map->mysql_handle); #endif ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port); diff --git a/src/map/map.h b/src/map/map.h index 6b2e9d909..8277c7a62 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -5,18 +5,18 @@ #ifndef _MAP_MAP_H_ #define _MAP_MAP_H_ +#include + +#include "atcommand.h" #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" #include "../common/mapindex.h" #include "../common/db.h" -#include "../config/core.h" #include "../common/sql.h" -#include "atcommand.h" -#include +struct mob_data; struct npc_data; -struct item_data; struct hChSysCh; enum E_MAPSERVER_ST { @@ -36,7 +36,6 @@ enum E_MAPSERVER_ST { #define NATURAL_HEAL_INTERVAL 500 #define MIN_FLOORITEM 2 #define MAX_FLOORITEM START_ACCOUNT_NUM -#define MAX_LEVEL 175 #define MAX_IGNORE_LIST 20 // official is 14 #define MAX_VENDING 12 #define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo] diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index 61c25f24e..f026fde00 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -2,6 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "mapreg.h" + +#include +#include + +#include "map.h" // map->mysql_handle +#include "script.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/ers.h" @@ -10,11 +19,6 @@ #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "map.h" // map->mysql_handle -#include "script.h" -#include "mapreg.h" -#include -#include struct mapreg_interface mapreg_s; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 495621014..26bc8c188 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -2,42 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "mercenary.h" + +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" -#include "mercenary.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct mercenary_interface mercenary_s; diff --git a/src/map/mercenary.h b/src/map/mercenary.h index dd9266b2e..b998ac006 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -6,6 +6,7 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" // number of cells that a mercenary can walk to from it's master before being warped #define MAX_MER_DISTANCE 15 diff --git a/src/map/mob.c b/src/map/mob.c index 8f12d4b1b..11ac74621 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2,46 +2,49 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/db.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/random.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/socket.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "clif.h" -#include "intif.h" -#include "pc.h" -#include "pet.h" -#include "status.h" +#include "../config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP #include "mob.h" -#include "homunculus.h" -#include "mercenary.h" + +#include +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" +#include "clif.h" +#include "date.h" #include "elemental.h" #include "guild.h" +#include "homunculus.h" +#include "intif.h" #include "itemdb.h" -#include "skill.h" -#include "battle.h" -#include "party.h" -#include "npc.h" #include "log.h" -#include "script.h" -#include "atcommand.h" -#include "date.h" +#include "map.h" +#include "mercenary.h" +#include "npc.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" #include "quest.h" - -#include -#include -#include -#include -#include +#include "script.h" +#include "skill.h" +#include "status.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct mob_interface mob_s; diff --git a/src/map/mob.h b/src/map/mob.h index 80175b1db..d07f78c77 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -5,12 +5,11 @@ #ifndef _MAP_MOB_H_ #define _MAP_MOB_H_ -#include "../common/mmo.h" // struct item -#include "guild.h" // struct guardian_data #include "map.h" // struct status_data, struct view_data, struct mob_skill -#include "status.h" // struct status data, struct status_change -#include "unit.h" // unit_stop_walking(), unit_stop_attack() -#include "npc.h" +#include "status.h" // struct status_data, struct status_change +#include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // struct item #define MAX_RANDOMMONSTER 5 diff --git a/src/map/npc.c b/src/map/npc.c index 27759d185..289c42d44 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2,41 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/db.h" -#include "../common/socket.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" -#include "log.h" +#include "../config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL +#include "npc.h" + +#include +#include +#include +#include +#include +#include + +#include "battle.h" +#include "chat.h" #include "clif.h" +#include "instance.h" #include "intif.h" -#include "pc.h" -#include "status.h" #include "itemdb.h" -#include "script.h" +#include "log.h" +#include "map.h" #include "mob.h" +#include "pc.h" #include "pet.h" -#include "instance.h" -#include "battle.h" +#include "script.h" #include "skill.h" +#include "status.h" #include "unit.h" -#include "npc.h" -#include "chat.h" - -#include -#include -#include -#include -#include -#include +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct npc_interface npc_s; diff --git a/src/map/npc.h b/src/map/npc.h index d11db0164..a277d4968 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -8,10 +8,10 @@ #include "map.h" // struct block_list #include "status.h" // struct status_change #include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/db.h" struct HPluginData; -struct block_list; -struct npc_data; struct view_data; enum npc_parse_options { diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 9d5639efc..f245ffea5 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -2,25 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifdef PCRE_SUPPORT +#define HERCULES_CORE -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" +#ifdef PCRE_SUPPORT -#include "mob.h" // struct mob_data #include "npc.h" // struct npc_data -#include "pc.h" // struct map_session_data -#include "script.h" // set_var() - -#include "../../3rdparty/pcre/include/pcre.h" +#include #include #include #include -#include + +#include "../../3rdparty/pcre/include/pcre.h" + +#include "mob.h" // struct mob_data +#include "pc.h" // struct map_session_data +#include "script.h" // set_var() +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" /** * interface sources diff --git a/src/map/party.c b/src/map/party.c index cf5e7bbe3..7c49e241c 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,34 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/socket.h" // last_tick -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/strlib.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP #include "party.h" + +#include +#include +#include + #include "atcommand.h" //msg_txt() -#include "pc.h" -#include "map.h" -#include "instance.h" #include "battle.h" -#include "intif.h" #include "clif.h" +#include "instance.h" +#include "intif.h" +#include "itemdb.h" #include "log.h" +#include "map.h" +#include "mob.h" // struct mob_data +#include "pc.h" #include "skill.h" #include "status.h" -#include "itemdb.h" - -#include -#include -#include - +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // last_tick +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct party_interface party_s; diff --git a/src/map/party.h b/src/map/party.h index ed8289af6..3bad22b13 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -5,11 +5,12 @@ #ifndef _MAP_PARTY_H_ #define _MAP_PARTY_H_ -#include "../common/mmo.h" // struct party -#include "../config/core.h" #include -#include "map.h" +#include "map.h" // TBL_PC +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // struct party #define PARTY_BOOKING_JOBS 6 #define PARTY_BOOKING_RESULTS 10 diff --git a/src/map/path.c b/src/map/path.c index ae9fc389d..d02e9ee4a 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -2,20 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" +#define HERCULES_CORE +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA #include "path.h" -#include "map.h" #include #include #include +#include "map.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" + #define SET_OPEN 0 #define SET_CLOSED 1 diff --git a/src/map/path.h b/src/map/path.h index 0b67a0120..b48ff05fb 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -6,6 +6,7 @@ #define _MAP_PATH_H_ #include "map.h" // enum cell_chk +#include "../common/cbasetypes.h" #define MOVE_COST 10 #define MOVE_DIAGONAL_COST 14 diff --git a/src/map/pc.c b/src/map/pc.c index c8fb14e55..45adfe22a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2,21 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/core.h" // get_svn_revision() -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // session[] -#include "../common/strlib.h" // safestrncpy() -#include "../common/timer.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/mmo.h" //NAME_LENGTH -#include "../common/sysinfo.h" +#define HERCULES_CORE +#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_CARTS, MAX_SPIRITBALL, NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT #include "pc.h" + +#include +#include +#include +#include + #include "atcommand.h" // get_atcommand_level() #include "battle.h" // battle_config #include "battleground.h" @@ -25,32 +20,40 @@ #include "clif.h" #include "date.h" // is_day_of_*() #include "duel.h" +#include "elemental.h" +#include "guild.h" // guild->search(), guild_request_info() +#include "homunculus.h" +#include "instance.h" #include "intif.h" #include "itemdb.h" #include "log.h" #include "mail.h" #include "map.h" -#include "path.h" -#include "homunculus.h" -#include "instance.h" #include "mercenary.h" -#include "elemental.h" +#include "mob.h" // struct mob_data #include "npc.h" // fake_nd -#include "pet.h" // pet_unlocktarget() #include "party.h" // party->search() -#include "guild.h" // guild->search(), guild_request_info() +#include "path.h" +#include "pc_groups.h" +#include "pet.h" // pet_unlocktarget() +#include "quest.h" #include "script.h" // script_config #include "skill.h" #include "status.h" // struct status_data #include "storage.h" -#include "pc_groups.h" -#include "quest.h" - -#include -#include -#include -#include - +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/core.h" // get_svn_revision() +#include "../common/malloc.h" +#include "../common/mmo.h" //NAME_LENGTH +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // session[] +#include "../common/strlib.h" // safestrncpy() +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" struct pc_interface pc_s; @@ -10651,9 +10654,7 @@ void pc_defaults(void) { memset(pc->exp_table, 0, sizeof(pc->exp_table) + sizeof(pc->max_level) + sizeof(pc->statp) -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) + sizeof(pc->level_penalty) -#endif + sizeof(pc->skill_tree) + sizeof(pc->smith_fame_list) + sizeof(pc->chemist_fame_list) diff --git a/src/map/pc.h b/src/map/pc.h index 70df9ca56..c4026a48d 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -5,23 +5,23 @@ #ifndef _MAP_PC_H_ #define _MAP_PC_H_ -#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus -#include "../common/ers.h" -#include "../common/timer.h" // INVALID_TIMER -#include "atcommand.h" // AtCommandType +#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT + #include "battle.h" // battle_config -#include "battleground.h" +#include "battleground.h" // enum bg_queue_types #include "buyingstore.h" // struct s_buyingstore -#include "itemdb.h" -#include "log.h" -#include "map.h" // RC_MAX -#include "mob.h" -#include "pc_groups.h" -#include "script.h" // struct script_reg, struct script_regstr +#include "itemdb.h" // MAX_ITEMDELAYS +#include "log.h" // struct e_log_pick_type +#include "map.h" // RC_MAX, ELE_MAX +#include "pc_groups.h" // GroupSettings +#include "script.h" // struct reg_db #include "searchstore.h" // struct s_search_store_info -#include "status.h" // OPTION_*, struct weapon_atk -#include "unit.h" // unit_stop_attack(), unit_stop_walking() +#include "status.h" // enum sc_type, OPTION_* +#include "unit.h" // struct unit_data, struct view_data #include "vending.h" // struct s_vending +#include "../common/cbasetypes.h" +#include "../common/ers.h" // struct eri +#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus /** * Defines @@ -742,9 +742,8 @@ struct pc_interface { unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; unsigned int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; -#endif + unsigned int equip_pos[EQI_MAX]; /* */ struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE]; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index 906462c7e..a917ef409 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,6 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "pc_groups.h" + +#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() +#include "clif.h" // clif->GM_kick() +#include "map.h" // mapiterator +#include "pc.h" // pc->set_group() #include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/db.h" @@ -10,12 +18,6 @@ #include "../common/showmsg.h" #include "../common/strlib.h" // strcmp -#include "pc_groups.h" -#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() -#include "clif.h" // clif->GM_kick() -#include "map.h" // mapiterator -#include "pc.h" // pc->set_group() - static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd() struct pc_groups_interface pcg_s; diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 5c03f999f..7c8cdd82a 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -5,6 +5,10 @@ #ifndef _MAP_PC_GROUPS_H_ #define _MAP_PC_GROUPS_H_ +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" + /// PC permissions enum e_pc_permission { PC_PERM_NONE = 0, // #0 diff --git a/src/map/pet.c b/src/map/pet.c index 993497434..aa2be4473 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -2,37 +2,39 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/db.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" +#define HERCULES_CORE -#include "pc.h" -#include "status.h" -#include "map.h" -#include "path.h" -#include "intif.h" -#include "clif.h" -#include "chrif.h" #include "pet.h" -#include "itemdb.h" + +#include +#include +#include + +#include "atcommand.h" // msg_txt() #include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" #include "mob.h" #include "npc.h" +#include "path.h" +#include "pc.h" #include "script.h" #include "skill.h" +#include "status.h" #include "unit.h" -#include "atcommand.h" // msg_txt() -#include "log.h" - -#include -#include -#include +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct pet_interface pet_s; diff --git a/src/map/pet.h b/src/map/pet.h index 4ec30b3fb..8dde0fac2 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -5,8 +5,14 @@ #ifndef _MAP_PET_H_ #define _MAP_PET_H_ -#define MAX_PET_DB 300 -#define MAX_PETLOOT_SIZE 30 +#include "map.h" // struct block_list +#include "status.h" // enum sc_type +#include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // NAME_LENGTH, struct s_pet + +#define MAX_PET_DB 300 +#define MAX_PETLOOT_SIZE 30 struct s_pet_db { short class_; diff --git a/src/map/quest.c b/src/map/quest.c index bde276f9d..b76d6bc82 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -2,36 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "map.h" -#include "pc.h" -#include "npc.h" -#include "itemdb.h" -#include "script.h" -#include "intif.h" -#include "battle.h" -#include "mob.h" -#include "party.h" -#include "unit.h" -#include "log.h" -#include "clif.h" #include "quest.h" -#include "chrif.h" +#include #include #include #include -#include #include +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "script.h" +#include "unit.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct quest_interface quest_s; diff --git a/src/map/quest.h b/src/map/quest.h index e01e35619..87894d639 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -5,6 +5,10 @@ #ifndef _MAP_QUEST_H_ #define _MAP_QUEST_H_ +#include "map.h" // TBL_PC +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES + #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 struct quest_db { diff --git a/src/map/script.c b/src/map/script.c index aecdf9b28..e4cf7f227 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2,6 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL +#include "script.h" + +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "mail.h" +#include "map.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" +#include "pet.h" +#include "quest.h" +#include "skill.h" +#include "status.h" +#include "status.h" +#include "storage.h" +#include "unit.h" #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/md5calc.h" @@ -10,47 +50,10 @@ #include "../common/showmsg.h" #include "../common/socket.h" // usage: getcharip #include "../common/strlib.h" +#include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/sysinfo.h" - -#include "map.h" -#include "path.h" -#include "clif.h" -#include "chrif.h" -#include "itemdb.h" -#include "pc.h" -#include "status.h" -#include "storage.h" -#include "mob.h" -#include "npc.h" -#include "pet.h" -#include "mapreg.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "intif.h" -#include "skill.h" -#include "status.h" -#include "chat.h" -#include "battle.h" -#include "battleground.h" -#include "party.h" -#include "guild.h" -#include "atcommand.h" -#include "log.h" -#include "unit.h" -#include "pet.h" -#include "mail.h" -#include "script.h" -#include "quest.h" -#include "elemental.h" -#include "../config/core.h" -#include -#include -#include -#include #ifndef WIN32 #include #endif diff --git a/src/map/script.h b/src/map/script.h index 90b18d87f..899c745da 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -5,17 +5,19 @@ #ifndef _MAP_SCRIPT_H_ #define _MAP_SCRIPT_H_ -#include "../common/strlib.h" //StringBuf -#include "../common/cbasetypes.h" -#include "map.h" //EVENT_NAME_LENGTH - #include #include +#include "map.h" //EVENT_NAME_LENGTH +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // struct item +#include "../common/sql.h" // Sql +#include "../common/strlib.h" //StringBuf + /** * Declarations **/ -struct map_session_data; struct eri; /** diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 0144aea93..72b28aacd 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -2,14 +2,17 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "searchstore.h" // struct s_search_store_info + +#include "battle.h" // battle_config.* +#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* +#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/malloc.h" // aMalloc, aRealloc, aFree #include "../common/showmsg.h" // ShowError, ShowWarning #include "../common/strlib.h" // safestrncpy -#include "battle.h" // battle_config.* -#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* -#include "pc.h" // struct map_session_data -#include "searchstore.h" // struct s_search_store_info struct searchstore_interface searchstore_s; diff --git a/src/map/searchstore.h b/src/map/searchstore.h index 827e39053..c9b93ba54 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -5,6 +5,12 @@ #ifndef _MAP_SEARCHSTORE_H_ #define _MAP_SEARCHSTORE_H_ +#include + +#include "map.h" // MESSAGE_SIZE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_SLOTS + /** * Defines **/ diff --git a/src/map/skill.c b/src/map/skill.c index c8388770a..b2e94ec79 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2,46 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "clif.h" -#include "pc.h" -#include "status.h" +#include "../config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION() #include "skill.h" -#include "pet.h" + +#include +#include +#include +#include +#include + +#include "battle.h" +#include "battleground.h" +#include "chrif.h" +#include "clif.h" +#include "date.h" +#include "elemental.h" +#include "guild.h" #include "homunculus.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" #include "mercenary.h" -#include "elemental.h" #include "mob.h" #include "npc.h" -#include "battle.h" -#include "battleground.h" #include "party.h" -#include "itemdb.h" +#include "path.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "intif.h" -#include "log.h" -#include "chrif.h" -#include "guild.h" -#include "date.h" +#include "status.h" #include "unit.h" - -#include -#include -#include -#include -#include - +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" #define SKILLUNITTIMER_INTERVAL 100 diff --git a/src/map/skill.h b/src/map/skill.h index dda310bd4..b6dbb1fcb 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -5,19 +5,23 @@ #ifndef _MAP_SKILL_H_ #define _MAP_SKILL_H_ -#include "../common/mmo.h" // MAX_SKILL, struct square -#include "../common/db.h" +#include "../config/core.h" // RENEWAL_CAST + #include "map.h" // struct block_list +#include "status.h" // enum sc_type +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // MAX_SKILL, struct square /** * Declarations **/ -struct map_session_data; struct homun_data; +struct map_session_data; +struct mercenary_data; struct skill_unit; -struct skill_unit_group; -struct status_change_entry; struct square; +struct status_change_entry; /** * Defines diff --git a/src/map/status.c b/src/map/status.c index 4c2bc6d22..eb06138da 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2,43 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/strlib.h" +#define HERCULES_CORE + +#include "../config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP +#include "status.h" +#include +#include +#include +#include +#include +#include + +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "itemdb.h" #include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" #include "path.h" #include "pc.h" #include "pet.h" -#include "npc.h" -#include "mob.h" -#include "clif.h" -#include "guild.h" +#include "script.h" #include "skill.h" -#include "itemdb.h" -#include "battle.h" -#include "chrif.h" #include "skill.h" -#include "status.h" -#include "script.h" #include "unit.h" -#include "homunculus.h" -#include "mercenary.h" -#include "elemental.h" #include "vending.h" - -#include -#include -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct status_interface status_s; diff --git a/src/map/status.h b/src/map/status.h index e47c2b365..baa586297 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -5,14 +5,18 @@ #ifndef _MAP_STATUS_H_ #define _MAP_STATUS_H_ +#include "../config/core.h" // defType, NEW_CARTS, RENEWAL, RENEWAL_ASPD + +#include "../common/cbasetypes.h" #include "../common/mmo.h" struct block_list; -struct mob_data; -struct pet_data; +struct elemental_data; struct homun_data; struct mercenary_data; -struct status_change; +struct mob_data; +struct npc_data; +struct pet_data; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] @@ -1878,11 +1882,7 @@ struct status_interface { int hp_coefficient2[CLASS_COUNT]; int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1]; int sp_coefficient[CLASS_COUNT]; -#ifdef RENEWAL_ASPD - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; -#else - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89] -#endif + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD sc_type Skill2SCTable[MAX_SKILL]; // skill -> status int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) unsigned int ChangeFlagTable[SC_MAX]; // status -> flags diff --git a/src/map/storage.c b/src/map/storage.c index e65ed7b80..2db5fff3d 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -2,28 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" +#define HERCULES_CORE -#include "map.h" // struct map_session_data #include "storage.h" -#include "chrif.h" -#include "itemdb.h" -#include "clif.h" -#include "intif.h" -#include "pc.h" -#include "guild.h" -#include "battle.h" -#include "atcommand.h" -#include "log.h" #include #include #include +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "guild.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" // struct map_session_data +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" + struct storage_interface storage_s; struct guild_storage_interface gstorage_s; diff --git a/src/map/storage.h b/src/map/storage.h index 8f9f904f6..5edb68cfc 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -5,11 +5,12 @@ #ifndef _MAP_STORAGE_H_ #define _MAP_STORAGE_H_ -struct storage_data; +#include "../common/cbasetypes.h" +#include "../common/db.h" + struct guild_storage; struct item; struct map_session_data; -struct DBMap; struct storage_interface { /* */ diff --git a/src/map/trade.c b/src/map/trade.c index 44b669ebd..83426c407 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -2,25 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/socket.h" +#define HERCULES_CORE #include "trade.h" + +#include +#include + +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" #include "clif.h" +#include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" +#include "npc.h" #include "path.h" #include "pc.h" -#include "npc.h" -#include "battle.h" -#include "chrif.h" #include "storage.h" -#include "intif.h" -#include "atcommand.h" -#include "log.h" - -#include -#include +#include "../common/nullpo.h" +#include "../common/socket.h" struct trade_interface trade_s; diff --git a/src/map/unit.c b/src/map/unit.c index 151d4bad5..0ad770e80 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2,45 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/showmsg.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // RENEWAL_CAST +#include "unit.h" + +#include +#include +#include + +#include "battle.h" +#include "battleground.h" +#include "chat.h" +#include "chrif.h" +#include "clif.h" +#include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" #include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" #include "path.h" #include "pc.h" -#include "mob.h" #include "pet.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "elemental.h" +#include "script.h" #include "skill.h" -#include "clif.h" -#include "duel.h" -#include "npc.h" -#include "guild.h" #include "status.h" -#include "unit.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" +#include "storage.h" #include "trade.h" #include "vending.h" -#include "party.h" -#include "intif.h" -#include "chrif.h" -#include "script.h" -#include "storage.h" - -#include -#include -#include - +#include "../common/HPM.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" const short dirx[8]={0,-1,-1,-1,0,1,1,1}; const short diry[8]={1,1,0,-1,-1,-1,0,1}; diff --git a/src/map/unit.h b/src/map/unit.h index 33fa4e052..9e05647b1 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -5,15 +5,13 @@ #ifndef _MAP_UNIT_H_ #define _MAP_UNIT_H_ -//#include "map.h" -struct block_list; -struct unit_data; -struct map_session_data; - #include "clif.h" // clr_type -#include "map.h" // struct block_list #include "path.h" // struct walkpath_data -#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "../common/cbasetypes.h" + +struct map_session_data; +struct block_list; struct unit_data { struct block_list *bl; diff --git a/src/map/vending.c b/src/map/vending.c index 9462975b3..c8ac814db 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -2,24 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE + +#include "vending.h" + +#include +#include + +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" #include "clif.h" #include "itemdb.h" -#include "atcommand.h" +#include "log.h" #include "map.h" +#include "npc.h" #include "path.h" -#include "chrif.h" -#include "vending.h" #include "pc.h" -#include "npc.h" #include "skill.h" -#include "battle.h" -#include "log.h" - -#include -#include +#include "../common/nullpo.h" +#include "../common/strlib.h" +#include "../common/utils.h" struct vending_interface vending_s; diff --git a/src/map/vending.h b/src/map/vending.h index a212f8385..a70726374 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -7,6 +7,7 @@ #include "../common/cbasetypes.h" #include "../common/db.h" + struct map_session_data; struct s_search_store_search; diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 85d5fb548..96d51aec6 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -1,6 +1,14 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "../config/core.h" // RENEWAL + +#include +#include +#include + #include "../common/cbasetypes.h" #include "../common/grfio.h" #include "../common/malloc.h" @@ -8,12 +16,6 @@ #include "../common/showmsg.h" #include "../common/utils.h" -#include "../config/renewal.h" - -#include -#include -#include - #ifndef _WIN32 #include #endif -- cgit v1.2.3-70-g09d2 From 94657284973f4037596bae468ebfbee5c217e02b Mon Sep 17 00:00:00 2001 From: panikon Date: Sat, 10 May 2014 06:08:56 -0300 Subject: Revert "Fixed order of includes in all source files" This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/ --- src/char/char.c | 44 +++++----- src/char/char.h | 1 + src/char/int_auction.c | 25 +++--- src/char/int_elemental.c | 22 ++--- src/char/int_elemental.h | 2 +- src/char/int_guild.c | 24 +++-- src/char/int_guild.h | 3 + src/char/int_homun.c | 21 ++--- src/char/int_homun.h | 2 - src/char/int_mail.c | 20 ++--- src/char/int_mail.h | 3 - src/char/int_mercenary.c | 22 ++--- src/char/int_mercenary.h | 4 +- src/char/int_party.c | 25 +++--- src/char/int_party.h | 2 + src/char/int_pet.c | 22 ++--- src/char/int_quest.c | 22 +++-- src/char/int_storage.c | 22 ++--- src/char/inter.c | 43 +++++---- src/char/inter.h | 5 +- src/char/pincode.c | 11 +-- src/common/HPM.c | 31 +++---- src/common/HPM.h | 6 +- src/common/HPMi.h | 16 +++- src/common/cbasetypes.h | 6 -- src/common/conf.c | 3 - src/common/conf.h | 1 - src/common/console.c | 223 +++++++++++++++++++++++------------------------ src/common/console.h | 21 ++--- src/common/core.c | 38 ++++---- src/common/core.h | 3 +- src/common/db.c | 10 +-- src/common/db.h | 3 +- src/common/des.c | 7 +- src/common/ers.c | 8 +- src/common/grfio.c | 17 ++-- src/common/malloc.c | 11 +-- src/common/mapindex.c | 15 ++-- src/common/md5calc.c | 8 +- src/common/mmo.h | 6 +- src/common/mutex.c | 5 +- src/common/mutex.h | 1 - src/common/nullpo.c | 6 +- src/common/random.c | 18 ++-- src/common/showmsg.c | 17 ++-- src/common/showmsg.h | 23 ++--- src/common/socket.c | 64 +++++++------- src/common/socket.h | 12 +-- src/common/spinlock.h | 9 +- src/common/sql.c | 12 +-- src/common/sql.h | 3 +- src/common/strlib.c | 13 ++- src/common/strlib.h | 15 ++-- src/common/sysinfo.c | 32 ++----- src/common/sysinfo.h | 16 ++++ src/common/thread.c | 31 +++---- src/common/thread.h | 1 + src/common/timer.c | 19 ++-- src/common/utils.c | 36 ++++---- src/common/utils.h | 3 +- src/config/const.h | 7 ++ src/config/renewal.h | 1 - src/login/account.h | 1 - src/login/account_sql.c | 17 ++-- src/login/ipban_sql.c | 14 ++- src/login/login.c | 21 ++--- src/login/login.h | 2 +- src/login/loginlog.h | 2 +- src/login/loginlog_sql.c | 9 +- src/map/HPMmap.c | 42 ++++----- src/map/atcommand.c | 67 +++++++------- src/map/atcommand.h | 2 +- src/map/battle.c | 61 ++++++------- src/map/battle.h | 2 +- src/map/battleground.c | 33 ++++--- src/map/battleground.h | 2 +- src/map/buyingstore.c | 17 ++-- src/map/buyingstore.h | 5 -- src/map/chat.c | 23 +++-- src/map/chat.h | 5 +- src/map/chrif.c | 35 ++++---- src/map/chrif.h | 4 +- src/map/clif.c | 83 +++++++++--------- src/map/clif.h | 9 +- src/map/date.c | 6 +- src/map/date.h | 2 - src/map/duel.c | 10 +-- src/map/duel.h | 4 - src/map/elemental.c | 54 ++++++------ src/map/elemental.h | 1 - src/map/guild.c | 47 +++++----- src/map/guild.h | 16 +++- src/map/homunculus.c | 56 ++++++------ src/map/homunculus.h | 3 +- src/map/instance.c | 34 ++++---- src/map/instance.h | 3 - src/map/intif.c | 51 +++++------ src/map/intif.h | 13 ++- src/map/irc-bot.c | 22 +++-- src/map/irc-bot.h | 2 - src/map/itemdb.c | 27 +++--- src/map/itemdb.h | 5 +- src/map/log.c | 23 +++-- src/map/log.h | 5 +- src/map/mail.c | 16 ++-- src/map/mail.h | 6 +- src/map/map.c | 96 ++++++++++---------- src/map/map.h | 9 +- src/map/mapreg_sql.c | 14 ++- src/map/mercenary.c | 54 ++++++------ src/map/mercenary.h | 1 - src/map/mob.c | 69 +++++++-------- src/map/mob.h | 9 +- src/map/npc.c | 57 ++++++------ src/map/npc.h | 4 +- src/map/npc_chat.c | 26 +++--- src/map/party.c | 43 +++++---- src/map/party.h | 7 +- src/map/path.c | 17 ++-- src/map/path.h | 1 - src/map/pc.c | 59 ++++++------- src/map/pc.h | 29 +++--- src/map/pc_groups.c | 14 ++- src/map/pc_groups.h | 4 - src/map/pet.c | 48 +++++----- src/map/pet.h | 10 +-- src/map/quest.c | 45 +++++----- src/map/quest.h | 4 - src/map/script.c | 79 ++++++++--------- src/map/script.h | 12 ++- src/map/searchstore.c | 11 +-- src/map/searchstore.h | 6 -- src/map/skill.c | 64 +++++++------- src/map/skill.h | 14 ++- src/map/status.c | 59 ++++++------- src/map/status.h | 16 ++-- src/map/storage.c | 32 ++++--- src/map/storage.h | 5 +- src/map/trade.c | 24 +++-- src/map/unit.c | 63 +++++++------ src/map/unit.h | 12 +-- src/map/vending.c | 27 +++--- src/map/vending.h | 1 - src/tool/mapcache.c | 14 ++- 144 files changed, 1367 insertions(+), 1676 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index 6c0902644..77e393c0d 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2,30 +2,7 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT -#include "char.h" - -#include -#include -#include -#include -#include -#include -#include - -#include "int_elemental.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_party.h" -#include "int_storage.h" -#include "inter.h" -#include "pincode.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/console.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -36,6 +13,25 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/console.h" +#include "../common/HPM.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_elemental.h" +#include "int_party.h" +#include "int_storage.h" +#include "char.h" +#include "inter.h" +#include "pincode.h" + +#include +#include +#include +#include +#include +#include +#include // private declarations #define CHAR_CONF_NAME "conf/char-server.conf" @@ -5501,7 +5497,7 @@ int do_init(int argc, char **argv) { Sql_HerculesUpdateCheck(sql_handle); #ifdef CONSOLE_INPUT - console->input->setSQL(sql_handle); + console->setSQL(sql_handle); #endif ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); diff --git a/src/char/char.h b/src/char/char.h index 09a78f6b9..2928929de 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -5,6 +5,7 @@ #ifndef _COMMON_CHAR_H_ #define _COMMON_CHAR_H_ +#include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/db.h" diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 886b5be26..924930867 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -2,25 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_auction.h" - -#include -#include -#include - -#include "char.h" -#include "int_mail.h" -#include "inter.h" -#include "../common/db.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/db.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_mail.h" +#include "int_auction.h" + +#include +#include +#include static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data* diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c index 3a36e75a2..ed0c2a9ed 100644 --- a/src/char/int_elemental.c +++ b/src/char/int_elemental.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_elemental.h" - -#include -#include -#include - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include +#include +#include bool mapif_elemental_save(struct s_elemental* ele) { bool flag = true; diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index c869e6fc2..c90891fc4 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -4,7 +4,7 @@ #ifndef _CHAR_INT_ELEMENTAL_H_ #define _CHAR_INT_ELEMENTAL_H_ -#include "../common/cbasetypes.h" +struct s_elemental; void inter_elemental_sql_init(void); void inter_elemental_sql_final(void); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index ffbe48e10..895cbbb94 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -2,25 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH -#include "int_guild.h" - -#include -#include -#include - -#include "char.h" -#include "inter.h" #include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/malloc.h" #include "../common/socket.h" +#include "../common/db.h" +#include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_guild.h" + +#include +#include +#include #define GS_MEMBER_UNMODIFIED 0x00 #define GS_MEMBER_MODIFIED 0x01 diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 5e657ff06..4eb7d310b 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -20,6 +20,9 @@ enum { GS_REMOVE = 0x8000, }; +struct guild; +struct guild_castle; + int inter_guild_parse_frommap(int fd); int inter_guild_sql_init(void); void inter_guild_sql_final(void); diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 795a6b927..143277f05 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -2,23 +2,20 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_homun.h" +#include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" #include #include #include -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" -#include "../common/utils.h" int inter_homunculus_sql_init(void) { diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 9477f4f03..561dc848f 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -4,8 +4,6 @@ #ifndef _CHAR_INT_HOMUN_H_ #define _CHAR_INT_HOMUN_H_ -#include "../common/cbasetypes.h" - struct s_homunculus; int inter_homunculus_sql_init(void); diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 86a36d59f..826771676 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_mail.h" - -#include -#include -#include - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" + +#include +#include +#include static int mail_fromsql(int char_id, struct mail_data* md) { diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 824ba48a3..7c06cdc1f 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -4,9 +4,6 @@ #ifndef _CHAR_INT_MAIL_H_ #define _CHAR_INT_MAIL_H_ -struct item; -struct mail_message; - int inter_mail_parse_frommap(int fd); void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c index 1dffb656c..aecb3844a 100644 --- a/src/char/int_mercenary.c +++ b/src/char/int_mercenary.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_mercenary.h" - -#include -#include -#include - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include +#include +#include bool mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index 195a83b34..b614b8cf7 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -4,9 +4,7 @@ #ifndef _CHAR_INT_MERCENARY_H_ #define _CHAR_INT_MERCENARY_H_ -#include "../common/cbasetypes.h" - -struct mmo_charstatus; +struct s_mercenary; int inter_mercenary_sql_init(void); void inter_mercenary_sql_final(void); diff --git a/src/char/int_party.c b/src/char/int_party.c index 3e4a743d6..7c328c452 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -2,25 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_party.h" - -#include -#include -#include - -#include "char.h" -#include "inter.h" #include "../common/cbasetypes.h" +#include "../common/mmo.h" #include "../common/db.h" #include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/strlib.h" #include "../common/socket.h" +#include "../common/showmsg.h" +#include "../common/mapindex.h" #include "../common/sql.h" -#include "../common/strlib.h" +#include "char.h" +#include "inter.h" +#include "int_party.h" + +#include +#include +#include struct party_data { struct party party; diff --git a/src/char/int_party.h b/src/char/int_party.h index 098c1e9a9..84f00635a 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -14,6 +14,8 @@ enum { PS_BREAK = 0x20, //Specify that this party must be deleted. }; +struct party; + int inter_party_parse_frommap(int fd); int inter_party_sql_init(void); void inter_party_sql_final(void); diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 29c40eff9..25f00e6f0 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_pet.h" - -#include -#include -#include - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/malloc.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/showmsg.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include +#include +#include struct s_pet *pet_pt; diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 61b43c57d..061dd89d9 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -2,25 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_quest.h" - -#include -#include -#include - -#include "char.h" -#include "inter.h" +#include "../common/mmo.h" #include "../common/db.h" #include "../common/malloc.h" -#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_quest.h" + +#include +#include +#include + /** * Loads the entire questlog for a character. * diff --git a/src/char/int_storage.c b/src/char/int_storage.c index bf7b76da0..966e61bb3 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "int_storage.h" - -#include -#include -#include - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" // StringBuf +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include +#include +#include + #define STORAGE_MEMINC 16 diff --git a/src/char/inter.c b/src/char/inter.c index 972407ef3..515ca0ec4 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -2,34 +2,33 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/mmo.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "char.h" #include "inter.h" +#include "int_party.h" +#include "int_guild.h" +#include "int_storage.h" +#include "int_pet.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_mail.h" +#include "int_auction.h" +#include "int_quest.h" +#include "int_elemental.h" -#include #include -#include #include +#include +#include + #include // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool] -#include "char.h" -#include "int_auction.h" -#include "int_elemental.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mail.h" -#include "int_mercenary.h" -#include "int_party.h" -#include "int_pet.h" -#include "int_quest.h" -#include "int_storage.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" #define WISDATA_TTL (60*1000) //Wis data Time To Live (60 seconds) #define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis diff --git a/src/char/inter.h b/src/char/inter.h index 5e655237e..25b0c2a96 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -5,10 +5,9 @@ #ifndef _CHAR_INTER_H_ #define _CHAR_INTER_H_ -#include "char.h" -#include "../common/sql.h" - struct accreg; +#include "../common/sql.h" +#include "char.h" int inter_init_sql(const char *file); void inter_final(void); diff --git a/src/char/pincode.c b/src/char/pincode.c index 59182f12d..d51953448 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pincode.h" - -#include - -#include "char.h" #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/strlib.h" +#include "char.h" +#include "pincode.h" + +#include int enabled = PINCODE_OK; int changetime = 0; diff --git a/src/common/HPM.c b/src/common/HPM.c index 00b92dc60..9ffce87de 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -1,31 +1,26 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT -#include "HPM.h" - -#include -#include -#include - #include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/console.h" +#include "../common/mmo.h" #include "../common/core.h" #include "../common/malloc.h" -#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" -#include "../common/sysinfo.h" #include "../common/timer.h" +#include "../common/conf.h" #include "../common/utils.h" +#include "../common/console.h" +#include "../common/strlib.h" +#include "../common/sql.h" +#include "../common/sysinfo.h" +#include "HPM.h" +#include +#include +#include #ifndef WIN32 -# include +#include #endif struct malloc_interface iMalloc_HPM; @@ -691,7 +686,7 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po void hplugins_share_defaults(void) { /* console */ #ifdef CONSOLE_INPUT - HPM->share(console->input->addCommand,"addCPCommand"); + HPM->share(console->addCommand,"addCPCommand"); #endif /* our own */ HPM->share(hplugins_addpacket,"addPacket"); @@ -760,7 +755,7 @@ void hpm_init(void) { HPM->symbol_defaults(); #ifdef CONSOLE_INPUT - console->input->addCommand("plugins",CPCMD_A(plugins)); + console->addCommand("plugins",CPCMD_A(plugins)); #endif return; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 9c176cfd6..0f0df4cda 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -4,12 +4,8 @@ #ifndef _COMMON_HPM_H_ #define _COMMON_HPM_H_ -#ifndef HERCULES_CORE -#error You should never include HPM.h from a plugin. -#endif - -#include "../common/HPMi.h" #include "../common/cbasetypes.h" +#include "../common/HPMi.h" #ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN diff --git a/src/common/HPMi.h b/src/common/HPMi.h index b98e87d90..19206aeca 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -5,8 +5,8 @@ #define _COMMON_HPMI_H_ #include "../common/cbasetypes.h" -#include "../common/console.h" #include "../common/core.h" +#include "../common/console.h" #include "../common/sql.h" struct script_state; @@ -20,6 +20,18 @@ struct map_session_data; #define HPExport #endif +#ifndef _COMMON_SHOWMSG_H_ + HPExport void (*ShowMessage) (const char *, ...); + HPExport void (*ShowStatus) (const char *, ...); + HPExport void (*ShowSQL) (const char *, ...); + HPExport void (*ShowInfo) (const char *, ...); + HPExport void (*ShowNotice) (const char *, ...); + HPExport void (*ShowWarning) (const char *, ...); + HPExport void (*ShowDebug) (const char *, ...); + HPExport void (*ShowError) (const char *, ...); + HPExport void (*ShowFatalError) (const char *, ...); +#endif + /* after */ #include "../common/showmsg.h" @@ -180,7 +192,7 @@ HPExport struct HPMi_interface { /* pc group permission */ void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask); } HPMi_s; -#ifndef HERCULES_CORE +#ifndef _COMMON_HPM_H_ HPExport struct HPMi_interface *HPMi; #endif diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index da0d6b307..f44e80413 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -442,11 +442,5 @@ void SET_FUNCPOINTER(T1& var, T2 p) #define SET_FUNCPOINTER(var,p) ((var) = (p)) #endif -/* pointer size fix which fixes several gcc warnings */ -#ifdef __64BIT__ - #define __64BPTRSIZE(y) ((intptr)(y)) -#else - #define __64BPTRSIZE(y) (y) -#endif #endif /* _COMMON_CBASETYPES_H_ */ diff --git a/src/common/conf.c b/src/common/conf.c index 46a034497..b816b2f7f 100644 --- a/src/common/conf.c +++ b/src/common/conf.c @@ -2,10 +2,7 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - #include "conf.h" - #include "../../3rdparty/libconfig/libconfig.h" #include "../common/showmsg.h" // ShowError diff --git a/src/common/conf.h b/src/common/conf.h index e5b637e47..9aff3df47 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -6,7 +6,6 @@ #define _COMMON_CONF_H_ #include "../common/cbasetypes.h" - #include "../../3rdparty/libconfig/libconfig.h" /** diff --git a/src/common/console.c b/src/common/console.c index 6a82db555..d8f352c8a 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -2,46 +2,42 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT, MAX_CONSOLE_INPUT -#include "console.h" - -#include -#include - #include "../common/cbasetypes.h" -#include "../common/core.h" #include "../common/showmsg.h" +#include "../common/core.h" #include "../common/sysinfo.h" +#include "../config/core.h" +#include "console.h" #ifndef MINICORE -# include "../common/atomic.h" -# include "../common/ers.h" -# include "../common/malloc.h" -# include "../common/mutex.h" -# include "../common/spinlock.h" -# include "../common/sql.h" -# include "../common/strlib.h" -# include "../common/thread.h" -# include "../common/timer.h" + #include "../common/ers.h" + #include "../common/malloc.h" + #include "../common/atomic.h" + #include "../common/spinlock.h" + #include "../common/thread.h" + #include "../common/mutex.h" + #include "../common/timer.h" + #include "../common/strlib.h" + #include "../common/sql.h" #endif +#include +#include #if !defined(WIN32) -# include -# include + #include + #include #else -# include "../common/winapi.h" // Console close event handling -# ifdef CONSOLE_INPUT -# include /* _kbhit() */ -# endif + #include "../common/winapi.h" // Console close event handling #endif -struct console_interface console_s; #ifdef CONSOLE_INPUT -struct console_input_interface console_input_s; + #if defined(WIN32) + #include /* _kbhit() */ + #endif #endif +struct console_interface console_s; + /*====================================== * CORE : Display title *--------------------------------------*/ @@ -120,12 +116,12 @@ CPCMD_C(mem_report,server) { **/ CPCMD(help) { unsigned int i = 0; - for ( i = 0; i < console->input->cmd_list_count; i++ ) { - if( console->input->cmd_list[i]->next_count ) { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->input->cmd_list[i]->cmd); - console->input->parse_list_subs(console->input->cmd_list[i],2); + for ( i = 0; i < console->cmd_list_count; i++ ) { + if( console->cmd_list[i]->next_count ) { + ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->cmd_list[i]->cmd); + console->parse_list_subs(console->cmd_list[i],2); } else { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->input->cmd_list[i]->cmd); + ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->cmd_list[i]->cmd); } } } @@ -148,7 +144,7 @@ CPCMD_C(skip,update) { ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n"); return; } - Sql_HerculesUpdateSkip(console->input->SQL, line); + Sql_HerculesUpdateSkip(console->SQL, line); } /** @@ -210,7 +206,7 @@ void console_load_defaults(void) { unsigned int i, len = ARRAYLENGTH(default_list); struct CParseEntry *cmd; - RECREATE(console->input->cmds,struct CParseEntry *, len); + RECREATE(console->cmds,struct CParseEntry *, len); for(i = 0; i < len; i++) { CREATE(cmd, struct CParseEntry, 1); @@ -224,12 +220,12 @@ void console_load_defaults(void) { cmd->next_count = 0; - console->input->cmd_count++; - console->input->cmds[i] = cmd; + console->cmd_count++; + console->cmds[i] = cmd; default_list[i].self = cmd; if( !default_list[i].connect ) { - RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); - console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; + RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); + console->cmd_list[console->cmd_list_count - 1] = cmd; } } @@ -237,11 +233,11 @@ void console_load_defaults(void) { unsigned int k; if( !default_list[i].connect ) continue; - for(k = 0; k < console->input->cmd_count; k++) { - if( strcmpi(default_list[i].connect,console->input->cmds[k]->cmd) == 0 ) { + for(k = 0; k < console->cmd_count; k++) { + if( strcmpi(default_list[i].connect,console->cmds[k]->cmd) == 0 ) { cmd = default_list[i].self; - RECREATE(console->input->cmds[k]->u.next, struct CParseEntry *, ++console->input->cmds[k]->next_count); - console->input->cmds[k]->u.next[console->input->cmds[k]->next_count - 1] = cmd; + RECREATE(console->cmds[k]->u.next, struct CParseEntry *, ++console->cmds[k]->next_count); + console->cmds[k]->u.next[console->cmds[k]->next_count - 1] = cmd; break; } } @@ -260,23 +256,23 @@ void console_parse_create(char *name, CParseFunc func) { safestrncpy(sublist, name, CP_CMD_LENGTH * 5); tok = strtok(sublist,":"); - for ( i = 0; i < console->input->cmd_list_count; i++ ) { - if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->cmd_list_count; i++ ) { + if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->input->cmd_list_count ) { - RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); + if( i == console->cmd_list_count ) { + RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); CREATE(cmd, struct CParseEntry, 1); safestrncpy(cmd->cmd, tok, CP_CMD_LENGTH); cmd->next_count = 0; - console->input->cmds[console->input->cmd_count - 1] = cmd; - RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); - console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; - i = console->input->cmd_list_count - 1; + console->cmds[console->cmd_count - 1] = cmd; + RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); + console->cmd_list[console->cmd_list_count - 1] = cmd; + i = console->cmd_list_count - 1; } - cmd = console->input->cmd_list[i]; + cmd = console->cmd_list[i]; while( ( tok = strtok(NULL, ":") ) != NULL ) { for(i = 0; i < cmd->next_count; i++) { @@ -285,13 +281,13 @@ void console_parse_create(char *name, CParseFunc func) { } if ( i == cmd->next_count ) { - RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); - CREATE(console->input->cmds[console->input->cmd_count-1], struct CParseEntry, 1); - safestrncpy(console->input->cmds[console->input->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); - console->input->cmds[console->input->cmd_count-1]->next_count = 0; + RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); + CREATE(console->cmds[console->cmd_count-1], struct CParseEntry, 1); + safestrncpy(console->cmds[console->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); + console->cmds[console->cmd_count-1]->next_count = 0; RECREATE(cmd->u.next, struct CParseEntry *, ++cmd->next_count); - cmd->u.next[cmd->next_count - 1] = console->input->cmds[console->input->cmd_count-1]; - cmd = console->input->cmds[console->input->cmd_count-1]; + cmd->u.next[cmd->next_count - 1] = console->cmds[console->cmd_count-1]; + cmd = console->cmds[console->cmd_count-1]; continue; } @@ -306,7 +302,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd); ShowInfo("%s subs\n",msg); - console->input->parse_list_subs(cmd->u.next[i],depth + 1); + console->parse_list_subs(cmd->u.next[i],depth + 1); } else { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " %s",cmd->u.next[i]->cmd); @@ -324,21 +320,21 @@ void console_parse_sub(char *line) { memcpy(bline, line, 200); tok = strtok(line, " "); - for ( i = 0; i < console->input->cmd_list_count; i++ ) { - if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->cmd_list_count; i++ ) { + if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->input->cmd_list_count ) { + if( i == console->cmd_list_count ) { ShowError("'"CL_WHITE"%s"CL_RESET"' is not a known command, type '"CL_WHITE"help"CL_RESET"' to list all commands\n",line); return; } - cmd = console->input->cmd_list[i]; + cmd = console->cmd_list[i]; len += snprintf(sublist,CP_CMD_LENGTH * 5,"%s", cmd->cmd) + 1; - if( cmd->next_count == 0 && console->input->cmd_list[i]->u.func ) { + if( cmd->next_count == 0 && console->cmd_list[i]->u.func ) { char *r = NULL; if( (tok = strtok(NULL, " ")) ) { r = bline; @@ -355,7 +351,7 @@ void console_parse_sub(char *line) { if( strcmpi("help",tok) == 0 ) { if( cmd->next_count ) { ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",sublist); - console->input->parse_list_subs(cmd,2); + console->parse_list_subs(cmd,2); } else { ShowError("'"CL_WHITE"%s"CL_RESET"' doesn't possess any subcommands\n",sublist); } @@ -396,95 +392,95 @@ void console_parse(char* line) { } void *cThread_main(void *x) { - while( console->input->ptstate ) {/* loopx */ - if( console->input->key_pressed() ) { + while( console->ptstate ) {/* loopx */ + if( console->key_pressed() ) { char input[MAX_CONSOLE_INPUT]; - console->input->parse(input); + console->parse(input); if( input[0] != '\0' ) {/* did we get something? */ - EnterSpinLock(&console->input->ptlock); + EnterSpinLock(&console->ptlock); if( cinput.count == CONSOLE_PARSE_SIZE ) { - LeaveSpinLock(&console->input->ptlock); + LeaveSpinLock(&console->ptlock); continue;/* drop */ } safestrncpy(cinput.queue[cinput.count++],input,MAX_CONSOLE_INPUT); - LeaveSpinLock(&console->input->ptlock); + LeaveSpinLock(&console->ptlock); } } - ramutex_lock( console->input->ptmutex ); - racond_wait( console->input->ptcond, console->input->ptmutex, -1 ); - ramutex_unlock( console->input->ptmutex ); + ramutex_lock( console->ptmutex ); + racond_wait( console->ptcond, console->ptmutex, -1 ); + ramutex_unlock( console->ptmutex ); } return NULL; } int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { int i; - EnterSpinLock(&console->input->ptlock); + EnterSpinLock(&console->ptlock); for(i = 0; i < cinput.count; i++) { - console->input->parse_sub(cinput.queue[i]); + console->parse_sub(cinput.queue[i]); } cinput.count = 0; - LeaveSpinLock(&console->input->ptlock); - racond_signal(console->input->ptcond); + LeaveSpinLock(&console->ptlock); + racond_signal(console->ptcond); return 0; } void console_parse_final(void) { - if( console->input->ptstate ) { - InterlockedDecrement(&console->input->ptstate); - racond_signal(console->input->ptcond); + if( console->ptstate ) { + InterlockedDecrement(&console->ptstate); + racond_signal(console->ptcond); /* wait for thread to close */ - rathread_wait(console->input->pthread, NULL); + rathread_wait(console->pthread, NULL); - racond_destroy(console->input->ptcond); - ramutex_destroy(console->input->ptmutex); + racond_destroy(console->ptcond); + ramutex_destroy(console->ptmutex); } } void console_parse_init(void) { cinput.count = 0; - console->input->ptstate = 1; + console->ptstate = 1; - InitializeSpinLock(&console->input->ptlock); + InitializeSpinLock(&console->ptlock); - console->input->ptmutex = ramutex_create(); - console->input->ptcond = racond_create(); + console->ptmutex = ramutex_create(); + console->ptcond = racond_create(); - if( (console->input->pthread = rathread_create(console->input->pthread_main, NULL)) == NULL ){ + if( (console->pthread = rathread_create(console->pthread_main, NULL)) == NULL ){ ShowFatalError("console_parse_init: failed to spawn console_parse thread.\n"); exit(EXIT_FAILURE); } - timer->add_func_list(console->input->parse_timer, "console_parse_timer"); - timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ + timer->add_func_list(console->parse_timer, "console_parse_timer"); + timer->add_interval(timer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } void console_setSQL(Sql *SQL_handle) { - console->input->SQL = SQL_handle; + console->SQL = SQL_handle; } #endif /* CONSOLE_INPUT */ void console_init (void) { #ifdef CONSOLE_INPUT - console->input->cmd_count = console->input->cmd_list_count = 0; - console->input->load_defaults(); - console->input->parse_init(); + console->cmd_count = console->cmd_list_count = 0; + console->load_defaults(); + console->parse_init(); #endif } void console_final(void) { #ifdef CONSOLE_INPUT unsigned int i; - console->input->parse_final(); - for( i = 0; i < console->input->cmd_count; i++ ) { - if( console->input->cmds[i]->next_count ) - aFree(console->input->cmds[i]->u.next); - aFree(console->input->cmds[i]); + console->parse_final(); + for( i = 0; i < console->cmd_count; i++ ) { + if( console->cmds[i]->next_count ) + aFree(console->cmds[i]->u.next); + aFree(console->cmds[i]); } - aFree(console->input->cmds); - aFree(console->input->cmd_list); + aFree(console->cmds); + aFree(console->cmd_list); #endif } void console_defaults(void) { @@ -493,20 +489,17 @@ void console_defaults(void) { console->final = console_final; console->display_title = display_title; #ifdef CONSOLE_INPUT - console->input = &console_input_s; - console->input->parse_init = console_parse_init; - console->input->parse_final = console_parse_final; - console->input->parse_timer = console_parse_timer; - console->input->pthread_main = cThread_main; - console->input->parse = console_parse; - console->input->parse_sub = console_parse_sub; - console->input->key_pressed = console_parse_key_pressed; - console->input->load_defaults = console_load_defaults; - console->input->parse_list_subs = console_parse_list_subs; - console->input->addCommand = console_parse_create; - console->input->setSQL = console_setSQL; - console->input->SQL = NULL; -#else - console->input = NULL; + console->parse_init = console_parse_init; + console->parse_final = console_parse_final; + console->parse_timer = console_parse_timer; + console->pthread_main = cThread_main; + console->parse = console_parse; + console->parse_sub = console_parse_sub; + console->key_pressed = console_parse_key_pressed; + console->load_defaults = console_load_defaults; + console->parse_list_subs = console_parse_list_subs; + console->addCommand = console_parse_create; + console->setSQL = console_setSQL; + console->SQL = NULL; #endif } diff --git a/src/common/console.h b/src/common/console.h index d2c58f978..3d19ddc9d 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -4,13 +4,11 @@ #ifndef _COMMON_CONSOLE_H_ #define _COMMON_CONSOLE_H_ -#include "../config/core.h" // MAX_CONSOLE_INPUT - -#include "../common/cbasetypes.h" +#include "../common/thread.h" #include "../common/mutex.h" #include "../common/spinlock.h" #include "../common/sql.h" -#include "../common/thread.h" +#include "../config/core.h" /** * Queue Max @@ -49,8 +47,11 @@ struct { unsigned short count; } cinput; +struct console_interface { + void (*init) (void); + void (*final) (void); + void (*display_title) (void); #ifdef CONSOLE_INPUT -struct console_input_interface { /* vars */ SPIN_LOCK ptlock;/* parse thread lock */ rAthread pthread;/* parse thread */ @@ -76,17 +77,7 @@ struct console_input_interface { void (*parse_list_subs) (struct CParseEntry *cmd, unsigned char depth); void (*addCommand) (char *name, CParseFunc func); void (*setSQL) (Sql *SQL_handle); -}; -#else -struct console_input_interface; #endif - -struct console_interface { - void (*init) (void); - void (*final) (void); - void (*display_title) (void); - - struct console_input_interface *input; }; struct console_interface *console; diff --git a/src/common/core.c b/src/common/core.c index 85f824866..49b272488 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -2,40 +2,36 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" -#include "core.h" - -#include "../common/cbasetypes.h" -#include "../common/console.h" -#include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/random.h" #include "../common/showmsg.h" +#include "../common/malloc.h" #include "../common/strlib.h" +#include "core.h" +#include "../common/console.h" +#include "../common/random.h" #include "../common/sysinfo.h" #ifndef MINICORE -# include "../common/HPM.h" -# include "../common/conf.h" -# include "../common/db.h" -# include "../common/ers.h" -# include "../common/socket.h" -# include "../common/sql.h" -# include "../common/thread.h" -# include "../common/timer.h" -# include "../common/utils.h" + #include "../common/db.h" + #include "../common/socket.h" + #include "../common/timer.h" + #include "../common/thread.h" + #include "../common/sql.h" + #include "../config/core.h" + #include "../common/HPM.h" + #include "../common/utils.h" + #include "../common/conf.h" + #include "../common/ers.h" #endif -#include #include #include +#include #include #ifndef _WIN32 -# include +#include #else -# include "../common/winapi.h" // Console close event handling +#include "../common/winapi.h" // Console close event handling #endif /// Called when a terminate signal is received. diff --git a/src/common/core.h b/src/common/core.h index ba75e6b01..e9f7c5961 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -7,10 +7,11 @@ #include "../common/db.h" #include "../common/mmo.h" +#include "../config/core.h" /* so that developers with --enable-debug can raise signals from any section of the code they'd like */ #ifdef DEBUG -# include + #include #endif extern int arg_c; diff --git a/src/common/db.c b/src/common/db.c index 1781aa96f..8d6b08815 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -67,18 +67,14 @@ * @encoding US-ASCII * @see #db.h \*****************************************************************************/ - -#define HERCULES_CORE - -#include "db.h" - #include #include -#include "../common/ers.h" -#include "../common/malloc.h" +#include "db.h" #include "../common/mmo.h" +#include "../common/malloc.h" #include "../common/showmsg.h" +#include "../common/ers.h" #include "../common/strlib.h" /*****************************************************************************\ diff --git a/src/common/db.h b/src/common/db.h index 0d2548806..67abe6f19 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -42,9 +42,8 @@ #ifndef _COMMON_DB_H_ #define _COMMON_DB_H_ -#include - #include "../common/cbasetypes.h" +#include /*****************************************************************************\ * (1) Section with public typedefs, enums, unions, structures and defines. * diff --git a/src/common/des.c b/src/common/des.c index 7f952be76..ed6d098dc 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -1,11 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder - -#define HERCULES_CORE - -#include "des.h" - #include "../common/cbasetypes.h" +#include "../common/des.h" + /// DES (Data Encryption Standard) algorithm, modified version. /// @see http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=5099. diff --git a/src/common/ers.c b/src/common/ers.c index d9895e4f2..5a3d7314a 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -39,18 +39,14 @@ * @encoding US-ASCII * * @see common#ers.h * \*****************************************************************************/ - -#define HERCULES_CORE - -#include "ers.h" - #include #include #include "../common/cbasetypes.h" #include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree -#include "../common/nullpo.h" #include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL +#include "../common/nullpo.h" +#include "ers.h" #ifndef DISABLE_ERS diff --git a/src/common/grfio.c b/src/common/grfio.c index 1111fb3f3..bde0ed720 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -2,8 +2,13 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/cbasetypes.h" +#include "../common/des.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/nullpo.h" #include "grfio.h" #include @@ -12,14 +17,6 @@ #include #include -#include "../common/cbasetypes.h" -#include "../common/des.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" - //---------------------------- // file entry table struct //---------------------------- diff --git a/src/common/malloc.c b/src/common/malloc.c index 13cf0b5ce..5b39cbab6 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "malloc.h" +#include "../common/malloc.h" +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/sysinfo.h" #include #include #include #include -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/sysinfo.h" - struct malloc_interface iMalloc_s; ////////////// Memory Libraries ////////////////// diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 5c69c7063..3128a3cb0 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/db.h" #include "mapindex.h" +#include #include #include -#include - -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" /* mapindex.c interface source */ struct mapindex_interface mapindex_s; diff --git a/src/common/md5calc.c b/src/common/md5calc.c index e7b506e27..05fde42cc 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -6,15 +6,11 @@ * ***********************************************************/ -#define HERCULES_CORE - +#include "../common/random.h" #include "md5calc.h" - +#include #include #include -#include - -#include "../common/random.h" #ifndef UINT_MAX #define UINT_MAX 4294967295U diff --git a/src/common/mmo.h b/src/common/mmo.h index 1d826463e..d535d2874 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -5,10 +5,9 @@ #ifndef _COMMON_MMO_H_ #define _COMMON_MMO_H_ -#include - -#include "../common/cbasetypes.h" +#include "cbasetypes.h" #include "../common/db.h" +#include // server->client protocol version // 0 - pre-? @@ -97,7 +96,6 @@ //Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default ) #define MAX_BANK_ZENY 2100000000 -#define MAX_LEVEL 175 #define MAX_FAME 1000000000 #define MAX_CART 100 #define MAX_SKILL 1478 diff --git a/src/common/mutex.c b/src/common/mutex.c index 12524c3b7..0668dbc41 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -1,10 +1,6 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "mutex.h" - #ifdef WIN32 #include "../common/winapi.h" #else @@ -17,6 +13,7 @@ #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/timer.h" +#include "../common/mutex.h" struct ramutex{ #ifdef WIN32 diff --git a/src/common/mutex.h b/src/common/mutex.h index 3b83b66d6..eeb24e6ff 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -4,7 +4,6 @@ #ifndef _COMMON_MUTEX_H_ #define _COMMON_MUTEX_H_ -#include "../common/cbasetypes.h" typedef struct ramutex *ramutex; // Mutex typedef struct racond *racond; // Condition Var diff --git a/src/common/nullpo.c b/src/common/nullpo.c index 1891835f1..1cb471aff 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -2,14 +2,10 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "nullpo.h" - #include #include #include - +#include "../common/nullpo.h" #include "../common/showmsg.h" /** diff --git a/src/common/random.c b/src/common/random.c index 7019a31f3..e46c52cad 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -1,23 +1,17 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "random.h" - -#include // time - -#include // init_genrand, genrand_int32, genrand_res53 - #include "../common/showmsg.h" #include "../common/timer.h" // gettick - +#include "random.h" #if defined(WIN32) -# include "../common/winapi.h" + #include "../common/winapi.h" #elif defined(HAVE_GETPID) || defined(HAVE_GETTID) -# include -# include + #include + #include #endif +#include // time +#include // init_genrand, genrand_int32, genrand_res53 /// Initializes the random number generator with an appropriate seed. diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 1dbcba282..14342fe5e 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -2,26 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/cbasetypes.h" +#include "../common/strlib.h" // StringBuf #include "showmsg.h" +#include "core.h" //[Ind] - For SERVER_TYPE -#include #include -#include // atexit #include +#include #include +#include // atexit #include "../../3rdparty/libconfig/libconfig.h" -#include "../common/cbasetypes.h" -#include "../common/core.h" //[Ind] - For SERVER_TYPE -#include "../common/strlib.h" // StringBuf - #ifdef WIN32 -# include "../common/winapi.h" +#include "../common/winapi.h" #else // not WIN32 -# include +#include #endif // WIN32 #if defined(DEBUGLOGMAP) diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 5b32f39ae..49fbc34fb 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -5,14 +5,12 @@ #ifndef _COMMON_SHOWMSG_H_ #define _COMMON_SHOWMSG_H_ -#include - -#ifdef HERCULES_CORE -# include "../../3rdparty/libconfig/libconfig.h" -#else -# include "../common/HPMi.h" +#ifndef _COMMON_HPMI_H_ + #include "../../3rdparty/libconfig/libconfig.h" #endif +#include + // for help with the console colors look here: // http://www.edoceo.com/liberum/?doc=printf-with-color // some code explanation (used here): @@ -92,7 +90,7 @@ enum msg_type { }; extern void ClearScreen(void); -#ifdef HERCULES_CORE +#ifndef _COMMON_HPMI_H_ extern void ShowMessage(const char *, ...); extern void ShowStatus(const char *, ...); extern void ShowSQL(const char *, ...); @@ -103,18 +101,7 @@ extern void ClearScreen(void); extern void ShowError(const char *, ...); extern void ShowFatalError(const char *, ...); extern void ShowConfigWarning(config_setting_t *config, const char *string, ...); -#else - HPExport void (*ShowMessage) (const char *, ...); - HPExport void (*ShowStatus) (const char *, ...); - HPExport void (*ShowSQL) (const char *, ...); - HPExport void (*ShowInfo) (const char *, ...); - HPExport void (*ShowNotice) (const char *, ...); - HPExport void (*ShowWarning) (const char *, ...); - HPExport void (*ShowDebug) (const char *, ...); - HPExport void (*ShowError) (const char *, ...); - HPExport void (*ShowFatalError) (const char *, ...); #endif - extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap); #endif /* _COMMON_SHOWMSG_H_ */ diff --git a/src/common/socket.c b/src/common/socket.c index 3738f2c2a..35d350e95 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -2,50 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../config/core.h" +#include "../common/HPM.h" -#include "../config/core.h" // SHOW_SERVER_STATS #define _H_SOCKET_C_ + #include "socket.h" -#undef _H_SOCKET_C_ #include #include #include #include -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" - #ifdef WIN32 -# include "../common/winapi.h" + #include "../common/winapi.h" #else -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -# ifndef SIOCGIFCONF -# include // SIOCGIFCONF on Solaris, maybe others? [Shinomori] -# endif -# ifndef FIONBIO -# include // FIONBIO on Solaris [FlavioJS] -# endif - -# ifdef HAVE_SETRLIMIT -# include -# endif + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #ifndef SIOCGIFCONF + #include // SIOCGIFCONF on Solaris, maybe others? [Shinomori] + #endif + #ifndef FIONBIO + #include // FIONBIO on Solaris [FlavioJS] + #endif + + #ifdef HAVE_SETRLIMIT + #include + #endif #endif /** diff --git a/src/common/socket.h b/src/common/socket.h index 804b9284f..75adde4cf 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -5,19 +5,19 @@ #ifndef _COMMON_SOCKET_H_ #define _COMMON_SOCKET_H_ -#include - #include "../common/cbasetypes.h" #ifdef WIN32 -# include "../common/winapi.h" + #include "../common/winapi.h" typedef long in_addr_t; #else -# include -# include -# include + #include + #include + #include #endif +#include + struct HPluginData; #define FIFOSIZE_SERVERLINK 256*1024 diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 0058e1d83..29fbb355b 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -1,3 +1,4 @@ +#pragma once #ifndef _COMMON_SPINLOCK_H_ #define _COMMON_SPINLOCK_H_ @@ -14,14 +15,14 @@ // // -#include "../common/atomic.h" -#include "../common/cbasetypes.h" -#include "../common/thread.h" - #ifdef WIN32 #include "../common/winapi.h" #endif +#include "../common/cbasetypes.h" +#include "../common/atomic.h" +#include "../common/thread.h" + #ifdef WIN32 typedef struct __declspec( align(64) ) SPIN_LOCK{ diff --git a/src/common/sql.c b/src/common/sql.c index aeb56bff0..79ccc8e92 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "sql.h" - -#include // strtoul -#include // strlen/strnlen/memcpy/memset - #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "sql.h" #ifdef WIN32 -# include "../common/winapi.h" // Needed before mysql.h +#include "../common/winapi.h" #endif #include +#include // strlen/strnlen/memcpy/memset +#include // strtoul void hercules_mysql_error_handler(unsigned int ecode); diff --git a/src/common/sql.h b/src/common/sql.h index 807e0843c..1fb436853 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -5,9 +5,10 @@ #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ +#include "../common/cbasetypes.h" #include // va_list -#include "../common/cbasetypes.h" + // Return codes #define SQL_ERROR (-1) diff --git a/src/common/strlib.c b/src/common/strlib.c index e2e802915..361595b07 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#define _H_STRLIB_C_ +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#define STRLIB_C #include "strlib.h" -#undef _H_STRLIB_C_ -#include #include #include +#include -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" #define J_MAX_MALLOC_SIZE 65535 diff --git a/src/common/strlib.h b/src/common/strlib.h index decf661a6..10844d257 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -5,16 +5,15 @@ #ifndef _COMMON_STRLIB_H_ #define _COMMON_STRLIB_H_ -#include - #include "../common/cbasetypes.h" +#include #ifndef __USE_GNU -# define __USE_GNU // required to enable strnlen on some platforms -# include -# undef __USE_GNU + #define __USE_GNU // required to enable strnlen on some platforms + #include + #undef __USE_GNU #else -# include + #include #endif #ifdef WIN32 @@ -166,7 +165,7 @@ struct sv_interface *sv; void strlib_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ -#ifndef _H_STRLIB_C_ +#ifndef STRLIB_C #define jstrescape(pt) (strlib->jstrescape(pt)) #define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt))) #define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size))) @@ -190,6 +189,6 @@ void strlib_defaults(void); #define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__)) #define strline(str,pos) (strlib->strline((str),(pos))) #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) -#endif /* _H_STRLIB_C_ */ +#endif /* STRLIB_C */ #endif /* _COMMON_STRLIB_H_ */ diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 3fdfadb41..a56896458 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -4,39 +4,23 @@ /// See sysinfo.h for a description of this file -#define HERCULES_CORE - +#define _COMMON_SYSINFO_P_ #include "sysinfo.h" - -#include // fopen -#include // atoi +#undef _COMMON_SYSINFO_P_ #include "../common/cbasetypes.h" #include "../common/core.h" -#include "../common/malloc.h" #include "../common/strlib.h" +#include "../common/malloc.h" #ifdef WIN32 -# include // strlen -# include +#include +#include // strlen #else -# include +#include #endif - -/// Private interface fields -struct sysinfo_private { - char *platform; - char *osversion; - char *cpu; - int cpucores; - char *arch; - char *compiler; - char *cflags; - char *vcstype_name; - int vcstype; - char *vcsrevision_src; - char *vcsrevision_scripts; -}; +#include // fopen +#include // atoi /// sysinfo.c interface source struct sysinfo_interface sysinfo_s; diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h index c0c4d276a..17faac26b 100644 --- a/src/common/sysinfo.h +++ b/src/common/sysinfo.h @@ -13,7 +13,23 @@ #include "../common/cbasetypes.h" +#ifdef _COMMON_SYSINFO_P_ +struct sysinfo_private { + char *platform; + char *osversion; + char *cpu; + int cpucores; + char *arch; + char *compiler; + char *cflags; + char *vcstype_name; + int vcstype; + char *vcsrevision_src; + char *vcsrevision_scripts; +}; +#else struct sysinfo_private; +#endif /** * sysinfo.c interface diff --git a/src/common/thread.c b/src/common/thread.c index 4f73aa9b3..4d110f2dd 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -6,27 +6,24 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "thread.h" - -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" - #ifdef WIN32 -# include "../common/winapi.h" -# define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) -# define __thread __declspec( thread ) +#include "../common/winapi.h" +#define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) +#define __thread __declspec( thread ) #else -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif +#include "cbasetypes.h" +#include "malloc.h" +#include "showmsg.h" +#include "thread.h" + // When Compiling using MSC (on win32..) we know we have support in any case! #ifdef _MSC_VER #define HAS_TLS diff --git a/src/common/thread.h b/src/common/thread.h index 887c03179..d6b2bbc6e 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -1,6 +1,7 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#pragma once #ifndef _COMMON_THREAD_H_ #define _COMMON_THREAD_H_ diff --git a/src/common/timer.c b/src/common/timer.c index 10f14b0f2..526854582 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -2,8 +2,11 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/utils.h" #include "timer.h" #include @@ -11,17 +14,11 @@ #include #include -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/utils.h" - #ifdef WIN32 -# include "../common/winapi.h" // GetTickCount() +#include "../common/winapi.h" // GetTickCount() #else -# include // struct timeval, gettimeofday() -# include +#include +#include // struct timeval, gettimeofday() #endif struct timer_interface timer_s; diff --git a/src/common/utils.c b/src/common/utils.c index 84925f707..47747dd32 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2,35 +2,33 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/cbasetypes.h" +#include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/core.h" +#include "socket.h" #include "utils.h" -#include // floor() -#include #include +#include #include #include -#include // cache purposes [Ind/Hercules] - -#include "../common/cbasetypes.h" -#include "../common/core.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" +#include // floor() #ifdef WIN32 -# include "../common/winapi.h" -# ifndef F_OK -# define F_OK 0x0 -# endif /* F_OK */ + #include "../common/winapi.h" + #ifndef F_OK + #define F_OK 0x0 + #endif /* F_OK */ #else -# include -# include -# include + #include + #include + #include #endif +#include // cache purposes [Ind/Hercules] + struct HCache_interface HCache_s; /// Dumps given buffer into file pointed to by a handle. diff --git a/src/common/utils.h b/src/common/utils.h index 823651163..f89546b8a 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -5,11 +5,10 @@ #ifndef _COMMON_UTILS_H_ #define _COMMON_UTILS_H_ +#include "../common/cbasetypes.h" #include // FILE* #include -#include "../common/cbasetypes.h" - /* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */ #define HCACHE_KEY 'k' diff --git a/src/config/const.h b/src/config/const.h index f9baa4d7d..6557cb987 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -52,6 +52,13 @@ #define DEFTYPE_MAX CHAR_MAX #endif +/* pointer size fix which fixes several gcc warnings */ +#ifdef __64BIT__ + #define __64BPTRSIZE(y) ((intptr)(y)) +#else + #define __64BPTRSIZE(y) (y) +#endif + /* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ #ifdef RENEWAL #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 ) diff --git a/src/config/renewal.h b/src/config/renewal.h index 36bdd3958..36615d63b 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -74,6 +74,5 @@ #define RENEWAL_ASPD #endif // DISABLE_RENEWAL -#undef DISABLE_RENEWAL #endif // _CONFIG_RENEWAL_H_ diff --git a/src/login/account.h b/src/login/account.h index 329ae31c8..234e7c0c1 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -7,7 +7,6 @@ #include "../common/cbasetypes.h" #include "../common/mmo.h" // ACCOUNT_REG2_NUM -#include "../common/sql.h" // Sql typedef struct AccountDB AccountDB; typedef struct AccountDBIterator AccountDBIterator; diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 2e4ed7ab9..1483196ab 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -2,22 +2,17 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT -#include "account.h" - -#include -#include - -#include "../common/console.h" #include "../common/malloc.h" #include "../common/mmo.h" #include "../common/showmsg.h" -#include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "../common/console.h" +#include "../common/socket.h" +#include "account.h" +#include +#include /// global defines #define ACCOUNT_SQL_DB_VERSION 20110114 @@ -657,7 +652,7 @@ Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; Sql_HerculesUpdateCheck(db->accounts); #ifdef CONSOLE_INPUT - console->input->setSQL(db->accounts); + console->setSQL(db->accounts); #endif return db->accounts; } diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c index 081f28d84..74f45e418 100644 --- a/src/login/ipban_sql.c +++ b/src/login/ipban_sql.c @@ -2,15 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "ipban.h" - -#include -#include - -#include "login.h" -#include "loginlog.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -18,6 +9,11 @@ #include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "login.h" +#include "ipban.h" +#include "loginlog.h" +#include +#include // global sql settings static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/login/login.c b/src/login/login.c index cb46e0226..af59fcf38 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -2,18 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "login.h" - -#include -#include -#include - -#include "account.h" -#include "ipban.h" -#include "loginlog.h" -#include "../common/HPM.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -24,6 +12,15 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/HPM.h" +#include "account.h" +#include "ipban.h" +#include "login.h" +#include "loginlog.h" + +#include +#include +#include struct Login_Config login_config; diff --git a/src/login/login.h b/src/login/login.h index e77b96a0e..14c361a15 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -5,8 +5,8 @@ #ifndef _LOGIN_LOGIN_H_ #define _LOGIN_LOGIN_H_ -#include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" // NAME_LENGTH,SEX_* +#include "../common/core.h" // CORE_ST_LAST enum E_LOGINSERVER_ST { diff --git a/src/login/loginlog.h b/src/login/loginlog.h index a86ad431c..730fb6e62 100644 --- a/src/login/loginlog.h +++ b/src/login/loginlog.h @@ -4,7 +4,6 @@ #ifndef _LOGIN_LOGINLOG_H_ #define _LOGIN_LOGINLOG_H_ -#include "../common/cbasetypes.h" unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes); void login_log(uint32 ip, const char* username, int rcode, const char* message); @@ -12,4 +11,5 @@ bool loginlog_init(void); bool loginlog_final(void); bool loginlog_config_read(const char* w1, const char* w2); + #endif /* _LOGIN_LOGINLOG_H_ */ diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 2cbc02c93..231ac783b 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -2,18 +2,13 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "loginlog.h" - -#include -#include // exit - #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" +#include +#include // exit // global sql settings (in ipban_sql.c) static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index cb8c979c6..061479d87 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -1,15 +1,25 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/HPM.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/socket.h" +#include "../common/strlib.h" -#include "HPMmap.h" -#include -#include -#include -#include +#include "HPMmap.h" +#include "pc.h" +#include "map.h" +// #include "atcommand.h" #include "battle.h" #include "battleground.h" @@ -27,14 +37,12 @@ #include "itemdb.h" #include "log.h" #include "mail.h" -#include "map.h" #include "mapreg.h" #include "mercenary.h" #include "mob.h" #include "npc.h" #include "party.h" #include "path.h" -#include "pc.h" #include "pc_groups.h" #include "pet.h" #include "quest.h" @@ -46,19 +54,11 @@ #include "trade.h" #include "unit.h" #include "vending.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/db.h" -#include "../common/des.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/sysinfo.h" + +#include +#include +#include +#include #include "../common/HPMDataCheck.h" diff --git a/src/map/atcommand.c b/src/map/atcommand.c index df3be40a5..5fd0faf86 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2,60 +2,57 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/sysinfo.h" -#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_CARTS, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP #include "atcommand.h" - -#include -#include -#include -#include - #include "battle.h" #include "chat.h" -#include "chrif.h" #include "clif.h" +#include "chrif.h" #include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" #include "intif.h" #include "itemdb.h" #include "log.h" -#include "mail.h" #include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" #include "pc_groups.h" // groupid2name +#include "status.h" +#include "skill.h" +#include "mob.h" +#include "npc.h" #include "pet.h" -#include "quest.h" +#include "homunculus.h" +#include "mail.h" +#include "mercenary.h" +#include "elemental.h" +#include "party.h" +#include "guild.h" #include "script.h" -#include "searchstore.h" -#include "skill.h" -#include "status.h" #include "storage.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/core.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/sysinfo.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "mapreg.h" +#include "quest.h" +#include "searchstore.h" #include "HPMmap.h" +#include +#include +#include +#include + struct atcommand_interface atcommand_s; static char atcmd_output[CHAT_SIZE_MAX]; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index c8a1863af..bc4ab30a3 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -5,9 +5,9 @@ #ifndef _MAP_ATCOMMAND_H_ #define _MAP_ATCOMMAND_H_ -#include "pc_groups.h" #include "../common/conf.h" #include "../common/db.h" +#include "pc_groups.h" /** * Declarations diff --git a/src/map/battle.c b/src/map/battle.c index 0865ee4ba..9089b7102 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2,44 +2,41 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT -#include "battle.h" - -#include -#include -#include -#include - -#include "battleground.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "itemdb.h" -#include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "skill.h" -#include "status.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" +#include "../common/timer.h" #include "../common/nullpo.h" -#include "../common/random.h" +#include "../common/malloc.h" #include "../common/showmsg.h" +#include "../common/ers.h" +#include "../common/random.h" #include "../common/socket.h" #include "../common/strlib.h" -#include "../common/sysinfo.h" -#include "../common/timer.h" #include "../common/utils.h" +#include "../common/sysinfo.h" +#include "../common/HPM.h" + +#include "map.h" +#include "path.h" +#include "pc.h" +#include "status.h" +#include "skill.h" +#include "homunculus.h" +#include "mercenary.h" +#include "elemental.h" +#include "mob.h" +#include "itemdb.h" +#include "clif.h" +#include "pet.h" +#include "guild.h" +#include "party.h" +#include "battle.h" +#include "battleground.h" +#include "chrif.h" + +#include +#include +#include +#include struct Battle_Config battle_config; struct battle_interface battle_s; diff --git a/src/map/battle.h b/src/map/battle.h index fbe097c78..88038ddb4 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -5,8 +5,8 @@ #ifndef _MAP_BATTLE_H_ #define _MAP_BATTLE_H_ -#include "map.h" //ELE_MAX #include "../common/cbasetypes.h" +#include "map.h" //ELE_MAX /** * Declarations diff --git a/src/map/battleground.c b/src/map/battleground.c index a7169de0e..68539e25d 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -2,32 +2,29 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/conf.h" #include "battleground.h" - -#include -#include - #include "battle.h" #include "clif.h" -#include "homunculus.h" #include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" // struct mob_data #include "npc.h" -#include "party.h" #include "pc.h" +#include "party.h" #include "pet.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" +#include "homunculus.h" +#include "mercenary.h" +#include "mapreg.h" + +#include +#include struct battleground_interface bg_s; diff --git a/src/map/battleground.h b/src/map/battleground.h index ec0a86f14..05c4eb060 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -5,9 +5,9 @@ #ifndef _MAP_BATTLEGROUND_H_ #define _MAP_BATTLEGROUND_H_ +#include "../common/mmo.h" // struct party #include "clif.h" #include "guild.h" -#include "../common/mmo.h" // struct party /** * Defines diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 80264b30d..2a15e66fc 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -2,21 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "buyingstore.h" // struct s_buyingstore - -#include "atcommand.h" // msg_txt -#include "battle.h" // battle_config.* -#include "chrif.h" -#include "clif.h" // clif->buyingstore_* -#include "log.h" // log_pick_pc, log_zeny -#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/db.h" // ARR_FIND #include "../common/showmsg.h" // ShowWarning #include "../common/socket.h" // RBUF* #include "../common/strlib.h" // safestrncpy +#include "atcommand.h" // msg_txt +#include "battle.h" // battle_config.* +#include "buyingstore.h" // struct s_buyingstore +#include "clif.h" // clif->buyingstore_* +#include "log.h" // log_pick_pc, log_zeny +#include "pc.h" // struct map_session_data +#include "chrif.h" struct buyingstore_interface buyingstore_s; diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 914631872..5141a1013 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -5,11 +5,6 @@ #ifndef _MAP_BUYINGSTORE_H_ #define _MAP_BUYINGSTORE_H_ -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_SLOTS - -struct map_session_data; - /** * Declarations **/ diff --git a/src/map/chat.c b/src/map/chat.c index c9d3e6d46..08fc4a575 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -2,13 +2,12 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "chat.h" - -#include -#include - +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/mmo.h" #include "atcommand.h" // msg_txt() #include "battle.h" // struct battle_config #include "clif.h" @@ -16,12 +15,10 @@ #include "npc.h" // npc_event_do() #include "pc.h" #include "skill.h" // ext_skill_unit_onplace() -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" +#include "chat.h" + +#include +#include struct chat_interface chat_s; diff --git a/src/map/chat.h b/src/map/chat.h index cbc2a391e..b0c6cd905 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -6,12 +6,9 @@ #define _MAP_CHAT_H_ #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE -#include "../common/cbasetypes.h" -#include "../common/db.h" -struct chat_data; struct map_session_data; -struct npc_data; +struct chat_data; #define MAX_CHAT_USERS 20 diff --git a/src/map/chrif.c b/src/map/chrif.c index 81e2d387c..99a1935fd 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,16 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT -#include "chrif.h" - -#include -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/ers.h" +#include "../common/HPM.h" #include "map.h" #include "battle.h" @@ -26,17 +25,15 @@ #include "instance.h" #include "mercenary.h" #include "elemental.h" +#include "chrif.h" #include "quest.h" #include "storage.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" + +#include +#include +#include +#include +#include struct chrif_interface chrif_s; diff --git a/src/map/chrif.h b/src/map/chrif.h index 84efc66d3..25e955604 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -5,11 +5,9 @@ #ifndef _MAP_CHRIF_H_ #define _MAP_CHRIF_H_ +#include "../common/cbasetypes.h" #include - #include "map.h" //TBL_stuff -#include "../common/cbasetypes.h" -#include "../common/db.h" struct status_change_entry; diff --git a/src/map/clif.c b/src/map/clif.c index cb2474961..1a6665307 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2,59 +2,56 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // ANTI_MAYAP_CHEAT, NEW_CARTS, RENEWAL, SECURE_NPCTIMEOUT -#include "clif.h" - -#include -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/conf.h" +#include "../common/HPM.h" +#include "map.h" +#include "chrif.h" +#include "pc.h" +#include "status.h" +#include "npc.h" +#include "itemdb.h" +#include "chat.h" +#include "trade.h" +#include "storage.h" +#include "script.h" +#include "skill.h" #include "atcommand.h" +#include "intif.h" #include "battle.h" #include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "elemental.h" +#include "mob.h" +#include "party.h" +#include "unit.h" #include "guild.h" +#include "vending.h" +#include "pet.h" #include "homunculus.h" #include "instance.h" -#include "intif.h" -#include "irc-bot.h" -#include "itemdb.h" +#include "mercenary.h" +#include "elemental.h" #include "log.h" +#include "clif.h" #include "mail.h" -#include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "pet.h" #include "quest.h" -#include "script.h" -#include "skill.h" -#include "status.h" -#include "storage.h" -#include "trade.h" -#include "unit.h" -#include "vending.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "irc-bot.h" + +#include +#include +#include +#include +#include struct clif_interface clif_s; diff --git a/src/map/clif.h b/src/map/clif.h index 7b27e1fe6..0f4a9e756 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -5,13 +5,13 @@ #ifndef _MAP_CLIF_H_ #define _MAP_CLIF_H_ -#include - -#include "map.h" -#include "packets_struct.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/mmo.h" +#include "../common/socket.h" +#include "../map/map.h" +#include "../map/packets_struct.h" +#include /** * Declarations @@ -20,6 +20,7 @@ struct item; struct item_data; struct storage_data; struct guild_storage; +struct block_list; struct unit_data; struct map_session_data; struct homun_data; diff --git a/src/map/date.c b/src/map/date.c index 975a00c50..f38ead858 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -1,14 +1,10 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - +#include "../common/cbasetypes.h" #include "date.h" - #include -#include "../common/cbasetypes.h" - int date_get_year(void) { time_t t; diff --git a/src/map/date.h b/src/map/date.h index b3ed59b2f..46f0d86c3 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -4,8 +4,6 @@ #ifndef _MAP_DATE_H_ #define _MAP_DATE_H_ -#include "../common/cbasetypes.h" - int date_get_year(void); int date_get_month(void); int date_get_day(void); diff --git a/src/map/duel.c b/src/map/duel.c index a423ef240..af2741f77 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -2,20 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "atcommand.h" // msg_txt +#include "clif.h" #include "duel.h" +#include "pc.h" #include #include #include #include -#include "atcommand.h" // msg_txt -#include "clif.h" -#include "pc.h" -#include "../common/cbasetypes.h" - /*========================================== * Duel organizing functions [LuzZza] *------------------------------------------*/ diff --git a/src/map/duel.h b/src/map/duel.h index 956aed36d..5405d2eee 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -5,10 +5,6 @@ #ifndef _MAP_DUEL_H_ #define _MAP_DUEL_H_ -#include "../common/cbasetypes.h" - -struct map_session_data; - struct duel { int members_count; int invites_count; diff --git a/src/map/elemental.c b/src/map/elemental.c index 323df41e1..f335600d6 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -2,44 +2,42 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "elemental.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/utils.h" +#include "../common/random.h" +#include "../common/strlib.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "elemental.h" + +#include +#include +#include +#include struct elemental_interface elemental_s; diff --git a/src/map/elemental.h b/src/map/elemental.h index aa27aadc9..6d04a41a5 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -7,7 +7,6 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/mmo.h" // NAME_LENGTH /** * Defines diff --git a/src/map/guild.c b/src/map/guild.c index 69f67238d..fa5805c8b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2,37 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "guild.h" - -#include -#include -#include - -#include "battle.h" -#include "clif.h" -#include "instance.h" -#include "intif.h" -#include "log.h" -#include "map.h" -#include "mob.h" -#include "npc.h" -#include "pc.h" -#include "skill.h" -#include "status.h" -#include "storage.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/ers.h" +#include "../common/timer.h" +#include "../common/nullpo.h" #include "../common/malloc.h" #include "../common/mapindex.h" -#include "../common/nullpo.h" #include "../common/showmsg.h" +#include "../common/ers.h" #include "../common/strlib.h" -#include "../common/timer.h" #include "../common/utils.h" +#include "../common/HPM.h" + +#include "map.h" +#include "guild.h" +#include "storage.h" +#include "battle.h" +#include "npc.h" +#include "pc.h" +#include "status.h" +#include "mob.h" +#include "intif.h" +#include "clif.h" +#include "skill.h" +#include "log.h" +#include "instance.h" + +#include +#include +#include struct guild_interface guild_s; diff --git a/src/map/guild.h b/src/map/guild.h index 34e27a56c..b03bd664d 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -5,10 +5,18 @@ #ifndef _MAP_GUILD_H_ #define _MAP_GUILD_H_ -#include "map.h" // EVENT_NAME_LENGTH, TBL_PC -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" +//#include "../common/mmo.h" +#include "map.h" // NAME_LENGTH + +/** + * Declarations + **/ +struct guild; +struct guild_member; +struct guild_position; +struct guild_castle; +struct map_session_data; +struct mob_data; /** * Defines diff --git a/src/map/homunculus.c b/src/map/homunculus.c index b6a83d1cb..ff9f7a5b1 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -2,45 +2,43 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH -#include "homunculus.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" + +#include "homunculus.h" + +#include +#include +#include +#include struct homunculus_interface homunculus_s; diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 9eef6af5b..e6d59e30e 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -5,10 +5,9 @@ #ifndef _MAP_HOMUNCULUS_H_ #define _MAP_HOMUNCULUS_H_ -#include "pc.h" #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/mmo.h" +#include "pc.h" #define MAX_HOM_SKILL_REQUIRE 5 #define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX) diff --git a/src/map/instance.c b/src/map/instance.c index 5789d7dd6..caf622b3d 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -2,32 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/db.h" +#include "../common/HPM.h" +#include "clif.h" #include "instance.h" +#include "map.h" +#include "npc.h" +#include "party.h" +#include "pc.h" -#include #include #include #include +#include #include -#include "clif.h" -#include "map.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" - struct instance_interface instance_s; /// Checks whether given instance id is valid or not. diff --git a/src/map/instance.h b/src/map/instance.h index ae649eda7..712a0f141 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -6,11 +6,8 @@ #define _MAP_INSTANCE_H_ #include "script.h" // struct reg_db -#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct point - struct block_list; -struct map_session_data; #define INSTANCE_NAME_LENGTH (60+1) diff --git a/src/map/intif.c b/src/map/intif.c index 383150fbc..6bd24368a 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1,40 +1,37 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "intif.h" - -#include -#include -#include -#include -#include -#include - -#include "atcommand.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "map.h" #include "battle.h" #include "chrif.h" #include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" +#include "pc.h" +#include "intif.h" #include "log.h" -#include "mail.h" -#include "map.h" -#include "mercenary.h" +#include "storage.h" #include "party.h" -#include "pc.h" +#include "guild.h" #include "pet.h" +#include "atcommand.h" +#include "mercenary.h" +#include "homunculus.h" +#include "elemental.h" +#include "mail.h" #include "quest.h" -#include "storage.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" + +#include +#include +#include +#include +#include +#include + struct intif_interface intif_s; diff --git a/src/map/intif.h b/src/map/intif.h index b6ee727f3..290dcfcdc 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -5,22 +5,19 @@ #ifndef _MAP_INTIF_H_ #define _MAP_INTIF_H_ -#include "../common/cbasetypes.h" /** * Declarations **/ -struct auction_data; +struct party_member; struct guild_member; struct guild_position; -struct guild_storage; -struct mail_message; -struct map_session_data; -struct party_member; -struct s_elemental; +struct s_pet; struct s_homunculus; struct s_mercenary; -struct s_pet; +struct s_elemental; +struct mail_message; +struct auction_data; /** * Defines diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index 6f016697f..ff28082e7 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -2,25 +2,23 @@ // See the LICENSE file // Base Author: shennetsind @ http://hercules.ws -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/random.h" +#include "map.h" +#include "pc.h" +#include "clif.h" #include "irc-bot.h" #include #include #include -#include "clif.h" -#include "map.h" -#include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" - //#define IRCBOT_DEBUG struct irc_bot_interface irc_bot_s; diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index 60f03fca5..c15a5d46a 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -6,8 +6,6 @@ #ifndef _MAP_IRC_BOT_H_ #define _MAP_IRC_BOT_H_ -#include "../common/cbasetypes.h" - #define IRC_NICK_LENGTH 40 #define IRC_IDENT_LENGTH 40 #define IRC_HOST_LENGTH 63 diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 1981f435c..5eeb90be5 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2,27 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH, RENEWAL -#include "itemdb.h" - -#include -#include -#include - -#include "battle.h" // struct battle_config -#include "map.h" -#include "mob.h" // MAX_MOB_DB -#include "pc.h" // W_MUSICAL, W_WHIP -#include "script.h" // item script processing -#include "../common/conf.h" -#include "../common/malloc.h" #include "../common/nullpo.h" +#include "../common/malloc.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/utils.h" +#include "../common/conf.h" +#include "itemdb.h" +#include "map.h" +#include "battle.h" // struct battle_config +#include "script.h" // item script processing +#include "pc.h" // W_MUSICAL, W_WHIP + +#include +#include +#include struct itemdb_interface itemdb_s; diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 12766b288..77fb2e2ec 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -5,12 +5,9 @@ #ifndef _MAP_ITEMDB_H_ #define _MAP_ITEMDB_H_ -#include "map.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" #include "../common/db.h" #include "../common/mmo.h" // ITEM_NAME_LENGTH -#include "../common/sql.h" +#include "map.h" /** * Declarations diff --git a/src/map/log.c b/src/map/log.c index 523ef1d65..19a98f34b 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -2,24 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "log.h" - -#include -#include -#include - +#include "../common/cbasetypes.h" +#include "../common/sql.h" // SQL_INNODB +#include "../common/strlib.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" #include "battle.h" #include "itemdb.h" +#include "log.h" #include "map.h" #include "mob.h" #include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/sql.h" // SQL_INNODB -#include "../common/strlib.h" + +#include +#include +#include struct log_interface log_s; diff --git a/src/map/log.h b/src/map/log.h index ecfedeac2..b2cb92c20 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -11,10 +11,11 @@ /** * Declarations **/ -struct item; -struct item_data; +struct block_list; struct map_session_data; struct mob_data; +struct item; +struct item_data; /** * Defines diff --git a/src/map/mail.c b/src/map/mail.c index 7ba7d7470..371aa892f 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -2,20 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/nullpo.h" +#include "../common/showmsg.h" #include "mail.h" - -#include -#include - #include "atcommand.h" -#include "clif.h" #include "itemdb.h" -#include "log.h" +#include "clif.h" #include "pc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#include "log.h" + +#include +#include struct mail_interface mail_s; diff --git a/src/map/mail.h b/src/map/mail.h index 30b032ef4..8df537ff3 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -5,11 +5,7 @@ #ifndef _MAP_MAIL_H_ #define _MAP_MAIL_H_ -#include "../common/cbasetypes.h" - -struct item; -struct mail_message; -struct map_session_data; +#include "../common/mmo.h" struct mail_interface { void (*clear) (struct map_session_data *sd); diff --git a/src/map/map.c b/src/map/map.c index 01d3dbb9f..315924e2e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2,66 +2,62 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/core.h" +#include "../common/timer.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/socket.h" // WFIFO*() +#include "../common/showmsg.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/console.h" +#include "../common/HPM.h" -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL #include "map.h" - -#include -#include -#include -#include -#include - -#include "HPMmap.h" -#include "atcommand.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" +#include "path.h" #include "chrif.h" #include "clif.h" #include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" #include "intif.h" -#include "irc-bot.h" -#include "itemdb.h" -#include "log.h" -#include "mail.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" #include "npc.h" -#include "npc.h" // npc_setcells(), npc_unsetcells() -#include "party.h" -#include "path.h" #include "pc.h" -#include "pet.h" -#include "quest.h" -#include "script.h" -#include "skill.h" #include "status.h" +#include "mob.h" +#include "npc.h" // npc_setcells(), npc_unsetcells() +#include "chat.h" +#include "itemdb.h" #include "storage.h" +#include "skill.h" #include "trade.h" +#include "party.h" #include "unit.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/console.h" -#include "../common/core.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // WFIFO*() -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "battle.h" +#include "battleground.h" +#include "quest.h" +#include "script.h" +#include "mapreg.h" +#include "guild.h" +#include "pet.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "elemental.h" +#include "atcommand.h" +#include "log.h" +#include "mail.h" +#include "irc-bot.h" +#include "HPMmap.h" +#include +#include +#include +#include +#include #ifndef _WIN32 #include #endif @@ -5486,8 +5482,8 @@ void map_cp_defaults(void) { map->cpsd->bl.y = MAP_DEFAULT_Y; map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT); - console->input->addCommand("gm:info",CPCMD_A(gm_position)); - console->input->addCommand("gm:use",CPCMD_A(gm_use)); + console->addCommand("gm:info",CPCMD_A(gm_position)); + console->addCommand("gm:use",CPCMD_A(gm_use)); #endif } /* Hercules Plugin Mananger */ @@ -5843,7 +5839,7 @@ int do_init(int argc, char *argv[]) Sql_HerculesUpdateCheck(map->mysql_handle); #ifdef CONSOLE_INPUT - console->input->setSQL(map->mysql_handle); + console->setSQL(map->mysql_handle); #endif ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port); diff --git a/src/map/map.h b/src/map/map.h index 539b02ed8..c61868b13 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -5,18 +5,18 @@ #ifndef _MAP_MAP_H_ #define _MAP_MAP_H_ -#include - -#include "atcommand.h" #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" #include "../common/mapindex.h" #include "../common/db.h" +#include "../config/core.h" #include "../common/sql.h" +#include "atcommand.h" +#include -struct mob_data; struct npc_data; +struct item_data; struct hChSysCh; enum E_MAPSERVER_ST { @@ -36,6 +36,7 @@ enum E_MAPSERVER_ST { #define NATURAL_HEAL_INTERVAL 500 #define MIN_FLOORITEM 2 #define MAX_FLOORITEM START_ACCOUNT_NUM +#define MAX_LEVEL 175 #define MAX_IGNORE_LIST 20 // official is 14 #define MAX_VENDING 12 #define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo] diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index f026fde00..61c25f24e 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -2,15 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "mapreg.h" - -#include -#include - -#include "map.h" // map->mysql_handle -#include "script.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/ers.h" @@ -19,6 +10,11 @@ #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "map.h" // map->mysql_handle +#include "script.h" +#include "mapreg.h" +#include +#include struct mapreg_interface mapreg_s; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 26bc8c188..495621014 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -2,44 +2,42 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "mercenary.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "mercenary.h" + +#include +#include +#include +#include struct mercenary_interface mercenary_s; diff --git a/src/map/mercenary.h b/src/map/mercenary.h index b998ac006..dd9266b2e 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -6,7 +6,6 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" // number of cells that a mercenary can walk to from it's master before being warped #define MAX_MER_DISTANCE 15 diff --git a/src/map/mob.c b/src/map/mob.c index 11ac74621..8f12d4b1b 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2,49 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP -#include "mob.h" - -#include -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/db.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/ers.h" +#include "../common/random.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/socket.h" -#include "atcommand.h" -#include "battle.h" +#include "map.h" +#include "path.h" #include "clif.h" -#include "date.h" +#include "intif.h" +#include "pc.h" +#include "pet.h" +#include "status.h" +#include "mob.h" +#include "homunculus.h" +#include "mercenary.h" #include "elemental.h" #include "guild.h" -#include "homunculus.h" -#include "intif.h" #include "itemdb.h" -#include "log.h" -#include "map.h" -#include "mercenary.h" -#include "npc.h" +#include "skill.h" +#include "battle.h" #include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "quest.h" +#include "npc.h" +#include "log.h" #include "script.h" -#include "skill.h" -#include "status.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "atcommand.h" +#include "date.h" +#include "quest.h" + +#include +#include +#include +#include +#include struct mob_interface mob_s; diff --git a/src/map/mob.h b/src/map/mob.h index d07f78c77..80175b1db 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -5,11 +5,12 @@ #ifndef _MAP_MOB_H_ #define _MAP_MOB_H_ -#include "map.h" // struct status_data, struct view_data, struct mob_skill -#include "status.h" // struct status_data, struct status_change -#include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct item +#include "guild.h" // struct guardian_data +#include "map.h" // struct status_data, struct view_data, struct mob_skill +#include "status.h" // struct status data, struct status_change +#include "unit.h" // unit_stop_walking(), unit_stop_attack() +#include "npc.h" #define MAX_RANDOMMONSTER 5 diff --git a/src/map/npc.c b/src/map/npc.c index 8e5854dbf..20b500630 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2,44 +2,41 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL -#include "npc.h" - -#include -#include -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/db.h" +#include "../common/socket.h" +#include "../common/HPM.h" -#include "battle.h" -#include "chat.h" +#include "map.h" +#include "log.h" #include "clif.h" -#include "instance.h" #include "intif.h" +#include "pc.h" +#include "status.h" #include "itemdb.h" -#include "log.h" -#include "map.h" +#include "script.h" #include "mob.h" -#include "pc.h" #include "pet.h" -#include "script.h" +#include "instance.h" +#include "battle.h" #include "skill.h" -#include "status.h" #include "unit.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "npc.h" +#include "chat.h" + +#include +#include +#include +#include +#include +#include struct npc_interface npc_s; diff --git a/src/map/npc.h b/src/map/npc.h index 6e9686d33..c154b14d0 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -8,10 +8,10 @@ #include "map.h" // struct block_list #include "status.h" // struct status_change #include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" -#include "../common/db.h" struct HPluginData; +struct block_list; +struct npc_data; struct view_data; enum npc_parse_options { diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index f245ffea5..9d5639efc 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -2,27 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - #ifdef PCRE_SUPPORT +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" + +#include "mob.h" // struct mob_data #include "npc.h" // struct npc_data +#include "pc.h" // struct map_session_data +#include "script.h" // set_var() + +#include "../../3rdparty/pcre/include/pcre.h" -#include #include #include #include - -#include "../../3rdparty/pcre/include/pcre.h" - -#include "mob.h" // struct mob_data -#include "pc.h" // struct map_session_data -#include "script.h" // set_var() -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" +#include /** * interface sources diff --git a/src/map/party.c b/src/map/party.c index 7c49e241c..cf5e7bbe3 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,37 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/socket.h" // last_tick +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/utils.h" +#include "../common/strlib.h" +#include "../common/HPM.h" -#include "../config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP #include "party.h" - -#include -#include -#include - #include "atcommand.h" //msg_txt() -#include "battle.h" -#include "clif.h" +#include "pc.h" +#include "map.h" #include "instance.h" +#include "battle.h" #include "intif.h" -#include "itemdb.h" +#include "clif.h" #include "log.h" -#include "map.h" -#include "mob.h" // struct mob_data -#include "pc.h" #include "skill.h" #include "status.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // last_tick -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "itemdb.h" + +#include +#include +#include + struct party_interface party_s; diff --git a/src/map/party.h b/src/map/party.h index 3bad22b13..ed8289af6 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -5,12 +5,11 @@ #ifndef _MAP_PARTY_H_ #define _MAP_PARTY_H_ +#include "../common/mmo.h" // struct party +#include "../config/core.h" #include -#include "map.h" // TBL_PC -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" // struct party +#include "map.h" #define PARTY_BOOKING_JOBS 6 #define PARTY_BOOKING_RESULTS 10 diff --git a/src/map/path.c b/src/map/path.c index d02e9ee4a..ae9fc389d 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -2,16 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA -#include "path.h" - -#include -#include -#include - -#include "map.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -19,6 +9,13 @@ #include "../common/random.h" #include "../common/showmsg.h" +#include "path.h" +#include "map.h" + +#include +#include +#include + #define SET_OPEN 0 #define SET_CLOSED 1 diff --git a/src/map/path.h b/src/map/path.h index b48ff05fb..0b67a0120 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -6,7 +6,6 @@ #define _MAP_PATH_H_ #include "map.h" // enum cell_chk -#include "../common/cbasetypes.h" #define MOVE_COST 10 #define MOVE_DIAGONAL_COST 14 diff --git a/src/map/pc.c b/src/map/pc.c index 45adfe22a..c8fb14e55 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2,16 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/core.h" // get_svn_revision() +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // session[] +#include "../common/strlib.h" // safestrncpy() +#include "../common/timer.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/mmo.h" //NAME_LENGTH +#include "../common/sysinfo.h" -#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_CARTS, MAX_SPIRITBALL, NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT #include "pc.h" - -#include -#include -#include -#include - #include "atcommand.h" // get_atcommand_level() #include "battle.h" // battle_config #include "battleground.h" @@ -20,40 +25,32 @@ #include "clif.h" #include "date.h" // is_day_of_*() #include "duel.h" -#include "elemental.h" -#include "guild.h" // guild->search(), guild_request_info() -#include "homunculus.h" -#include "instance.h" #include "intif.h" #include "itemdb.h" #include "log.h" #include "mail.h" #include "map.h" +#include "path.h" +#include "homunculus.h" +#include "instance.h" #include "mercenary.h" -#include "mob.h" // struct mob_data +#include "elemental.h" #include "npc.h" // fake_nd -#include "party.h" // party->search() -#include "path.h" -#include "pc_groups.h" #include "pet.h" // pet_unlocktarget() -#include "quest.h" +#include "party.h" // party->search() +#include "guild.h" // guild->search(), guild_request_info() #include "script.h" // script_config #include "skill.h" #include "status.h" // struct status_data #include "storage.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/core.h" // get_svn_revision() -#include "../common/malloc.h" -#include "../common/mmo.h" //NAME_LENGTH -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // session[] -#include "../common/strlib.h" // safestrncpy() -#include "../common/sysinfo.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "pc_groups.h" +#include "quest.h" + +#include +#include +#include +#include + struct pc_interface pc_s; @@ -10654,7 +10651,9 @@ void pc_defaults(void) { memset(pc->exp_table, 0, sizeof(pc->exp_table) + sizeof(pc->max_level) + sizeof(pc->statp) +#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) + sizeof(pc->level_penalty) +#endif + sizeof(pc->skill_tree) + sizeof(pc->smith_fame_list) + sizeof(pc->chemist_fame_list) diff --git a/src/map/pc.h b/src/map/pc.h index c4026a48d..70df9ca56 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -5,23 +5,23 @@ #ifndef _MAP_PC_H_ #define _MAP_PC_H_ -#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT - +#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus +#include "../common/ers.h" +#include "../common/timer.h" // INVALID_TIMER +#include "atcommand.h" // AtCommandType #include "battle.h" // battle_config -#include "battleground.h" // enum bg_queue_types +#include "battleground.h" #include "buyingstore.h" // struct s_buyingstore -#include "itemdb.h" // MAX_ITEMDELAYS -#include "log.h" // struct e_log_pick_type -#include "map.h" // RC_MAX, ELE_MAX -#include "pc_groups.h" // GroupSettings -#include "script.h" // struct reg_db +#include "itemdb.h" +#include "log.h" +#include "map.h" // RC_MAX +#include "mob.h" +#include "pc_groups.h" +#include "script.h" // struct script_reg, struct script_regstr #include "searchstore.h" // struct s_search_store_info -#include "status.h" // enum sc_type, OPTION_* -#include "unit.h" // struct unit_data, struct view_data +#include "status.h" // OPTION_*, struct weapon_atk +#include "unit.h" // unit_stop_attack(), unit_stop_walking() #include "vending.h" // struct s_vending -#include "../common/cbasetypes.h" -#include "../common/ers.h" // struct eri -#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus /** * Defines @@ -742,8 +742,9 @@ struct pc_interface { unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; unsigned int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; +#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; - +#endif unsigned int equip_pos[EQI_MAX]; /* */ struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE]; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index a917ef409..906462c7e 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,14 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pc_groups.h" - -#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() -#include "clif.h" // clif->GM_kick() -#include "map.h" // mapiterator -#include "pc.h" // pc->set_group() #include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/db.h" @@ -18,6 +10,12 @@ #include "../common/showmsg.h" #include "../common/strlib.h" // strcmp +#include "pc_groups.h" +#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() +#include "clif.h" // clif->GM_kick() +#include "map.h" // mapiterator +#include "pc.h" // pc->set_group() + static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd() struct pc_groups_interface pcg_s; diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 7c8cdd82a..5c03f999f 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -5,10 +5,6 @@ #ifndef _MAP_PC_GROUPS_H_ #define _MAP_PC_GROUPS_H_ -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/db.h" - /// PC permissions enum e_pc_permission { PC_PERM_NONE = 0, // #0 diff --git a/src/map/pet.c b/src/map/pet.c index aa2be4473..993497434 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -2,39 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pet.h" - -#include -#include -#include +#include "../common/db.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" -#include "atcommand.h" // msg_txt() -#include "battle.h" -#include "chrif.h" -#include "clif.h" +#include "pc.h" +#include "status.h" +#include "map.h" +#include "path.h" #include "intif.h" +#include "clif.h" +#include "chrif.h" +#include "pet.h" #include "itemdb.h" -#include "log.h" -#include "map.h" +#include "battle.h" #include "mob.h" #include "npc.h" -#include "path.h" -#include "pc.h" #include "script.h" #include "skill.h" -#include "status.h" #include "unit.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "atcommand.h" // msg_txt() +#include "log.h" + +#include +#include +#include struct pet_interface pet_s; diff --git a/src/map/pet.h b/src/map/pet.h index 8dde0fac2..4ec30b3fb 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -5,14 +5,8 @@ #ifndef _MAP_PET_H_ #define _MAP_PET_H_ -#include "map.h" // struct block_list -#include "status.h" // enum sc_type -#include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // NAME_LENGTH, struct s_pet - -#define MAX_PET_DB 300 -#define MAX_PETLOOT_SIZE 30 +#define MAX_PET_DB 300 +#define MAX_PETLOOT_SIZE 30 struct s_pet_db { short class_; diff --git a/src/map/quest.c b/src/map/quest.c index b76d6bc82..bde276f9d 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -2,37 +2,36 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "map.h" +#include "pc.h" +#include "npc.h" +#include "itemdb.h" +#include "script.h" +#include "intif.h" +#include "battle.h" +#include "mob.h" +#include "party.h" +#include "unit.h" +#include "log.h" +#include "clif.h" #include "quest.h" +#include "chrif.h" -#include #include #include #include +#include #include -#include "battle.h" -#include "chrif.h" -#include "clif.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "script.h" -#include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" struct quest_interface quest_s; diff --git a/src/map/quest.h b/src/map/quest.h index 87894d639..e01e35619 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -5,10 +5,6 @@ #ifndef _MAP_QUEST_H_ #define _MAP_QUEST_H_ -#include "map.h" // TBL_PC -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES - #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 struct quest_db { diff --git a/src/map/script.c b/src/map/script.c index 068be8524..4d77c506b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2,46 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL -#include "script.h" - -#include -#include -#include -#include - -#include "atcommand.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "mail.h" -#include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "pet.h" -#include "quest.h" -#include "skill.h" -#include "status.h" -#include "status.h" -#include "storage.h" -#include "unit.h" #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/md5calc.h" @@ -50,10 +10,47 @@ #include "../common/showmsg.h" #include "../common/socket.h" // usage: getcharip #include "../common/strlib.h" -#include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/sysinfo.h" + +#include "map.h" +#include "path.h" +#include "clif.h" +#include "chrif.h" +#include "itemdb.h" +#include "pc.h" +#include "status.h" +#include "storage.h" +#include "mob.h" +#include "npc.h" +#include "pet.h" +#include "mapreg.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "intif.h" +#include "skill.h" +#include "status.h" +#include "chat.h" +#include "battle.h" +#include "battleground.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" +#include "log.h" +#include "unit.h" +#include "pet.h" +#include "mail.h" +#include "script.h" +#include "quest.h" +#include "elemental.h" +#include "../config/core.h" +#include +#include +#include +#include #ifndef WIN32 #include #endif diff --git a/src/map/script.h b/src/map/script.h index 899c745da..90b18d87f 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -5,19 +5,17 @@ #ifndef _MAP_SCRIPT_H_ #define _MAP_SCRIPT_H_ +#include "../common/strlib.h" //StringBuf +#include "../common/cbasetypes.h" +#include "map.h" //EVENT_NAME_LENGTH + #include #include -#include "map.h" //EVENT_NAME_LENGTH -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" // struct item -#include "../common/sql.h" // Sql -#include "../common/strlib.h" //StringBuf - /** * Declarations **/ +struct map_session_data; struct eri; /** diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 72b28aacd..0144aea93 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -2,17 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "searchstore.h" // struct s_search_store_info - -#include "battle.h" // battle_config.* -#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* -#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/malloc.h" // aMalloc, aRealloc, aFree #include "../common/showmsg.h" // ShowError, ShowWarning #include "../common/strlib.h" // safestrncpy +#include "battle.h" // battle_config.* +#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* +#include "pc.h" // struct map_session_data +#include "searchstore.h" // struct s_search_store_info struct searchstore_interface searchstore_s; diff --git a/src/map/searchstore.h b/src/map/searchstore.h index c9b93ba54..827e39053 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -5,12 +5,6 @@ #ifndef _MAP_SEARCHSTORE_H_ #define _MAP_SEARCHSTORE_H_ -#include - -#include "map.h" // MESSAGE_SIZE -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_SLOTS - /** * Defines **/ diff --git a/src/map/skill.c b/src/map/skill.c index b2e94ec79..c8388770a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2,48 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION() -#include "skill.h" - -#include -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" -#include "battle.h" -#include "battleground.h" -#include "chrif.h" +#include "map.h" +#include "path.h" #include "clif.h" -#include "date.h" -#include "elemental.h" -#include "guild.h" +#include "pc.h" +#include "status.h" +#include "skill.h" +#include "pet.h" #include "homunculus.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" #include "mercenary.h" +#include "elemental.h" #include "mob.h" #include "npc.h" +#include "battle.h" +#include "battleground.h" #include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" +#include "itemdb.h" #include "script.h" -#include "status.h" +#include "intif.h" +#include "log.h" +#include "chrif.h" +#include "guild.h" +#include "date.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" + +#include +#include +#include +#include +#include + #define SKILLUNITTIMER_INTERVAL 100 diff --git a/src/map/skill.h b/src/map/skill.h index b6dbb1fcb..dda310bd4 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -5,23 +5,19 @@ #ifndef _MAP_SKILL_H_ #define _MAP_SKILL_H_ -#include "../config/core.h" // RENEWAL_CAST - -#include "map.h" // struct block_list -#include "status.h" // enum sc_type -#include "../common/cbasetypes.h" -#include "../common/db.h" #include "../common/mmo.h" // MAX_SKILL, struct square +#include "../common/db.h" +#include "map.h" // struct block_list /** * Declarations **/ -struct homun_data; struct map_session_data; -struct mercenary_data; +struct homun_data; struct skill_unit; -struct square; +struct skill_unit_group; struct status_change_entry; +struct square; /** * Defines diff --git a/src/map/status.c b/src/map/status.c index eb06138da..4c2bc6d22 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2,46 +2,43 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP -#include "status.h" - -#include -#include -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/malloc.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/strlib.h" -#include "battle.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "itemdb.h" #include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" #include "path.h" #include "pc.h" #include "pet.h" -#include "script.h" +#include "npc.h" +#include "mob.h" +#include "clif.h" +#include "guild.h" #include "skill.h" +#include "itemdb.h" +#include "battle.h" +#include "chrif.h" #include "skill.h" +#include "status.h" +#include "script.h" #include "unit.h" +#include "homunculus.h" +#include "mercenary.h" +#include "elemental.h" #include "vending.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" + +#include +#include +#include +#include +#include +#include struct status_interface status_s; diff --git a/src/map/status.h b/src/map/status.h index baa586297..e47c2b365 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -5,18 +5,14 @@ #ifndef _MAP_STATUS_H_ #define _MAP_STATUS_H_ -#include "../config/core.h" // defType, NEW_CARTS, RENEWAL, RENEWAL_ASPD - -#include "../common/cbasetypes.h" #include "../common/mmo.h" struct block_list; -struct elemental_data; -struct homun_data; -struct mercenary_data; struct mob_data; -struct npc_data; struct pet_data; +struct homun_data; +struct mercenary_data; +struct status_change; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] @@ -1882,7 +1878,11 @@ struct status_interface { int hp_coefficient2[CLASS_COUNT]; int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1]; int sp_coefficient[CLASS_COUNT]; - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD +#ifdef RENEWAL_ASPD + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; +#else + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89] +#endif sc_type Skill2SCTable[MAX_SKILL]; // skill -> status int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) unsigned int ChangeFlagTable[SC_MAX]; // status -> flags diff --git a/src/map/storage.c b/src/map/storage.c index 2db5fff3d..e65ed7b80 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -2,29 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "map.h" // struct map_session_data #include "storage.h" - -#include -#include -#include - -#include "atcommand.h" -#include "battle.h" #include "chrif.h" +#include "itemdb.h" #include "clif.h" -#include "guild.h" #include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" // struct map_session_data #include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#include "guild.h" +#include "battle.h" +#include "atcommand.h" +#include "log.h" + +#include +#include +#include struct storage_interface storage_s; struct guild_storage_interface gstorage_s; diff --git a/src/map/storage.h b/src/map/storage.h index 5edb68cfc..8f9f904f6 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -5,12 +5,11 @@ #ifndef _MAP_STORAGE_H_ #define _MAP_STORAGE_H_ -#include "../common/cbasetypes.h" -#include "../common/db.h" - +struct storage_data; struct guild_storage; struct item; struct map_session_data; +struct DBMap; struct storage_interface { /* */ diff --git a/src/map/trade.c b/src/map/trade.c index 83426c407..44b669ebd 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -2,27 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/nullpo.h" +#include "../common/socket.h" #include "trade.h" - -#include -#include - -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" #include "clif.h" -#include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "npc.h" #include "path.h" #include "pc.h" +#include "npc.h" +#include "battle.h" +#include "chrif.h" #include "storage.h" -#include "../common/nullpo.h" -#include "../common/socket.h" +#include "intif.h" +#include "atcommand.h" +#include "log.h" + +#include +#include struct trade_interface trade_s; diff --git a/src/map/unit.c b/src/map/unit.c index 0ad770e80..151d4bad5 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2,48 +2,45 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // RENEWAL_CAST -#include "unit.h" - -#include -#include -#include +#include "../common/showmsg.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/HPM.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "clif.h" -#include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" -#include "intif.h" #include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "path.h" #include "pc.h" +#include "mob.h" #include "pet.h" -#include "script.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "elemental.h" #include "skill.h" +#include "clif.h" +#include "duel.h" +#include "npc.h" +#include "guild.h" #include "status.h" -#include "storage.h" +#include "unit.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" #include "trade.h" #include "vending.h" -#include "../common/HPM.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" +#include "party.h" +#include "intif.h" +#include "chrif.h" +#include "script.h" +#include "storage.h" + +#include +#include +#include + const short dirx[8]={0,-1,-1,-1,0,1,1,1}; const short diry[8]={1,1,0,-1,-1,-1,0,1}; diff --git a/src/map/unit.h b/src/map/unit.h index 9e05647b1..33fa4e052 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -5,13 +5,15 @@ #ifndef _MAP_UNIT_H_ #define _MAP_UNIT_H_ +//#include "map.h" +struct block_list; +struct unit_data; +struct map_session_data; + #include "clif.h" // clr_type +#include "map.h" // struct block_list #include "path.h" // struct walkpath_data -#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset -#include "../common/cbasetypes.h" - -struct map_session_data; -struct block_list; +#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset struct unit_data { struct block_list *bl; diff --git a/src/map/vending.c b/src/map/vending.c index c8ac814db..9462975b3 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -2,27 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "vending.h" - -#include -#include - -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "../common/nullpo.h" +#include "../common/strlib.h" +#include "../common/utils.h" #include "clif.h" #include "itemdb.h" -#include "log.h" +#include "atcommand.h" #include "map.h" -#include "npc.h" #include "path.h" +#include "chrif.h" +#include "vending.h" #include "pc.h" +#include "npc.h" #include "skill.h" -#include "../common/nullpo.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#include "battle.h" +#include "log.h" + +#include +#include struct vending_interface vending_s; diff --git a/src/map/vending.h b/src/map/vending.h index a70726374..a212f8385 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -7,7 +7,6 @@ #include "../common/cbasetypes.h" #include "../common/db.h" - struct map_session_data; struct s_search_store_search; diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 96d51aec6..85d5fb548 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -1,14 +1,6 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "../config/core.h" // RENEWAL - -#include -#include -#include - #include "../common/cbasetypes.h" #include "../common/grfio.h" #include "../common/malloc.h" @@ -16,6 +8,12 @@ #include "../common/showmsg.h" #include "../common/utils.h" +#include "../config/renewal.h" + +#include +#include +#include + #ifndef _WIN32 #include #endif -- cgit v1.2.3-70-g09d2 From 0ab52ac65bdba93be94e4149e267698d31b41d72 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 10 May 2014 17:17:13 +0200 Subject: Re-commit of "Fixed order of includes in all source files" This reverts commit 94657284973f4037596bae468ebfbee5c217e02b. --- src/char/char.c | 44 +++++----- src/char/char.h | 1 - src/char/int_auction.c | 25 +++--- src/char/int_elemental.c | 22 +++-- src/char/int_elemental.h | 2 +- src/char/int_guild.c | 24 ++--- src/char/int_guild.h | 3 - src/char/int_homun.c | 21 +++-- src/char/int_homun.h | 2 + src/char/int_mail.c | 20 +++-- src/char/int_mail.h | 3 + src/char/int_mercenary.c | 22 +++-- src/char/int_mercenary.h | 4 +- src/char/int_party.c | 25 +++--- src/char/int_party.h | 2 - src/char/int_pet.c | 22 +++-- src/char/int_quest.c | 22 ++--- src/char/int_storage.c | 22 +++-- src/char/inter.c | 43 ++++----- src/char/inter.h | 5 +- src/char/pincode.c | 11 ++- src/common/HPM.c | 31 ++++--- src/common/HPM.h | 6 +- src/common/HPMi.h | 16 +--- src/common/cbasetypes.h | 6 ++ src/common/conf.c | 3 + src/common/conf.h | 1 + src/common/console.c | 223 ++++++++++++++++++++++++----------------------- src/common/console.h | 21 +++-- src/common/core.c | 38 ++++---- src/common/core.h | 3 +- src/common/db.c | 10 ++- src/common/db.h | 3 +- src/common/des.c | 7 +- src/common/ers.c | 8 +- src/common/grfio.c | 17 ++-- src/common/malloc.c | 11 ++- src/common/mapindex.c | 15 ++-- src/common/md5calc.c | 8 +- src/common/mmo.h | 6 +- src/common/mutex.c | 5 +- src/common/mutex.h | 1 + src/common/nullpo.c | 6 +- src/common/random.c | 18 ++-- src/common/showmsg.c | 17 ++-- src/common/showmsg.h | 23 +++-- src/common/socket.c | 64 +++++++------- src/common/socket.h | 12 +-- src/common/spinlock.h | 9 +- src/common/sql.c | 12 ++- src/common/sql.h | 3 +- src/common/strlib.c | 13 +-- src/common/strlib.h | 15 ++-- src/common/sysinfo.c | 32 +++++-- src/common/sysinfo.h | 16 ---- src/common/thread.c | 31 ++++--- src/common/thread.h | 1 - src/common/timer.c | 19 ++-- src/common/utils.c | 36 ++++---- src/common/utils.h | 3 +- src/config/const.h | 7 -- src/config/renewal.h | 1 + src/login/account.h | 1 + src/login/account_sql.c | 17 ++-- src/login/ipban_sql.c | 14 +-- src/login/login.c | 21 +++-- src/login/login.h | 2 +- src/login/loginlog.h | 2 +- src/login/loginlog_sql.c | 9 +- src/map/HPMmap.c | 42 ++++----- src/map/atcommand.c | 67 +++++++------- src/map/atcommand.h | 2 +- src/map/battle.c | 61 +++++++------ src/map/battle.h | 2 +- src/map/battleground.c | 33 +++---- src/map/battleground.h | 2 +- src/map/buyingstore.c | 17 ++-- src/map/buyingstore.h | 5 ++ src/map/chat.c | 23 ++--- src/map/chat.h | 5 +- src/map/chrif.c | 35 ++++---- src/map/chrif.h | 4 +- src/map/clif.c | 83 +++++++++--------- src/map/clif.h | 9 +- src/map/date.c | 6 +- src/map/date.h | 2 + src/map/duel.c | 10 ++- src/map/duel.h | 4 + src/map/elemental.c | 54 ++++++------ src/map/elemental.h | 1 + src/map/guild.c | 47 +++++----- src/map/guild.h | 16 +--- src/map/homunculus.c | 56 ++++++------ src/map/homunculus.h | 3 +- src/map/instance.c | 34 ++++---- src/map/instance.h | 3 + src/map/intif.c | 51 ++++++----- src/map/intif.h | 13 +-- src/map/irc-bot.c | 22 ++--- src/map/irc-bot.h | 2 + src/map/itemdb.c | 27 +++--- src/map/itemdb.h | 5 +- src/map/log.c | 23 ++--- src/map/log.h | 5 +- src/map/mail.c | 16 ++-- src/map/mail.h | 6 +- src/map/map.c | 96 ++++++++++---------- src/map/map.h | 9 +- src/map/mapreg_sql.c | 14 +-- src/map/mercenary.c | 54 ++++++------ src/map/mercenary.h | 1 + src/map/mob.c | 69 ++++++++------- src/map/mob.h | 9 +- src/map/npc.c | 57 ++++++------ src/map/npc.h | 4 +- src/map/npc_chat.c | 26 +++--- src/map/party.c | 43 ++++----- src/map/party.h | 7 +- src/map/path.c | 17 ++-- src/map/path.h | 1 + src/map/pc.c | 59 +++++++------ src/map/pc.h | 29 +++--- src/map/pc_groups.c | 14 +-- src/map/pc_groups.h | 4 + src/map/pet.c | 48 +++++----- src/map/pet.h | 10 ++- src/map/quest.c | 45 +++++----- src/map/quest.h | 4 + src/map/script.c | 79 +++++++++-------- src/map/script.h | 12 +-- src/map/searchstore.c | 11 ++- src/map/searchstore.h | 6 ++ src/map/skill.c | 64 +++++++------- src/map/skill.h | 14 +-- src/map/status.c | 59 +++++++------ src/map/status.h | 16 ++-- src/map/storage.c | 32 +++---- src/map/storage.h | 5 +- src/map/trade.c | 24 ++--- src/map/unit.c | 63 ++++++------- src/map/unit.h | 12 ++- src/map/vending.c | 27 +++--- src/map/vending.h | 1 + src/tool/mapcache.c | 14 +-- 144 files changed, 1676 insertions(+), 1367 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index 77e393c0d..6c0902644 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2,7 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "char.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "int_elemental.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_party.h" +#include "int_storage.h" +#include "inter.h" +#include "pincode.h" +#include "../common/HPM.h" #include "../common/cbasetypes.h" +#include "../common/console.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -13,25 +36,6 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/console.h" -#include "../common/HPM.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_elemental.h" -#include "int_party.h" -#include "int_storage.h" -#include "char.h" -#include "inter.h" -#include "pincode.h" - -#include -#include -#include -#include -#include -#include -#include // private declarations #define CHAR_CONF_NAME "conf/char-server.conf" @@ -5497,7 +5501,7 @@ int do_init(int argc, char **argv) { Sql_HerculesUpdateCheck(sql_handle); #ifdef CONSOLE_INPUT - console->setSQL(sql_handle); + console->input->setSQL(sql_handle); #endif ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); diff --git a/src/char/char.h b/src/char/char.h index 2928929de..09a78f6b9 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -5,7 +5,6 @@ #ifndef _COMMON_CHAR_H_ #define _COMMON_CHAR_H_ -#include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/db.h" diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 924930867..886b5be26 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -2,22 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" +#define HERCULES_CORE + +#include "int_auction.h" + +#include +#include +#include + +#include "char.h" +#include "int_mail.h" +#include "inter.h" #include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_mail.h" -#include "int_auction.h" - -#include -#include -#include static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data* diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c index ed0c2a9ed..3a36e75a2 100644 --- a/src/char/int_elemental.c +++ b/src/char/int_elemental.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_elemental.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + bool mapif_elemental_save(struct s_elemental* ele) { bool flag = true; diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index c90891fc4..c869e6fc2 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -4,7 +4,7 @@ #ifndef _CHAR_INT_ELEMENTAL_H_ #define _CHAR_INT_ELEMENTAL_H_ -struct s_elemental; +#include "../common/cbasetypes.h" void inter_elemental_sql_init(void); void inter_elemental_sql_final(void); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 895cbbb94..ffbe48e10 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -2,21 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // DBPATH +#include "int_guild.h" + +#include +#include +#include + +#include "char.h" +#include "inter.h" #include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/socket.h" #include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" +#include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_guild.h" - -#include -#include -#include #define GS_MEMBER_UNMODIFIED 0x00 #define GS_MEMBER_MODIFIED 0x01 diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 4eb7d310b..5e657ff06 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -20,9 +20,6 @@ enum { GS_REMOVE = 0x8000, }; -struct guild; -struct guild_castle; - int inter_guild_parse_frommap(int fd); int inter_guild_sql_init(void); void inter_guild_sql_final(void); diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 143277f05..795a6b927 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -2,20 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_homun.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" int inter_homunculus_sql_init(void) { diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 561dc848f..9477f4f03 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -4,6 +4,8 @@ #ifndef _CHAR_INT_HOMUN_H_ #define _CHAR_INT_HOMUN_H_ +#include "../common/cbasetypes.h" + struct s_homunculus; int inter_homunculus_sql_init(void); diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 826771676..86a36d59f 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "int_mail.h" + +#include +#include +#include + +#include "char.h" +#include "inter.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" - -#include -#include -#include static int mail_fromsql(int char_id, struct mail_data* md) { diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 7c06cdc1f..824ba48a3 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -4,6 +4,9 @@ #ifndef _CHAR_INT_MAIL_H_ #define _CHAR_INT_MAIL_H_ +struct item; +struct mail_message; + int inter_mail_parse_frommap(int fd); void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c index aecb3844a..1dffb656c 100644 --- a/src/char/int_mercenary.c +++ b/src/char/int_mercenary.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_mercenary.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + bool mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { char* data; diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index b614b8cf7..195a83b34 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -4,7 +4,9 @@ #ifndef _CHAR_INT_MERCENARY_H_ #define _CHAR_INT_MERCENARY_H_ -struct s_mercenary; +#include "../common/cbasetypes.h" + +struct mmo_charstatus; int inter_mercenary_sql_init(void); void inter_mercenary_sql_final(void); diff --git a/src/char/int_party.c b/src/char/int_party.c index 7c328c452..3e4a743d6 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -2,23 +2,26 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/socket.h" -#include "../common/showmsg.h" -#include "../common/mapindex.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + #include "int_party.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" + struct party_data { struct party party; unsigned int min_lv, max_lv; diff --git a/src/char/int_party.h b/src/char/int_party.h index 84f00635a..098c1e9a9 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -14,8 +14,6 @@ enum { PS_BREAK = 0x20, //Specify that this party must be deleted. }; -struct party; - int inter_party_parse_frommap(int fd); int inter_party_sql_init(void); void inter_party_sql_final(void); diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 25f00e6f0..29c40eff9 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -2,20 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "int_pet.h" #include #include #include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" +#include "../common/utils.h" + struct s_pet *pet_pt; //--------------------------------------------------------- diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 061dd89d9..61b43c57d 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -2,23 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "int_quest.h" + +#include +#include +#include + +#include "char.h" +#include "inter.h" #include "../common/db.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/timer.h" -#include "char.h" -#include "inter.h" -#include "int_quest.h" - -#include -#include -#include - /** * Loads the entire questlog for a character. * diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 966e61bb3..bf7b76da0 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" // StringBuf -#include "../common/sql.h" -#include "char.h" -#include "inter.h" +#define HERCULES_CORE + +#include "../config/core.h" // GP_BOUND_ITEMS +#include "int_storage.h" #include -#include #include +#include +#include "char.h" +#include "inter.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" // StringBuf #define STORAGE_MEMINC 16 diff --git a/src/char/inter.c b/src/char/inter.c index 515ca0ec4..972407ef3 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -2,33 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "char.h" +#define HERCULES_CORE + #include "inter.h" -#include "int_party.h" -#include "int_guild.h" -#include "int_storage.h" -#include "int_pet.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_mail.h" -#include "int_auction.h" -#include "int_quest.h" -#include "int_elemental.h" +#include #include -#include #include -#include - +#include #include // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool] +#include "char.h" +#include "int_auction.h" +#include "int_elemental.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mail.h" +#include "int_mercenary.h" +#include "int_party.h" +#include "int_pet.h" +#include "int_quest.h" +#include "int_storage.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" #define WISDATA_TTL (60*1000) //Wis data Time To Live (60 seconds) #define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis diff --git a/src/char/inter.h b/src/char/inter.h index 25b0c2a96..5e655237e 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -5,9 +5,10 @@ #ifndef _CHAR_INTER_H_ #define _CHAR_INTER_H_ -struct accreg; -#include "../common/sql.h" #include "char.h" +#include "../common/sql.h" + +struct accreg; int inter_init_sql(const char *file); void inter_final(void); diff --git a/src/char/pincode.c b/src/char/pincode.c index d51953448..59182f12d 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "pincode.h" + +#include + +#include "char.h" #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/strlib.h" -#include "char.h" -#include "pincode.h" - -#include int enabled = PINCODE_OK; int changetime = 0; diff --git a/src/common/HPM.c b/src/common/HPM.c index 9ffce87de..00b92dc60 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -1,26 +1,31 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "HPM.h" + +#include +#include +#include + #include "../common/cbasetypes.h" -#include "../common/mmo.h" +#include "../common/conf.h" +#include "../common/console.h" #include "../common/core.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/timer.h" -#include "../common/conf.h" -#include "../common/utils.h" -#include "../common/console.h" -#include "../common/strlib.h" #include "../common/sql.h" +#include "../common/strlib.h" #include "../common/sysinfo.h" -#include "HPM.h" +#include "../common/timer.h" +#include "../common/utils.h" -#include -#include -#include #ifndef WIN32 -#include +# include #endif struct malloc_interface iMalloc_HPM; @@ -686,7 +691,7 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po void hplugins_share_defaults(void) { /* console */ #ifdef CONSOLE_INPUT - HPM->share(console->addCommand,"addCPCommand"); + HPM->share(console->input->addCommand,"addCPCommand"); #endif /* our own */ HPM->share(hplugins_addpacket,"addPacket"); @@ -755,7 +760,7 @@ void hpm_init(void) { HPM->symbol_defaults(); #ifdef CONSOLE_INPUT - console->addCommand("plugins",CPCMD_A(plugins)); + console->input->addCommand("plugins",CPCMD_A(plugins)); #endif return; } diff --git a/src/common/HPM.h b/src/common/HPM.h index 0f0df4cda..9c176cfd6 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -4,8 +4,12 @@ #ifndef _COMMON_HPM_H_ #define _COMMON_HPM_H_ -#include "../common/cbasetypes.h" +#ifndef HERCULES_CORE +#error You should never include HPM.h from a plugin. +#endif + #include "../common/HPMi.h" +#include "../common/cbasetypes.h" #ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 19206aeca..b98e87d90 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -5,8 +5,8 @@ #define _COMMON_HPMI_H_ #include "../common/cbasetypes.h" -#include "../common/core.h" #include "../common/console.h" +#include "../common/core.h" #include "../common/sql.h" struct script_state; @@ -20,18 +20,6 @@ struct map_session_data; #define HPExport #endif -#ifndef _COMMON_SHOWMSG_H_ - HPExport void (*ShowMessage) (const char *, ...); - HPExport void (*ShowStatus) (const char *, ...); - HPExport void (*ShowSQL) (const char *, ...); - HPExport void (*ShowInfo) (const char *, ...); - HPExport void (*ShowNotice) (const char *, ...); - HPExport void (*ShowWarning) (const char *, ...); - HPExport void (*ShowDebug) (const char *, ...); - HPExport void (*ShowError) (const char *, ...); - HPExport void (*ShowFatalError) (const char *, ...); -#endif - /* after */ #include "../common/showmsg.h" @@ -192,7 +180,7 @@ HPExport struct HPMi_interface { /* pc group permission */ void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask); } HPMi_s; -#ifndef _COMMON_HPM_H_ +#ifndef HERCULES_CORE HPExport struct HPMi_interface *HPMi; #endif diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index f44e80413..da0d6b307 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -442,5 +442,11 @@ void SET_FUNCPOINTER(T1& var, T2 p) #define SET_FUNCPOINTER(var,p) ((var) = (p)) #endif +/* pointer size fix which fixes several gcc warnings */ +#ifdef __64BIT__ + #define __64BPTRSIZE(y) ((intptr)(y)) +#else + #define __64BPTRSIZE(y) (y) +#endif #endif /* _COMMON_CBASETYPES_H_ */ diff --git a/src/common/conf.c b/src/common/conf.c index b816b2f7f..46a034497 100644 --- a/src/common/conf.c +++ b/src/common/conf.c @@ -2,7 +2,10 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + #include "conf.h" + #include "../../3rdparty/libconfig/libconfig.h" #include "../common/showmsg.h" // ShowError diff --git a/src/common/conf.h b/src/common/conf.h index 9aff3df47..e5b637e47 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -6,6 +6,7 @@ #define _COMMON_CONF_H_ #include "../common/cbasetypes.h" + #include "../../3rdparty/libconfig/libconfig.h" /** diff --git a/src/common/console.c b/src/common/console.c index d8f352c8a..6a82db555 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -2,42 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT, MAX_CONSOLE_INPUT +#include "console.h" + +#include +#include + #include "../common/cbasetypes.h" -#include "../common/showmsg.h" #include "../common/core.h" +#include "../common/showmsg.h" #include "../common/sysinfo.h" -#include "../config/core.h" -#include "console.h" #ifndef MINICORE - #include "../common/ers.h" - #include "../common/malloc.h" - #include "../common/atomic.h" - #include "../common/spinlock.h" - #include "../common/thread.h" - #include "../common/mutex.h" - #include "../common/timer.h" - #include "../common/strlib.h" - #include "../common/sql.h" +# include "../common/atomic.h" +# include "../common/ers.h" +# include "../common/malloc.h" +# include "../common/mutex.h" +# include "../common/spinlock.h" +# include "../common/sql.h" +# include "../common/strlib.h" +# include "../common/thread.h" +# include "../common/timer.h" #endif -#include -#include #if !defined(WIN32) - #include - #include +# include +# include #else - #include "../common/winapi.h" // Console close event handling +# include "../common/winapi.h" // Console close event handling +# ifdef CONSOLE_INPUT +# include /* _kbhit() */ +# endif #endif +struct console_interface console_s; #ifdef CONSOLE_INPUT - #if defined(WIN32) - #include /* _kbhit() */ - #endif +struct console_input_interface console_input_s; #endif -struct console_interface console_s; - /*====================================== * CORE : Display title *--------------------------------------*/ @@ -116,12 +120,12 @@ CPCMD_C(mem_report,server) { **/ CPCMD(help) { unsigned int i = 0; - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( console->cmd_list[i]->next_count ) { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->cmd_list[i]->cmd); - console->parse_list_subs(console->cmd_list[i],2); + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( console->input->cmd_list[i]->next_count ) { + ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->input->cmd_list[i]->cmd); + console->input->parse_list_subs(console->input->cmd_list[i],2); } else { - ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->cmd_list[i]->cmd); + ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->input->cmd_list[i]->cmd); } } } @@ -144,7 +148,7 @@ CPCMD_C(skip,update) { ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n"); return; } - Sql_HerculesUpdateSkip(console->SQL, line); + Sql_HerculesUpdateSkip(console->input->SQL, line); } /** @@ -206,7 +210,7 @@ void console_load_defaults(void) { unsigned int i, len = ARRAYLENGTH(default_list); struct CParseEntry *cmd; - RECREATE(console->cmds,struct CParseEntry *, len); + RECREATE(console->input->cmds,struct CParseEntry *, len); for(i = 0; i < len; i++) { CREATE(cmd, struct CParseEntry, 1); @@ -220,12 +224,12 @@ void console_load_defaults(void) { cmd->next_count = 0; - console->cmd_count++; - console->cmds[i] = cmd; + console->input->cmd_count++; + console->input->cmds[i] = cmd; default_list[i].self = cmd; if( !default_list[i].connect ) { - RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); - console->cmd_list[console->cmd_list_count - 1] = cmd; + RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); + console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; } } @@ -233,11 +237,11 @@ void console_load_defaults(void) { unsigned int k; if( !default_list[i].connect ) continue; - for(k = 0; k < console->cmd_count; k++) { - if( strcmpi(default_list[i].connect,console->cmds[k]->cmd) == 0 ) { + for(k = 0; k < console->input->cmd_count; k++) { + if( strcmpi(default_list[i].connect,console->input->cmds[k]->cmd) == 0 ) { cmd = default_list[i].self; - RECREATE(console->cmds[k]->u.next, struct CParseEntry *, ++console->cmds[k]->next_count); - console->cmds[k]->u.next[console->cmds[k]->next_count - 1] = cmd; + RECREATE(console->input->cmds[k]->u.next, struct CParseEntry *, ++console->input->cmds[k]->next_count); + console->input->cmds[k]->u.next[console->input->cmds[k]->next_count - 1] = cmd; break; } } @@ -256,23 +260,23 @@ void console_parse_create(char *name, CParseFunc func) { safestrncpy(sublist, name, CP_CMD_LENGTH * 5); tok = strtok(sublist,":"); - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->cmd_list_count ) { - RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); + if( i == console->input->cmd_list_count ) { + RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); CREATE(cmd, struct CParseEntry, 1); safestrncpy(cmd->cmd, tok, CP_CMD_LENGTH); cmd->next_count = 0; - console->cmds[console->cmd_count - 1] = cmd; - RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count); - console->cmd_list[console->cmd_list_count - 1] = cmd; - i = console->cmd_list_count - 1; + console->input->cmds[console->input->cmd_count - 1] = cmd; + RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count); + console->input->cmd_list[console->input->cmd_list_count - 1] = cmd; + i = console->input->cmd_list_count - 1; } - cmd = console->cmd_list[i]; + cmd = console->input->cmd_list[i]; while( ( tok = strtok(NULL, ":") ) != NULL ) { for(i = 0; i < cmd->next_count; i++) { @@ -281,13 +285,13 @@ void console_parse_create(char *name, CParseFunc func) { } if ( i == cmd->next_count ) { - RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count); - CREATE(console->cmds[console->cmd_count-1], struct CParseEntry, 1); - safestrncpy(console->cmds[console->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); - console->cmds[console->cmd_count-1]->next_count = 0; + RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count); + CREATE(console->input->cmds[console->input->cmd_count-1], struct CParseEntry, 1); + safestrncpy(console->input->cmds[console->input->cmd_count-1]->cmd, tok, CP_CMD_LENGTH); + console->input->cmds[console->input->cmd_count-1]->next_count = 0; RECREATE(cmd->u.next, struct CParseEntry *, ++cmd->next_count); - cmd->u.next[cmd->next_count - 1] = console->cmds[console->cmd_count-1]; - cmd = console->cmds[console->cmd_count-1]; + cmd->u.next[cmd->next_count - 1] = console->input->cmds[console->input->cmd_count-1]; + cmd = console->input->cmds[console->input->cmd_count-1]; continue; } @@ -302,7 +306,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd); ShowInfo("%s subs\n",msg); - console->parse_list_subs(cmd->u.next[i],depth + 1); + console->input->parse_list_subs(cmd->u.next[i],depth + 1); } else { memset(msg, '-', depth); snprintf(msg + depth,CP_CMD_LENGTH * 2, " %s",cmd->u.next[i]->cmd); @@ -320,21 +324,21 @@ void console_parse_sub(char *line) { memcpy(bline, line, 200); tok = strtok(line, " "); - for ( i = 0; i < console->cmd_list_count; i++ ) { - if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 ) + for ( i = 0; i < console->input->cmd_list_count; i++ ) { + if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 ) break; } - if( i == console->cmd_list_count ) { + if( i == console->input->cmd_list_count ) { ShowError("'"CL_WHITE"%s"CL_RESET"' is not a known command, type '"CL_WHITE"help"CL_RESET"' to list all commands\n",line); return; } - cmd = console->cmd_list[i]; + cmd = console->input->cmd_list[i]; len += snprintf(sublist,CP_CMD_LENGTH * 5,"%s", cmd->cmd) + 1; - if( cmd->next_count == 0 && console->cmd_list[i]->u.func ) { + if( cmd->next_count == 0 && console->input->cmd_list[i]->u.func ) { char *r = NULL; if( (tok = strtok(NULL, " ")) ) { r = bline; @@ -351,7 +355,7 @@ void console_parse_sub(char *line) { if( strcmpi("help",tok) == 0 ) { if( cmd->next_count ) { ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",sublist); - console->parse_list_subs(cmd,2); + console->input->parse_list_subs(cmd,2); } else { ShowError("'"CL_WHITE"%s"CL_RESET"' doesn't possess any subcommands\n",sublist); } @@ -392,95 +396,95 @@ void console_parse(char* line) { } void *cThread_main(void *x) { - while( console->ptstate ) {/* loopx */ - if( console->key_pressed() ) { + while( console->input->ptstate ) {/* loopx */ + if( console->input->key_pressed() ) { char input[MAX_CONSOLE_INPUT]; - console->parse(input); + console->input->parse(input); if( input[0] != '\0' ) {/* did we get something? */ - EnterSpinLock(&console->ptlock); + EnterSpinLock(&console->input->ptlock); if( cinput.count == CONSOLE_PARSE_SIZE ) { - LeaveSpinLock(&console->ptlock); + LeaveSpinLock(&console->input->ptlock); continue;/* drop */ } safestrncpy(cinput.queue[cinput.count++],input,MAX_CONSOLE_INPUT); - LeaveSpinLock(&console->ptlock); + LeaveSpinLock(&console->input->ptlock); } } - ramutex_lock( console->ptmutex ); - racond_wait( console->ptcond, console->ptmutex, -1 ); - ramutex_unlock( console->ptmutex ); + ramutex_lock( console->input->ptmutex ); + racond_wait( console->input->ptcond, console->input->ptmutex, -1 ); + ramutex_unlock( console->input->ptmutex ); } return NULL; } int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { int i; - EnterSpinLock(&console->ptlock); + EnterSpinLock(&console->input->ptlock); for(i = 0; i < cinput.count; i++) { - console->parse_sub(cinput.queue[i]); + console->input->parse_sub(cinput.queue[i]); } cinput.count = 0; - LeaveSpinLock(&console->ptlock); - racond_signal(console->ptcond); + LeaveSpinLock(&console->input->ptlock); + racond_signal(console->input->ptcond); return 0; } void console_parse_final(void) { - if( console->ptstate ) { - InterlockedDecrement(&console->ptstate); - racond_signal(console->ptcond); + if( console->input->ptstate ) { + InterlockedDecrement(&console->input->ptstate); + racond_signal(console->input->ptcond); /* wait for thread to close */ - rathread_wait(console->pthread, NULL); + rathread_wait(console->input->pthread, NULL); - racond_destroy(console->ptcond); - ramutex_destroy(console->ptmutex); + racond_destroy(console->input->ptcond); + ramutex_destroy(console->input->ptmutex); } } void console_parse_init(void) { cinput.count = 0; - console->ptstate = 1; + console->input->ptstate = 1; - InitializeSpinLock(&console->ptlock); + InitializeSpinLock(&console->input->ptlock); - console->ptmutex = ramutex_create(); - console->ptcond = racond_create(); + console->input->ptmutex = ramutex_create(); + console->input->ptcond = racond_create(); - if( (console->pthread = rathread_create(console->pthread_main, NULL)) == NULL ){ + if( (console->input->pthread = rathread_create(console->input->pthread_main, NULL)) == NULL ){ ShowFatalError("console_parse_init: failed to spawn console_parse thread.\n"); exit(EXIT_FAILURE); } - timer->add_func_list(console->parse_timer, "console_parse_timer"); - timer->add_interval(timer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ + timer->add_func_list(console->input->parse_timer, "console_parse_timer"); + timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } void console_setSQL(Sql *SQL_handle) { - console->SQL = SQL_handle; + console->input->SQL = SQL_handle; } #endif /* CONSOLE_INPUT */ void console_init (void) { #ifdef CONSOLE_INPUT - console->cmd_count = console->cmd_list_count = 0; - console->load_defaults(); - console->parse_init(); + console->input->cmd_count = console->input->cmd_list_count = 0; + console->input->load_defaults(); + console->input->parse_init(); #endif } void console_final(void) { #ifdef CONSOLE_INPUT unsigned int i; - console->parse_final(); - for( i = 0; i < console->cmd_count; i++ ) { - if( console->cmds[i]->next_count ) - aFree(console->cmds[i]->u.next); - aFree(console->cmds[i]); + console->input->parse_final(); + for( i = 0; i < console->input->cmd_count; i++ ) { + if( console->input->cmds[i]->next_count ) + aFree(console->input->cmds[i]->u.next); + aFree(console->input->cmds[i]); } - aFree(console->cmds); - aFree(console->cmd_list); + aFree(console->input->cmds); + aFree(console->input->cmd_list); #endif } void console_defaults(void) { @@ -489,17 +493,20 @@ void console_defaults(void) { console->final = console_final; console->display_title = display_title; #ifdef CONSOLE_INPUT - console->parse_init = console_parse_init; - console->parse_final = console_parse_final; - console->parse_timer = console_parse_timer; - console->pthread_main = cThread_main; - console->parse = console_parse; - console->parse_sub = console_parse_sub; - console->key_pressed = console_parse_key_pressed; - console->load_defaults = console_load_defaults; - console->parse_list_subs = console_parse_list_subs; - console->addCommand = console_parse_create; - console->setSQL = console_setSQL; - console->SQL = NULL; + console->input = &console_input_s; + console->input->parse_init = console_parse_init; + console->input->parse_final = console_parse_final; + console->input->parse_timer = console_parse_timer; + console->input->pthread_main = cThread_main; + console->input->parse = console_parse; + console->input->parse_sub = console_parse_sub; + console->input->key_pressed = console_parse_key_pressed; + console->input->load_defaults = console_load_defaults; + console->input->parse_list_subs = console_parse_list_subs; + console->input->addCommand = console_parse_create; + console->input->setSQL = console_setSQL; + console->input->SQL = NULL; +#else + console->input = NULL; #endif } diff --git a/src/common/console.h b/src/common/console.h index 3d19ddc9d..d2c58f978 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -4,11 +4,13 @@ #ifndef _COMMON_CONSOLE_H_ #define _COMMON_CONSOLE_H_ -#include "../common/thread.h" +#include "../config/core.h" // MAX_CONSOLE_INPUT + +#include "../common/cbasetypes.h" #include "../common/mutex.h" #include "../common/spinlock.h" #include "../common/sql.h" -#include "../config/core.h" +#include "../common/thread.h" /** * Queue Max @@ -47,11 +49,8 @@ struct { unsigned short count; } cinput; -struct console_interface { - void (*init) (void); - void (*final) (void); - void (*display_title) (void); #ifdef CONSOLE_INPUT +struct console_input_interface { /* vars */ SPIN_LOCK ptlock;/* parse thread lock */ rAthread pthread;/* parse thread */ @@ -77,7 +76,17 @@ struct console_interface { void (*parse_list_subs) (struct CParseEntry *cmd, unsigned char depth); void (*addCommand) (char *name, CParseFunc func); void (*setSQL) (Sql *SQL_handle); +}; +#else +struct console_input_interface; #endif + +struct console_interface { + void (*init) (void); + void (*final) (void); + void (*display_title) (void); + + struct console_input_interface *input; }; struct console_interface *console; diff --git a/src/common/core.c b/src/common/core.c index 49b272488..85f824866 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -2,36 +2,40 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/strlib.h" +#define HERCULES_CORE + +#include "../config/core.h" #include "core.h" + +#include "../common/cbasetypes.h" #include "../common/console.h" +#include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" #include "../common/sysinfo.h" #ifndef MINICORE - #include "../common/db.h" - #include "../common/socket.h" - #include "../common/timer.h" - #include "../common/thread.h" - #include "../common/sql.h" - #include "../config/core.h" - #include "../common/HPM.h" - #include "../common/utils.h" - #include "../common/conf.h" - #include "../common/ers.h" +# include "../common/HPM.h" +# include "../common/conf.h" +# include "../common/db.h" +# include "../common/ers.h" +# include "../common/socket.h" +# include "../common/sql.h" +# include "../common/thread.h" +# include "../common/timer.h" +# include "../common/utils.h" #endif +#include #include #include -#include #include #ifndef _WIN32 -#include +# include #else -#include "../common/winapi.h" // Console close event handling +# include "../common/winapi.h" // Console close event handling #endif /// Called when a terminate signal is received. diff --git a/src/common/core.h b/src/common/core.h index e9f7c5961..ba75e6b01 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -7,11 +7,10 @@ #include "../common/db.h" #include "../common/mmo.h" -#include "../config/core.h" /* so that developers with --enable-debug can raise signals from any section of the code they'd like */ #ifdef DEBUG - #include +# include #endif extern int arg_c; diff --git a/src/common/db.c b/src/common/db.c index 8d6b08815..1781aa96f 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -67,14 +67,18 @@ * @encoding US-ASCII * @see #db.h \*****************************************************************************/ + +#define HERCULES_CORE + +#include "db.h" + #include #include -#include "db.h" -#include "../common/mmo.h" +#include "../common/ers.h" #include "../common/malloc.h" +#include "../common/mmo.h" #include "../common/showmsg.h" -#include "../common/ers.h" #include "../common/strlib.h" /*****************************************************************************\ diff --git a/src/common/db.h b/src/common/db.h index 67abe6f19..0d2548806 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -42,9 +42,10 @@ #ifndef _COMMON_DB_H_ #define _COMMON_DB_H_ -#include "../common/cbasetypes.h" #include +#include "../common/cbasetypes.h" + /*****************************************************************************\ * (1) Section with public typedefs, enums, unions, structures and defines. * * DBRelease - Enumeration of release options. * diff --git a/src/common/des.c b/src/common/des.c index ed6d098dc..7f952be76 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -1,8 +1,11 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/cbasetypes.h" -#include "../common/des.h" +#define HERCULES_CORE + +#include "des.h" + +#include "../common/cbasetypes.h" /// DES (Data Encryption Standard) algorithm, modified version. /// @see http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=5099. diff --git a/src/common/ers.c b/src/common/ers.c index 5a3d7314a..d9895e4f2 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -39,14 +39,18 @@ * @encoding US-ASCII * * @see common#ers.h * \*****************************************************************************/ + +#define HERCULES_CORE + +#include "ers.h" + #include #include #include "../common/cbasetypes.h" #include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree -#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL #include "../common/nullpo.h" -#include "ers.h" +#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL #ifndef DISABLE_ERS diff --git a/src/common/grfio.c b/src/common/grfio.c index bde0ed720..1111fb3f3 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -2,13 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/des.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/nullpo.h" +#define HERCULES_CORE + #include "grfio.h" #include @@ -17,6 +12,14 @@ #include #include +#include "../common/cbasetypes.h" +#include "../common/des.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" + //---------------------------- // file entry table struct //---------------------------- diff --git a/src/common/malloc.c b/src/common/malloc.c index 5b39cbab6..13cf0b5ce 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/malloc.h" -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/sysinfo.h" +#define HERCULES_CORE + +#include "malloc.h" #include #include #include #include +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/sysinfo.h" + struct malloc_interface iMalloc_s; ////////////// Memory Libraries ////////////////// diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 3128a3cb0..5c69c7063 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/db.h" +#define HERCULES_CORE + #include "mapindex.h" -#include #include #include +#include + +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" /* mapindex.c interface source */ struct mapindex_interface mapindex_s; diff --git a/src/common/md5calc.c b/src/common/md5calc.c index 05fde42cc..e7b506e27 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -6,11 +6,15 @@ * ***********************************************************/ -#include "../common/random.h" +#define HERCULES_CORE + #include "md5calc.h" -#include + #include #include +#include + +#include "../common/random.h" #ifndef UINT_MAX #define UINT_MAX 4294967295U diff --git a/src/common/mmo.h b/src/common/mmo.h index d535d2874..1d826463e 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -5,10 +5,11 @@ #ifndef _COMMON_MMO_H_ #define _COMMON_MMO_H_ -#include "cbasetypes.h" -#include "../common/db.h" #include +#include "../common/cbasetypes.h" +#include "../common/db.h" + // server->client protocol version // 0 - pre-? // 1 - ? - 0x196 @@ -96,6 +97,7 @@ //Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default ) #define MAX_BANK_ZENY 2100000000 +#define MAX_LEVEL 175 #define MAX_FAME 1000000000 #define MAX_CART 100 #define MAX_SKILL 1478 diff --git a/src/common/mutex.c b/src/common/mutex.c index 0668dbc41..12524c3b7 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -1,6 +1,10 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "mutex.h" + #ifdef WIN32 #include "../common/winapi.h" #else @@ -13,7 +17,6 @@ #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/timer.h" -#include "../common/mutex.h" struct ramutex{ #ifdef WIN32 diff --git a/src/common/mutex.h b/src/common/mutex.h index eeb24e6ff..3b83b66d6 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -4,6 +4,7 @@ #ifndef _COMMON_MUTEX_H_ #define _COMMON_MUTEX_H_ +#include "../common/cbasetypes.h" typedef struct ramutex *ramutex; // Mutex typedef struct racond *racond; // Condition Var diff --git a/src/common/nullpo.c b/src/common/nullpo.c index 1cb471aff..1891835f1 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -2,10 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "nullpo.h" + #include #include #include -#include "../common/nullpo.h" + #include "../common/showmsg.h" /** diff --git a/src/common/random.c b/src/common/random.c index e46c52cad..7019a31f3 100644 --- a/src/common/random.c +++ b/src/common/random.c @@ -1,17 +1,23 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "random.h" + +#include // time + +#include // init_genrand, genrand_int32, genrand_res53 + #include "../common/showmsg.h" #include "../common/timer.h" // gettick -#include "random.h" + #if defined(WIN32) - #include "../common/winapi.h" +# include "../common/winapi.h" #elif defined(HAVE_GETPID) || defined(HAVE_GETTID) - #include - #include +# include +# include #endif -#include // time -#include // init_genrand, genrand_int32, genrand_res53 /// Initializes the random number generator with an appropriate seed. diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 14342fe5e..1dbcba282 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -2,23 +2,26 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/strlib.h" // StringBuf +#define HERCULES_CORE + #include "showmsg.h" -#include "core.h" //[Ind] - For SERVER_TYPE +#include #include +#include // atexit #include -#include #include -#include // atexit #include "../../3rdparty/libconfig/libconfig.h" +#include "../common/cbasetypes.h" +#include "../common/core.h" //[Ind] - For SERVER_TYPE +#include "../common/strlib.h" // StringBuf + #ifdef WIN32 -#include "../common/winapi.h" +# include "../common/winapi.h" #else // not WIN32 -#include +# include #endif // WIN32 #if defined(DEBUGLOGMAP) diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 49fbc34fb..5b32f39ae 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -5,12 +5,14 @@ #ifndef _COMMON_SHOWMSG_H_ #define _COMMON_SHOWMSG_H_ -#ifndef _COMMON_HPMI_H_ - #include "../../3rdparty/libconfig/libconfig.h" -#endif - #include +#ifdef HERCULES_CORE +# include "../../3rdparty/libconfig/libconfig.h" +#else +# include "../common/HPMi.h" +#endif + // for help with the console colors look here: // http://www.edoceo.com/liberum/?doc=printf-with-color // some code explanation (used here): @@ -90,7 +92,7 @@ enum msg_type { }; extern void ClearScreen(void); -#ifndef _COMMON_HPMI_H_ +#ifdef HERCULES_CORE extern void ShowMessage(const char *, ...); extern void ShowStatus(const char *, ...); extern void ShowSQL(const char *, ...); @@ -101,7 +103,18 @@ extern void ClearScreen(void); extern void ShowError(const char *, ...); extern void ShowFatalError(const char *, ...); extern void ShowConfigWarning(config_setting_t *config, const char *string, ...); +#else + HPExport void (*ShowMessage) (const char *, ...); + HPExport void (*ShowStatus) (const char *, ...); + HPExport void (*ShowSQL) (const char *, ...); + HPExport void (*ShowInfo) (const char *, ...); + HPExport void (*ShowNotice) (const char *, ...); + HPExport void (*ShowWarning) (const char *, ...); + HPExport void (*ShowDebug) (const char *, ...); + HPExport void (*ShowError) (const char *, ...); + HPExport void (*ShowFatalError) (const char *, ...); #endif + extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap); #endif /* _COMMON_SHOWMSG_H_ */ diff --git a/src/common/socket.c b/src/common/socket.c index 35d350e95..3738f2c2a 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -2,48 +2,50 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../config/core.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // SHOW_SERVER_STATS #define _H_SOCKET_C_ - #include "socket.h" +#undef _H_SOCKET_C_ #include #include #include #include +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" + #ifdef WIN32 - #include "../common/winapi.h" +# include "../common/winapi.h" #else - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - - #ifndef SIOCGIFCONF - #include // SIOCGIFCONF on Solaris, maybe others? [Shinomori] - #endif - #ifndef FIONBIO - #include // FIONBIO on Solaris [FlavioJS] - #endif - - #ifdef HAVE_SETRLIMIT - #include - #endif +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# ifndef SIOCGIFCONF +# include // SIOCGIFCONF on Solaris, maybe others? [Shinomori] +# endif +# ifndef FIONBIO +# include // FIONBIO on Solaris [FlavioJS] +# endif + +# ifdef HAVE_SETRLIMIT +# include +# endif #endif /** diff --git a/src/common/socket.h b/src/common/socket.h index 75adde4cf..804b9284f 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -5,19 +5,19 @@ #ifndef _COMMON_SOCKET_H_ #define _COMMON_SOCKET_H_ +#include + #include "../common/cbasetypes.h" #ifdef WIN32 - #include "../common/winapi.h" +# include "../common/winapi.h" typedef long in_addr_t; #else - #include - #include - #include +# include +# include +# include #endif -#include - struct HPluginData; #define FIFOSIZE_SERVERLINK 256*1024 diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 29fbb355b..0058e1d83 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -1,4 +1,3 @@ -#pragma once #ifndef _COMMON_SPINLOCK_H_ #define _COMMON_SPINLOCK_H_ @@ -15,14 +14,14 @@ // // +#include "../common/atomic.h" +#include "../common/cbasetypes.h" +#include "../common/thread.h" + #ifdef WIN32 #include "../common/winapi.h" #endif -#include "../common/cbasetypes.h" -#include "../common/atomic.h" -#include "../common/thread.h" - #ifdef WIN32 typedef struct __declspec( align(64) ) SPIN_LOCK{ diff --git a/src/common/sql.c b/src/common/sql.c index 79ccc8e92..aeb56bff0 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -2,19 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "sql.h" + +#include // strtoul +#include // strlen/strnlen/memcpy/memset + #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "sql.h" #ifdef WIN32 -#include "../common/winapi.h" +# include "../common/winapi.h" // Needed before mysql.h #endif #include -#include // strlen/strnlen/memcpy/memset -#include // strtoul void hercules_mysql_error_handler(unsigned int ecode); diff --git a/src/common/sql.h b/src/common/sql.h index 1fb436853..807e0843c 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -5,10 +5,9 @@ #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ -#include "../common/cbasetypes.h" #include // va_list - +#include "../common/cbasetypes.h" // Return codes #define SQL_ERROR (-1) diff --git a/src/common/strlib.c b/src/common/strlib.c index 361595b07..e2e802915 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -2,16 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#define STRLIB_C +#define HERCULES_CORE + +#define _H_STRLIB_C_ #include "strlib.h" +#undef _H_STRLIB_C_ +#include #include #include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" #define J_MAX_MALLOC_SIZE 65535 diff --git a/src/common/strlib.h b/src/common/strlib.h index 10844d257..decf661a6 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -5,15 +5,16 @@ #ifndef _COMMON_STRLIB_H_ #define _COMMON_STRLIB_H_ -#include "../common/cbasetypes.h" #include +#include "../common/cbasetypes.h" + #ifndef __USE_GNU - #define __USE_GNU // required to enable strnlen on some platforms - #include - #undef __USE_GNU +# define __USE_GNU // required to enable strnlen on some platforms +# include +# undef __USE_GNU #else - #include +# include #endif #ifdef WIN32 @@ -165,7 +166,7 @@ struct sv_interface *sv; void strlib_defaults(void); /* the purpose of these macros is simply to not make calling them be an annoyance */ -#ifndef STRLIB_C +#ifndef _H_STRLIB_C_ #define jstrescape(pt) (strlib->jstrescape(pt)) #define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt))) #define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size))) @@ -189,6 +190,6 @@ void strlib_defaults(void); #define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__)) #define strline(str,pos) (strlib->strline((str),(pos))) #define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count))) -#endif /* STRLIB_C */ +#endif /* _H_STRLIB_C_ */ #endif /* _COMMON_STRLIB_H_ */ diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index a56896458..3fdfadb41 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -4,23 +4,39 @@ /// See sysinfo.h for a description of this file -#define _COMMON_SYSINFO_P_ +#define HERCULES_CORE + #include "sysinfo.h" -#undef _COMMON_SYSINFO_P_ + +#include // fopen +#include // atoi #include "../common/cbasetypes.h" #include "../common/core.h" -#include "../common/strlib.h" #include "../common/malloc.h" +#include "../common/strlib.h" #ifdef WIN32 -#include -#include // strlen +# include // strlen +# include #else -#include +# include #endif -#include // fopen -#include // atoi + +/// Private interface fields +struct sysinfo_private { + char *platform; + char *osversion; + char *cpu; + int cpucores; + char *arch; + char *compiler; + char *cflags; + char *vcstype_name; + int vcstype; + char *vcsrevision_src; + char *vcsrevision_scripts; +}; /// sysinfo.c interface source struct sysinfo_interface sysinfo_s; diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h index 17faac26b..c0c4d276a 100644 --- a/src/common/sysinfo.h +++ b/src/common/sysinfo.h @@ -13,23 +13,7 @@ #include "../common/cbasetypes.h" -#ifdef _COMMON_SYSINFO_P_ -struct sysinfo_private { - char *platform; - char *osversion; - char *cpu; - int cpucores; - char *arch; - char *compiler; - char *cflags; - char *vcstype_name; - int vcstype; - char *vcsrevision_src; - char *vcsrevision_scripts; -}; -#else struct sysinfo_private; -#endif /** * sysinfo.c interface diff --git a/src/common/thread.c b/src/common/thread.c index 4d110f2dd..4f73aa9b3 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -6,24 +6,27 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "thread.h" + +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" + #ifdef WIN32 -#include "../common/winapi.h" -#define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) -#define __thread __declspec( thread ) +# include "../common/winapi.h" +# define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) +# define __thread __declspec( thread ) #else -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include #endif -#include "cbasetypes.h" -#include "malloc.h" -#include "showmsg.h" -#include "thread.h" - // When Compiling using MSC (on win32..) we know we have support in any case! #ifdef _MSC_VER #define HAS_TLS diff --git a/src/common/thread.h b/src/common/thread.h index d6b2bbc6e..887c03179 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -1,7 +1,6 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#pragma once #ifndef _COMMON_THREAD_H_ #define _COMMON_THREAD_H_ diff --git a/src/common/timer.c b/src/common/timer.c index 526854582..10f14b0f2 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -2,11 +2,8 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/utils.h" +#define HERCULES_CORE + #include "timer.h" #include @@ -14,11 +11,17 @@ #include #include +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/utils.h" + #ifdef WIN32 -#include "../common/winapi.h" // GetTickCount() +# include "../common/winapi.h" // GetTickCount() #else -#include -#include // struct timeval, gettimeofday() +# include // struct timeval, gettimeofday() +# include #endif struct timer_interface timer_s; diff --git a/src/common/utils.c b/src/common/utils.c index 47747dd32..84925f707 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2,33 +2,35 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/core.h" -#include "socket.h" +#define HERCULES_CORE + #include "utils.h" -#include +#include // floor() #include +#include #include #include -#include // floor() +#include // cache purposes [Ind/Hercules] + +#include "../common/cbasetypes.h" +#include "../common/core.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" #ifdef WIN32 - #include "../common/winapi.h" - #ifndef F_OK - #define F_OK 0x0 - #endif /* F_OK */ +# include "../common/winapi.h" +# ifndef F_OK +# define F_OK 0x0 +# endif /* F_OK */ #else - #include - #include - #include +# include +# include +# include #endif -#include // cache purposes [Ind/Hercules] - struct HCache_interface HCache_s; /// Dumps given buffer into file pointed to by a handle. diff --git a/src/common/utils.h b/src/common/utils.h index f89546b8a..823651163 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -5,10 +5,11 @@ #ifndef _COMMON_UTILS_H_ #define _COMMON_UTILS_H_ -#include "../common/cbasetypes.h" #include // FILE* #include +#include "../common/cbasetypes.h" + /* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */ #define HCACHE_KEY 'k' diff --git a/src/config/const.h b/src/config/const.h index 6557cb987..f9baa4d7d 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -52,13 +52,6 @@ #define DEFTYPE_MAX CHAR_MAX #endif -/* pointer size fix which fixes several gcc warnings */ -#ifdef __64BIT__ - #define __64BPTRSIZE(y) ((intptr)(y)) -#else - #define __64BPTRSIZE(y) (y) -#endif - /* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ #ifdef RENEWAL #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 ) diff --git a/src/config/renewal.h b/src/config/renewal.h index 36615d63b..36bdd3958 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -74,5 +74,6 @@ #define RENEWAL_ASPD #endif // DISABLE_RENEWAL +#undef DISABLE_RENEWAL #endif // _CONFIG_RENEWAL_H_ diff --git a/src/login/account.h b/src/login/account.h index 234e7c0c1..329ae31c8 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -7,6 +7,7 @@ #include "../common/cbasetypes.h" #include "../common/mmo.h" // ACCOUNT_REG2_NUM +#include "../common/sql.h" // Sql typedef struct AccountDB AccountDB; typedef struct AccountDBIterator AccountDBIterator; diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 1483196ab..2e4ed7ab9 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -2,17 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // CONSOLE_INPUT +#include "account.h" + +#include +#include + +#include "../common/console.h" #include "../common/malloc.h" #include "../common/mmo.h" #include "../common/showmsg.h" +#include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "../common/console.h" -#include "../common/socket.h" -#include "account.h" -#include -#include /// global defines #define ACCOUNT_SQL_DB_VERSION 20110114 @@ -652,7 +657,7 @@ Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; Sql_HerculesUpdateCheck(db->accounts); #ifdef CONSOLE_INPUT - console->setSQL(db->accounts); + console->input->setSQL(db->accounts); #endif return db->accounts; } diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c index 74f45e418..081f28d84 100644 --- a/src/login/ipban_sql.c +++ b/src/login/ipban_sql.c @@ -2,6 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "ipban.h" + +#include +#include + +#include "login.h" +#include "loginlog.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -9,11 +18,6 @@ #include "../common/socket.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "login.h" -#include "ipban.h" -#include "loginlog.h" -#include -#include // global sql settings static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/login/login.c b/src/login/login.c index af59fcf38..cb46e0226 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -2,6 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "login.h" + +#include +#include +#include + +#include "account.h" +#include "ipban.h" +#include "loginlog.h" +#include "../common/HPM.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -12,15 +24,6 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/HPM.h" -#include "account.h" -#include "ipban.h" -#include "login.h" -#include "loginlog.h" - -#include -#include -#include struct Login_Config login_config; diff --git a/src/login/login.h b/src/login/login.h index 14c361a15..e77b96a0e 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -5,8 +5,8 @@ #ifndef _LOGIN_LOGIN_H_ #define _LOGIN_LOGIN_H_ -#include "../common/mmo.h" // NAME_LENGTH,SEX_* #include "../common/core.h" // CORE_ST_LAST +#include "../common/mmo.h" // NAME_LENGTH,SEX_* enum E_LOGINSERVER_ST { diff --git a/src/login/loginlog.h b/src/login/loginlog.h index 730fb6e62..a86ad431c 100644 --- a/src/login/loginlog.h +++ b/src/login/loginlog.h @@ -4,6 +4,7 @@ #ifndef _LOGIN_LOGINLOG_H_ #define _LOGIN_LOGINLOG_H_ +#include "../common/cbasetypes.h" unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes); void login_log(uint32 ip, const char* username, int rcode, const char* message); @@ -11,5 +12,4 @@ bool loginlog_init(void); bool loginlog_final(void); bool loginlog_config_read(const char* w1, const char* w2); - #endif /* _LOGIN_LOGINLOG_H_ */ diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 231ac783b..2cbc02c93 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -2,13 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "loginlog.h" + +#include +#include // exit + #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" -#include -#include // exit // global sql settings (in ipban_sql.c) static char global_db_hostname[32] = "127.0.0.1"; diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 061479d87..cb8c979c6 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -1,25 +1,15 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/HPM.h" -#include "../common/conf.h" -#include "../common/db.h" -#include "../common/des.h" -#include "../common/ers.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/socket.h" -#include "../common/strlib.h" - +#define HERCULES_CORE #include "HPMmap.h" -#include "pc.h" -#include "map.h" -// +#include +#include +#include +#include + #include "atcommand.h" #include "battle.h" #include "battleground.h" @@ -37,12 +27,14 @@ #include "itemdb.h" #include "log.h" #include "mail.h" +#include "map.h" #include "mapreg.h" #include "mercenary.h" #include "mob.h" #include "npc.h" #include "party.h" #include "path.h" +#include "pc.h" #include "pc_groups.h" #include "pet.h" #include "quest.h" @@ -54,11 +46,19 @@ #include "trade.h" #include "unit.h" #include "vending.h" - -#include -#include -#include -#include +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" #include "../common/HPMDataCheck.h" diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 5fd0faf86..df3be40a5 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2,57 +2,60 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/core.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/sysinfo.h" +#define HERCULES_CORE +#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_CARTS, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP #include "atcommand.h" + +#include +#include +#include +#include + #include "battle.h" #include "chat.h" -#include "clif.h" #include "chrif.h" +#include "clif.h" #include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" #include "intif.h" #include "itemdb.h" #include "log.h" +#include "mail.h" #include "map.h" -#include "pc.h" -#include "pc_groups.h" // groupid2name -#include "status.h" -#include "skill.h" +#include "mapreg.h" +#include "mercenary.h" #include "mob.h" #include "npc.h" -#include "pet.h" -#include "homunculus.h" -#include "mail.h" -#include "mercenary.h" -#include "elemental.h" #include "party.h" -#include "guild.h" +#include "pc.h" +#include "pc_groups.h" // groupid2name +#include "pet.h" +#include "quest.h" #include "script.h" +#include "searchstore.h" +#include "skill.h" +#include "status.h" #include "storage.h" #include "trade.h" #include "unit.h" -#include "mapreg.h" -#include "quest.h" -#include "searchstore.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/core.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" #include "HPMmap.h" -#include -#include -#include -#include - struct atcommand_interface atcommand_s; static char atcmd_output[CHAT_SIZE_MAX]; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index bc4ab30a3..c8a1863af 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -5,9 +5,9 @@ #ifndef _MAP_ATCOMMAND_H_ #define _MAP_ATCOMMAND_H_ +#include "pc_groups.h" #include "../common/conf.h" #include "../common/db.h" -#include "pc_groups.h" /** * Declarations diff --git a/src/map/battle.c b/src/map/battle.c index 9089b7102..0865ee4ba 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2,41 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/random.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/sysinfo.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "pc.h" -#include "status.h" -#include "skill.h" -#include "homunculus.h" -#include "mercenary.h" -#include "elemental.h" -#include "mob.h" -#include "itemdb.h" -#include "clif.h" -#include "pet.h" -#include "guild.h" -#include "party.h" +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT #include "battle.h" -#include "battleground.h" -#include "chrif.h" +#include #include #include #include -#include + +#include "battleground.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "itemdb.h" +#include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" +#include "skill.h" +#include "status.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" struct Battle_Config battle_config; struct battle_interface battle_s; diff --git a/src/map/battle.h b/src/map/battle.h index 88038ddb4..fbe097c78 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -5,8 +5,8 @@ #ifndef _MAP_BATTLE_H_ #define _MAP_BATTLE_H_ -#include "../common/cbasetypes.h" #include "map.h" //ELE_MAX +#include "../common/cbasetypes.h" /** * Declarations diff --git a/src/map/battleground.c b/src/map/battleground.c index 68539e25d..a7169de0e 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -2,29 +2,32 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/conf.h" +#define HERCULES_CORE #include "battleground.h" + +#include +#include + #include "battle.h" #include "clif.h" +#include "homunculus.h" #include "map.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" // struct mob_data #include "npc.h" -#include "pc.h" #include "party.h" +#include "pc.h" #include "pet.h" -#include "homunculus.h" -#include "mercenary.h" -#include "mapreg.h" - -#include -#include +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct battleground_interface bg_s; diff --git a/src/map/battleground.h b/src/map/battleground.h index 05c4eb060..ec0a86f14 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -5,9 +5,9 @@ #ifndef _MAP_BATTLEGROUND_H_ #define _MAP_BATTLEGROUND_H_ -#include "../common/mmo.h" // struct party #include "clif.h" #include "guild.h" +#include "../common/mmo.h" // struct party /** * Defines diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 2a15e66fc..80264b30d 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -2,18 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" // ARR_FIND -#include "../common/showmsg.h" // ShowWarning -#include "../common/socket.h" // RBUF* -#include "../common/strlib.h" // safestrncpy +#define HERCULES_CORE + +#include "buyingstore.h" // struct s_buyingstore + #include "atcommand.h" // msg_txt #include "battle.h" // battle_config.* -#include "buyingstore.h" // struct s_buyingstore +#include "chrif.h" #include "clif.h" // clif->buyingstore_* #include "log.h" // log_pick_pc, log_zeny #include "pc.h" // struct map_session_data -#include "chrif.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" // ARR_FIND +#include "../common/showmsg.h" // ShowWarning +#include "../common/socket.h" // RBUF* +#include "../common/strlib.h" // safestrncpy struct buyingstore_interface buyingstore_s; diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 5141a1013..914631872 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -5,6 +5,11 @@ #ifndef _MAP_BUYINGSTORE_H_ #define _MAP_BUYINGSTORE_H_ +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_SLOTS + +struct map_session_data; + /** * Declarations **/ diff --git a/src/map/chat.c b/src/map/chat.c index 08fc4a575..c9d3e6d46 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -2,12 +2,13 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/mmo.h" +#define HERCULES_CORE + +#include "chat.h" + +#include +#include + #include "atcommand.h" // msg_txt() #include "battle.h" // struct battle_config #include "clif.h" @@ -15,10 +16,12 @@ #include "npc.h" // npc_event_do() #include "pc.h" #include "skill.h" // ext_skill_unit_onplace() -#include "chat.h" - -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" struct chat_interface chat_s; diff --git a/src/map/chat.h b/src/map/chat.h index b0c6cd905..cbc2a391e 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -6,9 +6,12 @@ #define _MAP_CHAT_H_ #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE +#include "../common/cbasetypes.h" +#include "../common/db.h" -struct map_session_data; struct chat_data; +struct map_session_data; +struct npc_data; #define MAX_CHAT_USERS 20 diff --git a/src/map/chrif.c b/src/map/chrif.c index 99a1935fd..81e2d387c 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,15 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/ers.h" -#include "../common/HPM.h" +#define HERCULES_CORE + +#include "../config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT +#include "chrif.h" + +#include +#include +#include +#include +#include #include "map.h" #include "battle.h" @@ -25,15 +26,17 @@ #include "instance.h" #include "mercenary.h" #include "elemental.h" -#include "chrif.h" #include "quest.h" #include "storage.h" - -#include -#include -#include -#include -#include +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct chrif_interface chrif_s; diff --git a/src/map/chrif.h b/src/map/chrif.h index 25e955604..84efc66d3 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -5,9 +5,11 @@ #ifndef _MAP_CHRIF_H_ #define _MAP_CHRIF_H_ -#include "../common/cbasetypes.h" #include + #include "map.h" //TBL_stuff +#include "../common/cbasetypes.h" +#include "../common/db.h" struct status_change_entry; diff --git a/src/map/clif.c b/src/map/clif.c index 1a6665307..cb2474961 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2,56 +2,59 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/conf.h" -#include "../common/HPM.h" +#define HERCULES_CORE + +#include "../config/core.h" // ANTI_MAYAP_CHEAT, NEW_CARTS, RENEWAL, SECURE_NPCTIMEOUT +#include "clif.h" + +#include +#include +#include +#include +#include -#include "map.h" -#include "chrif.h" -#include "pc.h" -#include "status.h" -#include "npc.h" -#include "itemdb.h" -#include "chat.h" -#include "trade.h" -#include "storage.h" -#include "script.h" -#include "skill.h" #include "atcommand.h" -#include "intif.h" #include "battle.h" #include "battleground.h" -#include "mob.h" -#include "party.h" -#include "unit.h" +#include "chat.h" +#include "chrif.h" +#include "elemental.h" #include "guild.h" -#include "vending.h" -#include "pet.h" #include "homunculus.h" #include "instance.h" -#include "mercenary.h" -#include "elemental.h" +#include "intif.h" +#include "irc-bot.h" +#include "itemdb.h" #include "log.h" -#include "clif.h" #include "mail.h" +#include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "pet.h" #include "quest.h" -#include "irc-bot.h" - -#include -#include -#include -#include -#include +#include "script.h" +#include "skill.h" +#include "status.h" +#include "storage.h" +#include "trade.h" +#include "unit.h" +#include "vending.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct clif_interface clif_s; diff --git a/src/map/clif.h b/src/map/clif.h index 0f4a9e756..7b27e1fe6 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -5,13 +5,13 @@ #ifndef _MAP_CLIF_H_ #define _MAP_CLIF_H_ +#include + +#include "map.h" +#include "packets_struct.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/mmo.h" -#include "../common/socket.h" -#include "../map/map.h" -#include "../map/packets_struct.h" -#include /** * Declarations @@ -20,7 +20,6 @@ struct item; struct item_data; struct storage_data; struct guild_storage; -struct block_list; struct unit_data; struct map_session_data; struct homun_data; diff --git a/src/map/date.c b/src/map/date.c index f38ead858..975a00c50 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -1,10 +1,14 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/cbasetypes.h" +#define HERCULES_CORE + #include "date.h" + #include +#include "../common/cbasetypes.h" + int date_get_year(void) { time_t t; diff --git a/src/map/date.h b/src/map/date.h index 46f0d86c3..b3ed59b2f 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -4,6 +4,8 @@ #ifndef _MAP_DATE_H_ #define _MAP_DATE_H_ +#include "../common/cbasetypes.h" + int date_get_year(void); int date_get_month(void); int date_get_day(void); diff --git a/src/map/duel.c b/src/map/duel.c index af2741f77..a423ef240 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -2,18 +2,20 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" +#define HERCULES_CORE -#include "atcommand.h" // msg_txt -#include "clif.h" #include "duel.h" -#include "pc.h" #include #include #include #include +#include "atcommand.h" // msg_txt +#include "clif.h" +#include "pc.h" +#include "../common/cbasetypes.h" + /*========================================== * Duel organizing functions [LuzZza] *------------------------------------------*/ diff --git a/src/map/duel.h b/src/map/duel.h index 5405d2eee..956aed36d 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -5,6 +5,10 @@ #ifndef _MAP_DUEL_H_ #define _MAP_DUEL_H_ +#include "../common/cbasetypes.h" + +struct map_session_data; + struct duel { int members_count; int invites_count; diff --git a/src/map/elemental.c b/src/map/elemental.c index f335600d6..323df41e1 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -2,42 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/random.h" -#include "../common/strlib.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "elemental.h" + +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" -#include "elemental.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct elemental_interface elemental_s; diff --git a/src/map/elemental.h b/src/map/elemental.h index 6d04a41a5..aa27aadc9 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -7,6 +7,7 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data +#include "../common/mmo.h" // NAME_LENGTH /** * Defines diff --git a/src/map/guild.c b/src/map/guild.c index fa5805c8b..69f67238d 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2,35 +2,38 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" +#include "../config/core.h" // GP_BOUND_ITEMS #include "guild.h" -#include "storage.h" -#include "battle.h" -#include "npc.h" -#include "pc.h" -#include "status.h" -#include "mob.h" -#include "intif.h" -#include "clif.h" -#include "skill.h" -#include "log.h" -#include "instance.h" #include #include #include +#include "battle.h" +#include "clif.h" +#include "instance.h" +#include "intif.h" +#include "log.h" +#include "map.h" +#include "mob.h" +#include "npc.h" +#include "pc.h" +#include "skill.h" +#include "status.h" +#include "storage.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" + struct guild_interface guild_s; /*========================================== diff --git a/src/map/guild.h b/src/map/guild.h index b03bd664d..34e27a56c 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -5,18 +5,10 @@ #ifndef _MAP_GUILD_H_ #define _MAP_GUILD_H_ -//#include "../common/mmo.h" -#include "map.h" // NAME_LENGTH - -/** - * Declarations - **/ -struct guild; -struct guild_member; -struct guild_position; -struct guild_castle; -struct map_session_data; -struct mob_data; +#include "map.h" // EVENT_NAME_LENGTH, TBL_PC +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" /** * Defines diff --git a/src/map/homunculus.c b/src/map/homunculus.c index ff9f7a5b1..b6a83d1cb 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -2,43 +2,45 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "../config/core.h" // DBPATH +#include "homunculus.h" + +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" - -#include "homunculus.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct homunculus_interface homunculus_s; diff --git a/src/map/homunculus.h b/src/map/homunculus.h index e6d59e30e..9eef6af5b 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -5,9 +5,10 @@ #ifndef _MAP_HOMUNCULUS_H_ #define _MAP_HOMUNCULUS_H_ +#include "pc.h" #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "pc.h" +#include "../common/mmo.h" #define MAX_HOM_SKILL_REQUIRE 5 #define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX) diff --git a/src/map/instance.c b/src/map/instance.c index caf622b3d..5789d7dd6 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -2,30 +2,32 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/db.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "clif.h" #include "instance.h" -#include "map.h" -#include "npc.h" -#include "party.h" -#include "pc.h" +#include #include #include #include -#include #include +#include "clif.h" +#include "map.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" + struct instance_interface instance_s; /// Checks whether given instance id is valid or not. diff --git a/src/map/instance.h b/src/map/instance.h index 712a0f141..ae649eda7 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -6,8 +6,11 @@ #define _MAP_INSTANCE_H_ #include "script.h" // struct reg_db +#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct point + struct block_list; +struct map_session_data; #define INSTANCE_NAME_LENGTH (60+1) diff --git a/src/map/intif.c b/src/map/intif.c index 6bd24368a..383150fbc 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1,37 +1,40 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "map.h" +#define HERCULES_CORE + +#include "../config/core.h" // GP_BOUND_ITEMS +#include "intif.h" + +#include +#include +#include +#include +#include +#include + +#include "atcommand.h" #include "battle.h" #include "chrif.h" #include "clif.h" -#include "pc.h" -#include "intif.h" -#include "log.h" -#include "storage.h" -#include "party.h" +#include "elemental.h" #include "guild.h" -#include "pet.h" -#include "atcommand.h" -#include "mercenary.h" #include "homunculus.h" -#include "elemental.h" +#include "log.h" #include "mail.h" +#include "map.h" +#include "mercenary.h" +#include "party.h" +#include "pc.h" +#include "pet.h" #include "quest.h" - -#include -#include -#include -#include -#include -#include - +#include "storage.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" struct intif_interface intif_s; diff --git a/src/map/intif.h b/src/map/intif.h index 290dcfcdc..b6ee727f3 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -5,19 +5,22 @@ #ifndef _MAP_INTIF_H_ #define _MAP_INTIF_H_ +#include "../common/cbasetypes.h" /** * Declarations **/ -struct party_member; +struct auction_data; struct guild_member; struct guild_position; -struct s_pet; +struct guild_storage; +struct mail_message; +struct map_session_data; +struct party_member; +struct s_elemental; struct s_homunculus; struct s_mercenary; -struct s_elemental; -struct mail_message; -struct auction_data; +struct s_pet; /** * Defines diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index ff28082e7..6f016697f 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -2,23 +2,25 @@ // See the LICENSE file // Base Author: shennetsind @ http://hercules.ws -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/strlib.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/random.h" +#define HERCULES_CORE -#include "map.h" -#include "pc.h" -#include "clif.h" #include "irc-bot.h" #include #include #include +#include "clif.h" +#include "map.h" +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" + //#define IRCBOT_DEBUG struct irc_bot_interface irc_bot_s; diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index c15a5d46a..60f03fca5 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -6,6 +6,8 @@ #ifndef _MAP_IRC_BOT_H_ #define _MAP_IRC_BOT_H_ +#include "../common/cbasetypes.h" + #define IRC_NICK_LENGTH 40 #define IRC_IDENT_LENGTH 40 #define IRC_HOST_LENGTH 63 diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 5eeb90be5..1981f435c 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2,23 +2,28 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" +#define HERCULES_CORE + +#include "../config/core.h" // DBPATH, RENEWAL #include "itemdb.h" -#include "map.h" -#include "battle.h" // struct battle_config -#include "script.h" // item script processing -#include "pc.h" // W_MUSICAL, W_WHIP #include #include #include +#include "battle.h" // struct battle_config +#include "map.h" +#include "mob.h" // MAX_MOB_DB +#include "pc.h" // W_MUSICAL, W_WHIP +#include "script.h" // item script processing +#include "../common/conf.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" + struct itemdb_interface itemdb_s; /** diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 77fb2e2ec..12766b288 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -5,9 +5,12 @@ #ifndef _MAP_ITEMDB_H_ #define _MAP_ITEMDB_H_ +#include "map.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" #include "../common/db.h" #include "../common/mmo.h" // ITEM_NAME_LENGTH -#include "map.h" +#include "../common/sql.h" /** * Declarations diff --git a/src/map/log.c b/src/map/log.c index 19a98f34b..523ef1d65 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -2,22 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/sql.h" // SQL_INNODB -#include "../common/strlib.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "battle.h" -#include "itemdb.h" +#define HERCULES_CORE + #include "log.h" -#include "map.h" -#include "mob.h" -#include "pc.h" #include #include #include +#include "battle.h" +#include "itemdb.h" +#include "map.h" +#include "mob.h" +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/sql.h" // SQL_INNODB +#include "../common/strlib.h" + struct log_interface log_s; /// obtain log type character for item/zeny logs diff --git a/src/map/log.h b/src/map/log.h index b2cb92c20..ecfedeac2 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -11,11 +11,10 @@ /** * Declarations **/ -struct block_list; -struct map_session_data; -struct mob_data; struct item; struct item_data; +struct map_session_data; +struct mob_data; /** * Defines diff --git a/src/map/mail.c b/src/map/mail.c index 371aa892f..7ba7d7470 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -2,19 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#define HERCULES_CORE #include "mail.h" -#include "atcommand.h" -#include "itemdb.h" -#include "clif.h" -#include "pc.h" -#include "log.h" #include #include +#include "atcommand.h" +#include "clif.h" +#include "itemdb.h" +#include "log.h" +#include "pc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" + struct mail_interface mail_s; void mail_clear(struct map_session_data *sd) diff --git a/src/map/mail.h b/src/map/mail.h index 8df537ff3..30b032ef4 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -5,7 +5,11 @@ #ifndef _MAP_MAIL_H_ #define _MAP_MAIL_H_ -#include "../common/mmo.h" +#include "../common/cbasetypes.h" + +struct item; +struct mail_message; +struct map_session_data; struct mail_interface { void (*clear) (struct map_session_data *sd); diff --git a/src/map/map.c b/src/map/map.c index 315924e2e..01d3dbb9f 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2,62 +2,66 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/core.h" -#include "../common/timer.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/socket.h" // WFIFO*() -#include "../common/showmsg.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/console.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL #include "map.h" -#include "path.h" + +#include +#include +#include +#include +#include + +#include "HPMmap.h" +#include "atcommand.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" #include "chrif.h" #include "clif.h" #include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" #include "intif.h" +#include "irc-bot.h" +#include "itemdb.h" +#include "log.h" +#include "mail.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" #include "npc.h" +#include "npc.h" // npc_setcells(), npc_unsetcells() +#include "party.h" +#include "path.h" #include "pc.h" +#include "pet.h" +#include "quest.h" +#include "script.h" +#include "skill.h" #include "status.h" -#include "mob.h" -#include "npc.h" // npc_setcells(), npc_unsetcells() -#include "chat.h" -#include "itemdb.h" #include "storage.h" -#include "skill.h" #include "trade.h" -#include "party.h" #include "unit.h" -#include "battle.h" -#include "battleground.h" -#include "quest.h" -#include "script.h" -#include "mapreg.h" -#include "guild.h" -#include "pet.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "elemental.h" -#include "atcommand.h" -#include "log.h" -#include "mail.h" -#include "irc-bot.h" -#include "HPMmap.h" +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/console.h" +#include "../common/core.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // WFIFO*() +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" -#include -#include -#include -#include -#include #ifndef _WIN32 #include #endif @@ -5482,8 +5486,8 @@ void map_cp_defaults(void) { map->cpsd->bl.y = MAP_DEFAULT_Y; map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT); - console->addCommand("gm:info",CPCMD_A(gm_position)); - console->addCommand("gm:use",CPCMD_A(gm_use)); + console->input->addCommand("gm:info",CPCMD_A(gm_position)); + console->input->addCommand("gm:use",CPCMD_A(gm_use)); #endif } /* Hercules Plugin Mananger */ @@ -5839,7 +5843,7 @@ int do_init(int argc, char *argv[]) Sql_HerculesUpdateCheck(map->mysql_handle); #ifdef CONSOLE_INPUT - console->setSQL(map->mysql_handle); + console->input->setSQL(map->mysql_handle); #endif ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port); diff --git a/src/map/map.h b/src/map/map.h index c61868b13..539b02ed8 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -5,18 +5,18 @@ #ifndef _MAP_MAP_H_ #define _MAP_MAP_H_ +#include + +#include "atcommand.h" #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" #include "../common/mapindex.h" #include "../common/db.h" -#include "../config/core.h" #include "../common/sql.h" -#include "atcommand.h" -#include +struct mob_data; struct npc_data; -struct item_data; struct hChSysCh; enum E_MAPSERVER_ST { @@ -36,7 +36,6 @@ enum E_MAPSERVER_ST { #define NATURAL_HEAL_INTERVAL 500 #define MIN_FLOORITEM 2 #define MAX_FLOORITEM START_ACCOUNT_NUM -#define MAX_LEVEL 175 #define MAX_IGNORE_LIST 20 // official is 14 #define MAX_VENDING 12 #define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo] diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index 61c25f24e..f026fde00 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -2,6 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "mapreg.h" + +#include +#include + +#include "map.h" // map->mysql_handle +#include "script.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/ers.h" @@ -10,11 +19,6 @@ #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" -#include "map.h" // map->mysql_handle -#include "script.h" -#include "mapreg.h" -#include -#include struct mapreg_interface mapreg_s; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 495621014..26bc8c188 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -2,42 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/mmo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "log.h" -#include "clif.h" +#include "mercenary.h" + +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" #include "chrif.h" +#include "clif.h" +#include "guild.h" #include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" -#include "pc.h" -#include "status.h" -#include "skill.h" #include "mob.h" -#include "pet.h" -#include "battle.h" +#include "npc.h" #include "party.h" -#include "guild.h" -#include "atcommand.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "npc.h" +#include "skill.h" +#include "status.h" #include "trade.h" #include "unit.h" -#include "mercenary.h" - -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct mercenary_interface mercenary_s; diff --git a/src/map/mercenary.h b/src/map/mercenary.h index dd9266b2e..b998ac006 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -6,6 +6,7 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" // number of cells that a mercenary can walk to from it's master before being warped #define MAX_MER_DISTANCE 15 diff --git a/src/map/mob.c b/src/map/mob.c index 8f12d4b1b..11ac74621 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2,46 +2,49 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/db.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/ers.h" -#include "../common/random.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/socket.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "clif.h" -#include "intif.h" -#include "pc.h" -#include "pet.h" -#include "status.h" +#include "../config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP #include "mob.h" -#include "homunculus.h" -#include "mercenary.h" + +#include +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" +#include "clif.h" +#include "date.h" #include "elemental.h" #include "guild.h" +#include "homunculus.h" +#include "intif.h" #include "itemdb.h" -#include "skill.h" -#include "battle.h" -#include "party.h" -#include "npc.h" #include "log.h" -#include "script.h" -#include "atcommand.h" -#include "date.h" +#include "map.h" +#include "mercenary.h" +#include "npc.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" #include "quest.h" - -#include -#include -#include -#include -#include +#include "script.h" +#include "skill.h" +#include "status.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct mob_interface mob_s; diff --git a/src/map/mob.h b/src/map/mob.h index 80175b1db..d07f78c77 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -5,12 +5,11 @@ #ifndef _MAP_MOB_H_ #define _MAP_MOB_H_ -#include "../common/mmo.h" // struct item -#include "guild.h" // struct guardian_data #include "map.h" // struct status_data, struct view_data, struct mob_skill -#include "status.h" // struct status data, struct status_change -#include "unit.h" // unit_stop_walking(), unit_stop_attack() -#include "npc.h" +#include "status.h" // struct status_data, struct status_change +#include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // struct item #define MAX_RANDOMMONSTER 5 diff --git a/src/map/npc.c b/src/map/npc.c index 20b500630..8e5854dbf 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2,41 +2,44 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/db.h" -#include "../common/socket.h" -#include "../common/HPM.h" +#define HERCULES_CORE -#include "map.h" -#include "log.h" +#include "../config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL +#include "npc.h" + +#include +#include +#include +#include +#include +#include + +#include "battle.h" +#include "chat.h" #include "clif.h" +#include "instance.h" #include "intif.h" -#include "pc.h" -#include "status.h" #include "itemdb.h" -#include "script.h" +#include "log.h" +#include "map.h" #include "mob.h" +#include "pc.h" #include "pet.h" -#include "instance.h" -#include "battle.h" +#include "script.h" #include "skill.h" +#include "status.h" #include "unit.h" -#include "npc.h" -#include "chat.h" - -#include -#include -#include -#include -#include -#include +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct npc_interface npc_s; diff --git a/src/map/npc.h b/src/map/npc.h index c154b14d0..6e9686d33 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -8,10 +8,10 @@ #include "map.h" // struct block_list #include "status.h" // struct status_change #include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/db.h" struct HPluginData; -struct block_list; -struct npc_data; struct view_data; enum npc_parse_options { diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 9d5639efc..f245ffea5 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -2,25 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#ifdef PCRE_SUPPORT +#define HERCULES_CORE -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" +#ifdef PCRE_SUPPORT -#include "mob.h" // struct mob_data #include "npc.h" // struct npc_data -#include "pc.h" // struct map_session_data -#include "script.h" // set_var() - -#include "../../3rdparty/pcre/include/pcre.h" +#include #include #include #include -#include + +#include "../../3rdparty/pcre/include/pcre.h" + +#include "mob.h" // struct mob_data +#include "pc.h" // struct map_session_data +#include "script.h" // set_var() +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" /** * interface sources diff --git a/src/map/party.c b/src/map/party.c index cf5e7bbe3..7c49e241c 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,34 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/socket.h" // last_tick -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/utils.h" -#include "../common/strlib.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP #include "party.h" + +#include +#include +#include + #include "atcommand.h" //msg_txt() -#include "pc.h" -#include "map.h" -#include "instance.h" #include "battle.h" -#include "intif.h" #include "clif.h" +#include "instance.h" +#include "intif.h" +#include "itemdb.h" #include "log.h" +#include "map.h" +#include "mob.h" // struct mob_data +#include "pc.h" #include "skill.h" #include "status.h" -#include "itemdb.h" - -#include -#include -#include - +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // last_tick +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct party_interface party_s; diff --git a/src/map/party.h b/src/map/party.h index ed8289af6..3bad22b13 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -5,11 +5,12 @@ #ifndef _MAP_PARTY_H_ #define _MAP_PARTY_H_ -#include "../common/mmo.h" // struct party -#include "../config/core.h" #include -#include "map.h" +#include "map.h" // TBL_PC +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // struct party #define PARTY_BOOKING_JOBS 6 #define PARTY_BOOKING_RESULTS 10 diff --git a/src/map/path.c b/src/map/path.c index ae9fc389d..d02e9ee4a 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -2,20 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" +#define HERCULES_CORE +#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA #include "path.h" -#include "map.h" #include #include #include +#include "map.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" + #define SET_OPEN 0 #define SET_CLOSED 1 diff --git a/src/map/path.h b/src/map/path.h index 0b67a0120..b48ff05fb 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -6,6 +6,7 @@ #define _MAP_PATH_H_ #include "map.h" // enum cell_chk +#include "../common/cbasetypes.h" #define MOVE_COST 10 #define MOVE_DIAGONAL_COST 14 diff --git a/src/map/pc.c b/src/map/pc.c index c8fb14e55..45adfe22a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2,21 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/core.h" // get_svn_revision() -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // session[] -#include "../common/strlib.h" // safestrncpy() -#include "../common/timer.h" -#include "../common/utils.h" -#include "../common/conf.h" -#include "../common/mmo.h" //NAME_LENGTH -#include "../common/sysinfo.h" +#define HERCULES_CORE +#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_CARTS, MAX_SPIRITBALL, NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT #include "pc.h" + +#include +#include +#include +#include + #include "atcommand.h" // get_atcommand_level() #include "battle.h" // battle_config #include "battleground.h" @@ -25,32 +20,40 @@ #include "clif.h" #include "date.h" // is_day_of_*() #include "duel.h" +#include "elemental.h" +#include "guild.h" // guild->search(), guild_request_info() +#include "homunculus.h" +#include "instance.h" #include "intif.h" #include "itemdb.h" #include "log.h" #include "mail.h" #include "map.h" -#include "path.h" -#include "homunculus.h" -#include "instance.h" #include "mercenary.h" -#include "elemental.h" +#include "mob.h" // struct mob_data #include "npc.h" // fake_nd -#include "pet.h" // pet_unlocktarget() #include "party.h" // party->search() -#include "guild.h" // guild->search(), guild_request_info() +#include "path.h" +#include "pc_groups.h" +#include "pet.h" // pet_unlocktarget() +#include "quest.h" #include "script.h" // script_config #include "skill.h" #include "status.h" // struct status_data #include "storage.h" -#include "pc_groups.h" -#include "quest.h" - -#include -#include -#include -#include - +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/core.h" // get_svn_revision() +#include "../common/malloc.h" +#include "../common/mmo.h" //NAME_LENGTH +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // session[] +#include "../common/strlib.h" // safestrncpy() +#include "../common/sysinfo.h" +#include "../common/timer.h" +#include "../common/utils.h" struct pc_interface pc_s; @@ -10651,9 +10654,7 @@ void pc_defaults(void) { memset(pc->exp_table, 0, sizeof(pc->exp_table) + sizeof(pc->max_level) + sizeof(pc->statp) -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) + sizeof(pc->level_penalty) -#endif + sizeof(pc->skill_tree) + sizeof(pc->smith_fame_list) + sizeof(pc->chemist_fame_list) diff --git a/src/map/pc.h b/src/map/pc.h index 70df9ca56..c4026a48d 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -5,23 +5,23 @@ #ifndef _MAP_PC_H_ #define _MAP_PC_H_ -#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus -#include "../common/ers.h" -#include "../common/timer.h" // INVALID_TIMER -#include "atcommand.h" // AtCommandType +#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT + #include "battle.h" // battle_config -#include "battleground.h" +#include "battleground.h" // enum bg_queue_types #include "buyingstore.h" // struct s_buyingstore -#include "itemdb.h" -#include "log.h" -#include "map.h" // RC_MAX -#include "mob.h" -#include "pc_groups.h" -#include "script.h" // struct script_reg, struct script_regstr +#include "itemdb.h" // MAX_ITEMDELAYS +#include "log.h" // struct e_log_pick_type +#include "map.h" // RC_MAX, ELE_MAX +#include "pc_groups.h" // GroupSettings +#include "script.h" // struct reg_db #include "searchstore.h" // struct s_search_store_info -#include "status.h" // OPTION_*, struct weapon_atk -#include "unit.h" // unit_stop_attack(), unit_stop_walking() +#include "status.h" // enum sc_type, OPTION_* +#include "unit.h" // struct unit_data, struct view_data #include "vending.h" // struct s_vending +#include "../common/cbasetypes.h" +#include "../common/ers.h" // struct eri +#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus /** * Defines @@ -742,9 +742,8 @@ struct pc_interface { unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; unsigned int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; -#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; -#endif + unsigned int equip_pos[EQI_MAX]; /* */ struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE]; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index 906462c7e..a917ef409 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,6 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "pc_groups.h" + +#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() +#include "clif.h" // clif->GM_kick() +#include "map.h" // mapiterator +#include "pc.h" // pc->set_group() #include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/db.h" @@ -10,12 +18,6 @@ #include "../common/showmsg.h" #include "../common/strlib.h" // strcmp -#include "pc_groups.h" -#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() -#include "clif.h" // clif->GM_kick() -#include "map.h" // mapiterator -#include "pc.h" // pc->set_group() - static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd() struct pc_groups_interface pcg_s; diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 5c03f999f..7c8cdd82a 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -5,6 +5,10 @@ #ifndef _MAP_PC_GROUPS_H_ #define _MAP_PC_GROUPS_H_ +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" + /// PC permissions enum e_pc_permission { PC_PERM_NONE = 0, // #0 diff --git a/src/map/pet.c b/src/map/pet.c index 993497434..aa2be4473 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -2,37 +2,39 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/db.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" +#define HERCULES_CORE -#include "pc.h" -#include "status.h" -#include "map.h" -#include "path.h" -#include "intif.h" -#include "clif.h" -#include "chrif.h" #include "pet.h" -#include "itemdb.h" + +#include +#include +#include + +#include "atcommand.h" // msg_txt() #include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" #include "mob.h" #include "npc.h" +#include "path.h" +#include "pc.h" #include "script.h" #include "skill.h" +#include "status.h" #include "unit.h" -#include "atcommand.h" // msg_txt() -#include "log.h" - -#include -#include -#include +#include "../common/db.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct pet_interface pet_s; diff --git a/src/map/pet.h b/src/map/pet.h index 4ec30b3fb..8dde0fac2 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -5,8 +5,14 @@ #ifndef _MAP_PET_H_ #define _MAP_PET_H_ -#define MAX_PET_DB 300 -#define MAX_PETLOOT_SIZE 30 +#include "map.h" // struct block_list +#include "status.h" // enum sc_type +#include "unit.h" // struct unit_data +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // NAME_LENGTH, struct s_pet + +#define MAX_PET_DB 300 +#define MAX_PETLOOT_SIZE 30 struct s_pet_db { short class_; diff --git a/src/map/quest.c b/src/map/quest.c index bde276f9d..b76d6bc82 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -2,36 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/socket.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE -#include "map.h" -#include "pc.h" -#include "npc.h" -#include "itemdb.h" -#include "script.h" -#include "intif.h" -#include "battle.h" -#include "mob.h" -#include "party.h" -#include "unit.h" -#include "log.h" -#include "clif.h" #include "quest.h" -#include "chrif.h" +#include #include #include #include -#include #include +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "pc.h" +#include "script.h" +#include "unit.h" +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct quest_interface quest_s; diff --git a/src/map/quest.h b/src/map/quest.h index e01e35619..87894d639 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -5,6 +5,10 @@ #ifndef _MAP_QUEST_H_ #define _MAP_QUEST_H_ +#include "map.h" // TBL_PC +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES + #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 struct quest_db { diff --git a/src/map/script.c b/src/map/script.c index 4d77c506b..068be8524 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2,6 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "../config/core.h" // NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL +#include "script.h" + +#include +#include +#include +#include + +#include "atcommand.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "mail.h" +#include "map.h" +#include "mapreg.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" +#include "path.h" +#include "pc.h" +#include "pet.h" +#include "pet.h" +#include "quest.h" +#include "skill.h" +#include "status.h" +#include "status.h" +#include "storage.h" +#include "unit.h" #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/md5calc.h" @@ -10,47 +50,10 @@ #include "../common/showmsg.h" #include "../common/socket.h" // usage: getcharip #include "../common/strlib.h" +#include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" -#include "../common/sysinfo.h" - -#include "map.h" -#include "path.h" -#include "clif.h" -#include "chrif.h" -#include "itemdb.h" -#include "pc.h" -#include "status.h" -#include "storage.h" -#include "mob.h" -#include "npc.h" -#include "pet.h" -#include "mapreg.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "intif.h" -#include "skill.h" -#include "status.h" -#include "chat.h" -#include "battle.h" -#include "battleground.h" -#include "party.h" -#include "guild.h" -#include "atcommand.h" -#include "log.h" -#include "unit.h" -#include "pet.h" -#include "mail.h" -#include "script.h" -#include "quest.h" -#include "elemental.h" -#include "../config/core.h" -#include -#include -#include -#include #ifndef WIN32 #include #endif diff --git a/src/map/script.h b/src/map/script.h index 90b18d87f..899c745da 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -5,17 +5,19 @@ #ifndef _MAP_SCRIPT_H_ #define _MAP_SCRIPT_H_ -#include "../common/strlib.h" //StringBuf -#include "../common/cbasetypes.h" -#include "map.h" //EVENT_NAME_LENGTH - #include #include +#include "map.h" //EVENT_NAME_LENGTH +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // struct item +#include "../common/sql.h" // Sql +#include "../common/strlib.h" //StringBuf + /** * Declarations **/ -struct map_session_data; struct eri; /** diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 0144aea93..72b28aacd 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -2,14 +2,17 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams +#define HERCULES_CORE + +#include "searchstore.h" // struct s_search_store_info + +#include "battle.h" // battle_config.* +#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* +#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/malloc.h" // aMalloc, aRealloc, aFree #include "../common/showmsg.h" // ShowError, ShowWarning #include "../common/strlib.h" // safestrncpy -#include "battle.h" // battle_config.* -#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* -#include "pc.h" // struct map_session_data -#include "searchstore.h" // struct s_search_store_info struct searchstore_interface searchstore_s; diff --git a/src/map/searchstore.h b/src/map/searchstore.h index 827e39053..c9b93ba54 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -5,6 +5,12 @@ #ifndef _MAP_SEARCHSTORE_H_ #define _MAP_SEARCHSTORE_H_ +#include + +#include "map.h" // MESSAGE_SIZE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" // MAX_SLOTS + /** * Defines **/ diff --git a/src/map/skill.c b/src/map/skill.c index c8388770a..b2e94ec79 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2,46 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/utils.h" -#include "../common/ers.h" +#define HERCULES_CORE -#include "map.h" -#include "path.h" -#include "clif.h" -#include "pc.h" -#include "status.h" +#include "../config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION() #include "skill.h" -#include "pet.h" + +#include +#include +#include +#include +#include + +#include "battle.h" +#include "battleground.h" +#include "chrif.h" +#include "clif.h" +#include "date.h" +#include "elemental.h" +#include "guild.h" #include "homunculus.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" #include "mercenary.h" -#include "elemental.h" #include "mob.h" #include "npc.h" -#include "battle.h" -#include "battleground.h" #include "party.h" -#include "itemdb.h" +#include "path.h" +#include "pc.h" +#include "pet.h" #include "script.h" -#include "intif.h" -#include "log.h" -#include "chrif.h" -#include "guild.h" -#include "date.h" +#include "status.h" #include "unit.h" - -#include -#include -#include -#include -#include - +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" #define SKILLUNITTIMER_INTERVAL 100 diff --git a/src/map/skill.h b/src/map/skill.h index dda310bd4..b6dbb1fcb 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -5,19 +5,23 @@ #ifndef _MAP_SKILL_H_ #define _MAP_SKILL_H_ -#include "../common/mmo.h" // MAX_SKILL, struct square -#include "../common/db.h" +#include "../config/core.h" // RENEWAL_CAST + #include "map.h" // struct block_list +#include "status.h" // enum sc_type +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/mmo.h" // MAX_SKILL, struct square /** * Declarations **/ -struct map_session_data; struct homun_data; +struct map_session_data; +struct mercenary_data; struct skill_unit; -struct skill_unit_group; -struct status_change_entry; struct square; +struct status_change_entry; /** * Defines diff --git a/src/map/status.c b/src/map/status.c index 4c2bc6d22..eb06138da 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2,43 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/malloc.h" -#include "../common/utils.h" -#include "../common/ers.h" -#include "../common/strlib.h" +#define HERCULES_CORE + +#include "../config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP +#include "status.h" +#include +#include +#include +#include +#include +#include + +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "itemdb.h" #include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" #include "path.h" #include "pc.h" #include "pet.h" -#include "npc.h" -#include "mob.h" -#include "clif.h" -#include "guild.h" +#include "script.h" #include "skill.h" -#include "itemdb.h" -#include "battle.h" -#include "chrif.h" #include "skill.h" -#include "status.h" -#include "script.h" #include "unit.h" -#include "homunculus.h" -#include "mercenary.h" -#include "elemental.h" #include "vending.h" - -#include -#include -#include -#include -#include -#include +#include "../common/cbasetypes.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/timer.h" +#include "../common/utils.h" struct status_interface status_s; diff --git a/src/map/status.h b/src/map/status.h index e47c2b365..baa586297 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -5,14 +5,18 @@ #ifndef _MAP_STATUS_H_ #define _MAP_STATUS_H_ +#include "../config/core.h" // defType, NEW_CARTS, RENEWAL, RENEWAL_ASPD + +#include "../common/cbasetypes.h" #include "../common/mmo.h" struct block_list; -struct mob_data; -struct pet_data; +struct elemental_data; struct homun_data; struct mercenary_data; -struct status_change; +struct mob_data; +struct npc_data; +struct pet_data; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] @@ -1878,11 +1882,7 @@ struct status_interface { int hp_coefficient2[CLASS_COUNT]; int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1]; int sp_coefficient[CLASS_COUNT]; -#ifdef RENEWAL_ASPD - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; -#else - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89] -#endif + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD sc_type Skill2SCTable[MAX_SKILL]; // skill -> status int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) unsigned int ChangeFlagTable[SC_MAX]; // status -> flags diff --git a/src/map/storage.c b/src/map/storage.c index e65ed7b80..2db5fff3d 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -2,28 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/nullpo.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" +#define HERCULES_CORE -#include "map.h" // struct map_session_data #include "storage.h" -#include "chrif.h" -#include "itemdb.h" -#include "clif.h" -#include "intif.h" -#include "pc.h" -#include "guild.h" -#include "battle.h" -#include "atcommand.h" -#include "log.h" #include #include #include +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" +#include "clif.h" +#include "guild.h" +#include "intif.h" +#include "itemdb.h" +#include "log.h" +#include "map.h" // struct map_session_data +#include "pc.h" +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" + struct storage_interface storage_s; struct guild_storage_interface gstorage_s; diff --git a/src/map/storage.h b/src/map/storage.h index 8f9f904f6..5edb68cfc 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -5,11 +5,12 @@ #ifndef _MAP_STORAGE_H_ #define _MAP_STORAGE_H_ -struct storage_data; +#include "../common/cbasetypes.h" +#include "../common/db.h" + struct guild_storage; struct item; struct map_session_data; -struct DBMap; struct storage_interface { /* */ diff --git a/src/map/trade.c b/src/map/trade.c index 44b669ebd..83426c407 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -2,25 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/socket.h" +#define HERCULES_CORE #include "trade.h" + +#include +#include + +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" #include "clif.h" +#include "intif.h" #include "itemdb.h" +#include "log.h" #include "map.h" +#include "npc.h" #include "path.h" #include "pc.h" -#include "npc.h" -#include "battle.h" -#include "chrif.h" #include "storage.h" -#include "intif.h" -#include "atcommand.h" -#include "log.h" - -#include -#include +#include "../common/nullpo.h" +#include "../common/socket.h" struct trade_interface trade_s; diff --git a/src/map/unit.c b/src/map/unit.c index 151d4bad5..0ad770e80 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2,45 +2,48 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/showmsg.h" -#include "../common/timer.h" -#include "../common/nullpo.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/HPM.h" +#define HERCULES_CORE +#include "../config/core.h" // RENEWAL_CAST +#include "unit.h" + +#include +#include +#include + +#include "battle.h" +#include "battleground.h" +#include "chat.h" +#include "chrif.h" +#include "clif.h" +#include "duel.h" +#include "elemental.h" +#include "guild.h" +#include "homunculus.h" +#include "instance.h" +#include "intif.h" #include "map.h" +#include "mercenary.h" +#include "mob.h" +#include "npc.h" +#include "party.h" #include "path.h" #include "pc.h" -#include "mob.h" #include "pet.h" -#include "homunculus.h" -#include "instance.h" -#include "mercenary.h" -#include "elemental.h" +#include "script.h" #include "skill.h" -#include "clif.h" -#include "duel.h" -#include "npc.h" -#include "guild.h" #include "status.h" -#include "unit.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" +#include "storage.h" #include "trade.h" #include "vending.h" -#include "party.h" -#include "intif.h" -#include "chrif.h" -#include "script.h" -#include "storage.h" - -#include -#include -#include - +#include "../common/HPM.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" const short dirx[8]={0,-1,-1,-1,0,1,1,1}; const short diry[8]={1,1,0,-1,-1,-1,0,1}; diff --git a/src/map/unit.h b/src/map/unit.h index 33fa4e052..9e05647b1 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -5,15 +5,13 @@ #ifndef _MAP_UNIT_H_ #define _MAP_UNIT_H_ -//#include "map.h" -struct block_list; -struct unit_data; -struct map_session_data; - #include "clif.h" // clr_type -#include "map.h" // struct block_list #include "path.h" // struct walkpath_data -#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "../common/cbasetypes.h" + +struct map_session_data; +struct block_list; struct unit_data { struct block_list *bl; diff --git a/src/map/vending.c b/src/map/vending.c index 9462975b3..c8ac814db 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -2,24 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#include "../common/nullpo.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#define HERCULES_CORE + +#include "vending.h" + +#include +#include + +#include "atcommand.h" +#include "battle.h" +#include "chrif.h" #include "clif.h" #include "itemdb.h" -#include "atcommand.h" +#include "log.h" #include "map.h" +#include "npc.h" #include "path.h" -#include "chrif.h" -#include "vending.h" #include "pc.h" -#include "npc.h" #include "skill.h" -#include "battle.h" -#include "log.h" - -#include -#include +#include "../common/nullpo.h" +#include "../common/strlib.h" +#include "../common/utils.h" struct vending_interface vending_s; diff --git a/src/map/vending.h b/src/map/vending.h index a212f8385..a70726374 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -7,6 +7,7 @@ #include "../common/cbasetypes.h" #include "../common/db.h" + struct map_session_data; struct s_search_store_search; diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 85d5fb548..96d51aec6 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -1,6 +1,14 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#define HERCULES_CORE + +#include "../config/core.h" // RENEWAL + +#include +#include +#include + #include "../common/cbasetypes.h" #include "../common/grfio.h" #include "../common/malloc.h" @@ -8,12 +16,6 @@ #include "../common/showmsg.h" #include "../common/utils.h" -#include "../config/renewal.h" - -#include -#include -#include - #ifndef _WIN32 #include #endif -- cgit v1.2.3-70-g09d2 From 5d67f33135a5305665f78307e03fa9aee7aa544b Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 13 May 2014 18:17:52 +0200 Subject: Removed trailing whitespace (sources) Signed-off-by: Haru --- src/char/char.c | 12 +- src/char/int_auction.c | 2 +- src/char/int_party.c | 6 +- src/char/int_party.h | 2 +- src/common/HPM.c | 4 +- src/common/atomic.h | 8 +- src/common/cbasetypes.h | 2 +- src/common/db.c | 28 +- src/common/db.h | 40 +- src/common/ers.c | 34 +- src/common/ers.h | 12 +- src/common/malloc.c | 4 +- src/common/mutex.c | 2 +- src/common/mutex.h | 34 +- src/common/nullpo.c | 2 +- src/common/showmsg.c | 34 +- src/common/socket.c | 8 +- src/common/spinlock.h | 4 +- src/common/sql.c | 5 +- src/common/sql.h | 6 +- src/common/strlib.c | 12 +- src/common/thread.c | 41 +- src/common/thread.h | 38 +- src/common/timer.c | 4 +- src/common/timer.h | 4 +- src/common/utils.c | 4 +- src/common/winapi.h | 4 +- src/config/const.h | 2 +- src/login/login.c | 6 +- src/map/atcommand.c | 12 +- src/map/battle.c | 35 +- src/map/battle.h | 4 +- src/map/chat.c | 6 +- src/map/chat.h | 4 +- src/map/chrif.c | 8 +- src/map/chrif.h | 2 +- src/map/clif.c | 32 +- src/map/duel.c | 4 +- src/map/duel.h | 2 +- src/map/elemental.c | 2 +- src/map/elemental.h | 2 +- src/map/guild.c | 6 +- src/map/intif.c | 2 +- src/map/intif.h | 4 +- src/map/itemdb.c | 17 +- src/map/map.c | 4 +- src/map/map.h | 6 +- src/map/mercenary.c | 2 +- src/map/mercenary.h | 2 +- src/map/mob.c | 2 +- src/map/npc.c | 4 +- src/map/npc_chat.c | 27 +- src/map/packets.h | 26 +- src/map/packets_struct.h | 2 +- src/map/party.c | 2 +- src/map/party.h | 2 +- src/map/path.c | 4 +- src/map/pc.c | 10 +- src/map/pc.h | 2 +- src/map/pc_groups.c | 2 +- src/map/pet.c | 28 +- src/map/skill.c | 42 +- src/map/skill.h | 2 +- src/map/sql/CMakeLists.txt | 2 +- src/map/status.c | 24 +- src/map/status.h | 1539 ++++++++++++++++++++++---------------------- src/map/unit.c | 8 +- src/map/vending.c | 2 +- src/plugins/db2sql.c | 2 +- src/plugins/dbghelpplug.c | 23 +- src/test/test_spinlock.c | 15 +- 71 files changed, 1147 insertions(+), 1143 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index 6c0902644..289df62a4 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -797,7 +797,7 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u', `bound`='%d'", tablename, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].bound); for( j = 0; j < MAX_SLOTS; ++j )for( j = 0; j < MAX_SLOTS; ++j ) - StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]); + StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]); StrBuf->Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id); if( SQL_ERROR == SQL->QueryStr(sql_handle, StrBuf->Value(&buf)) ) @@ -1674,7 +1674,7 @@ int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int ag { if( SQL_ERROR == SQL->Query(sql_handle, "INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `identify`) VALUES ('%d', '%d', '%d', '%d')", - inventory_db, char_id, start_items[k], 1, 1) + inventory_db, char_id, start_items[k], 1, 1) ) Sql_ShowDebug(sql_handle); } @@ -2048,7 +2048,7 @@ int mmo_char_send006b(int fd, struct char_session_data* sd) int j, offset = 0; #if PACKETVER >= 20100413 offset += 3; -#endif +#endif if (save_log) ShowInfo("Loading Char Data ("CL_BOLD"%d"CL_RESET")\n",sd->account_id); @@ -3978,7 +3978,7 @@ static void char_delete2_req(int fd, struct char_session_data* sd) // see issue: 7338 if( char_aegis_delete ) { - if( SQL_SUCCESS != SQL->Query(sql_handle, "SELECT `party_id`, `guild_id` FROM `%s` WHERE `char_id`='%d'", char_db, char_id) + if( SQL_SUCCESS != SQL->Query(sql_handle, "SELECT `party_id`, `guild_id` FROM `%s` WHERE `char_id`='%d'", char_db, char_id) || SQL_SUCCESS != SQL->NextRow(sql_handle) ) { @@ -4268,7 +4268,7 @@ int parse_char(int fd) #if PACKETVER >= 20110309 if( *pincode->enabled ){ // hack check - struct online_char_data* character; + struct online_char_data* character; character = (struct online_char_data*)idb_get(online_char_db, sd->account_id); if( character && character->pincode_enable == -1){ WFIFOHEAD(fd,3); @@ -4508,7 +4508,7 @@ int parse_char(int fd) int i; #if PACKETVER >= 20110309 if( *pincode->enabled ){ // hack check - struct online_char_data* character; + struct online_char_data* character; character = (struct online_char_data*)idb_get(online_char_db, sd->account_id); if( character && character->pincode_enable == -1 ){ WFIFOHEAD(fd,3); diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 886b5be26..d246e9851 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -268,7 +268,7 @@ static void mapif_parse_Auction_requestlist(int fd) for( auction = dbi_first(iter); dbi_exists(iter); auction = dbi_next(iter) ) { - if( (type == 0 && auction->type != IT_ARMOR && auction->type != IT_PETARMOR) || + if( (type == 0 && auction->type != IT_ARMOR && auction->type != IT_PETARMOR) || (type == 1 && auction->type != IT_WEAPON) || (type == 2 && auction->type != IT_CARD) || (type == 3 && auction->type != IT_ETC) || diff --git a/src/char/int_party.c b/src/char/int_party.c index 3e4a743d6..5dd64a32b 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -652,7 +652,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id if (p == NULL) return 0; - for(i = 0; i < MAX_PARTY && + for(i = 0; i < MAX_PARTY && (p->party.member[i].account_id != account_id || p->party.member[i].char_id != char_id); i++); @@ -666,7 +666,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id else p->party.count--; // Even share check situations: Family state (always breaks) - // character logging on/off is max/min level (update level range) + // character logging on/off is max/min level (update level range) // or character logging on/off has a different level (update level range using new level) if (p->family || (p->party.member[i].lv <= p->min_lv || p->party.member[i].lv >= p->max_lv) || @@ -731,7 +731,7 @@ int mapif_parse_PartyLeaderChange(int fd,int party_id,int account_id,int char_id for (i = 0; i < MAX_PARTY; i++) { - if(p->party.member[i].leader) + if(p->party.member[i].leader) p->party.member[i].leader = 0; if(p->party.member[i].account_id == account_id && p->party.member[i].char_id == char_id) diff --git a/src/char/int_party.h b/src/char/int_party.h index 098c1e9a9..33325b46b 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -6,7 +6,7 @@ //Party Flags on what to save/delete. enum { - PS_CREATE = 0x01, //Create a new party entry (index holds leader's info) + PS_CREATE = 0x01, //Create a new party entry (index holds leader's info) PS_BASIC = 0x02, //Update basic party info. PS_LEADER = 0x04, //Update party's leader PS_ADDMEMBER = 0x08, //Specify new party member (index specifies which party member) diff --git a/src/common/HPM.c b/src/common/HPM.c index 00b92dc60..d33a4c1aa 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -505,7 +505,7 @@ bool hplugins_addpacket(unsigned short cmd, short length,void (*receive) (int fd return true; } -/* +/* 0 = unknown 1 = OK 2 = incomplete @@ -635,7 +635,7 @@ bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, void (*func) CREATE(data, struct HPMArgData, 1); - data->pluginID = pluginID; + data->pluginID = pluginID; data->name = aStrdup(name); data->func = func; data->help = help; diff --git a/src/common/atomic.h b/src/common/atomic.h index 8c01943e7..1349d0887 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -4,16 +4,16 @@ #ifndef _COMMON_ATOMIC_H_ #define _COMMON_ATOMIC_H_ -// Atomic Operations +// Atomic Operations // (Interlocked CompareExchange, Add .. and so on ..) -// +// // Implementation varies / depends on: // - Architecture // - Compiler // - Operating System // // our Abstraction is fully API-Compatible to Microsofts implementation @ NT5.0+ -// +// #include "../common/cbasetypes.h" #if defined(_MSC_VER) @@ -36,7 +36,7 @@ forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch, mov ecx,4[edi]; mov esi,dest; - lock CMPXCHG8B [esi]; + lock CMPXCHG8B [esi]; } } diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index da0d6b307..ac65b08a8 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -313,7 +313,7 @@ typedef char bool; #undef swap #endif // hmm only ints? -//#define swap(a,b) { int temp=a; a=b; b=temp;} +//#define swap(a,b) { int temp=a; a=b; b=temp;} // if using macros then something that is type independent //#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b))) // Avoid "value computed is not used" warning and generates the same assembly code diff --git a/src/common/db.c b/src/common/db.c index 1781aa96f..bbeaf0b61 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -94,7 +94,7 @@ \*****************************************************************************/ /** - * If defined statistics about database nodes, database creating/destruction + * If defined statistics about database nodes, database creating/destruction * and function usage are keept and displayed when finalizing the database * system. * WARNING: This adds overhead to every database operation (not shure how much). @@ -522,7 +522,7 @@ static void db_rebalance_erase(DBNode node, DBNode *root) x_parent = y->parent; if (x) x->parent = y->parent; y->parent->left = x; - // put the right of 'node' in 'y' + // put the right of 'node' in 'y' y->right = node->right; node->right->parent = y; // 'y' is a direct child of 'node' @@ -1409,7 +1409,7 @@ DBData* dbit_obj_prev(DBIterator* self, DBKey* out_key) /** * Returns true if the fetched entry exists. - * The databases entries might have NULL data, so use this to to test if + * The databases entries might have NULL data, so use this to to test if * the iterator is done. * @param self Iterator * @return true if the entry exists @@ -1426,7 +1426,7 @@ bool dbit_obj_exists(DBIterator* self) /** * Removes the current entry from the database. - * NOTE: {@link DBIterator#exists} will return false until another entry + * NOTE: {@link DBIterator#exists} will return false until another entry * is fetched * Puts data of the removed entry in out_data, if out_data is not NULL. * @param self Iterator @@ -1477,7 +1477,7 @@ void dbit_obj_destroy(DBIterator* self) /** * Returns a new iterator for this database. * The iterator keeps the database locked until it is destroyed. - * The database will keep functioning normally but will only free internal + * The database will keep functioning normally but will only free internal * memory when unlocked, so destroy the iterator as soon as possible. * @param self Database * @return New iterator @@ -1615,7 +1615,7 @@ static DBData* db_obj_get(DBMap* self, DBKey key) * It puts a maximum of max entries into buf. * If buf is NULL, it only counts the matches. * Returns the number of entries that matched. - * NOTE: if the value returned is greater than max, only the + * NOTE: if the value returned is greater than max, only the * first max entries found are put into the buffer. * @param self Interface of the database * @param buf Buffer to put the data of the matched entries @@ -1686,7 +1686,7 @@ static unsigned int db_obj_vgetall(DBMap* self, DBData **buf, unsigned int max, * It puts a maximum of max entries into buf. * If buf is NULL, it only counts the matches. * Returns the number of entries that matched. - * NOTE: if the value returned is greater than max, only the + * NOTE: if the value returned is greater than max, only the * first max entries found are put into the buffer. * @param self Interface of the database * @param buf Buffer to put the data of the matched entries @@ -1714,7 +1714,7 @@ static unsigned int db_obj_getall(DBMap* self, DBData **buf, unsigned int max, D /** * Get the data of the entry identified by the key. - * If the entry does not exist, an entry is added with the data returned by + * If the entry does not exist, an entry is added with the data returned by * create. * @param self Interface of the database * @param key Key that identifies the entry @@ -1813,7 +1813,7 @@ static DBData* db_obj_vensure(DBMap* self, DBKey key, DBCreateData create, va_li /** * Just calls {@link DBMap#vensure}. * Get the data of the entry identified by the key. - * If the entry does not exist, an entry is added with the data returned by + * If the entry does not exist, an entry is added with the data returned by * create. * @param self Interface of the database * @param key Key that identifies the entry @@ -2163,7 +2163,7 @@ static int db_obj_vclear(DBMap* self, DBApply func, va_list args) * Before deleting an entry, func is applied to it. * Releases the key and the data. * Returns the sum of values returned by func, if it exists. - * NOTE: This locks the database globally. Any attempt to insert or remove + * NOTE: This locks the database globally. Any attempt to insert or remove * a database entry will give an error and be aborted (except for clearing). * @param self Interface of the database * @param func Function to be applied to every entry before deleting @@ -2191,7 +2191,7 @@ static int db_obj_clear(DBMap* self, DBApply func, ...) * Finalize the database, feeing all the memory it uses. * Before deleting an entry, func is applied to it. * Returns the sum of values returned by func, if it exists. - * NOTE: This locks the database globally. Any attempt to insert or remove + * NOTE: This locks the database globally. Any attempt to insert or remove * a database entry will give an error and be aborted (except for clearing). * @param self Interface of the database * @param func Function to be applied to every entry before deleting @@ -2246,7 +2246,7 @@ static int db_obj_vdestroy(DBMap* self, DBApply func, va_list args) * Before deleting an entry, func is applied to it. * Releases the key and the data. * Returns the sum of values returned by func, if it exists. - * NOTE: This locks the database globally. Any attempt to insert or remove + * NOTE: This locks the database globally. Any attempt to insert or remove * a database entry will give an error and be aborted. * @param self Database * @param func Function to be applied to every entry before deleting @@ -2448,7 +2448,7 @@ DBHasher db_default_hash(DBType type) } /** - * Returns the default releaser for the specified type of database with the + * Returns the default releaser for the specified type of database with the * specified options. * NOTE: the options are fixed with {@link #db_fix_options(DBType,DBOptions)} * before choosing the releaser. @@ -2509,7 +2509,7 @@ DBReleaser db_custom_release(DBRelease which) * @param line Line of the file where the database is being allocated * @param type Type of database * @param options Options of the database - * @param maxlen Maximum length of the string to be used as key in string + * @param maxlen Maximum length of the string to be used as key in string * databases. If 0, the maximum number of maxlen is used (64K). * @return The interface of the database * @public diff --git a/src/common/db.h b/src/common/db.h index 0d2548806..f5714ceaf 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -79,7 +79,7 @@ typedef enum DBRelease { /** * Supported types of database. - * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the + * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the * types of databases. * @param DB_INT Uses int's for keys * @param DB_UINT Uses unsigned int's for keys @@ -107,14 +107,14 @@ typedef enum DBType { /** * Bitfield of options that define the behaviour of the database. - * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the + * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the * types of databases. * @param DB_OPT_BASE Base options: does not duplicate keys, releases nothing * and does not allow NULL keys or NULL data. - * @param DB_OPT_DUP_KEY Duplicates the keys internally. If DB_OPT_RELEASE_KEY + * @param DB_OPT_DUP_KEY Duplicates the keys internally. If DB_OPT_RELEASE_KEY * is defined, the real key is freed as soon as the entry is added. * @param DB_OPT_RELEASE_KEY Releases the key. - * @param DB_OPT_RELEASE_DATA Releases the data whenever an entry is removed + * @param DB_OPT_RELEASE_DATA Releases the data whenever an entry is removed * from the database. * WARNING: for funtions that return the data (like DBMap::remove), * a dangling pointer will be returned. @@ -188,7 +188,7 @@ typedef struct DBData { } DBData; /** - * Format of functions that create the data for the key when the entry doesn't + * Format of functions that create the data for the key when the entry doesn't * exist in the database yet. * @param key Key of the database entry * @param args Extra arguments of the function @@ -200,9 +200,9 @@ typedef struct DBData { typedef DBData (*DBCreateData)(DBKey key, va_list args); /** - * Format of functions to be applied to an unspecified quantity of entries of + * Format of functions to be applied to an unspecified quantity of entries of * a database. - * Any function that applies this function to the database will return the sum + * Any function that applies this function to the database will return the sum * of values returned by this function. * @param key Key of the database entry * @param data Data of the database entry @@ -280,7 +280,7 @@ typedef struct DBMap DBMap; * Database iterator. * Supports forward iteration, backward iteration and removing entries from the database. * The iterator is initially positioned before the first entry of the database. - * While the iterator exists the database is locked internally, so invoke + * While the iterator exists the database is locked internally, so invoke * {@link DBIterator#destroy} as soon as possible. * @public * @see #DBMap @@ -334,7 +334,7 @@ struct DBIterator /** * Returns true if the fetched entry exists. - * The databases entries might have NULL data, so use this to to test if + * The databases entries might have NULL data, so use this to to test if * the iterator is done. * @param self Iterator * @return true is the entry exists @@ -344,7 +344,7 @@ struct DBIterator /** * Removes the current entry from the database. - * NOTE: {@link DBIterator#exists} will return false until another entry + * NOTE: {@link DBIterator#exists} will return false until another entry * is fetched * Puts data of the removed entry in out_data, if out_data is not NULL. * @param self Iterator @@ -375,7 +375,7 @@ struct DBMap { /** * Returns a new iterator for this database. * The iterator keeps the database locked until it is destroyed. - * The database will keep functioning normally but will only free internal + * The database will keep functioning normally but will only free internal * memory when unlocked, so destroy the iterator as soon as possible. * @param self Database * @return New iterator @@ -407,7 +407,7 @@ struct DBMap { * It puts a maximum of max entries into buf. * If buf is NULL, it only counts the matches. * Returns the number of entries that matched. - * NOTE: if the value returned is greater than max, only the + * NOTE: if the value returned is greater than max, only the * first max entries found are put into the buffer. * @param self Database * @param buf Buffer to put the data of the matched entries @@ -425,7 +425,7 @@ struct DBMap { * It puts a maximum of max entries into buf. * If buf is NULL, it only counts the matches. * Returns the number of entries that matched. - * NOTE: if the value returned is greater than max, only the + * NOTE: if the value returned is greater than max, only the * first max entries found are put into the buffer. * @param self Database * @param buf Buffer to put the data of the matched entries @@ -441,7 +441,7 @@ struct DBMap { /** * Just calls {@link DBMap#vensure}. * Get the data of the entry identified by the key. - * If the entry does not exist, an entry is added with the data returned by + * If the entry does not exist, an entry is added with the data returned by * create. * @param self Database * @param key Key that identifies the entry @@ -455,7 +455,7 @@ struct DBMap { /** * Get the data of the entry identified by the key. - * If the entry does not exist, an entry is added with the data returned by + * If the entry does not exist, an entry is added with the data returned by * create. * @param self Database * @param key Key that identifies the entry @@ -552,7 +552,7 @@ struct DBMap { * Before deleting an entry, func is applied to it. * Releases the key and the data. * Returns the sum of values returned by func, if it exists. - * NOTE: This locks the database globally. Any attempt to insert or remove + * NOTE: This locks the database globally. Any attempt to insert or remove * a database entry will give an error and be aborted (except for clearing). * @param self Database * @param func Function to be applied to every entry before deleting @@ -567,7 +567,7 @@ struct DBMap { * Finalize the database, feeing all the memory it uses. * Before deleting an entry, func is applied to it. * Returns the sum of values returned by func, if it exists. - * NOTE: This locks the database globally. Any attempt to insert or remove + * NOTE: This locks the database globally. Any attempt to insert or remove * a database entry will give an error and be aborted (except for clearing). * @param self Database * @param func Function to be applied to every entry before deleting @@ -759,7 +759,7 @@ DBComparator (*default_cmp) (DBType type); DBHasher (*default_hash) (DBType type); /** - * Returns the default releaser for the specified type of database with the + * Returns the default releaser for the specified type of database with the * specified options. * NOTE: the options are fixed by {@link #db_fix_options(DBType,DBOptions)} * before choosing the releaser @@ -788,7 +788,7 @@ DBReleaser (*custom_release) (DBRelease which); /** * Allocate a new database of the specified type. - * It uses the default comparator, hasher and releaser of the specified + * It uses the default comparator, hasher and releaser of the specified * database type and fixed options. * NOTE: the options are fixed by {@link #db_fix_options(DBType,DBOptions)} * before creating the database. @@ -796,7 +796,7 @@ DBReleaser (*custom_release) (DBRelease which); * @param line Line of the file where the database is being allocated * @param type Type of database * @param options Options of the database - * @param maxlen Maximum length of the string to be used as key in string + * @param maxlen Maximum length of the string to be used as key in string * databases. If 0, the maximum number of maxlen is used (64K). * @return The interface of the database * @public diff --git a/src/common/ers.c b/src/common/ers.c index d9895e4f2..39e05a14c 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -78,7 +78,7 @@ typedef struct ers_cache // Memory blocks array unsigned char **Blocks; - // Max number of blocks + // Max number of blocks unsigned int Max; // Free objects count @@ -190,26 +190,19 @@ static void *ers_obj_alloc_entry(ERS self) struct ers_instance_t *instance = (struct ers_instance_t *)self; void *ret; - if (instance == NULL) - { + if (instance == NULL) { ShowError("ers_obj_alloc_entry: NULL object, aborting entry freeing.\n"); return NULL; } - if (instance->Cache->ReuseList != NULL) - { + if (instance->Cache->ReuseList != NULL) { ret = (void *)((unsigned char *)instance->Cache->ReuseList + sizeof(struct ers_list)); instance->Cache->ReuseList = instance->Cache->ReuseList->Next; - } - else if (instance->Cache->Free > 0) - { + } else if (instance->Cache->Free > 0) { instance->Cache->Free--; ret = &instance->Cache->Blocks[instance->Cache->Used - 1][instance->Cache->Free * instance->Cache->ObjectSize + sizeof(struct ers_list)]; - } - else - { - if (instance->Cache->Used == instance->Cache->Max) - { + } else { + if (instance->Cache->Used == instance->Cache->Max) { instance->Cache->Max = (instance->Cache->Max * 4) + 3; RECREATE(instance->Cache->Blocks, unsigned char *, instance->Cache->Max); } @@ -237,13 +230,10 @@ static void ers_obj_free_entry(ERS self, void *entry) struct ers_instance_t *instance = (struct ers_instance_t *)self; struct ers_list *reuse = (struct ers_list *)((unsigned char *)entry - sizeof(struct ers_list)); - if (instance == NULL) - { + if (instance == NULL) { ShowError("ers_obj_free_entry: NULL object, aborting entry freeing.\n"); return; - } - else if (entry == NULL) - { + } else if (entry == NULL) { ShowError("ers_obj_free_entry: NULL entry, nothing to free.\n"); return; } @@ -261,11 +251,10 @@ static size_t ers_obj_entry_size(ERS self) { struct ers_instance_t *instance = (struct ers_instance_t *)self; - if (instance == NULL) - { + if (instance == NULL) { ShowError("ers_obj_entry_size: NULL object, aborting entry freeing.\n"); return 0; - } + } return instance->Cache->ObjectSize; } @@ -274,8 +263,7 @@ static void ers_obj_destroy(ERS self) { struct ers_instance_t *instance = (struct ers_instance_t *)self; - if (instance == NULL) - { + if (instance == NULL) { ShowError("ers_obj_destroy: NULL object, aborting entry freeing.\n"); return; } diff --git a/src/common/ers.h b/src/common/ers.h index 23a996923..7eceaf87a 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -55,7 +55,7 @@ /** * Define this to disable the Entry Reusage System. * All code except the typedef of ERInterface will be disabled. - * To allow a smooth transition, + * To allow a smooth transition, */ //#define DISABLE_ERS @@ -63,7 +63,7 @@ * Entries are aligned to ERS_ALIGNED bytes in the blocks of entries. * By default it aligns to one byte, using the "natural order" of the entries. * This should NEVER be set to zero or less. - * If greater than one, some memory can be wasted. This should never be needed + * If greater than one, some memory can be wasted. This should never be needed * but is here just in case some aligment issues arise. */ #ifndef ERS_ALIGNED @@ -118,7 +118,7 @@ typedef struct eri { /** * Destroy this instance of the manager. * The manager is actually only destroyed when all the instances are destroyed. - * When destroying the manager a warning is shown if the manager has + * When destroying the manager a warning is shown if the manager has * missing/extra entries. * @param self Interface of the entry manager */ @@ -140,7 +140,7 @@ typedef struct eri { # define ers_report() # define ers_final() #else /* not DISABLE_ERS */ -// These defines should be used to allow the code to keep working whenever +// These defines should be used to allow the code to keep working whenever // the system is disabled # define ers_alloc(obj,type) ((type *)(obj)->alloc(obj)) # define ers_free(obj,entry) ((obj)->free((obj),(entry))) @@ -151,9 +151,9 @@ typedef struct eri { /** * Get a new instance of the manager that handles the specified entry size. * Size has to greater than 0. - * If the specified size is smaller than a pointer, the size of a pointer is + * If the specified size is smaller than a pointer, the size of a pointer is * used instead. - * It's also aligned to ERS_ALIGNED bytes, so the smallest multiple of + * It's also aligned to ERS_ALIGNED bytes, so the smallest multiple of * ERS_ALIGNED that is greater or equal to size is what's actually used. * @param The requested size of the entry in bytes * @return Interface of the object diff --git a/src/common/malloc.c b/src/common/malloc.c index 13cf0b5ce..74303fa92 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -21,7 +21,7 @@ struct malloc_interface iMalloc_s; #if defined(MEMWATCH) -# include +# include # include "memwatch.h" # define MALLOC(n,file,line,func) mwMalloc((n),(file),(line)) # define CALLOC(m,n,file,line,func) mwCalloc((m),(n),(file),(line)) @@ -421,7 +421,7 @@ void _mfree(void *ptr, const char *file, int line, const char *func ) struct unit_head *head; if (ptr == NULL) - return; + return; head = (struct unit_head *)((char *)ptr - sizeof(struct unit_head) + sizeof(long)); if(head->size == 0) { diff --git a/src/common/mutex.c b/src/common/mutex.c index 12524c3b7..1de707e95 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -119,7 +119,7 @@ void ramutex_unlock( ramutex m ){ /////////////// // Condition Variables -// +// // Implementation: // diff --git a/src/common/mutex.h b/src/common/mutex.h index 3b83b66d6..f78e31841 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -1,5 +1,5 @@ // Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// For more information, see LICENCE in the main folder #ifndef _COMMON_MUTEX_H_ #define _COMMON_MUTEX_H_ @@ -10,36 +10,36 @@ typedef struct ramutex *ramutex; // Mutex typedef struct racond *racond; // Condition Var /** - * Creates a Mutex + * Creates a Mutex * * @return not NULL */ ramutex ramutex_create(); -/** +/** * Destroys a Mutex - * + * * @param m - the mutex to destroy */ void ramutex_destroy( ramutex m ); -/** +/** * Gets a lock * * @param m - the mutex to lock */ void ramutex_lock( ramutex m); -/** +/** * Trys to get the Lock - * + * * @param m - the mutex try to lock - * + * * @return boolean (true = got the lock) */ bool ramutex_trylock( ramutex m ); -/** +/** * Unlocks a mutex * * @param m - the mutex to unlock @@ -47,14 +47,14 @@ bool ramutex_trylock( ramutex m ); void ramutex_unlock( ramutex m); -/** +/** * Creates a Condition variable * * @return not NULL */ racond racond_create(); -/** +/** * Destroy a Condition variable * * @param c - the condition varaible to destroy @@ -63,14 +63,14 @@ void racond_destroy( racond c ); /** * Waits Until state is signalled - * - * @param c - the condition var to wait for signalled state + * + * @param c - the condition var to wait for signalled state * @param m - the mutex used for syncronization * @param timeout_ticks - timeout in ticks ( -1 = INFINITE ) */ void racond_wait( racond c, ramutex m, sysint timeout_ticks); -/** +/** * Sets the given condition var to signalled state * * @param c - condition var to set in signalled state. @@ -80,13 +80,13 @@ void racond_wait( racond c, ramutex m, sysint timeout_ticks); */ void racond_signal( racond c ); -/** +/** * Sets notifys all waiting threads thats signalled. * @param c - condition var to set in signalled state - * + * * @note: * All Waiters getting notified. - */ + */ void racond_broadcast( racond c ); diff --git a/src/common/nullpo.c b/src/common/nullpo.c index 1891835f1..a3471b00d 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -14,7 +14,7 @@ /** * Reports failed assertions or NULL pointers - * + * * @param file Source file where the error was detected * @param line Line * @param func Function diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 1dbcba282..2a8e2d5f8 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -91,7 +91,7 @@ int console_msg_log = 0;//[Ind] msg error logging // ansi compatible printf with control sequence parser for windows // fast hack, handle with care, not everything implemented // -// \033[#;...;#m - Set Graphics Rendition (SGR) +// \033[#;...;#m - Set Graphics Rendition (SGR) // // printf("\x1b[1;31;40m"); // Bright red on black // printf("\x1b[3;33;45m"); // Blinking yellow on magenta (blink not implemented) @@ -110,19 +110,19 @@ int console_msg_log = 0;//[Ind] msg error logging // 8 - Concealed (invisible) // // \033[#A - Cursor Up (CUU) -// Moves the cursor up by the specified number of lines without changing columns. +// Moves the cursor up by the specified number of lines without changing columns. // If the cursor is already on the top line, this sequence is ignored. \e[A is equivalent to \e[1A. // // \033[#B - Cursor Down (CUD) -// Moves the cursor down by the specified number of lines without changing columns. +// Moves the cursor down by the specified number of lines without changing columns. // If the cursor is already on the bottom line, this sequence is ignored. \e[B is equivalent to \e[1B. // // \033[#C - Cursor Forward (CUF) -// Moves the cursor forward by the specified number of columns without changing lines. +// Moves the cursor forward by the specified number of columns without changing lines. // If the cursor is already in the rightmost column, this sequence is ignored. \e[C is equivalent to \e[1C. // // \033[#D - Cursor Backward (CUB) -// Moves the cursor back by the specified number of columns without changing lines. +// Moves the cursor back by the specified number of columns without changing lines. // If the cursor is already in the leftmost column, this sequence is ignored. \e[D is equivalent to \e[1D. // // \033[#E - Cursor Next Line (CNL) @@ -135,15 +135,15 @@ int console_msg_log = 0;//[Ind] msg error logging // Moves the cursor to indicated column in current row. \e[G is equivalent to \e[1G. // // \033[#;#H - Cursor Position (CUP) -// Moves the cursor to the specified position. The first # specifies the line number, -// the second # specifies the column. If you do not specify a position, the cursor moves to the home position: +// Moves the cursor to the specified position. The first # specifies the line number, +// the second # specifies the column. If you do not specify a position, the cursor moves to the home position: // the upper-left corner of the screen (line 1, column 1). // // \033[#;#f - Horizontal & Vertical Position // (same as \033[#;#H) // // \033[s - Save Cursor Position (SCP) -// The current cursor position is saved. +// The current cursor position is saved. // // \033[u - Restore cursor position (RCP) // Restores the cursor position saved with the (SCP) sequence \033[s. @@ -213,7 +213,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) WriteFile(handle, p, (DWORD)(q-p), &written, 0); if( q[1]!='[' ) - { // write the escape char (whatever purpose it has) + { // write the escape char (whatever purpose it has) if(0==WriteConsole(handle, q, 1, &written, 0) ) WriteFile(handle,q, 1, &written, 0); p=q+1; //and start searching again @@ -233,7 +233,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) q=q+2; for(;;) { - if( ISDIGIT(*q) ) + if( ISDIGIT(*q) ) { // add number to number array, only accept 2digits, shift out the rest // so // \033[123456789m will become \033[89m numbers[numpoint] = (numbers[numpoint]<<4) | (*q-'0'); @@ -350,12 +350,12 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) else if(num==2) { // Number of chars on screen. cnt = info.dwSize.X * info.dwSize.Y; - SetConsoleCursorPosition(handle, origin); + SetConsoleCursorPosition(handle, origin); } else// 0 and default { // number of chars from cursor to end origin = info.dwCursorPosition; - cnt = info.dwSize.X * (info.dwSize.Y - info.dwCursorPosition.Y) - info.dwCursorPosition.X; + cnt = info.dwSize.X * (info.dwSize.Y - info.dwCursorPosition.Y) - info.dwCursorPosition.X; } FillConsoleOutputAttribute(handle, info.wAttributes, cnt, origin, &tmp); FillConsoleOutputCharacter(handle, ' ', cnt, origin, &tmp); @@ -389,7 +389,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) else if( *q == 'H' || *q == 'f' ) { // \033[#;#H - Cursor Position (CUP) // \033[#;#f - Horizontal & Vertical Position - // The first # specifies the line number, the second # specifies the column. + // The first # specifies the line number, the second # specifies the column. // The default for both is 1 info.dwCursorPosition.X = (numbers[numpoint])?(numbers[numpoint]>>4)*10+((numbers[numpoint]&0x0F)-1):0; info.dwCursorPosition.Y = (numpoint && numbers[numpoint-1])?(numbers[numpoint-1]>>4)*10+((numbers[numpoint-1]&0x0F)-1):0; @@ -486,7 +486,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) --q; } // skip the sequencer and search again - p = q+1; + p = q+1; break; }// end while } @@ -542,7 +542,7 @@ int VFPRINTF(FILE *file, const char *fmt, va_list argptr) { // find the escape character fprintf(file, "%.*s", (int)(q-p), p); // write up to the escape if( q[1]!='[' ) - { // write the escape char (whatever purpose it has) + { // write the escape char (whatever purpose it has) fprintf(file, "%.*s", 1, q); p=q+1; //and start searching again } @@ -555,7 +555,7 @@ int VFPRINTF(FILE *file, const char *fmt, va_list argptr) q=q+2; while(1) { - if( ISDIGIT(*q) ) + if( ISDIGIT(*q) ) { ++q; // and next character @@ -624,7 +624,7 @@ int VFPRINTF(FILE *file, const char *fmt, va_list argptr) --q; } // skip the sequencer and search again - p = q+1; + p = q+1; break; }// end while } diff --git a/src/common/socket.c b/src/common/socket.c index 3738f2c2a..ac6be68fe 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -64,7 +64,7 @@ struct socket_interface sockt_s; ///////////////////////////////////////////////////////////////////// #if defined(WIN32) ///////////////////////////////////////////////////////////////////// -// windows portability layer +// windows portability layer typedef int socklen_t; @@ -110,7 +110,7 @@ int sock2fd(SOCKET s) /// Inserts the socket into the global array of sockets. /// Returns a new fd associated with the socket. -/// If there are too many sockets it closes the socket, sets an error and +/// If there are too many sockets it closes the socket, sets an error and // returns -1 instead. /// Since fd 0 is reserved, it returns values in the range [1,FD_SETSIZE[. /// @@ -293,8 +293,8 @@ void set_defaultparse(ParseFunc defaultparse) *--------------------------------------*/ void set_nonblocking(int fd, unsigned long yes) { - // FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s. - // The argp parameter is zero if nonblocking is to be disabled. + // FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s. + // The argp parameter is zero if nonblocking is to be disabled. if( sIoctl(fd, FIONBIO, &yes) != 0 ) ShowError("set_nonblocking: Failed to set socket #%d to non-blocking mode (%s) - Please report this!!!\n", fd, error_msg()); } diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 0058e1d83..1c0825181 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -57,7 +57,7 @@ static forceinline void FinalizeSpinLock(PSPIN_LOCK lck){ static forceinline void EnterSpinLock(PSPIN_LOCK lck){ int tid = rathread_get_tid(); - // Get Sync Lock && Check if the requester thread already owns the lock. + // Get Sync Lock && Check if the requester thread already owns the lock. // if it owns, increase nesting level getsynclock(&lck->sync_lock); if(InterlockedCompareExchange(&lck->lock, tid, tid) == tid){ @@ -69,7 +69,7 @@ static forceinline void EnterSpinLock(PSPIN_LOCK lck){ dropsynclock(&lck->sync_lock); - // Spin until we've got it ! + // Spin until we've got it ! while(1){ if(InterlockedCompareExchange(&lck->lock, tid, 0) == 0){ diff --git a/src/common/sql.c b/src/common/sql.c index aeb56bff0..ffc4d63ef 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -402,8 +402,7 @@ void Sql_ShowDebug_(Sql* self, const char* debug_file, const unsigned long debug /// Frees a Sql handle returned by Sql_Malloc. -void Sql_Free(Sql* self) -{ +void Sql_Free(Sql* self) { if( self ) { SQL->FreeResult(self); @@ -549,7 +548,7 @@ static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_ty SHOW_DEBUG_OF(MYSQL_TYPE_NULL); #undef SHOW_DEBUG_TYPE_OF } - ShowDebug("%stype=%s%s, length=%d%s\n", prefix, sign, type_string, length, length_postfix); + ShowDebug("%stype=%s%s, length=%d%s\n", prefix, sign, type_string, length, length_postfix); } diff --git a/src/common/sql.h b/src/common/sql.h index 807e0843c..64d8307fc 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -147,10 +147,10 @@ struct sql_interface { /////////////////////////////////////////////////////////////////////////////// // Prepared Statements /////////////////////////////////////////////////////////////////////////////// - // Parameters are placed in the statement by embedding question mark ('?') + // Parameters are placed in the statement by embedding question mark ('?') // characters into the query at the appropriate positions. // The markers are legal only in places where they represent data. - // The markers cannot be inside quotes. Quotes will be added automatically + // The markers cannot be inside quotes. Quotes will be added automatically // when they are required. // // example queries with parameters: @@ -236,7 +236,7 @@ struct sql_interface { /// Binds the result of a column to a buffer. /// The buffer will be filled with data when the next row is fetched. - /// For string/enum buffer types there has to be enough space for the data + /// For string/enum buffer types there has to be enough space for the data /// and the nul-terminator (an extra byte). /// /// @return SQL_SUCCESS or SQL_ERROR diff --git a/src/common/strlib.c b/src/common/strlib.c index e2e802915..10e893c3a 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -192,7 +192,7 @@ char* normalize_name(char* str,const char* delims) return str; } -//stristr: Case insensitive version of strstr, code taken from +//stristr: Case insensitive version of strstr, code taken from //http://www.daniweb.com/code/snippet313.html, Dave Sinkula // const char* stristr(const char* haystack, const char* needle) @@ -618,13 +618,13 @@ int sv_parse_next(struct s_svstate* svstate) /// out_pos[0] and out_pos[1] are the start and end of line. /// Other position pairs are the start and end of fields. /// Returns the number of fields found or -1 if an error occurs. -/// +/// /// out_pos can be NULL. /// If a line terminator is found, the end position is placed there. -/// out_pos[2] and out_pos[3] for the first field, out_pos[4] and out_pos[5] +/// out_pos[2] and out_pos[3] for the first field, out_pos[4] and out_pos[5] /// for the seconds field and so on. /// Unfilled positions are set to -1. -/// +/// /// @param str String to parse /// @param len Length of the string /// @param startoff Where to start parsing @@ -668,11 +668,11 @@ int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, i /// out_fields[0] is the start of the next line. /// Other entries are the start of fields (nul-teminated). /// Returns the number of fields found or -1 if an error occurs. -/// +/// /// out_fields can be NULL. /// Fields that don't fit in out_fields are not nul-terminated. /// Extra entries in out_fields are filled with the end of the last field (empty string). -/// +/// /// @param str String to parse /// @param len Length of the string /// @param startoff Where to start parsing diff --git a/src/common/thread.c b/src/common/thread.c index 4f73aa9b3..bba56e7eb 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -17,7 +17,7 @@ #ifdef WIN32 # include "../common/winapi.h" # define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.) -# define __thread __declspec( thread ) +# define __thread __declspec( thread ) #else # include # include @@ -28,8 +28,8 @@ #endif // When Compiling using MSC (on win32..) we know we have support in any case! -#ifdef _MSC_VER -#define HAS_TLS +#ifdef _MSC_VER +#define HAS_TLS #endif @@ -40,7 +40,7 @@ struct rAthread { RATHREAD_PRIO prio; rAthreadProc proc; - void *param; + void *param; #ifdef WIN32 HANDLE hThread; @@ -82,9 +82,9 @@ void rathread_init(){ void rathread_final(){ register unsigned int i; - // Unterminated Threads Left? + // Unterminated Threads Left? // Should'nt happen .. - // Kill 'em all! + // Kill 'em all! // for(i = 1; i < RA_THREADS_MAX; i++){ if(l_threads[i].proc != NULL){ @@ -116,12 +116,12 @@ static void *_raThreadMainRedirector( void *p ){ // Update myID @ TLS to right id. #ifdef HAS_TLS - g_rathread_ID = ((rAthread)p)->myID; + g_rathread_ID = ((rAthread)p)->myID; #endif #ifndef WIN32 // When using posix threads - // the threads inherits the Signal mask from the thread which's spawned + // the threads inherits the Signal mask from the thread which's spawned // this thread // so we've to block everything we dont care about. sigemptyset(&set); @@ -136,7 +136,7 @@ static void *_raThreadMainRedirector( void *p ){ ret = ((rAthread)p)->proc( ((rAthread)p)->param ) ; -#ifdef WIN32 +#ifdef WIN32 CloseHandle( ((rAthread)p)->hThread ); #endif @@ -154,7 +154,7 @@ static void *_raThreadMainRedirector( void *p ){ /// /// API Level -/// +/// rAthread rathread_create( rAthreadProc entryPoint, void *param ){ return rathread_createEx( entryPoint, param, (1<<23) /*8MB*/, RAT_PRIO_NORMAL ); }//end: rathread_create() @@ -175,7 +175,7 @@ rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szSta szStack += tmp; - // Get a free Thread Slot. + // Get a free Thread Slot. for(i = 0; i < RA_THREADS_MAX; i++){ if(l_threads[i].proc == NULL){ handle = &l_threads[i]; @@ -223,7 +223,6 @@ void rathread_destroy ( rAthread handle ){ if( pthread_cancel( handle->hThread ) == 0){ // We have to join it, otherwise pthread wont re-cycle its internal ressources assoc. with this thread. - // pthread_join( handle->hThread, NULL ); // Tell our manager to release ressources ;) @@ -236,10 +235,10 @@ rAthread rathread_self( ){ #ifdef HAS_TLS rAthread handle = &l_threads[g_rathread_ID]; - if(handle->proc != NULL) // entry point set, so its used! + if(handle->proc != NULL) // entry point set, so its used! return handle; #else - // .. so no tls means we have to search the thread by its api-handle .. + // .. so no tls means we have to search the thread by its api-handle .. int i; #ifdef WIN32 @@ -257,13 +256,13 @@ rAthread rathread_self( ){ #endif - return NULL; + return NULL; }//end: rathread_self() int rathread_get_tid(){ -#ifdef HAS_TLS +#ifdef HAS_TLS return g_rathread_ID; #else // todo @@ -286,7 +285,7 @@ bool rathread_wait( rAthread handle, void* *out_exitCode ){ // #ifdef WIN32 WaitForSingleObject(handle->hThread, INFINITE); - return true; + return true; #else if(pthread_join(handle->hThread, out_exitCode) == 0) return true; @@ -297,8 +296,8 @@ bool rathread_wait( rAthread handle, void* *out_exitCode ){ void rathread_prio_set( rAthread handle, RATHREAD_PRIO prio ){ - handle->prio = RAT_PRIO_NORMAL; - //@TODO + handle->prio = RAT_PRIO_NORMAL; + //@TODO }//end: rathread_prio_set() @@ -308,9 +307,9 @@ RATHREAD_PRIO rathread_prio_get( rAthread handle){ void rathread_yield(){ -#ifdef WIN32 +#ifdef WIN32 SwitchToThread(); #else sched_yield(); -#endif +#endif }//end: rathread_yield() diff --git a/src/common/thread.h b/src/common/thread.h index 887c03179..7ad326509 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -12,7 +12,7 @@ typedef void* (*rAthreadProc)(void*); typedef enum RATHREAD_PRIO { RAT_PRIO_LOW = 0, RAT_PRIO_NORMAL, - RAT_PRIO_HIGH + RAT_PRIO_HIGH } RATHREAD_PRIO; @@ -21,18 +21,18 @@ typedef enum RATHREAD_PRIO { * * @param entyPoint - entryProc, * @param param - general purpose parameter, would be given as parameter to the thread's entrypoint. - * + * * @return not NULL if success */ rAthread rathread_create( rAthreadProc entryPoint, void *param ); -/** +/** * Creates a new Thread (with more creation options) * * @param entyPoint - entryProc, * @param param - general purpose parameter, would be given as parameter to the thread's entrypoint - * @param szStack - stack Size in bytes + * @param szStack - stack Size in bytes * @param prio - Priority of the Thread @ OS Scheduler.. * * @return not NULL if success @@ -43,29 +43,29 @@ rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szSta /** * Destroys the given Thread immediatly * - * @note The Handle gets invalid after call! dont use it afterwards. + * @note The Handle gets invalid after call! dont use it afterwards. * * @param handle - thread to destroy. */ void rathread_destroy ( rAthread handle ); -/** +/** * Returns the thread handle of the thread calling this function - * + * * @note this wont work @ programms main thread - * @note the underlying implementation might not perform very well, cache the value received! - * + * @note the underlying implementation might not perform very well, cache the value received! + * * @return not NULL if success */ rAthread rathread_self( ); /** - * Returns own thrad id (TID) + * Returns own thrad id (TID) * - * @note this is an unique identifier for the calling thread, and - * depends on platfrom / compiler, and may not be the systems Thread ID! + * @note this is an unique identifier for the calling thread, and + * depends on platfrom / compiler, and may not be the systems Thread ID! * * @return -1 when fails, otherwise >= 0 */ @@ -73,26 +73,26 @@ int rathread_get_tid(); /** - * Waits for the given thread to terminate + * Waits for the given thread to terminate * * @param handle - thread to wait (join) for * @param out_Exitcode - [OPTIONAL] - if given => Exitcode (value) of the given thread - if it's terminated - * + * * @return true - if the given thread has been terminated. */ bool rathread_wait( rAthread handle, void* *out_exitCode ); -/** +/** * Sets the given PRIORITY @ OS Task Scheduler - * + * * @param handle - thread to set prio for * @param rio - the priority (RAT_PRIO_LOW ... ) */ void rathread_prio_set( rAthread handle, RATHREAD_PRIO prio ); -/** +/** * Gets the current Prio of the given trhead * * @param handle - the thread to get the prio for. @@ -102,9 +102,9 @@ RATHREAD_PRIO rathread_prio_get( rAthread handle); /** * Tells the OS scheduler to yield the execution of the calling thread - * + * * @note: this will not "pause" the thread, - * it just allows the OS to spent the remaining time + * it just allows the OS to spent the remaining time * of the slice to another thread. */ void rathread_yield(); diff --git a/src/common/timer.c b/src/common/timer.c index 5d67455dc..5240ec202 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -130,7 +130,7 @@ static void rdtsc_calibrate(){ t1 = _rdtsc(); usleep(1000000); //1000 MS t2 = _rdtsc(); - RDTSC_CLOCK += (t2 - t1) / 1000; + RDTSC_CLOCK += (t2 - t1) / 1000; } RDTSC_CLOCK /= 5; @@ -453,7 +453,7 @@ void timer_final(void) { if (free_timer_list) aFree(free_timer_list); } /*===================================== -* Default Functions : timer.h +* Default Functions : timer.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/common/timer.h b/src/common/timer.h index 1ce8cf203..a07f81612 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -30,13 +30,13 @@ struct TimerData { int interval; // general-purpose storage - int id; + int id; intptr_t data; }; /*===================================== -* Interface : timer.h +* Interface : timer.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/common/utils.c b/src/common/utils.c index 84925f707..80954f848 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -265,9 +265,9 @@ uint32 MakeDWord(uint16 word0, uint16 word1) ( (uint32)(word0 ) )| ( (uint32)(word1 << 0x10) ); } + /************************************* -* Big-endian compatibility functions * -* From mapcache.c * +* Big-endian compatibility functions * *************************************/ // Converts an int16 from current machine order to little-endian diff --git a/src/common/winapi.h b/src/common/winapi.h index 7ce555049..b7c2bea1e 100644 --- a/src/common/winapi.h +++ b/src/common/winapi.h @@ -7,7 +7,7 @@ #define WINVER 0x0500 #define _WIN32_IE 0x0600 #define WIN32_LEAN_AND_MEAN -#define NOCOMM +#define NOCOMM #define NOKANJI #define NOHELP #define NOMCX @@ -32,5 +32,3 @@ #include #include #include - - diff --git a/src/config/const.h b/src/config/const.h index ba06d70cb..23467bfa6 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -15,7 +15,7 @@ */ /** - * "Sane Checks" to save you from compiling with cool bugs + * "Sane Checks" to save you from compiling with cool bugs **/ #if SECURE_NPCTIMEOUT_INTERVAL <= 0 #error SECURE_NPCTIMEOUT_INTERVAL should be at least 1 (1s) diff --git a/src/login/login.c b/src/login/login.c index cb46e0226..43883c6ce 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -173,7 +173,7 @@ static int online_data_cleanup_sub(DBKey key, DBData *data, va_list ap) static int online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { online_db->foreach(online_db, online_data_cleanup_sub); return 0; -} +} //-------------------------------------------------------------------- @@ -1109,7 +1109,7 @@ void login_auth_ok(struct login_session_data* sd) WFIFOW(fd,0) = 0x81; WFIFOB(fd,2) = 1; // 01 = Server closed WFIFOSET(fd,3); - return; + return; } server_num = 0; @@ -1827,7 +1827,7 @@ int do_init(int argc, char** argv) HPM->config_read(NULL, 0); HPM->event(HPET_INIT); - // server port open & binding + // server port open & binding if( (login_fd = make_listen_bind(login_config.login_ip,login_config.login_port)) == -1 ) { ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",login_config.login_port); exit(EXIT_FAILURE); diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7a6ad84e4..96fa9c350 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1123,14 +1123,14 @@ ACMD(item) memset(item_name, '\0', sizeof(item_name)); if (!strcmpi(info->command,"itembound") && (!message || !*message || ( - sscanf(message, "\"%99[^\"]\" %d %d", item_name, &number, &bound) < 2 && - sscanf(message, "%99s %d %d", item_name, &number, &bound) < 2 + sscanf(message, "\"%99[^\"]\" %d %d", item_name, &number, &bound) < 2 && + sscanf(message, "%99s %d %d", item_name, &number, &bound) < 2 ))) { clif->message(fd, msg_txt(295)); // Please enter an item name or ID (usage: @itembound ). return false; } else if (!message || !*message || ( - sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && - sscanf(message, "%99s %d", item_name, &number) < 1 )) + sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && + sscanf(message, "%99s %d", item_name, &number) < 1 )) { clif->message(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item ). return false; @@ -10088,7 +10088,7 @@ void atcommand_config_read(const char* config_filename) { } commandinfo->log = false; } - } + } // Commands help // We only check if all commands exist @@ -10135,7 +10135,7 @@ static inline int AtCommandType2idx(AtCommandType type) { return (type-1); } /** * Loads permissions for groups to use commands. - * + * */ void atcommand_db_load_groups(GroupSettings **groups, config_setting_t **commands_, size_t sz) { diff --git a/src/map/battle.c b/src/map/battle.c index 0865ee4ba..fc2f4d3cf 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -446,7 +446,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u if( sc && sc->count ){ if( sc->data[SC_ZENKAI] && watk->ele == sc->data[SC_ZENKAI]->val2 ) eatk += 200; - #ifdef RENEWAL_EDP + #ifdef RENEWAL_EDP if( sc->data[SC_EDP] && skill_id != AS_GRIMTOOTH && skill_id != AS_VENOMKNIFE && skill_id != ASC_BREAKER ){ eatk = eatk * (sc->data[SC_EDP]->val4 / 100 - 1); damage = damage * (sc->data[SC_EDP]->val4 / 100); @@ -655,7 +655,7 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in damage += (skill_lv * 10); else if(pc_isriding(sd)) damage += (skill_lv * 5); - else + else damage += (skill_lv * 4); } break; @@ -737,7 +737,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, #endif ) damage += 3 * skill2_lv; - break; + break; #ifndef RENEWAL case NJ_KUNAI: if( weapon ) @@ -748,7 +748,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, if( sd->weight ) damage += sd->weight / 8 ; case RA_WUGSTRIKE: - case RA_WUGBITE: + case RA_WUGBITE: damage += 30*pc->checkskill(sd, RA_TOOTHOFWUG); break; case HT_FREEZINGTRAP: @@ -999,7 +999,7 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ cardfix = cardfix * (100 + sd->right_weapon.addrace[RC_NONDEMIHUMAN]+sd->arrow_addrace[RC_NONDEMIHUMAN]) / 100; }else{ // Melee attack if( !battle_config.left_cardfix_to_right ){ - cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race])/100; + cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race])/100; if( !(nk&NK_NO_ELEFIX) ){ int ele_fix = sd->right_weapon.addele[tstatus->def_ele]; for (i = 0; ARRAYLENGTH(sd->right_weapon.addele2) > i && sd->right_weapon.addele2[i].rate != 0; i++) { @@ -1019,9 +1019,9 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ cardfix = cardfix * (100 + sd->right_weapon.addrace[RC_NONDEMIHUMAN]) / 100; if( cflag&1 ){ - cardfix_ = cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100; + cardfix_ = cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100; if (!(nk&NK_NO_ELEFIX)){ - int ele_fix_lh = sd->left_weapon.addele[tstatus->def_ele]; + int ele_fix_lh = sd->left_weapon.addele[tstatus->def_ele]; for (i = 0; ARRAYLENGTH(sd->left_weapon.addele2) > i && sd->left_weapon.addele2[i].rate != 0; i++) { if (sd->left_weapon.addele2[i].ele != tstatus->def_ele) continue; if(!(sd->left_weapon.addele2[i].flag&wflag&BF_WEAPONMASK && @@ -1221,7 +1221,7 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_ **/ defType def1 = status->get_def(target); //Don't use tstatus->def1 due to skill timer reductions. short def2 = tstatus->def2, vit_def; -#ifdef RENEWAL +#ifdef RENEWAL def1 = status->calc_def2(target, tsc, def1, false); // equip def(RE) def2 = status->calc_def(target, tsc, def2, false); // status def(RE) #else @@ -1301,7 +1301,7 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_ if( def1 < -399 ) // it stops at -399 def1 = 399; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 399 - //return 1; + //return 1; if( flag&2 ) damage += def1 >> 1; @@ -1357,7 +1357,7 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_ **/ if( mdef < -99 ) // it stops at -99 mdef = 99; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 99 - //return 1; + //return 1; damage = (int)((100.0f - mdef / (mdef + 100.0f) * 90.0f) / 100.0f * damage - mdef2); #else @@ -2538,7 +2538,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block skillratio += sc->data[SC_LKCONCENTRATION]->val2; if( sd && sd->status.weapon == W_KATAR && (i=pc->checkskill(sd,ASC_KATAR)) > 0 ) skillratio += skillratio * (10 + 2 * i) / 100; -#endif +#endif if( sc && sc->data[SC_CRUSHSTRIKE] ){ if( sd ) {//ATK [{Weapon Level * (Weapon Upgrade Level + 6) * 100} + (Weapon ATK) + (Weapon Weight)]% @@ -2985,7 +2985,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam rnd()%100 < sce->val3) status->heal(src, damage*sce->val4/100, 0, 3); - if( (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON + if( (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON && rnd()%100 < sce->val2 && sc->fv_counter <= sce->val3 ) clif->millenniumshield(bl, sc->fv_counter++); @@ -4517,7 +4517,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list ATK_RATE(50); RE_SKILL_REDUCTION(); } - break; + break; case NJ_SYURIKEN: // [malufett] GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0) ); wd.damage += battle->calc_masteryfix(src, target, skill_id, skill_lv, 4 * skill_lv + (sd ? sd->bonus.arrow_atk : 0), wd.div_, 0, flag.weapon) - status->get_total_def(target); @@ -4886,7 +4886,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list ATK_ADDRATE(sd->bonus.long_attack_atk_rate); if( sc && sc->data[SC_MTF_RANGEATK] ) ATK_ADDRATE(25);// temporary it should be 'bonus.long_attack_atk_rate' - #endif + #endif if( (i=pc->checkskill(sd,AB_EUCHARISTICA)) > 0 && (tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) ) ATK_ADDRATE(-i); @@ -5124,12 +5124,13 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list temp = pc->checkskill(sd,TF_DOUBLE); wd.damage2 = wd.damage * (1 + (temp * 2))/100; - if(wd.damage && !wd.damage2) wd.damage2 = + if(wd.damage && !wd.damage2) { #ifdef RENEWAL - 0; + wd.damage2 = 0; #else - 1; + wd.damage2 = 1; #endif + } flag.lh = 1; } } diff --git a/src/map/battle.h b/src/map/battle.h index fbe097c78..8d7e4183a 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -537,9 +537,9 @@ struct battle_interface { int64 (*attr_fix) (struct block_list *src, struct block_list *target, int64 damage, int atk_elem, int def_type, int def_lv); /* applies card modifiers */ int64 (*calc_cardfix) (int attack_type, struct block_list *src, struct block_list *target, int nk, int s_ele, int s_ele_, int64 damage, int left, int flag); - /* applies element modifiers */ + /* applies element modifiers */ int64 (*calc_elefix) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int nk, int n_ele, int s_ele, int s_ele_, bool left, int flag); - /* applies mastery modifiers */ + /* applies mastery modifiers */ int64 (*calc_masteryfix) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int div, bool left, bool weapon); /* calculates chorus bonus */ int (*calc_chorusbonus) (struct map_session_data *sd); diff --git a/src/map/chat.c b/src/map/chat.c index c9d3e6d46..40a9d2348 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -157,8 +157,8 @@ bool chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) { pc_setchatid(sd,cd->bl.id); clif->joinchatok(sd, cd); //To the person who newly joined the list of all - clif->addchat(cd, sd); //Reports To the person who already in the chat - clif->dispchat(cd, 0); //Reported number of changes to the people around + clif->addchat(cd, sd); //Reports To the person who already in the chat + clif->dispchat(cd, 0); //Reported number of changes to the people around chat->trigger_event(cd); //Event @@ -446,7 +446,7 @@ bool chat_npckickall(struct chat_data* cd) } /*===================================== -* Default Functions : chat.h +* Default Functions : chat.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/chat.h b/src/map/chat.h index cbc2a391e..6e4fae1c0 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -17,7 +17,7 @@ struct npc_data; struct chat_data { struct block_list bl; // data for this map object - char title[CHATROOM_TITLE_SIZE]; // room title + char title[CHATROOM_TITLE_SIZE]; // room title char pass[CHATROOM_PASS_SIZE]; // password bool pub; // private/public flag uint8 users; // current user count @@ -34,7 +34,7 @@ struct chat_data { }; /*===================================== -* Interface : chat.h +* Interface : chat.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/chrif.c b/src/map/chrif.c index 81e2d387c..a69cca573 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -271,7 +271,7 @@ bool chrif_save(struct map_session_data *sd, int flag) { if (flag) sd->state.storage_flag = 0; //Force close it. - //Saving of registry values. + //Saving of registry values. if (sd->vars_dirty) intif->saveregistry(sd); @@ -291,7 +291,7 @@ bool chrif_save(struct map_session_data *sd, int flag) { if( sd->md && mercenary->get_lifetime(sd->md) > 0 ) mercenary->save(sd->md); if( sd->ed && elemental->get_lifetime(sd->ed) > 0 ) - elemental->save(sd->ed); + elemental->save(sd->ed); if( sd->save_quest ) intif->quest_save(sd); @@ -1367,7 +1367,7 @@ int chrif_parse(int fd) { if (cmd < 0x2af8 || cmd >= 0x2af8 + ARRAYLENGTH(chrif->packet_len_table) || chrif->packet_len_table[cmd-0x2af8] == 0) { r = intif->parse(fd); // Passed on to the intif - if (r == 1) continue; // Treated in intif + if (r == 1) continue; // Treated in intif if (r == 2) return 0; // Didn't have enough data (len==-1) ShowWarning("chrif_parse: session #%d, intif->parse failed (unrecognized command 0x%.4x).\n", fd, cmd); @@ -1638,7 +1638,7 @@ void do_init_chrif(bool minimal) { /*===================================== -* Default Functions : chrif.h +* Default Functions : chrif.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/chrif.h b/src/map/chrif.h index 84efc66d3..661ba8f84 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -41,7 +41,7 @@ struct auth_node { }; /*===================================== -* Interface : chrif.h +* Interface : chrif.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/clif.c b/src/map/clif.c index 068cb1e07..d1ae2eb07 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1105,7 +1105,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { p.accessory = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); - } + } p.headpalette = vd->hair_color; p.bodypalette = vd->cloth_color; p.headDir = (sd)? sd->head_dir : 0; @@ -1225,7 +1225,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, p.GID = -bl->id; #else p.GID = -bl->id; -#endif +#endif clif->send(&p,sizeof(p),bl,SELF); } } @@ -5639,7 +5639,7 @@ void clif_displaymessage2(const int fd, const char* mes) { } line = strtok(NULL, "\n"); } - aFree(message); + aFree(message); } } /* oh noo! another version of 0x8e! */ @@ -6170,7 +6170,7 @@ void clif_item_refine_list(struct map_session_data *sd) WFIFOHEAD(fd, MAX_INVENTORY * 13 + 4); WFIFOW(fd,0)=0x221; for(i=c=0;istatus.inventory[i].nameid > 0 && sd->status.inventory[i].identify + if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify && (wlv=itemdb_wlv(sd->status.inventory[i].nameid)) >=1 && !sd->inventory_data[i]->flag.no_refine && !(sd->status.inventory[i].equip&EQP_ARMS)){ @@ -8429,7 +8429,7 @@ void clif_message(struct block_list* bl, const char* msg) { /** * Notifies the client that the storage window is still open * - * Should only be used in cases where the client closed the + * Should only be used in cases where the client closed the * storage window without server's consent **/ void clif_refresh_storagewindow( struct map_session_data *sd ) { @@ -10312,7 +10312,7 @@ void clif_hercules_chsys_quit(struct map_session_data *sd) { sd->channel_count = 0; aFree(sd->channels); - sd->channels = NULL; + sd->channels = NULL; } /// Request for an action. @@ -11163,8 +11163,8 @@ void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd) /// 012a void clif_parse_RemoveOption(int fd,struct map_session_data *sd) { - if( !(sd->sc.option&(OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR)) -#ifdef NEW_CARTS + if( !(sd->sc.option&(OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR)) +#ifdef NEW_CARTS && sd->sc.data[SC_PUSH_CART] ){ pc->setcart(sd,0); #else @@ -13716,7 +13716,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) { return; value = battle_config.client_accept_chatdori; - dstsd = sd; + dstsd = sd; } else { dstsd = map->id2sd(id); if( dstsd == NULL ) @@ -17557,7 +17557,7 @@ void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) { WFIFOW(fd, 0) = 0x845; WFIFOL(fd, 2) = sd->cashPoints; //[Ryuuzaki] - switched positions to reflect proper values WFIFOL(fd, 6) = sd->kafraPoints; - WFIFOSET(fd, 10); + WFIFOSET(fd, 10); } void clif_parse_CashShopClose(int fd, struct map_session_data *sd) { @@ -17792,7 +17792,7 @@ void clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK clif->send(&p,sizeof(p), &sd->bl, SELF); } break; - } + } } @@ -17824,7 +17824,7 @@ void clif_parse_bgqueue_register(int fd, struct map_session_data *sd) { default: clif->bgqueue_ack(sd,BGQA_FAIL_TYPE_INVALID, arena->id); return; - } + } bg->queue_add(sd, arena, (enum bg_queue_types)p->type); } @@ -19024,7 +19024,7 @@ void clif_defaults(void) { clif->search_store_info_failed = clif_search_store_info_failed; clif->open_search_store_info = clif_open_search_store_info; clif->search_store_info_click_ack = clif_search_store_info_click_ack; - /* elemental-related */ + /* elemental-related */ clif->elemental_info = clif_elemental_info; clif->elemental_updatestatus = clif_elemental_updatestatus; /* bgqueue */ @@ -19034,7 +19034,7 @@ void clif_defaults(void) { clif->bgqueue_joined = clif_bgqueue_joined; clif->bgqueue_pcleft = clif_bgqueue_pcleft; clif->bgqueue_battlebegins = clif_bgqueue_battlebegins; - /* misc-handling */ + /* misc-handling */ clif->adopt_reply = clif_Adopt_reply; clif->adopt_request = clif_Adopt_request; clif->readbook = clif_readbook; @@ -19071,7 +19071,7 @@ void clif_defaults(void) { clif->npc_market_purchase_ack = clif_npc_market_purchase_ack; /*------------------------ *- Parse Incoming Packet - *------------------------*/ + *------------------------*/ clif->pWantToConnection = clif_parse_WantToConnection; clif->pLoadEndAck = clif_parse_LoadEndAck; clif->pTickSend = clif_parse_TickSend; @@ -19125,7 +19125,7 @@ void clif_defaults(void) { clif->pUseSkillToPos = clif_parse_UseSkillToPos; clif->pUseSkillToPosSub = clif_parse_UseSkillToPosSub; clif->pUseSkillToPos_homun = clif_parse_UseSkillToPos_homun; - clif->pUseSkillToPos_mercenary = clif_parse_UseSkillToPos_mercenary; + clif->pUseSkillToPos_mercenary = clif_parse_UseSkillToPos_mercenary; clif->pUseSkillToPosMoreInfo = clif_parse_UseSkillToPosMoreInfo; clif->pUseSkillMap = clif_parse_UseSkillMap; clif->pRequestMemo = clif_parse_RequestMemo; diff --git a/src/map/duel.c b/src/map/duel.c index a423ef240..4e4eeef1f 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -128,7 +128,7 @@ void duel_leave(const unsigned int did, struct map_session_data* sd) { duel->list[did].members_count--; if(duel->list[did].members_count == 0) { - map->foreachpc(duel_leave_sub, did); + map->foreachpc(duel_leave_sub, did); duel->count--; } @@ -176,7 +176,7 @@ void do_init_duel(bool minimal) { } /*===================================== -* Default Functions : duel.h +* Default Functions : duel.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/duel.h b/src/map/duel.h index 956aed36d..91dfa8f83 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -18,7 +18,7 @@ struct duel { #define MAX_DUEL 1024 /*===================================== -* Interface : duel.h +* Interface : duel.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/elemental.c b/src/map/elemental.c index 323df41e1..b414d5b9f 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -951,7 +951,7 @@ void do_final_elemental(void) { } /*===================================== -* Default Functions : elemental.h +* Default Functions : elemental.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/elemental.h b/src/map/elemental.h index aa27aadc9..beddd3ea1 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -64,7 +64,7 @@ struct elemental_data { }; /*===================================== -* Interface : elemental.h +* Interface : elemental.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/guild.c b/src/map/guild.c index 69f67238d..935cac8c0 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1004,7 +1004,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin //Ensure validity of pointer (ie: player logs in/out, changes map-server) g->member[idx].sd = guild->sd_check(guild_id, account_id, char_id); - if(oldonline!=online) + if(oldonline!=online) clif->guild_memberlogin_notice(g, idx, online); if(!g->member[idx].sd) @@ -2008,7 +2008,7 @@ void guild_castle_reconnect_sub(void *key, void *data, va_list ap) } /** - * Saves pending guild castle data changes when char-server is + * Saves pending guild castle data changes when char-server is * disconnected. * On reconnect pushes all changes to char-server for saving. */ @@ -2363,7 +2363,7 @@ void guild_defaults(void) { guild->flag_add = guild_flag_add; guild->flag_remove = guild_flag_remove; guild->flags_clear = guild_flags_clear; - /* guild aura */ + /* guild aura */ guild->aura_refresh = guild_guildaura_refresh; /* */ guild->payexp_timer = guild_payexp_timer; diff --git a/src/map/intif.c b/src/map/intif.c index 383150fbc..75379f6c0 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -2305,7 +2305,7 @@ int intif_parse(int fd) } /*===================================== -* Default Functions : intif.h +* Default Functions : intif.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/intif.h b/src/map/intif.h index b6ee727f3..d0eeccc6d 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -32,7 +32,7 @@ struct s_pet; /*===================================== -* Interface : intif.h +* Interface : intif.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ @@ -42,7 +42,7 @@ struct intif_interface { /* funcs */ int (*parse) (int fd); int (*create_pet)(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id, - short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name); + short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name); int (*broadcast) (const char* mes, size_t len, int type); int (*broadcast2) (const char* mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY); int (*main_message) (struct map_session_data* sd, const char* message); diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 1981f435c..9bc352276 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -27,7 +27,7 @@ struct itemdb_interface itemdb_s; /** - * Search for item name + * Search for item name * name = item alias, so we should find items aliases first. if not found then look for "jname" (full name) * @see DBApply */ @@ -55,7 +55,7 @@ int itemdb_searchname_sub(DBKey key, DBData *data, va_list ap) } /*========================================== - * Return item data from item name. (lookup) + * Return item data from item name. (lookup) *------------------------------------------*/ struct item_data* itemdb_searchname(const char *str) { struct item_data* item; @@ -256,7 +256,7 @@ void itemdb_package_item(struct map_session_data *sd, struct item_package *packa return; } /*========================================== - * Return a random item id from group. (takes into account % chance giving/tot group) + * Return a random item id from group. (takes into account % chance giving/tot group) *------------------------------------------*/ int itemdb_searchrandomid(struct item_group *group) { @@ -312,7 +312,7 @@ const char* itemdb_typename(int type) } /*========================================== - * Converts the jobid from the format in itemdb + * Converts the jobid from the format in itemdb * to the format used by the map server. [Skotlex] *------------------------------------------*/ void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask) @@ -470,8 +470,7 @@ int itemdb_isequip(int nameid) /*========================================== * Alternate version of itemdb_isequip *------------------------------------------*/ -int itemdb_isequip2(struct item_data *data) -{ +int itemdb_isequip2(struct item_data *data) { nullpo_ret(data); switch(data->type) { case IT_WEAPON: @@ -937,7 +936,7 @@ void itemdb_read_packages(void) { if( HCache->check(config_filename) ) { if( itemdb->read_cached_packages(config_filename) ) return; - } + } if (libconfig->read_file(&item_packages_conf, config_filename)) { ShowError("can't read %s\n", config_filename); @@ -1445,7 +1444,7 @@ void itemdb_read_combos() { p++; str[1] = p; - p = strchr(p,','); + p = strchr(p,','); p++; if (str[1][0] != '{') { @@ -2217,7 +2216,7 @@ void itemdb_name_constants(void) { script->parser_current_file = NULL; #endif // ENABLE_CASE_CHECK - dbi_destroy(iter); + dbi_destroy(iter); } void do_final_itemdb(void) { itemdb->clear(true); diff --git a/src/map/map.c b/src/map/map.c index 01d3dbb9f..e37e902f6 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -494,7 +494,7 @@ static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount, static int map_vforeachinmap(int (*func)(struct block_list*, va_list), int16 m, int type, va_list args) { int i; int returnCount = 0; - int bsize; + int bsize; va_list argscopy; struct block_list *bl; int blockcount = map->bl_list_count; @@ -5861,7 +5861,7 @@ int do_init(int argc, char *argv[]) } /*===================================== -* Default Functions : map.h +* Default Functions : map.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/map.h b/src/map/map.h index 539b02ed8..73ef4bb41 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -579,9 +579,9 @@ struct map_data { "Algorithms in Java, Parts 1-4" 3.18, Robert Sedgewick Map is divided into squares, called blocks (side length = BLOCK_SIZE). For each block there is a linked list of objects in that block (block_list). - Array provides capability to access immediately the set of objects close + Array provides capability to access immediately the set of objects close to a given object. - The linked lists provide the flexibility to store the objects without + The linked lists provide the flexibility to store the objects without knowing ahead how many objects fall into each block. */ struct block_list **block; // Grid array of block_lists containing only non-BL_MOB objects @@ -796,7 +796,7 @@ struct map_cache_map_info { /*===================================== -* Interface : map.h +* Interface : map.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 26bc8c188..80bcfdf05 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -503,7 +503,7 @@ void do_init_mercenary(bool minimal) { } /*===================================== -* Default Functions : mercenary.h +* Default Functions : mercenary.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/mercenary.h b/src/map/mercenary.h index b998ac006..22399e289 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -48,7 +48,7 @@ struct mercenary_data { }; /*===================================== -* Interface : mercenary.h +* Interface : mercenary.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/mob.c b/src/map/mob.c index 11ac74621..784bb5a07 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3880,7 +3880,7 @@ bool mob_parse_dbrow(char** str) { mob->db_data[class_] = (struct mob_db*)aMalloc(sizeof(struct mob_db)); else //Copy over spawn data - memcpy(&db->spawn, mob->db_data[class_]->spawn, sizeof(db->spawn)); + memcpy(&db->spawn, mob->db_data[class_]->spawn, sizeof(db->spawn)); memcpy(mob->db_data[class_], db, sizeof(struct mob_db)); return true; diff --git a/src/map/npc.c b/src/map/npc.c index cf509e11f..0817313e2 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1154,10 +1154,10 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd) // This usually happens when the player clicked on a NPC that has the view id // of a mob, to activate this kind of npc it's needed to be in a 2,2 range - // from it. If the OnTouch area of a npc, coincides with the 2,2 range of + // from it. If the OnTouch area of a npc, coincides with the 2,2 range of // another it's expected that the OnTouch event be put first in stack, because // unit_walktoxy_timer is executed before any other function in this case. - // So it's best practice to put an 'end;' before OnTouch events in npcs that + // So it's best practice to put an 'end;' before OnTouch events in npcs that // have view ids of mobs to avoid this "issue" [Panikon] if (sd->npc_id != 0) { // The player clicked a npc after entering an OnTouch area diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index f245ffea5..2182e1da2 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -49,7 +49,7 @@ struct pcre_interface libpcre_s; * * defpattern 1, "[^:]+: (.*) loves (.*)", "label"; * - * this defines a new pattern in set 1 using perl syntax + * this defines a new pattern in set 1 using perl syntax * (http://www.troubleshooters.com/codecorn/littperl/perlreg.htm) * and tells it to jump to the supplied label when the pattern * is matched. @@ -59,7 +59,7 @@ struct pcre_interface libpcre_s; * before the script gets executed. * * activatepset 1; - * + * * This activates a set of patterns.. You can have many pattern * sets defined and many active all at once. This feature allows * you to set up "conversations" and ever changing expectations of @@ -95,11 +95,10 @@ void finalize_pcrematch_entry(struct pcrematch_entry* e) /** * Lookup (and possibly create) a new set of patterns by the set id */ -struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) -{ +struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) { struct pcrematch_set *pcreset; struct npc_parse *npcParse = nd->chatdb; - if (npcParse == NULL) + if (npcParse == NULL) nd->chatdb = npcParse = (struct npc_parse *)aCalloc(sizeof(struct npc_parse), 1); pcreset = npcParse->active; @@ -109,7 +108,7 @@ struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) break; pcreset = pcreset->next; } - if (pcreset == NULL) + if (pcreset == NULL) pcreset = npcParse->inactive; while (pcreset != NULL) { @@ -140,7 +139,7 @@ void activate_pcreset(struct npc_data* nd, int setid) { struct pcrematch_set *pcreset; struct npc_parse *npcParse = nd->chatdb; - if (npcParse == NULL) + if (npcParse == NULL) return; // Nothing to activate... pcreset = npcParse->inactive; while (pcreset != NULL) { @@ -154,7 +153,7 @@ void activate_pcreset(struct npc_data* nd, int setid) pcreset->next->prev = pcreset->prev; if (pcreset->prev != NULL) pcreset->prev->next = pcreset->next; - else + else npcParse->inactive = pcreset->next; pcreset->prev = NULL; @@ -173,7 +172,7 @@ void deactivate_pcreset(struct npc_data* nd, int setid) { struct pcrematch_set *pcreset; struct npc_parse *npcParse = nd->chatdb; - if (npcParse == NULL) + if (npcParse == NULL) return; // Nothing to deactivate... if (setid == -1) { while(npcParse->active != NULL) @@ -192,7 +191,7 @@ void deactivate_pcreset(struct npc_data* nd, int setid) pcreset->next->prev = pcreset->prev; if (pcreset->prev != NULL) pcreset->prev->next = pcreset->next; - else + else npcParse->active = pcreset->next; pcreset->prev = NULL; @@ -210,7 +209,7 @@ void delete_pcreset(struct npc_data* nd, int setid) int active = 1; struct pcrematch_set *pcreset; struct npc_parse *npcParse = nd->chatdb; - if (npcParse == NULL) + if (npcParse == NULL) return; // Nothing to deactivate... pcreset = npcParse->active; while (pcreset != NULL) { @@ -227,7 +226,7 @@ void delete_pcreset(struct npc_data* nd, int setid) pcreset = pcreset->next; } } - if (pcreset == NULL) + if (pcreset == NULL) return; if (pcreset->next != NULL) @@ -254,7 +253,7 @@ void delete_pcreset(struct npc_data* nd, int setid) } /** - * create a new pattern entry + * create a new pattern entry */ struct pcrematch_entry* create_pcrematch_entry(struct pcrematch_set* set) { @@ -300,7 +299,7 @@ void npc_chat_def_pattern(struct npc_data* nd, int setid, const char* pattern, c /** * Delete everything associated with a NPC concerning the pattern - * matching code + * matching code * * this could be more efficent but.. how often do you do this? */ diff --git a/src/map/packets.h b/src/map/packets.h index da1f176ff..fe323965c 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -2600,19 +2600,19 @@ packet(0x020d,-1); // 2014-01-15eRagexe - YomRawr #if PACKETVER >= 20140115 - packet(0x0369,7,clif->pActionRequest,2,6); - packet(0x083C,10,clif->pUseSkillToId,2,4,6); - packet(0x0437,5,clif->pWalkToXY,2); - packet(0x035F,6,clif->pTickSend,2); - packet(0x08A7,5,clif->pChangeDir,2,4); - packet(0x0940,6,clif->pTakeItem,2); - packet(0x0361,6,clif->pDropItem,2,4); - packet(0x088E,8,clif->pMoveToKafra,2,4); - packet(0x0367,8,clif->pMoveFromKafra,2,4); - packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); - packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); - packet(0x0802,6,clif->pGetCharNameRequest,2); - packet(0x0368,6,clif->pSolveCharName,2); + packet(0x0369,7,clif->pActionRequest,2,6); + packet(0x083C,10,clif->pUseSkillToId,2,4,6); + packet(0x0437,5,clif->pWalkToXY,2); + packet(0x035F,6,clif->pTickSend,2); + packet(0x08A7,5,clif->pChangeDir,2,4); + packet(0x0940,6,clif->pTakeItem,2); + packet(0x0361,6,clif->pDropItem,2,4); + packet(0x088E,8,clif->pMoveToKafra,2,4); + packet(0x0367,8,clif->pMoveFromKafra,2,4); + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); + packet(0x0802,6,clif->pGetCharNameRequest,2); + packet(0x0368,6,clif->pSolveCharName,2); packet(0x0360,12,clif->pSearchStoreInfoListItemClick,2,6,10); packet(0x0817,2,clif->pSearchStoreInfoNextPage,0); packet(0x0815,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 55006db64..3d49944d1 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -596,7 +596,7 @@ struct packet_status_change { #if PACKETVER >= 20120618 unsigned int Total; #endif -#if PACKETVER >= 20090121 +#if PACKETVER >= 20090121 unsigned int Left; int val1; int val2; diff --git a/src/map/party.c b/src/map/party.c index 7c49e241c..678b2cd54 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -1364,7 +1364,7 @@ void do_init_party(bool minimal) { timer->add_interval(timer->gettick()+battle_config.party_update_interval, party->send_xy_timer, 0, 0, battle_config.party_update_interval); } /*===================================== -* Default Functions : party.h +* Default Functions : party.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/party.h b/src/map/party.h index 3bad22b13..1c58301d1 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -71,7 +71,7 @@ struct party_booking_ad_info { #endif /* PARTY_RECRUIT */ /*===================================== -* Interface : party.h +* Interface : party.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/path.c b/src/map/path.c index d02e9ee4a..e90b26db5 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -205,7 +205,7 @@ static int add_path(struct node_heap *heap, struct path_node *tp, int16 x, int16 if (g_cost < tp[i].g_cost) { // New path to this node is better than old one // Update costs and parent tp[i].g_cost = g_cost; - tp[i].parent = parent; + tp[i].parent = parent; tp[i].f_cost = g_cost + h_cost; if (tp[i].flag == SET_CLOSED) { heap_push_node(heap, &tp[i]); // Put it in open set again @@ -299,7 +299,7 @@ bool path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x return true; } - return false; // easy path unsuccessful + return false; // easy path unsuccessful } else { // !(flag&1) // A* (A-star) pathfinding diff --git a/src/map/pc.c b/src/map/pc.c index 08ff8baf9..ce2b8040e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1156,7 +1156,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim clif->message(sd->fd, buf); } - if (expiration_time != 0) { + if (expiration_time != 0) { sd->expiration_time = expiration_time; } @@ -4448,7 +4448,7 @@ int pc_useitem(struct map_session_data *sd,int n) { } } - /* on restricted maps the item is consumed but the effect is not used */ + /* on restricted maps the item is consumed but the effect is not used */ for(i = 0; i < map->list[sd->bl.m].zone->disabled_items_count; i++) { if( map->list[sd->bl.m].zone->disabled_items[i] == nameid ) { clif->msg(sd, ITEM_CANT_USE_AREA); // This item cannot be used within this area @@ -7264,7 +7264,7 @@ int pc_readparam(struct map_session_data* sd,int type) case SP_DEFELE: val = sd->battle_status.def_ele; break; #ifndef RENEWAL_CAST case SP_VARCASTRATE: -#endif +#endif case SP_CASTRATE: val = sd->castrate+=val; break; @@ -10329,7 +10329,7 @@ int pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) { return 0; } -void pc_expire_check(struct map_session_data *sd) { +void pc_expire_check(struct map_session_data *sd) { /* ongoing timer */ if( sd->expiration_tid != INVALID_TIMER ) return; @@ -10630,7 +10630,7 @@ void do_init_pc(bool minimal) { ers_chunk_size(pc->str_reg_ers, 50); } /*===================================== -* Default Functions : pc.h +* Default Functions : pc.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/pc.h b/src/map/pc.h index 5d723fcf8..90f227cee 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -725,7 +725,7 @@ struct autotrade_vending { }; /*===================================== -* Interface : pc.h +* Interface : pc.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index a917ef409..e577c642f 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -183,7 +183,7 @@ static void read_config(void) { int j, inherit_count = 0, done = 0; if (group_settings->inheritance_done) // group already processed - continue; + continue; if ((inherit = group_settings->inherit) == NULL || (inherit_count = libconfig->setting_length(inherit)) <= 0) { // this group does not inherit from others diff --git a/src/map/pet.c b/src/map/pet.c index aa2be4473..6a458eae6 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -99,7 +99,7 @@ int pet_unlocktarget(struct pet_data *pd) * Pet Attack Skill [Skotlex] *------------------------------------------*/ int pet_attackskill(struct pet_data *pd, int target_id) { - if (!battle_config.pet_status_support || !pd->a_skill || + if (!battle_config.pet_status_support || !pd->a_skill || (battle_config.pet_equip_required && !pd->pet.equip)) return 0; @@ -107,7 +107,7 @@ int pet_attackskill(struct pet_data *pd, int target_id) { return 0; if (rnd()%100 < (pd->a_skill->rate +pd->pet.intimate*pd->a_skill->bonusrate/1000)) { - //Skotlex: Use pet's skill + //Skotlex: Use pet's skill int inf; struct block_list *bl; @@ -158,7 +158,7 @@ int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type) if(pd->petDB->defence_attack_rate > 0 && rate <= 0) rate = 1; } - if(rnd()%10000 < rate) + if(rnd()%10000 < rate) { if(pd->target_id == 0 || rnd()%10000 < pd->petDB->change_target_rate) pd->target_id = bl->id; @@ -319,7 +319,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) nullpo_retr(1, sd); - Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd); + Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd); if(sd->status.account_id != petinfo->account_id || sd->status.char_id != petinfo->char_id) { sd->status.pet_id = 0; @@ -390,7 +390,7 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { nullpo_retr(1, sd); - Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd); + Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd); if(sd->status.pet_id && petinfo->incuvate == 1) { sd->status.pet_id = 0; @@ -418,7 +418,7 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) clif->send_petdata(NULL, sd->pd, 3, sd->pd->vd.head_bottom); clif->send_petstatus(sd); } - Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd); + Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd); return 0; } @@ -912,7 +912,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick (pd->ud.attacktimer != INVALID_TIMER || pd->ud.walktimer != INVALID_TIMER)) return 0; //Target already locked. - if (target->type != BL_ITEM) + if (target->type != BL_ITEM) { //enemy targetted if(!battle->check_range(&pd->bl,target,pd->status.rhw.range)) { //Chase @@ -934,7 +934,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick memcpy(&pd->loot->item[pd->loot->count++],&fitem->item_data,sizeof(pd->loot->item[0])); pd->loot->weight += itemdb_weight(fitem->item_data.nameid)*fitem->item_data.amount; map->clearflooritem(target); - } + } //Target is unlocked regardless of whether it was picked or not. pet->unlocktarget(pd); } @@ -1050,7 +1050,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd) /*========================================== * pet bonus giving skills [Valaris] / Rewritten by [Skotlex] - *------------------------------------------*/ + *------------------------------------------*/ int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { struct map_session_data *sd=map->id2sd(id); struct pet_data *pd; @@ -1091,7 +1091,7 @@ int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { /*========================================== * pet recovery skills [Valaris] / Rewritten by [Skotlex] - *------------------------------------------*/ + *------------------------------------------*/ int pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { struct map_session_data *sd=map->id2sd(id); struct pet_data *pd; @@ -1107,7 +1107,7 @@ int pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { } if(sd->sc.data[pd->recovery->type]) - { //Display a heal animation? + { //Display a heal animation? //Detoxify is chosen for now. clif->skill_nodamage(&pd->bl,&sd->bl,TF_DETOXIFY,1,1); status_change_end(&sd->bl, pd->recovery->type, INVALID_TIMER); @@ -1155,7 +1155,7 @@ int pet_heal_timer(int tid, int64 tick, int id, intptr_t data) { /*========================================== * pet support skills [Skotlex] - *------------------------------------------*/ + *------------------------------------------*/ int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { struct map_session_data *sd=map->id2sd(id); struct pet_data *pd; @@ -1202,12 +1202,12 @@ int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { * Pet read db data * pet->db.txt * pet->db2.txt - *------------------------------------------*/ + *------------------------------------------*/ int read_petdb() { char* filename[] = {"pet_db.txt","pet_db2.txt"}; FILE *fp; - int nameid,i,j,k; + int nameid,i,j,k; // Remove any previous scripts in case reloaddb was invoked. for( j = 0; j < MAX_PET_DB; j++ ) diff --git a/src/map/skill.c b/src/map/skill.c index b2e94ec79..94bcd1d1b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2234,7 +2234,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr status_change_end(bl, SC_ENERGYCOAT, INVALID_TIMER); //Reduction: 6% + 6% every 20% dmg.damage -= dmg.damage * (6 * (1+per)) / 100; - } + } } #endif /* MAGIC_REFLECTION_TYPE */ } @@ -2647,7 +2647,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr //blown-specific handling switch( skill_id ) { case LG_OVERBRAND_BRANDISH: - if( skill->blown(dsrc,bl,dmg.blewcount,dir,0) < dmg.blewcount ) + if( skill->blown(dsrc,bl,dmg.blewcount,dir,0) < dmg.blewcount ) skill->addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag|SD_ANIMATION); break; case SR_KNUCKLEARROW: @@ -3165,7 +3165,7 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) { BL_CHAR|BL_SKILL, target->id); // Search for a new Target around current one... if( nbl == NULL) skl->x++; - else + else skl->x = 0; skill->addtimerskill(src, tick + 651, (nbl?nbl:target)->id, skl->x, 0, WL_CHAINLIGHTNING_ATK, skl->skill_lv, skl->type + 1, skl->flag); @@ -3177,9 +3177,9 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) { case WL_TETRAVORTEX_WIND: case WL_TETRAVORTEX_GROUND: clif->skill_nodamage(src, target, skl->skill_id, skl->skill_lv, 1); - skill->attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag); + skill->attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag); skill->toggle_magicpower(src, skl->skill_id); // only the first hit will be amplify - if( skl->type == 4 ){ + if( skl->type == 4 ){ const enum sc_type scs[] = { SC_BURNING, SC_BLOODING, SC_FROSTMISTY, SC_STUN }; // status inflicts are depend on what summoned element is used. int rate = skl->y, index = skl->x-1; sc_start2(src,target, scs[index], rate, skl->skill_lv, src->id, skill->get_time(WL_TETRAVORTEX,index+1)); @@ -4196,7 +4196,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 case WL_TETRAVORTEX: if( sc ){ int i = SC_SUMMON5, x = 0; - int types[][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}}; + int types[][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}}; for(; i >= SC_SUMMON1; i--){ if( sc->data[i] ){ int skillid = WL_TETRAVORTEX_FIRE + (sc->data[i]->val1 - WLS_FIRE) + (sc->data[i]->val1 == WLS_WIND) - (sc->data[i]->val1 == WLS_WATER), sc_index = 0, rate = 0; @@ -4272,7 +4272,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 if (sd->skillcooldown[i].id == spell_skill_id){ cooldown += sd->skillcooldown[i].val; break; - } + } } if(cooldown) skill->blockpc_start(sd, spell_skill_id, cooldown); @@ -4769,10 +4769,10 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) { inf &= ~BCT_NEUTRAL; } - if( sd && (inf2&INF2_CHORUS_SKILL) && skill->check_pc_partner(sd, ud->skill_id, &ud->skill_lv, 1, 0) < 1 ) { - clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_NEED_HELPER, 0); - break; - } + if( sd && (inf2&INF2_CHORUS_SKILL) && skill->check_pc_partner(sd, ud->skill_id, &ud->skill_lv, 1, 0) < 1 ) { + clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_NEED_HELPER, 0); + break; + } if( ud->skill_id >= SL_SKE && ud->skill_id <= SL_SKA && target->type == BL_MOB ) { @@ -5036,7 +5036,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin **/ case AB_RENOVATIO: case AB_HIGHNESSHEAL: - case AL_INCAGI: + case AL_INCAGI: if( sd && dstsd && pc_ismadogear(dstsd) ){ clif->skill_fail(sd,skill_id,USESKILL_FAIL_TOTARGET,0); return 0; @@ -5674,7 +5674,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case KN_AUTOCOUNTER: sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)); - skill->addtimerskill(src, tick + 100, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag); + skill->addtimerskill(src, tick + 100, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag); break; case SO_STRIKING: @@ -10315,7 +10315,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case WM_SOUND_OF_DESTRUCTION: r = skill->get_splash(skill_id,skill_lv); map->foreachinarea(skill->area_sub,src->m,x-r,y-r,x+r,y+r,BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); - break; + break; case WM_LULLABY_DEEPSLEEP: r = skill->get_splash(skill_id,skill_lv); @@ -11669,7 +11669,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 case UNT_FIREPILLAR_ACTIVE: case UNT_CLAYMORETRAP: if( sg->unit_id == UNT_FIRINGTRAP || sg->unit_id == UNT_ICEBOUNDTRAP || sg->unit_id == UNT_CLAYMORETRAP ) - map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &src->bl,tick); + map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &src->bl,tick); else map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick); if (sg->unit_id != UNT_FIREPILLAR_ACTIVE) @@ -13054,7 +13054,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id { int j, i = 0; for(j = SC_SUMMON1; j <= SC_SUMMON5; j++) - if( sc && sc->data[j] ) + if( sc && sc->data[j] ) i++; switch(skill_id){ @@ -14124,9 +14124,9 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 if( sd->bonus.varcastrate < 0 ) VARCAST_REDUCTION(sd->bonus.varcastrate); if( sd->bonus.add_varcast != 0 ) // bonus bVariableCast - time += sd->bonus.add_varcast; + time += sd->bonus.add_varcast; if( sd->bonus.add_fixcast != 0 ) // bonus bFixedCast - fixed += sd->bonus.add_fixcast; + fixed += sd->bonus.add_fixcast; for (i = 0; i < ARRAYLENGTH(sd->skillfixcast) && sd->skillfixcast[i].id; i++) if (sd->skillfixcast[i].id == skill_id){ // bonus2 bSkillFixedCast fixed += sd->skillfixcast[i].val; @@ -14197,7 +14197,7 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 fixcast_r = max(fixcast_r, sc->data[SC_DANCE_WITH_WUG]->val4); if( sc->data[SC_SECRAMENT] ) fixcast_r = max(fixcast_r, sc->data[SC_SECRAMENT]->val2); - if( sd && ( skill_lv = pc->checkskill(sd, WL_RADIUS) ) && (skill_id >= WL_WHITEIMPRISON && skill_id < WL_FREEZE_SP) ) + if( sd && ( skill_lv = pc->checkskill(sd, WL_RADIUS) ) && (skill_id >= WL_WHITEIMPRISON && skill_id < WL_FREEZE_SP) ) fixcast_r = max(fixcast_r, (status_get_int(bl) + status->get_lv(bl)) / 15 + skill_lv * 5); // [{(Caster?s INT / 15) + (Caster?s Base Level / 15) + (Radius Skill Level x 5)}] % // Fixed cast non percentage bonuses if( sc->data[SC_MANDRAGORA] ) @@ -15323,7 +15323,7 @@ bool skill_check_shadowform(struct block_list *bl, int64 damage, int hit){ if( sc && sc->data[SC__SHADOWFORM] && damage ) { src = map->id2bl(sc->data[SC__SHADOWFORM]->val2); - if( !src || src->m != bl->m ) { + if( !src || src->m != bl->m ) { status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); return false; } @@ -18515,7 +18515,7 @@ void skill_defaults(void) { skill->unit_onplace = skill_unit_onplace; skill->unit_ondamaged = skill_unit_ondamaged; skill->cast_fix = skill_castfix; - skill->cast_fix_sc = skill_castfix_sc; + skill->cast_fix_sc = skill_castfix_sc; skill->vf_cast_fix = skill_vfcastfix; skill->delay_fix = skill_delay_fix; skill->check_condition_castbegin = skill_check_condition_castbegin; diff --git a/src/map/skill.h b/src/map/skill.h index b6dbb1fcb..66d6dc39e 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -1597,7 +1597,7 @@ enum { UNT_ZENKAI_WIND, UNT_MAKIBISHI, UNT_VENOMFOG, - UNT_ICEMINE, + UNT_ICEMINE, UNT_FLAMECROSS, UNT_HELLBURNING, UNT_MAGMA_ERUPTION, diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt index 11751a1a5..1629b2a8b 100644 --- a/src/map/sql/CMakeLists.txt +++ b/src/map/sql/CMakeLists.txt @@ -18,7 +18,7 @@ set( SQL_MAP_HEADERS "${SQL_MAP_SOURCE_DIR}/guild.h" "${SQL_MAP_SOURCE_DIR}/homunculus.h" "${SQL_MAP_SOURCE_DIR}/HPMmap.h" - "${SQL_MAP_SOURCE_DIR}/instance.h" + "${SQL_MAP_SOURCE_DIR}/instance.h" "${SQL_MAP_SOURCE_DIR}/intif.h" "${SQL_MAP_SOURCE_DIR}/irc-bot.h" "${SQL_MAP_SOURCE_DIR}/itemdb.h" diff --git a/src/map/status.c b/src/map/status.c index eb06138da..316dce8e6 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -180,7 +180,7 @@ void initChangeTables(void) { add_sc( TF_POISON , SC_POISON ); set_sc( KN_TWOHANDQUICKEN , SC_TWOHANDQUICKEN , SI_TWOHANDQUICKEN , SCB_ASPD ); add_sc( KN_AUTOCOUNTER , SC_AUTOCOUNTER ); - set_sc( PR_IMPOSITIO , SC_IMPOSITIO , SI_IMPOSITIO , + set_sc( PR_IMPOSITIO , SC_IMPOSITIO , SI_IMPOSITIO , #ifdef RENEWAL SCB_NONE ); #else @@ -204,7 +204,7 @@ void initChangeTables(void) { set_sc( BS_WEAPONPERFECT , SC_WEAPONPERFECT , SI_WEAPONPERFECT, SCB_NONE ); set_sc( BS_OVERTHRUST , SC_OVERTHRUST , SI_OVERTHRUST , SCB_NONE ); set_sc( BS_MAXIMIZE , SC_MAXIMIZEPOWER , SI_MAXIMIZE , SCB_REGEN ); - add_sc( HT_LANDMINE , SC_STUN ); + add_sc( HT_LANDMINE , SC_STUN ); set_sc( HT_ANKLESNARE , SC_ANKLESNARE , SI_ANKLESNARE , SCB_NONE ); add_sc( HT_SANDMAN , SC_SLEEP ); add_sc( HT_FLASHER , SC_BLIND ); @@ -3672,7 +3672,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) { st->batk = status->calc_batk(bl, sc, st->batk, true); } - if(flag&SCB_WATK) { + if(flag&SCB_WATK) { st->rhw.atk = status->calc_watk(bl, sc, bst->rhw.atk, true); if (!sd) //Should not affect weapon refine bonus st->rhw.atk2 = status->calc_watk(bl, sc, bst->rhw.atk2, true); @@ -5016,7 +5016,7 @@ signed short status_calc_def2(struct block_list *bl, struct status_change *sc, i #ifdef RENEWAL if( sc && sc->data[SC_ASSUMPTIO] ) def2 <<= 1; -#endif +#endif if( sc && sc->data[SC_CAMOUFLAGE] ) def2 -= def2 * 5 * (10-sc->data[SC_CAMOUFLAGE]->val4) / 100; #ifdef RENEWAL @@ -5912,7 +5912,7 @@ struct status_data *status_get_base_status(struct block_list *bl) case BL_HOM: return &((TBL_HOM*)bl)->base_status; case BL_MER: return &((TBL_MER*)bl)->base_status; case BL_ELEM: return &((TBL_ELEM*)bl)->base_status; - case BL_NPC: return ((mob->db_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL); + case BL_NPC: return ((mob->db_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL); default: return NULL; } @@ -5929,8 +5929,8 @@ defType status_get_def(struct block_list *bl) { } unsigned short status_get_speed(struct block_list *bl) { - if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex] - return ((struct npc_data *)bl)->speed; + if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex] + return ((struct npc_data *)bl)->speed; return status->get_status_data(bl)->speed; } @@ -6939,9 +6939,9 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_ASSNCROS: if(sc->option&OPTION_MADOGEAR) return 0;//Mado is immune to wind walk, cart boost, etc (others above) [Ind] - case SC_INC_AGI: + case SC_INC_AGI: if (sc->data[SC_QUAGMIRE]) - return 0; + return 0; break; case SC_CLOAKING: //Avoid cloaking with no wall and low skill level. [Skotlex] @@ -7143,7 +7143,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_ROKISWEIL: case SC_FOGWALL: case SC_FROSTMISTY: - case SC_BURNING: + case SC_BURNING: case SC_MARSHOFABYSS: case SC_ADORAMUS: case SC_NEEDLE_OF_PARALYZE: @@ -9401,7 +9401,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t } //On Aegis, when turning on a status change, first goes the option packet, then the sc packet. - if(opt_flag) { + if(opt_flag) { clif->changeoption(bl); if( sd && opt_flag&0x4 ) { clif->changelook(bl,LOOK_BASE,vd->class_); @@ -11958,7 +11958,7 @@ void do_final_status(void) { } /*===================================== -* Default Functions : status.h +* Default Functions : status.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/status.h b/src/map/status.h index 6bb563b0b..3bdd59041 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -711,766 +711,787 @@ typedef enum sc_type { SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; -// Official status change ids, used to display status icons on the client. + +/// Official status change ids, used to display status icons in the client. enum si_type { - SI_BLANK = -1, - SI_PROVOKE = 0, - SI_ENDURE = 1, - SI_TWOHANDQUICKEN = 2, - SI_CONCENTRATION = 3, - SI_HIDING = 4, - SI_CLOAKING = 5, - SI_ENCHANTPOISON = 6, - SI_POISONREACT = 7, - SI_QUAGMIRE = 8, - SI_ANGELUS = 9, - SI_BLESSING = 10, - SI_CRUCIS = 11, - SI_INC_AGI = 12, - SI_DEC_AGI = 13, - SI_SLOWPOISON = 14, - SI_IMPOSITIO = 15, - SI_SUFFRAGIUM = 16, - SI_ASPERSIO = 17, - SI_BENEDICTIO = 18, - SI_KYRIE = 19, - SI_MAGNIFICAT = 20, - SI_GLORIA = 21, - SI_LEXAETERNA = 22, - SI_ADRENALINE = 23, - SI_WEAPONPERFECT = 24, - SI_OVERTHRUST = 25, - SI_MAXIMIZE = 26, - SI_RIDING = 27, - SI_FALCON = 28, - SI_TRICKDEAD = 29, - SI_SHOUT = 30, - SI_ENERGYCOAT = 31, - SI_BROKENARMOR = 32, - SI_BROKENWEAPON = 33, - SI_ILLUSION = 34, - SI_WEIGHTOVER50 = 35, - SI_WEIGHTOVER90 = 36, - SI_ATTHASTE_POTION1 = 37, - SI_ATTHASTE_POTION2 = 38, - SI_ATTHASTE_POTION3 = 39, - SI_ATTHASTE_INFINITY = 40, - SI_MOVHASTE_POTION = 41, - SI_MOVHASTE_INFINITY = 42, -// SI_AUTOCOUNTER = 43, -// SI_SPLASHER = 44, - SI_ANKLESNARE = 45, - SI_POSTDELAY = 46, -// SI_NOACTION = 47, -// SI_IMPOSSIBLEPICKUP = 48, -// SI_BARRIER = 49, - SI_NOEQUIPWEAPON = 50, - SI_NOEQUIPSHIELD = 51, - SI_NOEQUIPARMOR = 52, - SI_NOEQUIPHELM = 53, - SI_PROTECTWEAPON = 54, - SI_PROTECTSHIELD = 55, - SI_PROTECTARMOR = 56, - SI_PROTECTHELM = 57, - SI_AUTOGUARD = 58, - SI_REFLECTSHIELD = 59, -// SI_DEVOTION = 60, - SI_PROVIDENCE = 61, - SI_DEFENDER = 62, -// SI_MAGICROD = 63, -// SI_WEAPONPROPERTY = 64, - SI_AUTOSPELL = 65, -// SI_SPECIALZONE = 66, -// SI_MASK = 67, - SI_SPEARQUICKEN = 68, -// SI_BDPLAYING = 69, -// SI_WHISTLE = 70, -// SI_ASSASSINCROSS = 71, -// SI_POEMBRAGI = 72, -// SI_APPLEIDUN = 73, -// SI_HUMMING = 74, -// SI_DONTFORGETME = 75, -// SI_FORTUNEKISS = 76, -// SI_SERVICEFORYOU = 77, -// SI_RICHMANKIM = 78, -// SI_ETERNALCHAOS = 79, -// SI_DRUMBATTLEFIELD = 80, -// SI_RINGNIBELUNGEN = 81, -// SI_ROKISWEIL = 82, -// SI_INTOABYSS = 83, -// SI_SIEGFRIED = 84, -// SI_BLADESTOP = 85, - SI_EXPLOSIONSPIRITS = 86, - SI_STEELBODY = 87, - SI_EXTREMITYFIST = 88, -// SI_COMBOATTACK = 89, - SI_PROPERTYFIRE = 90, - SI_PROPERTYWATER = 91, - SI_PROPERTYWIND = 92, - SI_PROPERTYGROUND = 93, -// SI_MAGICATTACK = 94, - SI_STOP = 95, -// SI_WEAPONBRAKER = 96, - SI_PROPERTYUNDEAD = 97, -// SI_POWERUP = 98, -// SI_AGIUP = 99, -// SI_SIEGEMODE = 100, -// SI_INVISIBLE = 101, -// SI_STATUSONE = 102, - SI_AURABLADE = 103, - SI_PARRYING = 104, - SI_LKCONCENTRATION = 105, - SI_TENSIONRELAX = 106, - SI_BERSERK = 107, -// SI_SACRIFICE = 108, -// SI_GOSPEL = 109, - SI_ASSUMPTIO = 110, -// SI_BASILICA = 111, - SI_GROUNDMAGIC = 112, - SI_MAGICPOWER = 113, - SI_EDP = 114, - SI_TRUESIGHT = 115, - SI_WINDWALK = 116, - SI_MELTDOWN = 117, - SI_CARTBOOST = 118, -// SI_CHASEWALK = 119, - SI_SWORDREJECT = 120, - SI_MARIONETTE_MASTER = 121, - SI_MARIONETTE = 122, - SI_MOON = 123, - SI_BLOODING = 124, - SI_JOINTBEAT = 125, -// SI_MINDBREAKER = 126, -// SI_MEMORIZE = 127, -// SI_FOGWALL = 128, -// SI_SPIDERWEB = 129, - SI_PROTECTEXP = 130, -// SI_SUB_WEAPONPROPERTY = 131, - SI_AUTOBERSERK = 132, - SI_RUN = 133, - SI_TING = 134, - SI_STORMKICK_ON = 135, - SI_STORMKICK_READY = 136, - SI_DOWNKICK_ON = 137, - SI_DOWNKICK_READY = 138, - SI_TURNKICK_ON = 139, - SI_TURNKICK_READY = 140, - SI_COUNTER_ON = 141, - SI_COUNTER_READY = 142, - SI_DODGE_ON = 143, - SI_DODGE_READY = 144, - SI_STRUP = 145, - SI_PROPERTYDARK = 146, - SI_ADRENALINE2 = 147, - SI_PROPERTYTELEKINESIS = 148, - SI_SOULLINK = 149, - SI_PLUSATTACKPOWER = 150, - SI_PLUSMAGICPOWER = 151, - SI_DEVIL1 = 152, - SI_KAITE = 153, -// SI_SWOO = 154, -// SI_STAR2 = 155, - SI_KAIZEL = 156, - SI_KAAHI = 157, - SI_KAUPE = 158, - SI_SMA_READY = 159, - SI_SKE = 160, - SI_ONEHANDQUICKEN = 161, -// SI_FRIEND = 162, -// SI_FRIENDUP = 163, -// SI_SG_WARM = 164, - SI_SG_SUN_WARM = 165, -// 166 | The three show the exact same display: ultra red character (165, 166, 167) -// 167 | Their names would be SI_SG_SUN_WARM, SI_SG_MOON_WARM, SI_SG_STAR_WARM -// SI_EMOTION = 168, - SI_SUN_COMFORT = 169, - SI_MOON_COMFORT = 170, - SI_STAR_COMFORT = 171, -// SI_EXPUP = 172, -// SI_GDSKILL_BATTLEORDER = 173, -// SI_GDSKILL_REGENERATION = 174, -// SI_GDSKILL_POSTDELAY = 175, -// SI_RESISTHANDICAP = 176, -// SI_MAXHPPERCENT = 177, -// SI_MAXSPPERCENT = 178, -// SI_DEFENCE = 179, -// SI_SLOWDOWN = 180, - SI_PRESERVE = 181, - SI_INCSTR = 182, -// SI_NOT_EXTREMITYFIST = 183, - SI_CLAIRVOYANCE = 184, -// SI_MOVESLOW_POTION = 185, - SI_DOUBLECASTING = 186, -// SI_GRAVITATION = 187, - SI_OVERTHRUSTMAX = 188, -// SI_LONGING = 189, -// SI_HERMODE = 190, - SI_TAROTCARD = 191, // the icon allows no doubt... but what is it really used for ?? [DracoRPG] -// SI_HLIF_AVOID = 192, -// SI_HFLI_FLEET = 193, -// SI_HFLI_SPEED = 194, -// SI_HLIF_CHANGE = 195, -// SI_HAMI_BLOODLUST = 196, - SI_CR_SHRINK = 197, - SI_WZ_SIGHTBLASTER = 198, - SI_DC_WINKCHARM = 199, - SI_RG_CCONFINE_M = 200, - SI_RG_CCONFINE_S = 201, -// SI_DISABLEMOVE = 202, - SI_GS_MADNESSCANCEL = 203, //[blackhole89] - SI_GS_GATLINGFEVER = 204, - SI_EARTHSCROLL = 205, - SI_NJ_UTSUSEMI = 206, - SI_NJ_BUNSINJYUTSU = 207, - SI_NJ_NEN = 208, - SI_GS_ADJUSTMENT = 209, - SI_GS_ACCURACY = 210, - SI_NJ_SUITON = 211, -// SI_PET = 212, -// SI_MENTAL = 213, -// SI_EXPMEMORY = 214, -// SI_PERFORMANCE = 215, -// SI_GAIN = 216, -// SI_GRIFFON = 217, -// SI_DRIFT = 218, -// SI_WALLSHIFT = 219, -// SI_REINCARNATION = 220, -// SI_PATTACK = 221, -// SI_PSPEED = 222, -// SI_PDEFENSE = 223, -// SI_PCRITICAL = 224, -// SI_RANKING = 225, -// SI_PTRIPLE = 226, -// SI_DENERGY = 227, -// SI_WAVE1 = 228, -// SI_WAVE2 = 229, -// SI_WAVE3 = 230, -// SI_WAVE4 = 231, -// SI_DAURA = 232, -// SI_DFREEZER = 233, -// SI_DPUNISH = 234, -// SI_DBARRIER = 235, -// SI_DWARNING = 236, -// SI_MOUSEWHEEL = 237, -// SI_DGAUGE = 238, -// SI_DACCEL = 239, -// SI_DBLOCK = 240, - SI_FOOD_STR = 241, - SI_FOOD_AGI = 242, - SI_FOOD_VIT = 243, - SI_FOOD_DEX = 244, - SI_FOOD_INT = 245, - SI_FOOD_LUK = 246, - SI_FOOD_BASICAVOIDANCE = 247, - SI_FOOD_BASICHIT = 248, - SI_FOOD_CRITICALSUCCESSVALUE = 249, - SI_CASH_PLUSEXP = 250, - SI_CASH_DEATHPENALTY = 251, - SI_CASH_RECEIVEITEM = 252, - SI_CASH_BOSS_ALARM = 253, -// SI_DA_ENERGY = 254, -// SI_DA_FIRSTSLOT = 255, -// SI_DA_HEADDEF = 256, -// SI_DA_SPACE = 257, -// SI_DA_TRANSFORM = 258, -// SI_DA_ITEMREBUILD = 259, -// SI_DA_ILLUSION = 260, //All mobs display as Turtle General -// SI_DA_DARKPOWER = 261, -// SI_DA_EARPLUG = 262, -// SI_DA_CONTRACT = 263, //Bio Mob effect on you and SI_TRICKDEAD icon -// SI_DA_BLACK = 264, //For short time blurry screen -// SI_DA_MAGICCART = 265, -// SI_CRYSTAL = 266, -// SI_DA_REBUILD = 267, -// SI_DA_EDARKNESS = 268, -// SI_DA_EGUARDIAN = 269, -// SI_DA_TIMEOUT = 270, - SI_FOOD_STR_CASH = 271, - SI_FOOD_AGI_CASH = 272, - SI_FOOD_VIT_CASH = 273, - SI_FOOD_DEX_CASH = 274, - SI_FOOD_INT_CASH = 275, - SI_FOOD_LUK_CASH = 276, - SI_MER_FLEE = 277, - SI_MER_ATK = 278, - SI_MER_HP = 279, - SI_MER_SP = 280, - SI_MER_HIT = 281, - SI_SLOWCAST = 282, -// SI_MAGICMIRROR = 283, -// SI_STONESKIN = 284, -// SI_ANTIMAGIC = 285, - SI_CRITICALWOUND = 286, -// SI_NPC_DEFENDER = 287, -// SI_NOACTION_WAIT = 288, - SI_MOVHASTE_HORSE = 289, - SI_PROTECT_DEF = 290, - SI_PROTECT_MDEF = 291, - SI_HEALPLUS = 292, - SI_S_LIFEPOTION = 293, - SI_L_LIFEPOTION = 294, - SI_CRITICALPERCENT = 295, - SI_PLUSAVOIDVALUE = 296, -// SI_ATKER_ASPD = 297, -// SI_TARGET_ASPD = 298, -// SI_ATKER_MOVESPEED = 299, - SI_ATKER_BLOOD = 300, - SI_TARGET_BLOOD = 301, - SI_ARMOR_PROPERTY = 302, -// SI_REUSE_LIMIT_A = 303, - SI_HELLPOWER = 304, -// SI_STEAMPACK = 305, -// SI_REUSE_LIMIT_B = 306, -// SI_REUSE_LIMIT_C = 307, -// SI_REUSE_LIMIT_D = 308, -// SI_REUSE_LIMIT_E = 309, -// SI_REUSE_LIMIT_F = 310, - SI_INVINCIBLE = 311, - SI_CASH_PLUSONLYJOBEXP = 312, - SI_PARTYFLEE = 313, - SI_ANGEL_PROTECT = 314, -// SI_ENDURE_MDEF = 315, - SI_ENCHANTBLADE = 316, - SI_DEATHBOUND = 317, - SI_REFRESH = 318, - SI_GIANTGROWTH = 319, - SI_STONEHARDSKIN = 320, - SI_VITALITYACTIVATION = 321, - SI_FIGHTINGSPIRIT = 322, - SI_ABUNDANCE = 323, - SI_REUSE_MILLENNIUMSHIELD = 324, - SI_REUSE_CRUSHSTRIKE = 325, - SI_REUSE_REFRESH = 326, - SI_REUSE_STORMBLAST = 327, - SI_VENOMIMPRESS = 328, - SI_EPICLESIS = 329, - SI_ORATIO = 330, - SI_LAUDAAGNUS = 331, - SI_LAUDARAMUS = 332, - SI_CLOAKINGEXCEED = 333, - SI_HALLUCINATIONWALK = 334, - SI_HALLUCINATIONWALK_POSTDELAY = 335, - SI_RENOVATIO = 336, - SI_WEAPONBLOCKING = 337, - SI_WEAPONBLOCKING_POSTDELAY = 338, - SI_ROLLINGCUTTER = 339, - SI_EXPIATIO = 340, - SI_POISONINGWEAPON = 341, - SI_TOXIN = 342, - SI_PARALYSE = 343, - SI_VENOMBLEED = 344, - SI_MAGICMUSHROOM = 345, - SI_DEATHHURT = 346, - SI_PYREXIA = 347, - SI_OBLIVIONCURSE = 348, - SI_LEECHESEND = 349, - SI_DUPLELIGHT = 350, - SI_FROSTMISTY = 351, - SI_FEARBREEZE = 352, - SI_ELECTRICSHOCKER = 353, - SI_MARSHOFABYSS = 354, - SI_RECOGNIZEDSPELL = 355, - SI_STASIS = 356, - SI_WUGRIDER = 357, - SI_WUGDASH = 358, - SI_WUGBITE = 359, - SI_CAMOUFLAGE = 360, - SI_ACCELERATION = 361, - SI_HOVERING = 362, - SI_SPHERE_1 = 363, - SI_SPHERE_2 = 364, - SI_SPHERE_3 = 365, - SI_SPHERE_4 = 366, - SI_SPHERE_5 = 367, - SI_MVPCARD_TAOGUNKA = 368, - SI_MVPCARD_MISTRESS = 369, - SI_MVPCARD_ORCHERO = 370, - SI_MVPCARD_ORCLORD = 371, - SI_OVERHEAT_LIMITPOINT = 372, - SI_OVERHEAT = 373, - SI_SHAPESHIFT = 374, - SI_INFRAREDSCAN = 375, - SI_MAGNETICFIELD = 376, - SI_NEUTRALBARRIER = 377, - SI_NEUTRALBARRIER_MASTER = 378, - SI_STEALTHFIELD = 379, - SI_STEALTHFIELD_MASTER = 380, - SI_MANU_ATK = 381, - SI_MANU_DEF = 382, - SI_SPL_ATK = 383, - SI_SPL_DEF = 384, - SI_REPRODUCE = 385, - SI_MANU_MATK = 386, - SI_SPL_MATK = 387, - SI_STR_SCROLL = 388, - SI_INT_SCROLL = 389, - SI_LG_REFLECTDAMAGE = 390, - SI_FORCEOFVANGUARD = 391, - SI_BUCHEDENOEL = 392, - SI_AUTOSHADOWSPELL = 393, - SI_SHADOWFORM = 394, - SI_RAID = 395, - SI_SHIELDSPELL_DEF = 396, - SI_SHIELDSPELL_MDEF = 397, - SI_SHIELDSPELL_REF = 398, - SI_BODYPAINT = 399, - SI_EXEEDBREAK = 400, - SI_ADORAMUS = 401, - SI_PRESTIGE = 402, - SI_INVISIBILITY = 403, - SI_DEADLYINFECT = 404, - SI_BANDING = 405, - SI_EARTHDRIVE = 406, - SI_INSPIRATION = 407, - SI_ENERVATION = 408, - SI_GROOMY = 409, - SI_RAISINGDRAGON = 410, - SI_IGNORANCE = 411, - SI_LAZINESS = 412, - SI_LIGHTNINGWALK = 413, - SI_ACARAJE = 414, - SI_UNLUCKY = 415, - SI_CURSEDCIRCLE_ATKER = 416, - SI_CURSEDCIRCLE_TARGET = 417, - SI_WEAKNESS = 418, - SI_CRESCENTELBOW = 419, - SI_NOEQUIPACCESSARY = 420, - SI_STRIPACCESSARY = 421, - SI_MANHOLE = 422, - SI_POPECOOKIE = 423, - SI_FALLENEMPIRE = 424, - SI_GENTLETOUCH_ENERGYGAIN = 425, - SI_GENTLETOUCH_CHANGE = 426, - SI_GENTLETOUCH_REVITALIZE = 427, - SI_BLOODYLUST = 428, - SI_SWINGDANCE = 429, - SI_SYMPHONYOFLOVERS = 430, - SI_PROPERTYWALK = 431, - SI_SPELLFIST = 432, - SI_NETHERWORLD = 433, - SI_SIREN = 434, - SI_DEEPSLEEP = 435, - SI_SIRCLEOFNATURE = 436, - SI_COLD = 437, - SI_GLOOMYDAY = 438, - SI_SONG_OF_MANA = 439, - SI_CLOUDKILL = 440, - SI_DANCEWITHWUG = 441, - SI_RUSHWINDMILL = 442, - SI_ECHOSONG = 443, - SI_HARMONIZE = 444, - SI_STRIKING = 445, - SI_WARMER = 446, - SI_MOONLITSERENADE = 447, - SI_SATURDAYNIGHTFEVER = 448, - SI_SITDOWN_FORCE = 449, - SI_ANALYZE = 450, - SI_LERADSDEW = 451, - SI_MELODYOFSINK = 452, - SI_WARCRYOFBEYOND = 453, - SI_UNLIMITEDHUMMINGVOICE = 454, - SI_SPELLBOOK1 = 455, - SI_SPELLBOOK2 = 456, - SI_SPELLBOOK3 = 457, - SI_FREEZE_SP = 458, - SI_GN_TRAINING_SWORD = 459, - SI_GN_REMODELING_CART = 460, - SI_CARTSBOOST = 461, - SI_FIXEDCASTINGTM_REDUCE = 462, - SI_THORNTRAP = 463, - SI_BLOODSUCKER = 464, - SI_SPORE_EXPLOSION = 465, - SI_DEMONIC_FIRE = 466, - SI_FIRE_EXPANSION_SMOKE_POWDER = 467, - SI_FIRE_EXPANSION_TEAR_GAS = 468, - SI_BLOCKING_PLAY = 469, - SI_MANDRAGORA = 470, - SI_ACTIVATE = 471, - SI_SECRAMENT = 472, - SI_ASSUMPTIO2 = 473, - SI_TK_SEVENWIND = 474, - SI_LIMIT_ODINS_RECALL = 475, - SI_STOMACHACHE = 476, - SI_MYSTERIOUS_POWDER = 477, - SI_MELON_BOMB = 478, - SI_BANANA_BOMB_SITDOWN_POSTDELAY = 479, - SI_PROMOTE_HEALTH_RESERCH = 480, - SI_ENERGY_DRINK_RESERCH = 481, - SI_EXTRACT_WHITE_POTION_Z = 482, - SI_VITATA_500 = 483, - SI_EXTRACT_SALAMINE_JUICE = 484, - SI_BOOST500 = 485, - SI_FULL_SWING_K = 486, - SI_MANA_PLUS = 487, - SI_MUSTLE_M = 488, - SI_LIFE_FORCE_F = 489, - SI_VACUUM_EXTREME = 490, - SI_SAVAGE_STEAK = 491, - SI_COCKTAIL_WARG_BLOOD = 492, - SI_MINOR_BBQ = 493, - SI_SIROMA_ICE_TEA = 494, - SI_DROCERA_HERB_STEAMED = 495, - SI_PUTTI_TAILS_NOODLES = 496, - SI_BANANA_BOMB = 497, - SI_SUMMON_AGNI = 498, - SI_SPELLBOOK4 = 499, - SI_SPELLBOOK5 = 500, - SI_SPELLBOOK6 = 501, - SI_SPELLBOOK7 = 502, - SI_ELEMENTAL_AGGRESSIVE = 503, - SI_RETURN_TO_ELDICASTES = 504, - SI_BANDING_DEFENCE = 505, - SI_SKELSCROLL = 506, - SI_DISTRUCTIONSCROLL = 507, - SI_ROYALSCROLL = 508, - SI_IMMUNITYSCROLL = 509, - SI_MYSTICSCROLL = 510, - SI_BATTLESCROLL = 511, - SI_ARMORSCROLL = 512, - SI_FREYJASCROLL = 513, - SI_SOULSCROLL = 514, - SI_CIRCLE_OF_FIRE = 515, - SI_CIRCLE_OF_FIRE_OPTION = 516, - SI_FIRE_CLOAK = 517, - SI_FIRE_CLOAK_OPTION = 518, - SI_WATER_SCREEN = 519, - SI_WATER_SCREEN_OPTION = 520, - SI_WATER_DROP = 521, - SI_WATER_DROP_OPTION = 522, - SI_WIND_STEP = 523, - SI_WIND_STEP_OPTION = 524, - SI_WIND_CURTAIN = 525, - SI_WIND_CURTAIN_OPTION = 526, - SI_WATER_BARRIER = 527, - SI_ZEPHYR = 528, - SI_SOLID_SKIN = 529, - SI_SOLID_SKIN_OPTION = 530, - SI_STONE_SHIELD = 531, - SI_STONE_SHIELD_OPTION = 532, - SI_POWER_OF_GAIA = 533, - // SI_EL_WAIT = 534, - // SI_EL_PASSIVE = 535, - // SI_EL_DEFENSIVE = 536, - // SI_EL_OFFENSIVE = 537, - // SI_EL_COST = 538, - SI_PYROTECHNIC = 539, - SI_PYROTECHNIC_OPTION = 540, - SI_HEATER = 541, - SI_HEATER_OPTION = 542, - SI_TROPIC = 543, - SI_TROPIC_OPTION = 544, - SI_AQUAPLAY = 545, - SI_AQUAPLAY_OPTION = 546, - SI_COOLER = 547, - SI_COOLER_OPTION = 548, - SI_CHILLY_AIR = 549, - SI_CHILLY_AIR_OPTION = 550, - SI_GUST = 551, - SI_GUST_OPTION = 552, - SI_BLAST = 553, - SI_BLAST_OPTION = 554, - SI_WILD_STORM = 555, - SI_WILD_STORM_OPTION = 556, - SI_PETROLOGY = 557, - SI_PETROLOGY_OPTION = 558, - SI_CURSED_SOIL = 559, - SI_CURSED_SOIL_OPTION = 560, - SI_UPHEAVAL = 561, - SI_UPHEAVAL_OPTION = 562, - SI_TIDAL_WEAPON = 563, - SI_TIDAL_WEAPON_OPTION = 564, - SI_ROCK_CRUSHER = 565, - SI_ROCK_CRUSHER_ATK = 566, - SI_FIRE_INSIGNIA = 567, - SI_WATER_INSIGNIA = 568, - SI_WIND_INSIGNIA = 569, - SI_EARTH_INSIGNIA = 570, - SI_EQUIPED_FLOOR = 571, - SI_GUARDIAN_RECALL = 572, - SI_MORA_BUFF = 573, - SI_REUSE_LIMIT_G = 574, - SI_REUSE_LIMIT_H = 575, - SI_NEEDLE_OF_PARALYZE = 576, - SI_PAIN_KILLER = 577, - SI_G_LIFEPOTION = 578, - SI_VITALIZE_POTION = 579, - SI_LIGHT_OF_REGENE = 580, - SI_OVERED_BOOST = 581, - SI_SILENT_BREEZE = 582, - SI_ODINS_POWER = 583, - SI_STYLE_CHANGE = 584, - SI_SONIC_CLAW_POSTDELAY = 585, + SI_BLANK = -1, + + SI_PROVOKE = 0, + SI_ENDURE = 1, + SI_TWOHANDQUICKEN = 2, + SI_CONCENTRATION = 3, + SI_HIDING = 4, + SI_CLOAKING = 5, + SI_ENCHANTPOISON = 6, + SI_POISONREACT = 7, + SI_QUAGMIRE = 8, + SI_ANGELUS = 9, + SI_BLESSING = 10, + SI_CRUCIS = 11, + SI_INC_AGI = 12, + SI_DEC_AGI = 13, + SI_SLOWPOISON = 14, + SI_IMPOSITIO = 15, + SI_SUFFRAGIUM = 16, + SI_ASPERSIO = 17, + SI_BENEDICTIO = 18, + SI_KYRIE = 19, + SI_MAGNIFICAT = 20, + SI_GLORIA = 21, + SI_LEXAETERNA = 22, + SI_ADRENALINE = 23, + SI_WEAPONPERFECT = 24, + SI_OVERTHRUST = 25, + SI_MAXIMIZE = 26, + SI_RIDING = 27, + SI_FALCON = 28, + SI_TRICKDEAD = 29, + SI_SHOUT = 30, + SI_ENERGYCOAT = 31, + SI_BROKENARMOR = 32, + SI_BROKENWEAPON = 33, + SI_ILLUSION = 34, + SI_WEIGHTOVER50 = 35, + SI_WEIGHTOVER90 = 36, + SI_ATTHASTE_POTION1 = 37, + SI_ATTHASTE_POTION2 = 38, + SI_ATTHASTE_POTION3 = 39, + SI_ATTHASTE_INFINITY = 40, + SI_MOVHASTE_POTION = 41, + SI_MOVHASTE_INFINITY = 42, + //SI_AUTOCOUNTER = 43, + //SI_SPLASHER = 44, + SI_ANKLESNARE = 45, + SI_POSTDELAY = 46, + //SI_NOACTION = 47, + //SI_IMPOSSIBLEPICKUP = 48, + //SI_BARRIER = 49, + + SI_NOEQUIPWEAPON = 50, + SI_NOEQUIPSHIELD = 51, + SI_NOEQUIPARMOR = 52, + SI_NOEQUIPHELM = 53, + SI_PROTECTWEAPON = 54, + SI_PROTECTSHIELD = 55, + SI_PROTECTARMOR = 56, + SI_PROTECTHELM = 57, + SI_AUTOGUARD = 58, + SI_REFLECTSHIELD = 59, + //SI_DEVOTION = 60, + SI_PROVIDENCE = 61, + SI_DEFENDER = 62, + //SI_MAGICROD = 63, + //SI_WEAPONPROPERTY = 64, + SI_AUTOSPELL = 65, + //SI_SPECIALZONE = 66, + //SI_MASK = 67, + SI_SPEARQUICKEN = 68, + //SI_BDPLAYING = 69, + //SI_WHISTLE = 70, + //SI_ASSASSINCROSS = 71, + //SI_POEMBRAGI = 72, + //SI_APPLEIDUN = 73, + //SI_HUMMING = 74, + //SI_DONTFORGETME = 75, + //SI_FORTUNEKISS = 76, + //SI_SERVICEFORYOU = 77, + //SI_RICHMANKIM = 78, + //SI_ETERNALCHAOS = 79, + //SI_DRUMBATTLEFIELD = 80, + //SI_RINGNIBELUNGEN = 81, + //SI_ROKISWEIL = 82, + //SI_INTOABYSS = 83, + //SI_SIEGFRIED = 84, + //SI_BLADESTOP = 85, + SI_EXPLOSIONSPIRITS = 86, + SI_STEELBODY = 87, + SI_EXTREMITYFIST = 88, + //SI_COMBOATTACK = 89, + SI_PROPERTYFIRE = 90, + SI_PROPERTYWATER = 91, + SI_PROPERTYWIND = 92, + SI_PROPERTYGROUND = 93, + //SI_MAGICATTACK = 94, + SI_STOP = 95, + //SI_WEAPONBRAKER = 96, + SI_PROPERTYUNDEAD = 97, + //SI_POWERUP = 98, + //SI_AGIUP = 99, + + //SI_SIEGEMODE = 100, + //SI_INVISIBLE = 101, + //SI_STATUSONE = 102, + SI_AURABLADE = 103, + SI_PARRYING = 104, + SI_LKCONCENTRATION = 105, + SI_TENSIONRELAX = 106, + SI_BERSERK = 107, + //SI_SACRIFICE = 108, + //SI_GOSPEL = 109, + SI_ASSUMPTIO = 110, + //SI_BASILICA = 111, + SI_GROUNDMAGIC = 112, + SI_MAGICPOWER = 113, + SI_EDP = 114, + SI_TRUESIGHT = 115, + SI_WINDWALK = 116, + SI_MELTDOWN = 117, + SI_CARTBOOST = 118, + //SI_CHASEWALK = 119, + SI_SWORDREJECT = 120, + SI_MARIONETTE_MASTER = 121, + SI_MARIONETTE = 122, + SI_MOON = 123, + SI_BLOODING = 124, + SI_JOINTBEAT = 125, + //SI_MINDBREAKER = 126, + //SI_MEMORIZE = 127, + //SI_FOGWALL = 128, + //SI_SPIDERWEB = 129, + SI_PROTECTEXP = 130, + //SI_SUB_WEAPONPROPERTY = 131, + SI_AUTOBERSERK = 132, + SI_RUN = 133, + SI_TING = 134, + SI_STORMKICK_ON = 135, + SI_STORMKICK_READY = 136, + SI_DOWNKICK_ON = 137, + SI_DOWNKICK_READY = 138, + SI_TURNKICK_ON = 139, + SI_TURNKICK_READY = 140, + SI_COUNTER_ON = 141, + SI_COUNTER_READY = 142, + SI_DODGE_ON = 143, + SI_DODGE_READY = 144, + SI_STRUP = 145, + SI_PROPERTYDARK = 146, + SI_ADRENALINE2 = 147, + SI_PROPERTYTELEKINESIS = 148, + SI_SOULLINK = 149, + + SI_PLUSATTACKPOWER = 150, + SI_PLUSMAGICPOWER = 151, + SI_DEVIL1 = 152, + SI_KAITE = 153, + //SI_SWOO = 154, + //SI_STAR2 = 155, + SI_KAIZEL = 156, + SI_KAAHI = 157, + SI_KAUPE = 158, + SI_SMA_READY = 159, + SI_SKE = 160, + SI_ONEHANDQUICKEN = 161, + //SI_FRIEND = 162, + //SI_FRIENDUP = 163, + //SI_SG_WARM = 164, + SI_SG_SUN_WARM = 165, + //SI_SG_MOON_WARM = 166 | The three show the exact same display: ultra red character (165, 166, 167) + //SI_SG_STAR_WARM = 167 | Their names would be SI_SG_SUN_WARM, SI_SG_MOON_WARM, SI_SG_STAR_WARM + //SI_EMOTION = 168, + SI_SUN_COMFORT = 169, + SI_MOON_COMFORT = 170, + SI_STAR_COMFORT = 171, + //SI_EXPUP = 172, + //SI_GDSKILL_BATTLEORDER = 173, + //SI_GDSKILL_REGENERATION = 174, + //SI_GDSKILL_POSTDELAY = 175, + //SI_RESISTHANDICAP = 176, + //SI_MAXHPPERCENT = 177, + //SI_MAXSPPERCENT = 178, + //SI_DEFENCE = 179, + //SI_SLOWDOWN = 180, + SI_PRESERVE = 181, + SI_INCSTR = 182, + //SI_NOT_EXTREMITYFIST = 183, + SI_CLAIRVOYANCE = 184, + //SI_MOVESLOW_POTION = 185, + SI_DOUBLECASTING = 186, + //SI_GRAVITATION = 187, + SI_OVERTHRUSTMAX = 188, + //SI_LONGING = 189, + //SI_HERMODE = 190, + SI_TAROTCARD = 191, // the icon allows no doubt... but what is it really used for ?? [DracoRPG] + //SI_HLIF_AVOID = 192, + //SI_HFLI_FLEET = 193, + //SI_HFLI_SPEED = 194, + //SI_HLIF_CHANGE = 195, + //SI_HAMI_BLOODLUST = 196, + SI_CR_SHRINK = 197, + SI_WZ_SIGHTBLASTER = 198, + SI_DC_WINKCHARM = 199, + + SI_RG_CCONFINE_M = 200, + SI_RG_CCONFINE_S = 201, + //SI_DISABLEMOVE = 202, + SI_GS_MADNESSCANCEL = 203, //[blackhole89] + SI_GS_GATLINGFEVER = 204, + SI_EARTHSCROLL = 205, + SI_NJ_UTSUSEMI = 206, + SI_NJ_BUNSINJYUTSU = 207, + SI_NJ_NEN = 208, + SI_GS_ADJUSTMENT = 209, + SI_GS_ACCURACY = 210, + SI_NJ_SUITON = 211, + //SI_PET = 212, + //SI_MENTAL = 213, + //SI_EXPMEMORY = 214, + //SI_PERFORMANCE = 215, + //SI_GAIN = 216, + //SI_GRIFFON = 217, + //SI_DRIFT = 218, + //SI_WALLSHIFT = 219, + //SI_REINCARNATION = 220, + //SI_PATTACK = 221, + //SI_PSPEED = 222, + //SI_PDEFENSE = 223, + //SI_PCRITICAL = 224, + //SI_RANKING = 225, + //SI_PTRIPLE = 226, + //SI_DENERGY = 227, + //SI_WAVE1 = 228, + //SI_WAVE2 = 229, + //SI_WAVE3 = 230, + //SI_WAVE4 = 231, + //SI_DAURA = 232, + //SI_DFREEZER = 233, + //SI_DPUNISH = 234, + //SI_DBARRIER = 235, + //SI_DWARNING = 236, + //SI_MOUSEWHEEL = 237, + //SI_DGAUGE = 238, + //SI_DACCEL = 239, + //SI_DBLOCK = 240, + SI_FOOD_STR = 241, + SI_FOOD_AGI = 242, + SI_FOOD_VIT = 243, + SI_FOOD_DEX = 244, + SI_FOOD_INT = 245, + SI_FOOD_LUK = 246, + SI_FOOD_BASICAVOIDANCE = 247, + SI_FOOD_BASICHIT = 248, + SI_FOOD_CRITICALSUCCESSVALUE = 249, + + SI_CASH_PLUSEXP = 250, + SI_CASH_DEATHPENALTY = 251, + SI_CASH_RECEIVEITEM = 252, + SI_CASH_BOSS_ALARM = 253, + //SI_DA_ENERGY = 254, + //SI_DA_FIRSTSLOT = 255, + //SI_DA_HEADDEF = 256, + //SI_DA_SPACE = 257, + //SI_DA_TRANSFORM = 258, + //SI_DA_ITEMREBUILD = 259, + //SI_DA_ILLUSION = 260, //All mobs display as Turtle General + //SI_DA_DARKPOWER = 261, + //SI_DA_EARPLUG = 262, + //SI_DA_CONTRACT = 263, //Bio Mob effect on you and SI_TRICKDEAD icon + //SI_DA_BLACK = 264, //For short time blurry screen + //SI_DA_MAGICCART = 265, + //SI_CRYSTAL = 266, + //SI_DA_REBUILD = 267, + //SI_DA_EDARKNESS = 268, + //SI_DA_EGUARDIAN = 269, + //SI_DA_TIMEOUT = 270, + SI_FOOD_STR_CASH = 271, + SI_FOOD_AGI_CASH = 272, + SI_FOOD_VIT_CASH = 273, + SI_FOOD_DEX_CASH = 274, + SI_FOOD_INT_CASH = 275, + SI_FOOD_LUK_CASH = 276, + SI_MER_FLEE = 277, + SI_MER_ATK = 278, + SI_MER_HP = 279, + SI_MER_SP = 280, + SI_MER_HIT = 281, + SI_SLOWCAST = 282, + //SI_MAGICMIRROR = 283, + //SI_STONESKIN = 284, + //SI_ANTIMAGIC = 285, + SI_CRITICALWOUND = 286, + //SI_NPC_DEFENDER = 287, + //SI_NOACTION_WAIT = 288, + SI_MOVHASTE_HORSE = 289, + SI_PROTECT_DEF = 290, + SI_PROTECT_MDEF = 291, + SI_HEALPLUS = 292, + SI_S_LIFEPOTION = 293, + SI_L_LIFEPOTION = 294, + SI_CRITICALPERCENT = 295, + SI_PLUSAVOIDVALUE = 296, + //SI_ATKER_ASPD = 297, + //SI_TARGET_ASPD = 298, + //SI_ATKER_MOVESPEED = 299, + + SI_ATKER_BLOOD = 300, + SI_TARGET_BLOOD = 301, + SI_ARMOR_PROPERTY = 302, + //SI_REUSE_LIMIT_A = 303, + SI_HELLPOWER = 304, + //SI_STEAMPACK = 305, + //SI_REUSE_LIMIT_B = 306, + //SI_REUSE_LIMIT_C = 307, + //SI_REUSE_LIMIT_D = 308, + //SI_REUSE_LIMIT_E = 309, + //SI_REUSE_LIMIT_F = 310, + SI_INVINCIBLE = 311, + SI_CASH_PLUSONLYJOBEXP = 312, + SI_PARTYFLEE = 313, + SI_ANGEL_PROTECT = 314, + //SI_ENDURE_MDEF = 315, + SI_ENCHANTBLADE = 316, + SI_DEATHBOUND = 317, + SI_REFRESH = 318, + SI_GIANTGROWTH = 319, + SI_STONEHARDSKIN = 320, + SI_VITALITYACTIVATION = 321, + SI_FIGHTINGSPIRIT = 322, + SI_ABUNDANCE = 323, + SI_REUSE_MILLENNIUMSHIELD = 324, + SI_REUSE_CRUSHSTRIKE = 325, + SI_REUSE_REFRESH = 326, + SI_REUSE_STORMBLAST = 327, + SI_VENOMIMPRESS = 328, + SI_EPICLESIS = 329, + SI_ORATIO = 330, + SI_LAUDAAGNUS = 331, + SI_LAUDARAMUS = 332, + SI_CLOAKINGEXCEED = 333, + SI_HALLUCINATIONWALK = 334, + SI_HALLUCINATIONWALK_POSTDELAY = 335, + SI_RENOVATIO = 336, + SI_WEAPONBLOCKING = 337, + SI_WEAPONBLOCKING_POSTDELAY = 338, + SI_ROLLINGCUTTER = 339, + SI_EXPIATIO = 340, + SI_POISONINGWEAPON = 341, + SI_TOXIN = 342, + SI_PARALYSE = 343, + SI_VENOMBLEED = 344, + SI_MAGICMUSHROOM = 345, + SI_DEATHHURT = 346, + SI_PYREXIA = 347, + SI_OBLIVIONCURSE = 348, + SI_LEECHESEND = 349, + + SI_DUPLELIGHT = 350, + SI_FROSTMISTY = 351, + SI_FEARBREEZE = 352, + SI_ELECTRICSHOCKER = 353, + SI_MARSHOFABYSS = 354, + SI_RECOGNIZEDSPELL = 355, + SI_STASIS = 356, + SI_WUGRIDER = 357, + SI_WUGDASH = 358, + SI_WUGBITE = 359, + SI_CAMOUFLAGE = 360, + SI_ACCELERATION = 361, + SI_HOVERING = 362, + SI_SPHERE_1 = 363, + SI_SPHERE_2 = 364, + SI_SPHERE_3 = 365, + SI_SPHERE_4 = 366, + SI_SPHERE_5 = 367, + SI_MVPCARD_TAOGUNKA = 368, + SI_MVPCARD_MISTRESS = 369, + SI_MVPCARD_ORCHERO = 370, + SI_MVPCARD_ORCLORD = 371, + SI_OVERHEAT_LIMITPOINT = 372, + SI_OVERHEAT = 373, + SI_SHAPESHIFT = 374, + SI_INFRAREDSCAN = 375, + SI_MAGNETICFIELD = 376, + SI_NEUTRALBARRIER = 377, + SI_NEUTRALBARRIER_MASTER = 378, + SI_STEALTHFIELD = 379, + SI_STEALTHFIELD_MASTER = 380, + SI_MANU_ATK = 381, + SI_MANU_DEF = 382, + SI_SPL_ATK = 383, + SI_SPL_DEF = 384, + SI_REPRODUCE = 385, + SI_MANU_MATK = 386, + SI_SPL_MATK = 387, + SI_STR_SCROLL = 388, + SI_INT_SCROLL = 389, + SI_LG_REFLECTDAMAGE = 390, + SI_FORCEOFVANGUARD = 391, + SI_BUCHEDENOEL = 392, + SI_AUTOSHADOWSPELL = 393, + SI_SHADOWFORM = 394, + SI_RAID = 395, + SI_SHIELDSPELL_DEF = 396, + SI_SHIELDSPELL_MDEF = 397, + SI_SHIELDSPELL_REF = 398, + SI_BODYPAINT = 399, + + SI_EXEEDBREAK = 400, + SI_ADORAMUS = 401, + SI_PRESTIGE = 402, + SI_INVISIBILITY = 403, + SI_DEADLYINFECT = 404, + SI_BANDING = 405, + SI_EARTHDRIVE = 406, + SI_INSPIRATION = 407, + SI_ENERVATION = 408, + SI_GROOMY = 409, + SI_RAISINGDRAGON = 410, + SI_IGNORANCE = 411, + SI_LAZINESS = 412, + SI_LIGHTNINGWALK = 413, + SI_ACARAJE = 414, + SI_UNLUCKY = 415, + SI_CURSEDCIRCLE_ATKER = 416, + SI_CURSEDCIRCLE_TARGET = 417, + SI_WEAKNESS = 418, + SI_CRESCENTELBOW = 419, + SI_NOEQUIPACCESSARY = 420, + SI_STRIPACCESSARY = 421, + SI_MANHOLE = 422, + SI_POPECOOKIE = 423, + SI_FALLENEMPIRE = 424, + SI_GENTLETOUCH_ENERGYGAIN = 425, + SI_GENTLETOUCH_CHANGE = 426, + SI_GENTLETOUCH_REVITALIZE = 427, + SI_BLOODYLUST = 428, + SI_SWINGDANCE = 429, + SI_SYMPHONYOFLOVERS = 430, + SI_PROPERTYWALK = 431, + SI_SPELLFIST = 432, + SI_NETHERWORLD = 433, + SI_SIREN = 434, + SI_DEEPSLEEP = 435, + SI_SIRCLEOFNATURE = 436, + SI_COLD = 437, + SI_GLOOMYDAY = 438, + SI_SONG_OF_MANA = 439, + SI_CLOUDKILL = 440, + SI_DANCEWITHWUG = 441, + SI_RUSHWINDMILL = 442, + SI_ECHOSONG = 443, + SI_HARMONIZE = 444, + SI_STRIKING = 445, + SI_WARMER = 446, + SI_MOONLITSERENADE = 447, + SI_SATURDAYNIGHTFEVER = 448, + SI_SITDOWN_FORCE = 449, + + SI_ANALYZE = 450, + SI_LERADSDEW = 451, + SI_MELODYOFSINK = 452, + SI_WARCRYOFBEYOND = 453, + SI_UNLIMITEDHUMMINGVOICE = 454, + SI_SPELLBOOK1 = 455, + SI_SPELLBOOK2 = 456, + SI_SPELLBOOK3 = 457, + SI_FREEZE_SP = 458, + SI_GN_TRAINING_SWORD = 459, + SI_GN_REMODELING_CART = 460, + SI_CARTSBOOST = 461, + SI_FIXEDCASTINGTM_REDUCE = 462, + SI_THORNTRAP = 463, + SI_BLOODSUCKER = 464, + SI_SPORE_EXPLOSION = 465, + SI_DEMONIC_FIRE = 466, + SI_FIRE_EXPANSION_SMOKE_POWDER = 467, + SI_FIRE_EXPANSION_TEAR_GAS = 468, + SI_BLOCKING_PLAY = 469, + SI_MANDRAGORA = 470, + SI_ACTIVATE = 471, + SI_SECRAMENT = 472, + SI_ASSUMPTIO2 = 473, + SI_TK_SEVENWIND = 474, + SI_LIMIT_ODINS_RECALL = 475, + SI_STOMACHACHE = 476, + SI_MYSTERIOUS_POWDER = 477, + SI_MELON_BOMB = 478, + SI_BANANA_BOMB_SITDOWN_POSTDELAY = 479, + SI_PROMOTE_HEALTH_RESERCH = 480, + SI_ENERGY_DRINK_RESERCH = 481, + SI_EXTRACT_WHITE_POTION_Z = 482, + SI_VITATA_500 = 483, + SI_EXTRACT_SALAMINE_JUICE = 484, + SI_BOOST500 = 485, + SI_FULL_SWING_K = 486, + SI_MANA_PLUS = 487, + SI_MUSTLE_M = 488, + SI_LIFE_FORCE_F = 489, + SI_VACUUM_EXTREME = 490, + SI_SAVAGE_STEAK = 491, + SI_COCKTAIL_WARG_BLOOD = 492, + SI_MINOR_BBQ = 493, + SI_SIROMA_ICE_TEA = 494, + SI_DROCERA_HERB_STEAMED = 495, + SI_PUTTI_TAILS_NOODLES = 496, + SI_BANANA_BOMB = 497, + SI_SUMMON_AGNI = 498, + SI_SPELLBOOK4 = 499, + + SI_SPELLBOOK5 = 500, + SI_SPELLBOOK6 = 501, + SI_SPELLBOOK7 = 502, + SI_ELEMENTAL_AGGRESSIVE = 503, + SI_RETURN_TO_ELDICASTES = 504, + SI_BANDING_DEFENCE = 505, + SI_SKELSCROLL = 506, + SI_DISTRUCTIONSCROLL = 507, + SI_ROYALSCROLL = 508, + SI_IMMUNITYSCROLL = 509, + SI_MYSTICSCROLL = 510, + SI_BATTLESCROLL = 511, + SI_ARMORSCROLL = 512, + SI_FREYJASCROLL = 513, + SI_SOULSCROLL = 514, + SI_CIRCLE_OF_FIRE = 515, + SI_CIRCLE_OF_FIRE_OPTION = 516, + SI_FIRE_CLOAK = 517, + SI_FIRE_CLOAK_OPTION = 518, + SI_WATER_SCREEN = 519, + SI_WATER_SCREEN_OPTION = 520, + SI_WATER_DROP = 521, + SI_WATER_DROP_OPTION = 522, + SI_WIND_STEP = 523, + SI_WIND_STEP_OPTION = 524, + SI_WIND_CURTAIN = 525, + SI_WIND_CURTAIN_OPTION = 526, + SI_WATER_BARRIER = 527, + SI_ZEPHYR = 528, + SI_SOLID_SKIN = 529, + SI_SOLID_SKIN_OPTION = 530, + SI_STONE_SHIELD = 531, + SI_STONE_SHIELD_OPTION = 532, + SI_POWER_OF_GAIA = 533, + //SI_EL_WAIT = 534, + //SI_EL_PASSIVE = 535, + //SI_EL_DEFENSIVE = 536, + //SI_EL_OFFENSIVE = 537, + //SI_EL_COST = 538, + SI_PYROTECHNIC = 539, + SI_PYROTECHNIC_OPTION = 540, + SI_HEATER = 541, + SI_HEATER_OPTION = 542, + SI_TROPIC = 543, + SI_TROPIC_OPTION = 544, + SI_AQUAPLAY = 545, + SI_AQUAPLAY_OPTION = 546, + SI_COOLER = 547, + SI_COOLER_OPTION = 548, + SI_CHILLY_AIR = 549, + + SI_CHILLY_AIR_OPTION = 550, + SI_GUST = 551, + SI_GUST_OPTION = 552, + SI_BLAST = 553, + SI_BLAST_OPTION = 554, + SI_WILD_STORM = 555, + SI_WILD_STORM_OPTION = 556, + SI_PETROLOGY = 557, + SI_PETROLOGY_OPTION = 558, + SI_CURSED_SOIL = 559, + SI_CURSED_SOIL_OPTION = 560, + SI_UPHEAVAL = 561, + SI_UPHEAVAL_OPTION = 562, + SI_TIDAL_WEAPON = 563, + SI_TIDAL_WEAPON_OPTION = 564, + SI_ROCK_CRUSHER = 565, + SI_ROCK_CRUSHER_ATK = 566, + SI_FIRE_INSIGNIA = 567, + SI_WATER_INSIGNIA = 568, + SI_WIND_INSIGNIA = 569, + SI_EARTH_INSIGNIA = 570, + SI_EQUIPED_FLOOR = 571, + SI_GUARDIAN_RECALL = 572, + SI_MORA_BUFF = 573, + SI_REUSE_LIMIT_G = 574, + SI_REUSE_LIMIT_H = 575, + SI_NEEDLE_OF_PARALYZE = 576, + SI_PAIN_KILLER = 577, + SI_G_LIFEPOTION = 578, + SI_VITALIZE_POTION = 579, + SI_LIGHT_OF_REGENE = 580, + SI_OVERED_BOOST = 581, + SI_SILENT_BREEZE = 582, + SI_ODINS_POWER = 583, + SI_STYLE_CHANGE = 584, + SI_SONIC_CLAW_POSTDELAY = 585, // ID's 586 - 595 Currently Unused - SI_SILVERVEIN_RUSH_POSTDELAY = 596, - SI_MIDNIGHT_FRENZY_POSTDELAY = 597, - SI_GOLDENE_FERSE = 598, - SI_ANGRIFFS_MODUS = 599, - SI_TINDER_BREAKER = 600, - SI_TINDER_BREAKER_POSTDELAY = 601, - SI_CBC = 602, - SI_CBC_POSTDELAY = 603, - SI_EQC = 604, - SI_MAGMA_FLOW = 605, - SI_GRANITIC_ARMOR = 606, - SI_PYROCLASTIC = 607, - SI_VOLCANIC_ASH = 608, - SI_SPIRITS_SAVEINFO1 = 609, - SI_SPIRITS_SAVEINFO2 = 610, - SI_MAGIC_CANDY = 611, - SI_SEARCH_STORE_INFO = 612, - SI_ALL_RIDING = 613, - SI_ALL_RIDING_REUSE_LIMIT = 614, - SI_MACRO = 615, - SI_MACRO_POSTDELAY = 616, - SI_BEER_BOTTLE_CAP = 617, - SI_OVERLAPEXPUP = 618, - SI_PC_IZ_DUN05 = 619, - SI_CRUSHSTRIKE = 620, - SI_MONSTER_TRANSFORM = 621, - SI_SIT = 622, - SI_ONAIR = 623, - SI_MTF_ASPD = 624, - SI_MTF_RANGEATK = 625, - SI_MTF_MATK = 626, - SI_MTF_MLEATKED = 627, - SI_MTF_CRIDAMAGE = 628, - SI_REUSE_LIMIT_MTF = 629, - SI_MACRO_PERMIT = 630, - SI_MACRO_PLAY = 631, - SI_SKF_CAST = 632, - SI_SKF_ASPD = 633, - SI_SKF_ATK = 634, - SI_SKF_MATK = 635, - SI_REWARD_PLUSONLYJOBEXP = 636, - SI_HANDICAPSTATE_NORECOVER = 637, - SI_SET_NUM_DEF = 638, - SI_SET_NUM_MDEF = 639, - SI_SET_PER_DEF = 640, - SI_SET_PER_MDEF = 641, - SI_PARTYBOOKING_SEARCH_DEALY = 642, - SI_PARTYBOOKING_REGISTER_DEALY = 643, - SI_PERIOD_TIME_CHECK_DETECT_SKILL = 644, - SI_KO_JYUMONJIKIRI = 645, - SI_MEIKYOUSISUI = 646, - SI_ATTHASTE_CASH = 647, - SI_EQUIPPED_DIVINE_ARMOR = 648, - SI_EQUIPPED_HOLY_ARMOR = 649, - SI_2011RWC = 650, - SI_KYOUGAKU = 651, - SI_IZAYOI = 652, - SI_ZENKAI = 653, - SI_KG_KAGEHUMI = 654, - SI_KYOMU = 655, - SI_KAGEMUSYA = 656, - SI_ZANGETSU = 657, - SI_PHI_DEMON = 658, - SI_GENSOU = 659, - SI_AKAITSUKI = 660, - SI_TETANY = 661, - SI_GM_BATTLE = 662, - SI_GM_BATTLE2 = 663, - SI_2011RWC_SCROLL = 664, - SI_ACTIVE_MONSTER_TRANSFORM = 665, - SI_MYSTICPOWDER = 666, - SI_ECLAGE_RECALL = 667, - SI_ENTRY_QUEUE_APPLY_DELAY = 668, - SI_REUSE_LIMIT_ECL = 669, - SI_M_LIFEPOTION = 670, + SI_SILVERVEIN_RUSH_POSTDELAY = 596, + SI_MIDNIGHT_FRENZY_POSTDELAY = 597, + SI_GOLDENE_FERSE = 598, + SI_ANGRIFFS_MODUS = 599, + + SI_TINDER_BREAKER = 600, + SI_TINDER_BREAKER_POSTDELAY = 601, + SI_CBC = 602, + SI_CBC_POSTDELAY = 603, + SI_EQC = 604, + SI_MAGMA_FLOW = 605, + SI_GRANITIC_ARMOR = 606, + SI_PYROCLASTIC = 607, + SI_VOLCANIC_ASH = 608, + SI_SPIRITS_SAVEINFO1 = 609, + SI_SPIRITS_SAVEINFO2 = 610, + SI_MAGIC_CANDY = 611, + SI_SEARCH_STORE_INFO = 612, + SI_ALL_RIDING = 613, + SI_ALL_RIDING_REUSE_LIMIT = 614, + SI_MACRO = 615, + SI_MACRO_POSTDELAY = 616, + SI_BEER_BOTTLE_CAP = 617, + SI_OVERLAPEXPUP = 618, + SI_PC_IZ_DUN05 = 619, + SI_CRUSHSTRIKE = 620, + SI_MONSTER_TRANSFORM = 621, + SI_SIT = 622, + SI_ONAIR = 623, + SI_MTF_ASPD = 624, + SI_MTF_RANGEATK = 625, + SI_MTF_MATK = 626, + SI_MTF_MLEATKED = 627, + SI_MTF_CRIDAMAGE = 628, + SI_REUSE_LIMIT_MTF = 629, + SI_MACRO_PERMIT = 630, + SI_MACRO_PLAY = 631, + SI_SKF_CAST = 632, + SI_SKF_ASPD = 633, + SI_SKF_ATK = 634, + SI_SKF_MATK = 635, + SI_REWARD_PLUSONLYJOBEXP = 636, + SI_HANDICAPSTATE_NORECOVER = 637, + SI_SET_NUM_DEF = 638, + SI_SET_NUM_MDEF = 639, + SI_SET_PER_DEF = 640, + SI_SET_PER_MDEF = 641, + SI_PARTYBOOKING_SEARCH_DEALY = 642, + SI_PARTYBOOKING_REGISTER_DEALY = 643, + SI_PERIOD_TIME_CHECK_DETECT_SKILL = 644, + SI_KO_JYUMONJIKIRI = 645, + SI_MEIKYOUSISUI = 646, + SI_ATTHASTE_CASH = 647, + SI_EQUIPPED_DIVINE_ARMOR = 648, + SI_EQUIPPED_HOLY_ARMOR = 649, + + SI_2011RWC = 650, + SI_KYOUGAKU = 651, + SI_IZAYOI = 652, + SI_ZENKAI = 653, + SI_KG_KAGEHUMI = 654, + SI_KYOMU = 655, + SI_KAGEMUSYA = 656, + SI_ZANGETSU = 657, + SI_PHI_DEMON = 658, + SI_GENSOU = 659, + SI_AKAITSUKI = 660, + SI_TETANY = 661, + SI_GM_BATTLE = 662, + SI_GM_BATTLE2 = 663, + SI_2011RWC_SCROLL = 664, + SI_ACTIVE_MONSTER_TRANSFORM = 665, + SI_MYSTICPOWDER = 666, + SI_ECLAGE_RECALL = 667, + SI_ENTRY_QUEUE_APPLY_DELAY = 668, + SI_REUSE_LIMIT_ECL = 669, + SI_M_LIFEPOTION = 670, SI_ENTRY_QUEUE_NOTIFY_ADMISSION_TIME_OUT = 671, - SI_UNKNOWN_NAME = 672, - SI_ON_PUSH_CART = 673, - SI_HAT_EFFECT = 674, - SI_FLOWER_LEAF = 675, - SI_RAY_OF_PROTECTION = 676, - SI_GLASTHEIM_ATK = 677, - SI_GLASTHEIM_DEF = 678, - SI_GLASTHEIM_HEAL = 679, - SI_GLASTHEIM_HIDDEN = 680, - SI_GLASTHEIM_STATE = 681, - SI_GLASTHEIM_ITEMDEF = 682, - SI_GLASTHEIM_HPSP = 683, - SI_HOMUN_SKILL_POSTDELAY = 684, - SI_ALMIGHTY = 685, - SI_GVG_GIANT = 686, - SI_GVG_GOLEM = 687, - SI_GVG_STUN = 688, - SI_GVG_STONE = 689, - SI_GVG_FREEZ = 690, - SI_GVG_SLEEP = 691, - SI_GVG_CURSE = 692, - SI_GVG_SILENCE = 693, - SI_GVG_BLIND = 694, - SI_CLIENT_ONLY_EQUIP_ARROW = 695, - SI_CLAN_INFO = 696, - SI_JP_EVENT01 = 697, - SI_JP_EVENT02 = 698, - SI_JP_EVENT03 = 699, - SI_JP_EVENT04 = 700, - SI_TELEPORT_FIXEDCASTINGDELAY = 701, - SI_GEFFEN_MAGIC1 = 702, - SI_GEFFEN_MAGIC2 = 703, - SI_GEFFEN_MAGIC3 = 704, - SI_QUEST_BUFF1 = 705, - SI_QUEST_BUFF2 = 706, - SI_QUEST_BUFF3 = 707, - SI_REUSE_LIMIT_RECALL = 708, - SI_SAVEPOSITION = 709, - SI_HANDICAPSTATE_ICEEXPLO = 710, - SI_FENRIR_CARD = 711, - SI_REUSE_LIMIT_ASPD_POTION = 712, - SI_MAXPAIN = 713, - SI_PC_STOP = 714, - SI_FRIGG_SONG = 715, - SI_OFFERTORIUM = 716, - SI_TELEKINESIS_INTENSE = 717, - SI_MOONSTAR = 718, - SI_STRANGELIGHTS = 719, - SI_FULL_THROTTLE = 720, - SI_REBOUND = 721, - SI_UNLIMIT = 722, - SI_KINGS_GRACE = 723, - SI_ITEM_ATKMAX = 724, - SI_ITEM_ATKMIN = 725, - SI_ITEM_MATKMAX = 726, - SI_ITEM_MATKMIN = 727, - SI_SUPER_STAR = 728, - SI_HIGH_RANKER = 729, - SI_DARKCROW = 730, - SI_2013_VALENTINE1 = 731, - SI_2013_VALENTINE2 = 732, - SI_2013_VALENTINE3 = 733, - SI_ILLUSIONDOPING = 734, - //SI_ = 735, - SI_CHILL = 736, - SI_BURNT = 737, - SI_FLASHCOMBO = 740, - SI_B_TRAP = 752, - SI_E_CHAIN = 753, - SI_E_QD_SHOT_READY = 754, - SI_C_MARKER = 755, - SI_H_MINE = 756, - SI_H_MINE_SPLASH = 757, - SI_P_ALTER = 758, - SI_HEAT_BARREL = 759, - SI_ANTI_M_BLAST = 760, - SI_SLUGSHOT = 761, - SI_SWORDCLAN = 762, - SI_ARCWANDCLAN = 763, - SI_GOLDENMACECLAN = 764, - SI_CROSSBOWCLAN = 765, - SI_PACKING_ENVELOPE1 = 766, - SI_PACKING_ENVELOPE2 = 767, - SI_PACKING_ENVELOPE3 = 768, - SI_PACKING_ENVELOPE4 = 769, - SI_PACKING_ENVELOPE5 = 770, - SI_PACKING_ENVELOPE6 = 771, - SI_PACKING_ENVELOPE7 = 772, - SI_PACKING_ENVELOPE8 = 773, - SI_PACKING_ENVELOPE9 = 774, - SI_PACKING_ENVELOPE10 = 775, - SI_GLASTHEIM_TRANS = 776, - SI_HEAT_BARREL_AFTER = 778, - SI_DECORATION_OF_MUSIC = 779, + SI_UNKNOWN_NAME = 672, + SI_ON_PUSH_CART = 673, + SI_HAT_EFFECT = 674, + SI_FLOWER_LEAF = 675, + SI_RAY_OF_PROTECTION = 676, + SI_GLASTHEIM_ATK = 677, + SI_GLASTHEIM_DEF = 678, + SI_GLASTHEIM_HEAL = 679, + SI_GLASTHEIM_HIDDEN = 680, + SI_GLASTHEIM_STATE = 681, + SI_GLASTHEIM_ITEMDEF = 682, + SI_GLASTHEIM_HPSP = 683, + SI_HOMUN_SKILL_POSTDELAY = 684, + SI_ALMIGHTY = 685, + SI_GVG_GIANT = 686, + SI_GVG_GOLEM = 687, + SI_GVG_STUN = 688, + SI_GVG_STONE = 689, + SI_GVG_FREEZ = 690, + SI_GVG_SLEEP = 691, + SI_GVG_CURSE = 692, + SI_GVG_SILENCE = 693, + SI_GVG_BLIND = 694, + SI_CLIENT_ONLY_EQUIP_ARROW = 695, + SI_CLAN_INFO = 696, + SI_JP_EVENT01 = 697, + SI_JP_EVENT02 = 698, + SI_JP_EVENT03 = 699, + + SI_JP_EVENT04 = 700, + SI_TELEPORT_FIXEDCASTINGDELAY = 701, + SI_GEFFEN_MAGIC1 = 702, + SI_GEFFEN_MAGIC2 = 703, + SI_GEFFEN_MAGIC3 = 704, + SI_QUEST_BUFF1 = 705, + SI_QUEST_BUFF2 = 706, + SI_QUEST_BUFF3 = 707, + SI_REUSE_LIMIT_RECALL = 708, + SI_SAVEPOSITION = 709, + SI_HANDICAPSTATE_ICEEXPLO = 710, + SI_FENRIR_CARD = 711, + SI_REUSE_LIMIT_ASPD_POTION = 712, + SI_MAXPAIN = 713, + SI_PC_STOP = 714, + SI_FRIGG_SONG = 715, + SI_OFFERTORIUM = 716, + SI_TELEKINESIS_INTENSE = 717, + SI_MOONSTAR = 718, + SI_STRANGELIGHTS = 719, + SI_FULL_THROTTLE = 720, + SI_REBOUND = 721, + SI_UNLIMIT = 722, + SI_KINGS_GRACE = 723, + SI_ITEM_ATKMAX = 724, + SI_ITEM_ATKMIN = 725, + SI_ITEM_MATKMAX = 726, + SI_ITEM_MATKMIN = 727, + SI_SUPER_STAR = 728, + SI_HIGH_RANKER = 729, + SI_DARKCROW = 730, + SI_2013_VALENTINE1 = 731, + SI_2013_VALENTINE2 = 732, + SI_2013_VALENTINE3 = 733, + SI_ILLUSIONDOPING = 734, + //SI_ = 735, + SI_CHILL = 736, + SI_BURNT = 737, + //... + SI_FLASHCOMBO = 740, + + //... + SI_B_TRAP = 752, + SI_E_CHAIN = 753, + SI_E_QD_SHOT_READY = 754, + SI_C_MARKER = 755, + SI_H_MINE = 756, + SI_H_MINE_SPLASH = 757, + SI_P_ALTER = 758, + SI_HEAT_BARREL = 759, + SI_ANTI_M_BLAST = 760, + SI_SLUGSHOT = 761, + SI_SWORDCLAN = 762, + SI_ARCWANDCLAN = 763, + SI_GOLDENMACECLAN = 764, + SI_CROSSBOWCLAN = 765, + SI_PACKING_ENVELOPE1 = 766, + SI_PACKING_ENVELOPE2 = 767, + SI_PACKING_ENVELOPE3 = 768, + SI_PACKING_ENVELOPE4 = 769, + SI_PACKING_ENVELOPE5 = 770, + SI_PACKING_ENVELOPE6 = 771, + SI_PACKING_ENVELOPE7 = 772, + SI_PACKING_ENVELOPE8 = 773, + SI_PACKING_ENVELOPE9 = 774, + SI_PACKING_ENVELOPE10 = 775, + SI_GLASTHEIM_TRANS = 776, + //... + SI_HEAT_BARREL_AFTER = 778, + SI_DECORATION_OF_MUSIC = 779, + SI_MAX, }; // JOINTBEAT stackable ailments @@ -1698,7 +1719,7 @@ struct status_data { speed, amotion, adelay, dmotion, mode; - short + short hit, flee, cri, flee2, def2, mdef2, #ifdef RENEWAL_ASPD @@ -1867,7 +1888,7 @@ struct s_refine_info { }; /*===================================== -* Interface : status.h +* Interface : status.h * Generated by HerculesInterfaceMaker * created by Susu *-------------------------------------*/ diff --git a/src/map/unit.c b/src/map/unit.c index 0ad770e80..e22d6f697 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1180,8 +1180,8 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui if( (skill->get_inf2(skill_id)&INF2_ENSEMBLE_SKILL) && skill->check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1 ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - return 0; - } + return 0; + } switch(skill_id){ case SA_CASTCANCEL: @@ -1371,7 +1371,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui // in official this is triggered even if no cast time. clif->skillcasting(src, src->id, target_id, 0,0, skill_id, skill->get_ele(skill_id, skill_lv), casttime); if( casttime > 0 || temp ) - { + { if (sd && target->type == BL_MOB) { TBL_MOB *md = (TBL_MOB*)target; @@ -1555,7 +1555,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui if( casttime > 0 ) { ud->skilltimer = timer->add( tick+casttime, skill->castend_pos, src->id, 0 ); if( (sd && pc->checkskill(sd,SA_FREECAST) > 0) || skill_id == LG_EXEEDBREAK) - status_calc_bl(&sd->bl, SCB_SPEED); + status_calc_bl(&sd->bl, SCB_SPEED); } else { ud->skilltimer = INVALID_TIMER; skill->castend_pos(ud->skilltimer,tick,src->id,0); diff --git a/src/map/vending.c b/src/map/vending.c index c8ac814db..7e9393bf2 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -60,7 +60,7 @@ void vending_vendinglistreq(struct map_session_data* sd, unsigned int id) { // GM is not allowed to trade clif->message(sd->fd, msg_txt(246)); return; - } + } sd->vended_id = vsd->vender_id; // register vending uid diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 46d654e0d..b8f21407e 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -198,7 +198,7 @@ HPExport void server_preinit (void) { libconfig = GET_SYMBOL("libconfig"); - addArg("--db2sql",false,db2sql_arg,NULL); + addArg("--db2sql",false,db2sql_arg,NULL); } HPExport void plugin_init (void) { addCPCommand("server:tools:db2sql",db2sql); diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c index 32b30d69a..0f1690f4b 100644 --- a/src/plugins/dbghelpplug.c +++ b/src/plugins/dbghelpplug.c @@ -17,7 +17,7 @@ HPExport struct hplugin_info pinfo = { #ifdef _WIN32 ///////////////////////////////////////////////////////////////////// -// Include files +// Include files // #include @@ -32,13 +32,12 @@ HPExport struct hplugin_info pinfo = { #include ///////////////////////////////////////////////////////////////////// -// Types from Cvconst.h (DIA SDK) +// Types from Cvconst.h (DIA SDK) // #ifdef _NO_CVCONST_H -typedef enum _BasicType -{ +typedef enum _BasicType { btNoType = 0, btVoid = 1, btChar = 2, @@ -66,7 +65,7 @@ typedef enum _UdtKind UdtUnion } UdtKind; /* -typedef enum _SymTag { +typedef enum _SymTag { SymTagNull = 0, SymTagExe = 1, SymTagCompiland = 2, @@ -235,7 +234,7 @@ SYMGETMODULEBASE SymGetModuleBase_ = NULL; ///////////////////////////////////////////////////////////////////// // Code -/// Writes the minidump to file. The callback function will at the +/// Writes the minidump to file. The callback function will at the /// same time write the list of modules to the log file. /// /// @param file Filename of the minidump @@ -324,7 +323,7 @@ Dhp__PrintModuleInfoCallback( return TRUE; } -/// Prints details about the current process, platform and exception +/// Prints details about the current process, platform and exception /// information to the log file. /// /// @param exception Exception info @@ -418,7 +417,7 @@ Dhp__PrintProcessInfo( { fprintf(log_file, "eip=%08x esp=%08x ebp=%08x iopl=%1x %s %s %s %s %s %s %s %s %s %s\n", - context->Eip, context->Esp, context->Ebp, + context->Eip, context->Esp, context->Ebp, (context->EFlags >> 12) & 3, // IOPL level value context->EFlags & 0x00100000 ? "vip" : " ", // VIP (virtual interrupt pending) context->EFlags & 0x00080000 ? "vif" : " ", // VIF (virtual interrupt flag) @@ -487,7 +486,7 @@ Dhp__PrintTypeName( switch( symtag ) { case SymTagEnum: - { + { WCHAR* pwszTypeName; if( SymGetTypeInfo_(hProcess, modBase, typeIndex, TI_GET_SYMNAME, &pwszTypeName) ) @@ -1007,7 +1006,7 @@ Dhp__PrintDataValue( fprintf(log_file, "0x%p", *(void**)pVariable); if( SymGetTypeInfo_(hProcess, modBase, typeIndex, TI_GET_TYPE, &childTypeIndex) && - SymGetTypeInfo_(hProcess, modBase, childTypeIndex, TI_GET_SYMTAG, &childSymtag) && + SymGetTypeInfo_(hProcess, modBase, childTypeIndex, TI_GET_SYMTAG, &childSymtag) && childSymtag != SymTagPointerType ) { DWORD childBasetype; @@ -1277,9 +1276,9 @@ Dhp__PrintSymbolInfo( assert( pSymInfo != NULL ); assert( pInterData != NULL ); - switch( pSymInfo->Tag ) + switch( pSymInfo->Tag ) { - case SymTagData: Dhp__PrintDataInfo( pSymInfo, pInterData ); break; + case SymTagData: Dhp__PrintDataInfo( pSymInfo, pInterData ); break; default: /*fprintf(pInterData->log_file, "", pSymInfo->Tag);*/ break; } } diff --git a/src/test/test_spinlock.c b/src/test/test_spinlock.c index 878ee8bab..0c0e3e2ae 100644 --- a/src/test/test_spinlock.c +++ b/src/test/test_spinlock.c @@ -8,13 +8,13 @@ #include #include -// -// Simple test for the spinlock implementation to see if it works properly.. +// +// Simple test for the spinlock implementation to see if it works properly.. // -#define THRC 32 //thread Count +#define THRC 32 //thread Count #define PERINC 100000 #define LOOPS 47 @@ -66,7 +66,7 @@ int do_init(int argc, char **argv){ while(1){ - if(InterlockedCompareExchange(&done_threads, THRC, THRC) == THRC) + if(InterlockedCompareExchange(&done_threads, THRC, THRC) == THRC) break; rathread_yield(); @@ -86,7 +86,7 @@ int do_init(int argc, char **argv){ if(ok != LOOPS){ - ShowFatalError("Test failed.\n"); + ShowFatalError("Test failed.\n"); exit(1); }else{ ShowStatus("Test passed.\n"); @@ -103,11 +103,12 @@ void do_abort(){ void set_server_type(){ - SERVER_TYPE = ATHENA_SERVER_NONE; + SERVER_TYPE = SERVER_TYPE_UNKNOWN; }//end: set_server_type() -void do_final(){ +int do_final(){ + return EXIT_SUCCESS; }//end: do_final() -- cgit v1.2.3-70-g09d2 From 0a4975ed611db7d1bcfe501008085e420e743128 Mon Sep 17 00:00:00 2001 From: Shido Date: Fri, 30 May 2014 10:37:54 +0800 Subject: Fixed typos inside src/ --- src/char/char.c | 50 ++++++------- src/char/int_auction.c | 2 +- src/char/int_guild.c | 10 +-- src/char/int_homun.c | 4 +- src/char/int_party.c | 4 +- src/char/int_quest.c | 2 +- src/char/inter.c | 18 ++--- src/char/pincode.c | 2 +- src/common/HPM.c | 4 +- src/common/HPM.h | 2 +- src/common/atomic.h | 6 +- src/common/conf.h | 2 +- src/common/db.c | 14 ++-- src/common/db.h | 6 +- src/common/ers.c | 8 +- src/common/ers.h | 14 ++-- src/common/grfio.c | 10 +-- src/common/malloc.c | 4 +- src/common/mapindex.c | 2 +- src/common/mmo.h | 4 +- src/common/mutex.h | 16 ++-- src/common/showmsg.c | 6 +- src/common/showmsg.h | 4 +- src/common/socket.c | 14 ++-- src/common/spinlock.h | 2 +- src/common/sql.c | 10 +-- src/common/sql.h | 6 +- src/common/strlib.c | 32 ++++---- src/common/strlib.h | 10 +-- src/common/sysinfo.c | 4 +- src/common/thread.c | 14 ++-- src/common/thread.h | 16 ++-- src/common/timer.c | 6 +- src/common/utils.c | 6 +- src/config/core.h | 4 +- src/config/secure.h | 2 +- src/login/account.h | 2 +- src/login/account_sql.c | 2 +- src/login/login.c | 16 ++-- src/login/login.h | 2 +- src/login/loginlog_sql.c | 2 +- src/map/atcommand.c | 66 ++++++++--------- src/map/battle.c | 66 ++++++++--------- src/map/battle.h | 6 +- src/map/battleground.c | 4 +- src/map/chat.c | 2 +- src/map/chrif.c | 22 +++--- src/map/chrif.h | 2 +- src/map/clif.c | 96 ++++++++++++------------ src/map/clif.h | 2 +- src/map/elemental.c | 4 +- src/map/guild.c | 8 +- src/map/homunculus.c | 4 +- src/map/intif.c | 10 +-- src/map/itemdb.c | 2 +- src/map/map.c | 26 +++---- src/map/map.h | 8 +- src/map/mob.c | 24 +++--- src/map/mob.h | 6 +- src/map/npc.c | 10 +-- src/map/npc_chat.c | 12 +-- src/map/party.c | 4 +- src/map/script.c | 2 +- src/map/skill.c | 188 ++++++++++++++++++++++++----------------------- src/map/status.c | 24 +++--- src/map/status.h | 2 +- src/map/storage.c | 10 +-- src/map/trade.c | 12 +-- src/map/unit.c | 22 +++--- src/map/vending.h | 4 +- 70 files changed, 497 insertions(+), 495 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/char/char.c b/src/char/char.c index 57031e3ee..fe17fd14f 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -118,7 +118,7 @@ bool char_new = true; int char_new_display = 0; bool name_ignoring_case = false; // Allow or not identical name for characters but with a different case by [Yor] -int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor] +int char_name_option = 0; // Option to know which letters/symbols are authorized in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor] char unknown_char_name[NAME_LENGTH] = "Unknown"; // Name to use when the requested name cannot be determined #define TRIM_CHARS "\255\xA0\032\t\x0A\x0D " //The following characters are trimmed regardless because they cause confusion and problems on the servers. [Skotlex] char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) in a character name. by [Yor] @@ -126,8 +126,8 @@ char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) i int char_del_level = 0; //From which level u can delete character [Lupus] int char_del_delay = 86400; -int log_char = 1; // loggin char or not [devil] -int log_inter = 1; // loggin inter or not [devil] +int log_char = 1; // logging char or not [devil] +int log_inter = 1; // logging inter or not [devil] int char_aegis_delete = 0; // Verify if char is in guild/party or char and reacts as Aegis does (doesn't allow deletion), see char_delete2_req for more information @@ -1387,7 +1387,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything if( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) strcat(t_msg, " accdata"); - if (save_log) ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfuly! + if (save_log) ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfully! SQL->StmtFree(stmt); StrBuf->Destroy(&buf); @@ -1413,7 +1413,7 @@ int mmo_char_sql_init(void) //and send the loginserver the new state.... // Force all users offline in sql when starting char-server - // (useful when servers crashs and don't clean the database) + // (useful when servers crashes and don't clean the database) set_all_offline_sql(); return 0; @@ -1468,7 +1468,7 @@ bool char_slotchange(struct char_session_data *sd, int fd, unsigned short from, } //----------------------------------- -// Function to change chararcter's names +// Function to change character's names //----------------------------------- int rename_char_sql(struct char_session_data *sd, int char_id) { @@ -1540,9 +1540,9 @@ int check_char_name(char * name, char * esc_name) if( strcmpi(name, wisp_server_name) == 0 ) return -1; // nick reserved for internal server messages - // Check Authorised letters/symbols in the name of the character + // Check Authorized letters/symbols in the name of the character if( char_name_option == 1 ) - { // only letters/symbols in char_name_letters are authorised + { // only letters/symbols in char_name_letters are authorized for( i = 0; i < NAME_LENGTH && name[i]; i++ ) if( strchr(char_name_letters, name[i]) == NULL ) return -2; @@ -1576,7 +1576,7 @@ int check_char_name(char * name, char * esc_name) * -1: 'Charname already exists' * -2: 'Char creation denied'/ Unknown error * -3: 'You are underaged' - * -4: 'You are not elegible to open the Character Slot.' + * -4: 'You are not eligible to open the Character Slot.' * -5: 'Symbols in Character Names are forbidden' * char_id: Success **/ @@ -2202,7 +2202,7 @@ void mapif_server_reset(int id); void loginif_reset(void) { int id; - // TODO kick everyone out and reset everything or wait for connect and try to reaquire locks [FlavioJS] + // TODO kick everyone out and reset everything or wait for connect and try to reacquire locks [FlavioJS] for( id = 0; id < ARRAYLENGTH(server); ++id ) mapif_server_reset(id); flush_fifos(); @@ -2286,7 +2286,7 @@ int parse_fromlogin(int fd) { switch( command ) { - // acknowledgement of connect-to-loginserver request + // acknowledgment of connect-to-loginserver request case 0x2711: if (RFIFOREST(fd) < 3) return 0; @@ -2306,7 +2306,7 @@ int parse_fromlogin(int fd) { RFIFOSKIP(fd,3); break; - // acknowledgement of account authentication request + // acknowledgment of account authentication request case 0x2713: if (RFIFOREST(fd) < 33) return 0; @@ -2526,7 +2526,7 @@ int parse_fromlogin(int fd) { unsigned char buf[11]; WBUFW(buf,0) = 0x2b14; WBUFL(buf,2) = RFIFOL(fd,2); - WBUFB(buf,6) = RFIFOB(fd,6); // 0: change of statut, 1: ban + WBUFB(buf,6) = RFIFOB(fd,6); // 0: change of status, 1: ban WBUFL(buf,7) = RFIFOL(fd,7); // status or final date of a banishment mapif_sendall(buf, 11); } @@ -3161,7 +3161,7 @@ int parse_frommap(int fd) memcpy(&char_dat, RFIFOP(fd,13), sizeof(struct mmo_charstatus)); mmo_char_tosql(cid, &char_dat); } else { //This may be valid on char-server reconnection, when re-sending characters that already logged off. - ShowError("parse_from_map (save-char): Received data for non-existant/offline character (%d:%d).\n", aid, cid); + ShowError("parse_from_map (save-char): Received data for non-existing/offline character (%d:%d).\n", aid, cid); set_char_online(id, cid, aid); } @@ -4174,7 +4174,7 @@ int parse_char(int fd) ShowInfo("request connect - account_id:%d/login_id1:%d/login_id2:%d\n", account_id, login_id1, login_id2); if (sd) { - //Received again auth packet for already authentified account?? Discard it. + //Received again auth packet for already authenticated account?? Discard it. //TODO: Perhaps log this as a hack attempt? //TODO: and perhaps send back a reply? break; @@ -4201,7 +4201,7 @@ int parse_char(int fd) break; } - // search authentification + // search authentication node = (struct auth_node*)idb_get(auth_db, account_id); if( node != NULL && node->account_id == account_id && @@ -4232,7 +4232,7 @@ int parse_char(int fd) {// authentication not found (coming from login server) if (login_fd > 0) { // don't send request if no login-server WFIFOHEAD(login_fd,23); - WFIFOW(login_fd,0) = 0x2712; // ask login-server to authentify an account + WFIFOW(login_fd,0) = 0x2712; // ask login-server to authenticate an account WFIFOL(login_fd,2) = sd->account_id; WFIFOL(login_fd,6) = sd->login_id1; WFIFOL(login_fd,10) = sd->login_id2; @@ -4317,7 +4317,7 @@ int parse_char(int fd) break; } - /* set char as online prior to loading its data so 3rd party applications will realise the sql data is not reliable */ + /* set char as online prior to loading its data so 3rd party applications will realize the sql data is not reliable */ set_char_online(-2,char_id,sd->account_id); if( !mmo_char_fromsql(char_id, &char_dat, true) ) { /* failed? set it back offline */ set_char_offline(char_id, sd->account_id); @@ -4459,13 +4459,13 @@ int parse_char(int fd) WFIFOW(fd,0) = 0x6e; /* Others I found [Ind] */ /* 0x02 = Symbols in Character Names are forbidden */ - /* 0x03 = You are not elegible to open the Character Slot. */ + /* 0x03 = You are not eligible to open the Character Slot. */ /* 0x0B = This service is only available for premium users. */ switch (result) { case -1: WFIFOB(fd,2) = 0x00; break; // 'Charname already exists' case -2: WFIFOB(fd,2) = 0xFF; break; // 'Char creation denied' case -3: WFIFOB(fd,2) = 0x01; break; // 'You are underaged' - case -4: WFIFOB(fd,2) = 0x03; break; // 'You are not elegible to open the Character Slot.' + case -4: WFIFOB(fd,2) = 0x03; break; // 'You are not eligible to open the Character Slot.' case -5: WFIFOB(fd,2) = 0x02; break; // 'Symbols in Character Names are forbidden' default: @@ -4641,7 +4641,7 @@ int parse_char(int fd) //Confirm change name. // 0x28f .L case 0x28f: - // 0: Sucessfull + // 0: Successful // 1: This character's name has already been changed. You cannot change a character's name more than once. // 2: User information is not correct. // 3: You have failed to change this character's name. @@ -4746,7 +4746,7 @@ int parse_char(int fd) RFIFOSKIP(fd,60); } - return 0; // avoid processing of followup packets here + return 0; // avoid processing of follow-up packets here // checks the entered pin case 0x8b8: @@ -5006,8 +5006,8 @@ static int online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { } //---------------------------------- -// Reading Lan Support configuration -// Rewrote: Anvanced subnet check [LuzZza] +// Reading LAN Support configuration +// Rewrote: Advanced subnet check [LuzZza] //---------------------------------- int char_lan_config_read(const char *lancfgName) { @@ -5479,7 +5479,7 @@ int do_init(int argc, char **argv) { timer->add_func_list(online_data_cleanup, "online_data_cleanup"); timer->add_interval(timer->gettick() + 1000, online_data_cleanup, 0, 0, 600 * 1000); - //Cleaning the tables for NULL entrys @ startup [Sirius] + //Cleaning the tables for NULL entries @ startup [Sirius] //Chardb clean if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `account_id` = '0'", char_db) ) Sql_ShowDebug(sql_handle); diff --git a/src/char/int_auction.c b/src/char/int_auction.c index d246e9851..8cd870647 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -230,7 +230,7 @@ void inter_auctions_fromsql(void) if( auction->timestamp > now ) endtick = ((int64)(auction->timestamp - now) * 1000) + tick; else - endtick = tick + 10000; // 10 Second's to process ended auctions + endtick = tick + 10000; // 10 seconds to process ended auctions auction->auction_end_timer = timer->add(endtick, auction_end_timer, auction->auction_id, 0); idb_put(auction_db_, auction->auction_id, auction); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index ffbe48e10..a6fcfe48c 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -117,7 +117,7 @@ int inter_guild_tosql(struct guild *g,int flag) // GS_EXPULSION `guild_expulsion` (`guild_id`,`account_id`,`name`,`mes`) // GS_SKILL `guild_skill` (`guild_id`,`id`,`lv`) - // temporary storage for str convertion. They must be twice the size of the + // temporary storage for str conversion. They must be twice the size of the // original string to ensure no overflows will occur. [Skotlex] char t_info[256]; char esc_name[NAME_LENGTH*2+1]; @@ -836,7 +836,7 @@ int guild_calcinfo(struct guild *g) // Save next exp step g->next_exp = nextexp; - // Set the max number of members, Guild Extention skill - currently adds 6 to max per skill lv. + // Set the max number of members, Guild Extension skill - currently adds 6 to max per skill lv. g->max_member = 16 + guild_checkskill(g, GD_EXTENSION) * 6; if(g->max_member > MAX_GUILD) { @@ -1142,8 +1142,8 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member mapif_guild_created(fd,account_id,NULL); return 0; } - // Check Authorised letters/symbols in the name of the character - if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised + // Check Authorized letters/symbols in the name of the character + if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized for (i = 0; i < NAME_LENGTH && name[i]; i++) if (strchr(char_name_letters, name[i]) == NULL) { mapif_guild_created(fd,account_id,NULL); @@ -1212,7 +1212,7 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member // Return guild info to client int mapif_parse_GuildInfo(int fd,int guild_id) { - struct guild * g = inter_guild_fromsql(guild_id); //We use this because on start-up the info of castle-owned guilds is requied. [Skotlex] + struct guild * g = inter_guild_fromsql(guild_id); //We use this because on start-up the info of castle-owned guilds is required. [Skotlex] if(g) { if (!guild_calcinfo(g)) diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 795a6b927..acde9eb38 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -248,9 +248,9 @@ bool mapif_homunculus_rename(char *name) { int i; - // Check Authorised letters/symbols in the name of the homun + // Check Authorized letters/symbols in the name of the homun if( char_name_option == 1 ) - {// only letters/symbols in char_name_letters are authorised + {// only letters/symbols in char_name_letters are authorized for( i = 0; i < NAME_LENGTH && name[i]; i++ ) if( strchr(char_name_letters, name[i]) == NULL ) return false; diff --git a/src/char/int_party.c b/src/char/int_party.c index 5dd64a32b..a8722fbe3 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -475,8 +475,8 @@ int mapif_parse_CreateParty(int fd, char *name, int item, int item2, struct part mapif_party_created(fd,leader->account_id,leader->char_id,NULL); return 0; } - // Check Authorised letters/symbols in the name of the character - if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised + // Check Authorized letters/symbols in the name of the character + if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized for (i = 0; i < NAME_LENGTH && name[i]; i++) if (strchr(char_name_letters, name[i]) == NULL) { if( name[i] == '"' ) { /* client-special-char */ diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 61b43c57d..d4155b0d6 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -197,7 +197,7 @@ int mapif_parse_quest_save(int fd) { if (j < old_n) { // Update existing quests - // Only states and counts are changable. + // Only states and counts are changeable. ARR_FIND( 0, MAX_QUEST_OBJECTIVES, k, new_qd[i].count[k] != old_qd[j].count[k] ); if (k != MAX_QUEST_OBJECTIVES || new_qd[i].state != old_qd[j].state) success &= mapif_quest_update(char_id, new_qd[i]); diff --git a/src/char/inter.c b/src/char/inter.c index 972407ef3..c2d8de37a 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -589,7 +589,7 @@ void mapif_parse_accinfo(int fd) { inter_msg_to_fd(fd, u_fd, aid, "No matches were found for your criteria, '%s'",query); } else { Sql_ShowDebug(sql_handle); - inter_msg_to_fd(fd, u_fd, aid, "An error occured, bother your admin about it."); + inter_msg_to_fd(fd, u_fd, aid, "An error occurred, bother your admin about it."); } SQL->FreeResult(sql_handle); return; @@ -658,7 +658,7 @@ void mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int acc if (SQL->NumRows(sql_handle) == 0) { inter_msg_to_fd(map_fd, u_fd, u_aid, "This account doesn't have characters."); } else { - inter_msg_to_fd(map_fd, u_fd, u_aid, "An error occured, bother your admin about it."); + inter_msg_to_fd(map_fd, u_fd, u_aid, "An error occurred, bother your admin about it."); Sql_ShowDebug(sql_handle); } } else { @@ -1165,7 +1165,7 @@ int check_ttl_wisdata(void) struct WisData *wd = (struct WisData*)idb_get(wis_db, wis_dellist[i]); ShowWarning("inter: wis data id=%d time out : from %s to %s\n", wd->id, wd->src, wd->dst); // removed. not send information after a timeout. Just no answer for the player - //mapif_wis_end(wd, 1); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + //mapif_wis_end(wd, 1); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target idb_remove(wis_db, wd->id); } } while(wis_delnum >= WISDELLIST_MAX); @@ -1199,7 +1199,7 @@ int mapif_parse_WisRequest(int fd) if (RFIFOW(fd,2)-52 >= sizeof(wd->msg)) { ShowWarning("inter: Wis message size too long.\n"); return 0; - } else if (RFIFOW(fd,2)-52 <= 0) { // normaly, impossible, but who knows... + } else if (RFIFOW(fd,2)-52 <= 0) { // normally, impossible, but who knows... ShowError("inter: Wis message doesn't exist.\n"); return 0; } @@ -1216,7 +1216,7 @@ int mapif_parse_WisRequest(int fd) unsigned char buf[27]; WBUFW(buf, 0) = 0x3802; memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH); - WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + WBUFB(buf,26) = 1; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target mapif_send(fd, buf, 27); } else @@ -1231,7 +1231,7 @@ int mapif_parse_WisRequest(int fd) uint8 buf[27]; WBUFW(buf, 0) = 0x3802; memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH); - WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + WBUFB(buf,26) = 1; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target mapif_send(fd, buf, 27); } else @@ -1272,7 +1272,7 @@ int mapif_parse_WisReply(int fd) return 0; // This wisp was probably suppress before, because it was timeout of because of target was found on another map-server if ((--wd->count) <= 0 || flag != 1) { - mapif_wis_end(wd, flag); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + mapif_wis_end(wd, flag); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target idb_remove(wis_db, id); } @@ -1376,8 +1376,8 @@ int mapif_parse_NameChangeRequest(int fd) type = RFIFOB(fd,10); name = (char*)RFIFOP(fd,11); - // Check Authorised letters/symbols in the name - if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised + // Check Authorized letters/symbols in the name + if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized for (i = 0; i < NAME_LENGTH && name[i]; i++) if (strchr(char_name_letters, name[i]) == NULL) { mapif_namechange_ack(fd, account_id, char_id, type, 0, name); diff --git a/src/char/pincode.c b/src/char/pincode.c index 59182f12d..18ad0ffc8 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -33,7 +33,7 @@ void pincode_handle ( int fd, struct char_session_data* sd ) { } if( strlen(sd->pincode) == 4 ){ - if( *pincode->changetime && time(NULL) > (sd->pincode_change+*pincode->changetime) ){ // User hasnt changed his PIN code for a long time + if( *pincode->changetime && time(NULL) > (sd->pincode_change+*pincode->changetime) ){ // User hasn't changed his PIN code for a long time pincode->sendstate( fd, sd, PINCODE_EXPIRED ); } else { // Ask user for his PIN code pincode->sendstate( fd, sd, PINCODE_ASK ); diff --git a/src/common/HPM.c b/src/common/HPM.c index d33a4c1aa..f39954175 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -410,7 +410,7 @@ void hplugins_addToHPData(enum HPluginDataTypes type, unsigned int pluginID, voi *(action.hdatac) += 1; RECREATE(*(action.HPDataSRCPtr),struct HPluginData *,*(action.hdatac)); - /* RECREATE modified the addresss */ + /* RECREATE modified the address */ HPDataSRC = *(action.HPDataSRCPtr); HPDataSRC[*(action.hdatac) - 1] = HPData; } @@ -578,7 +578,7 @@ void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char char* HPM_astrdup(const char *p, const char *file, int line, const char *func) { return iMalloc->astrdup(p,HPM_file2ptr(file),line,func); } -/* todo: add ability for tracking using pID for the upcoming runtime load/unload support. */ +/* TODO: add ability for tracking using pID for the upcoming runtime load/unload support. */ bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) { if( !HPM->hooking ) { ShowError("HPM:AddHook Fail! '%s' tried to hook to '%s' but HPMHooking is disabled!\n",HPM->pid2name(pID),target); diff --git a/src/common/HPM.h b/src/common/HPM.h index 9c176cfd6..5667f605a 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -24,7 +24,7 @@ #define DLL HINSTANCE #else // ! WIN32 #include - #ifdef RTLD_DEEPBIND // Certain linux ditributions require this, but it's not available everywhere + #ifdef RTLD_DEEPBIND // Certain linux distributions require this, but it's not available everywhere #define plugin_open(x) dlopen((x),RTLD_NOW|RTLD_DEEPBIND) #else // ! RTLD_DEEPBIND #define plugin_open(x) dlopen((x),RTLD_NOW) diff --git a/src/common/atomic.h b/src/common/atomic.h index 1349d0887..526811a09 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -12,7 +12,7 @@ // - Compiler // - Operating System // -// our Abstraction is fully API-Compatible to Microsofts implementation @ NT5.0+ +// our Abstraction is fully API-Compatible to Microsoft's implementation @ NT5.0+ // #include "../common/cbasetypes.h" @@ -23,7 +23,7 @@ #if _MSC_VER < 1800 #if !defined(_M_X64) -// When compiling for windows 32bit, the 8byte interlocked operations are not provided by microsoft +// When compiling for windows 32bit, the 8byte interlocked operations are not provided by Microsoft // (because they need at least i586 so its not generic enough.. ... ) forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch, int64 _cmp){ _asm{ @@ -143,7 +143,7 @@ static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){ }//end: InterlockedExchange() -#endif //endif compiler decission +#endif //endif compiler decision #endif /* _COMMON_ATOMIC_H_ */ diff --git a/src/common/conf.h b/src/common/conf.h index e5b637e47..7c275bec2 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -10,7 +10,7 @@ #include "../../3rdparty/libconfig/libconfig.h" /** - * The libconfig interface -- specially for plugins, but we enforce it throughought the core to be consistent + * The libconfig interface -- specially for plugins, but we enforce it throughout the core to be consistent **/ struct libconfig_interface { int (*read) (config_t *config, FILE *stream); diff --git a/src/common/db.c b/src/common/db.c index bbeaf0b61..11ac06c93 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -3,7 +3,7 @@ * For more information, see LICENCE in the main folder * * This file is separated in five sections: - * (1) Private typedefs, enums, structures, defines and gblobal variables + * (1) Private typedefs, enums, structures, defines and global variables * (2) Private functions * (3) Protected functions used internally * (4) Protected functions used in the interface of the database @@ -89,15 +89,15 @@ * DBNColor - Enumeration of colors of the nodes. * * DBNode - Structure of a node in RED-BLACK trees. * * struct db_free - Structure that holds a deleted node to be freed. * - * DBMap_impl - Struture of the database. * + * DBMap_impl - Structure of the database. * * stats - Statistics about the database system. * \*****************************************************************************/ /** * If defined statistics about database nodes, database creating/destruction - * and function usage are keept and displayed when finalizing the database + * and function usage are kept and displayed when finalizing the database * system. - * WARNING: This adds overhead to every database operation (not shure how much). + * WARNING: This adds overhead to every database operation (not sure how much). * @private * @see #DBStats * @see #stats @@ -511,7 +511,7 @@ static void db_rebalance_erase(DBNode node, DBNode *root) } // Remove the node from the tree - if (y != node) { // both childs existed + if (y != node) { // both child existed // put the left of 'node' in the left of 'y' node->left->parent = y; y->left = node->left; @@ -2066,7 +2066,7 @@ static int db_obj_vforeach(DBMap* self, DBApply func, va_list args) * Apply func to every entry in the database. * Returns the sum of values returned by func. * @param self Interface of the database - * @param func Function to be applyed + * @param func Function to be applied * @param ... Extra arguments for func * @return Sum of the values returned by func * @protected @@ -2345,7 +2345,7 @@ static DBOptions db_obj_options(DBMap* self) * db_default_cmp - Get the default comparator for a type of database. * db_default_hash - Get the default hasher for a type of database. * db_default_release - Get the default releaser for a type of database with the specified options. - * db_custom_release - Get a releaser that behaves a certains way. + * db_custom_release - Get a releaser that behaves a certain way. * db_alloc - Allocate a new database. * db_i2key - Manual cast from 'int' to 'DBKey'. * db_ui2key - Manual cast from 'unsigned int' to 'DBKey'. diff --git a/src/common/db.h b/src/common/db.h index f5714ceaf..4f8d6be79 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -106,7 +106,7 @@ typedef enum DBType { } DBType; /** - * Bitfield of options that define the behaviour of the database. + * Bitfield of options that define the behavior of the database. * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the * types of databases. * @param DB_OPT_BASE Base options: does not duplicate keys, releases nothing @@ -116,7 +116,7 @@ typedef enum DBType { * @param DB_OPT_RELEASE_KEY Releases the key. * @param DB_OPT_RELEASE_DATA Releases the data whenever an entry is removed * from the database. - * WARNING: for funtions that return the data (like DBMap::remove), + * WARNING: for functions that return the data (like DBMap::remove), * a dangling pointer will be returned. * @param DB_OPT_RELEASE_BOTH Releases both key and data. * @param DB_OPT_ALLOW_NULL_KEY Allow NULL keys in the database. @@ -365,7 +365,7 @@ struct DBIterator }; /** - * Public interface of a database. Only contains funtions. + * Public interface of a database. Only contains functions. * All the functions take the interface as the first argument. * @public * @see #db_alloc(const char*,int,DBType,DBOptions,unsigned short) diff --git a/src/common/ers.c b/src/common/ers.c index 39e05a14c..0842d9e15 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -13,16 +13,16 @@ * If it has reusable entries (freed entry), it uses one. * * So no assumption should be made about the data of the entry. * * Entries should be freed in the manager they where allocated from. * - * Failure to do so can lead to unexpected behaviours. * + * Failure to do so can lead to unexpected behaviors. * * * *

Advantages:

* * - The same manager is used for entries of the same size. * * So entries freed in one instance of the manager can be used by other * * instances of the manager. * * - Much less memory allocation/deallocation - program will be faster. * - * - Avoids memory fragmentaion - program will run better for longer. * + * - Avoids memory fragmentation - program will run better for longer. * * * - *

Disavantages:

* + *

Disadvantages:

* * - Unused entries are almost inevitable - memory being wasted. * * - A manager will only auto-destroy when all of its instances are * * destroyed so memory will usually only be recovered near the end. * @@ -104,7 +104,7 @@ struct ers_instance_t { // Interface to ERS struct eri VTable; - // Name, used for debbuging purpouses + // Name, used for debugging purposes char *Name; // Misc options diff --git a/src/common/ers.h b/src/common/ers.h index 7eceaf87a..f32680339 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -13,16 +13,16 @@ * If it has reusable entries (freed entry), it uses one. * * So no assumption should be made about the data of the entry. * * Entries should be freed in the manager they where allocated from. * - * Failure to do so can lead to unexpected behaviours. * + * Failure to do so can lead to unexpected behaviors. * * * *

Advantages:

* * - The same manager is used for entries of the same size. * * So entries freed in one instance of the manager can be used by other * * instances of the manager. * * - Much less memory allocation/deallocation - program will be faster. * - * - Avoids memory fragmentaion - program will run better for longer. * + * - Avoids memory fragmentation - program will run better for longer. * * * - *

Disavantages:

* + *

Disadvantages:

* * - Unused entries are almost inevitable - memory being wasted. * * - A manager will only auto-destroy when all of its instances are * * destroyed so memory will usually only be recovered near the end. * @@ -49,7 +49,7 @@ * ERS - Entry manager. * * ers_new - Allocate an instance of an entry manager. * * ers_report - Print a report about the current state. * - * ers_final - Clears the remainder of the manangers. * + * ers_final - Clears the remainder of the managers. * \*****************************************************************************/ /** @@ -64,7 +64,7 @@ * By default it aligns to one byte, using the "natural order" of the entries. * This should NEVER be set to zero or less. * If greater than one, some memory can be wasted. This should never be needed - * but is here just in case some aligment issues arise. + * but is here just in case some alignment issues arise. */ #ifndef ERS_ALIGNED # define ERS_ALIGNED 1 @@ -102,7 +102,7 @@ typedef struct eri { /** * Free an entry allocated from this manager. * WARNING: Does not check if the entry was allocated by this manager. - * Freeing such an entry can lead to unexpected behaviour. + * Freeing such an entry can lead to unexpected behavior. * @param self Interface of the entry manager * @param entry Entry to be freed */ @@ -170,7 +170,7 @@ ERS ers_new(uint32 size, char *name, enum ERSOptions options); void ers_report(void); /** - * Clears the remainder of the manangers + * Clears the remainder of the managers **/ void ers_final(void); #endif /* DISABLE_ERS / not DISABLE_ERS */ diff --git a/src/common/grfio.c b/src/common/grfio.c index 1111fb3f3..f592812f6 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -418,7 +418,7 @@ void* grfio_reads(const char* fname, int* size) declen = (int)ftell(in); fseek(in,0,SEEK_SET); buf2 = (unsigned char *)aMalloc(declen+1); // +1 for resnametable zero-termination - if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occured in fread grfio_reads, fname=%s \n",fname); + if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occurred in fread grfio_reads, fname=%s \n",fname); fclose(in); if( size ) @@ -440,7 +440,7 @@ void* grfio_reads(const char* fname, int* size) int fsize = entry->srclen_aligned; unsigned char *buf = (unsigned char *)aMalloc(fsize); fseek(in, entry->srcpos, 0); - if(fread(buf, 1, fsize, in) != (size_t)fsize) ShowError("An error occured in fread in grfio_reads, grfname=%s\n",grfname); + if(fread(buf, 1, fsize, in) != (size_t)fsize) ShowError("An error occurred in fread in grfio_reads, grfname=%s\n",grfname); fclose(in); buf2 = (unsigned char *)aMalloc(entry->declen+1); // +1 for resnametable zero-termination @@ -583,7 +583,7 @@ static int grfio_entryread(const char* grfname, int gentry) unsigned char *rBuf; uLongf rSize, eSize; - if(fread(eheader,1,8,fp) != 8) ShowError("An error occured in fread while reading eheader buffer\n"); + if(fread(eheader,1,8,fp) != 8) ShowError("An error occurred in fread while reading header buffer\n"); rSize = getlong(eheader); // Read Size eSize = getlong(eheader+4); // Extend Size @@ -595,7 +595,7 @@ static int grfio_entryread(const char* grfname, int gentry) rBuf = (unsigned char *)aMalloc(rSize); // Get a Read Size grf_filelist = (unsigned char *)aMalloc(eSize); // Get a Extend Size - if(fread(rBuf,1,rSize,fp) != rSize) ShowError("An error occured in fread \n"); + if(fread(rBuf,1,rSize,fp) != rSize) ShowError("An error occurred in fread \n"); fclose(fp); decode_zip(grf_filelist, &eSize, rBuf, rSize); // Decode function aFree(rBuf); @@ -827,7 +827,7 @@ void grfio_init(const char* fname) if( grf_num == 0 ) ShowInfo("No GRF loaded, using default data directory\n"); - // Unneccessary area release of filelist + // Unnecessary area release of filelist filelist_compact(); // Resource check diff --git a/src/common/malloc.c b/src/common/malloc.c index 74303fa92..83d1d6656 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -776,7 +776,7 @@ static void memmgr_init (void) { #ifdef LOG_MEMMGR sprintf(memmer_logfile, "log/%s.leaks", SERVER_NAME); - ShowStatus("Memory manager initialised: "CL_WHITE"%s"CL_RESET"\n", memmer_logfile); + ShowStatus("Memory manager initialized: "CL_WHITE"%s"CL_RESET"\n", memmer_logfile); memset(hash_unfill, 0, sizeof(hash_unfill)); #endif /* LOG_MEMMGR */ } @@ -784,7 +784,7 @@ static void memmgr_init (void) /*====================================== -* Initialise +* Initialize *-------------------------------------- */ diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 5c69c7063..644f2f619 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -70,7 +70,7 @@ const char* mapindex_getmapname_ext(const char* string, char* output) { } /// Adds a map to the specified index -/// Returns 1 if successful, 0 oherwise +/// Returns 1 if successful, 0 otherwise int mapindex_addmap(int index, const char* name) { char map_name[MAP_NAME_LENGTH]; diff --git a/src/common/mmo.h b/src/common/mmo.h index 4ac7ee793..6ef5b50f5 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -26,7 +26,7 @@ // 20071106 - 2007-11-06aSakexe+ - 0x78, 0x7c, 0x22c // 20080102 - 2008-01-02aSakexe+ - 0x2ec, 0x2ed , 0x2ee // 20081126 - 2008-11-26aSakexe+ - 0x1a2 -// 20090408 - 2009-04-08aSakexe+ - 0x44a (dont use as it overlaps with RE client packets) +// 20090408 - 2009-04-08aSakexe+ - 0x44a (don't use as it overlaps with RE client packets) // 20080827 - 2008-08-27aRagexeRE+ - First RE Client // 20081217 - 2008-12-17aRagexeRE+ - 0x6d (Note: This one still use old Char Info Packet Structure) // 20081218 - 2008-12-17bRagexeRE+ - 0x6d (Note: From this one client use new Char Info Packet Structure) @@ -120,7 +120,7 @@ #define MAX_GUILD_STORAGE 600 #define MAX_PARTY 12 #define MAX_GUILD (16+10*6) // Increased max guild members +6 per 1 extension levels [Lupus] -#define MAX_GUILDPOSITION 20 // Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW] +#define MAX_GUILDPOSITION 20 // Increased max guild positions to accommodate for all members [Valaris] (removed) [PoW] #define MAX_GUILDEXPULSION 32 #define MAX_GUILDALLIANCE 16 #define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan] diff --git a/src/common/mutex.h b/src/common/mutex.h index f78e31841..ce13a28b7 100644 --- a/src/common/mutex.h +++ b/src/common/mutex.h @@ -57,23 +57,23 @@ racond racond_create(); /** * Destroy a Condition variable * - * @param c - the condition varaible to destroy + * @param c - the condition variable to destroy */ void racond_destroy( racond c ); /** - * Waits Until state is signalled + * Waits Until state is signaled * - * @param c - the condition var to wait for signalled state - * @param m - the mutex used for syncronization + * @param c - the condition var to wait for signaled state + * @param m - the mutex used for synchronization * @param timeout_ticks - timeout in ticks ( -1 = INFINITE ) */ void racond_wait( racond c, ramutex m, sysint timeout_ticks); /** - * Sets the given condition var to signalled state + * Sets the given condition var to signaled state * - * @param c - condition var to set in signalled state. + * @param c - condition var to set in signaled state. * * @note: * Only one waiter gets notified. @@ -81,8 +81,8 @@ void racond_wait( racond c, ramutex m, sysint timeout_ticks); void racond_signal( racond c ); /** - * Sets notifys all waiting threads thats signalled. - * @param c - condition var to set in signalled state + * Sets notifies all waiting threads thats signaled. + * @param c - condition var to set in signaled state * * @note: * All Waiters getting notified. diff --git a/src/common/showmsg.c b/src/common/showmsg.c index 2a8e2d5f8..ece10c1a8 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -88,7 +88,7 @@ int console_msg_log = 0;//[Ind] msg error logging // XXX adapted from eApp (comments are left untouched) [flaviojs] /////////////////////////////////////////////////////////////////////////////// -// ansi compatible printf with control sequence parser for windows +// ANSI compatible printf with control sequence parser for windows // fast hack, handle with care, not everything implemented // // \033[#;...;#m - Set Graphics Rendition (SGR) @@ -147,7 +147,7 @@ int console_msg_log = 0;//[Ind] msg error logging // // \033[u - Restore cursor position (RCP) // Restores the cursor position saved with the (SCP) sequence \033[s. -// (addition, restore to 0,0 if nothinh was saved before) +// (addition, restore to 0,0 if nothing was saved before) // // \033[#J - Erase Display (ED) @@ -282,7 +282,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) } //case '2': // not existing //case '3': // blinking (not implemented) - //case '4': // unterline (not implemented) + //case '4': // underline (not implemented) //case '6': // not existing //case '8': // concealed (not implemented) //case '9': // not existing diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 5b32f39ae..8008acf5a 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -72,9 +72,9 @@ #define CL_XXBL "\033[0;44m" // default on blue #define CL_PASS "\033[0;32;42m" // green on green -#define CL_SPACE " " // space aquivalent of the print messages +#define CL_SPACE " " // space equivalent of the print messages -extern int stdout_with_ansisequence; //If the color ansi sequences are to be used. [flaviojs] +extern int stdout_with_ansisequence; //If the color ANSI sequences are to be used. [flaviojs] extern int msg_silent; //Specifies how silent the console is. [Skotlex] extern int console_msg_log; //Specifies what error messages to log. [Ind] extern char timestamp_format[20]; //For displaying Timestamps [Skotlex] diff --git a/src/common/socket.c b/src/common/socket.c index ac6be68fe..58c2d5bf9 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -360,7 +360,7 @@ int recv_to_fifo(int fd) len = sRecv(fd, (char *) session[fd]->rdata + session[fd]->rdata_size, (int)RFIFOSPACE(fd), 0); if( len == SOCKET_ERROR ) - {//An exception has occured + {//An exception has occurred if( sErrno != S_EWOULDBLOCK ) { //ShowDebug("recv_to_fifo: %s, closing connection #%d\n", error_msg(), fd); set_eof(fd); @@ -400,7 +400,7 @@ int send_from_fifo(int fd) len = sSend(fd, (const char *) session[fd]->wdata, (int)session[fd]->wdata_size, MSG_NOSIGNAL); if( len == SOCKET_ERROR ) - {//An exception has occured + {//An exception has occurred if( sErrno != S_EWOULDBLOCK ) { //ShowDebug("send_from_fifo: %s, ending connection #%d\n", error_msg(), fd); #ifdef SHOW_SERVER_STATS @@ -845,7 +845,7 @@ int do_sockets(int next) session[i]->func_send(i); if(session[i]->flag.eof) //func_send can't free a session, this is safe. - { //Finally, even if there is no data to parse, connections signalled eof should be closed, so we call parse_func [Skotlex] + { //Finally, even if there is no data to parse, connections signaled eof should be closed, so we call parse_func [Skotlex] session[i]->func_parse(i); //This should close the session immediately. } } @@ -1234,7 +1234,7 @@ void socket_final(void) if(session[i]) sockt->close(i); - // session[0] ‚̃_ƒ~[ƒf[ƒ^‚ðíœ + // session[0] aFree(session[0]->rdata); aFree(session[0]->wdata); aFree(session[0]); @@ -1364,7 +1364,7 @@ void socket_init(void) } } #elif defined(HAVE_SETRLIMIT) && !defined(CYGWIN) - // NOTE: getrlimit and setrlimit have bogus behaviour in cygwin. + // NOTE: getrlimit and setrlimit have bogus behavior in cygwin. // "Number of fds is virtually unlimited in cygwin" (sys/param.h) {// set socket limit to FD_SETSIZE struct rlimit rlp; @@ -1405,7 +1405,7 @@ void socket_init(void) socket_config_read(SOCKET_CONF_FILENAME); - // initialise last send-receive tick + // initialize last send-receive tick sockt->last_tick = time(NULL); // session[0] is now currently used for disconnected sessions of the map server, and as such, @@ -1458,7 +1458,7 @@ uint32 str2ip(const char* ip_str) } // Reorders bytes from network to little endian (Windows). -// Neccessary for sending port numbers to the RO client until Gravity notices that they forgot ntohs() calls. +// Necessary for sending port numbers to the RO client until Gravity notices that they forgot ntohs() calls. uint16 ntows(uint16 netshort) { return ((netshort & 0xFF) << 8) | ((netshort & 0xFF00) >> 8); diff --git a/src/common/spinlock.h b/src/common/spinlock.h index 1c0825181..fe0da6669 100644 --- a/src/common/spinlock.h +++ b/src/common/spinlock.h @@ -4,7 +4,7 @@ // // CAS based Spinlock Implementation // -// CamelCase names are choosen to be consistent with microsofts winapi +// CamelCase names are chosen to be consistent with Microsoft's WinAPI // which implements CriticalSection by this naming... // // Author: Florian Wilkemeyer diff --git a/src/common/sql.c b/src/common/sql.c index ffc4d63ef..a562478ea 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -38,7 +38,7 @@ struct Sql { // Column length receiver. -// Takes care of the possible size missmatch between uint32 and unsigned long. +// Takes care of the possible size mismatch between uint32 and unsigned long. struct s_column_length { uint32* out_length; unsigned long length; @@ -569,7 +569,7 @@ static void SqlStmt_P_ShowDebugTruncatedColumn(SqlStmt* self, size_t i) Sql_P_ShowDebugMysqlFieldInfo("data - ", field->type, field->flags&UNSIGNED_FLAG, self->column_lengths[i].length, ""); column = &self->columns[i]; if( column->buffer_type == MYSQL_TYPE_STRING ) - Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, "+1(nul-terminator)"); + Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, "+1(null-terminator)"); else Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, ""); mysql_free_result(meta); @@ -765,10 +765,10 @@ int SqlStmt_BindColumn(SqlStmt* self, size_t idx, enum SqlDataType buffer_type, { if( buffer_len < 1 ) { - ShowDebug("SqlStmt_BindColumn: buffer_len(%d) is too small, no room for the nul-terminator\n", buffer_len); + ShowDebug("SqlStmt_BindColumn: buffer_len(%d) is too small, no room for the null-terminator\n", buffer_len); return SQL_ERROR; } - --buffer_len;// nul-terminator + --buffer_len;// null-terminator } if( !self->bind_columns ) {// initialize the bindings @@ -891,7 +891,7 @@ int SqlStmt_NextRow(SqlStmt* self) if( self->column_lengths[i].out_length ) *self->column_lengths[i].out_length = (uint32)length; if( column->buffer_type == MYSQL_TYPE_STRING ) - {// clear unused part of the string/enum buffer (and nul-terminate) + {// clear unused part of the string/enum buffer (and null-terminate) memset((char*)column->buffer + length, 0, column->buffer_length - length + 1); } else if( column->buffer_type == MYSQL_TYPE_BLOB && length < column->buffer_length ) diff --git a/src/common/sql.h b/src/common/sql.h index 64d8307fc..3bdb76c74 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -166,7 +166,7 @@ struct sql_interface { /// It uses the connection of the parent Sql handle. /// Queries in Sql and SqlStmt are independent and don't affect each other. /// - /// @return SqlStmt handle or NULL if an error occured + /// @return SqlStmt handle or NULL if an error occurred struct SqlStmt* (*StmtMalloc)(Sql* sql); @@ -198,7 +198,7 @@ struct sql_interface { /// Returns the number of parameters in the prepared statement. /// - /// @return Number or paramenters + /// @return Number or parameters size_t (*StmtNumParams)(SqlStmt* self); @@ -237,7 +237,7 @@ struct sql_interface { /// Binds the result of a column to a buffer. /// The buffer will be filled with data when the next row is fetched. /// For string/enum buffer types there has to be enough space for the data - /// and the nul-terminator (an extra byte). + /// and the null-terminator (an extra byte). /// /// @return SQL_SUCCESS or SQL_ERROR int (*StmtBindColumn)(SqlStmt* self, size_t idx, SqlDataType buffer_type, void* buffer, size_t buffer_len, uint32* out_length, int8* out_is_null); diff --git a/src/common/strlib.c b/src/common/strlib.c index 10e893c3a..2ce8fd347 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -147,15 +147,15 @@ char* trim(char* str) if( start == end ) *str = '\0';// empty string else - {// move string with nul terminator + {// move string with null-terminator str[end] = '\0'; memmove(str,str+start,end-start+1); } return str; } -// Converts one or more consecutive occurences of the delimiters into a single space -// and removes such occurences from the beginning and end of string +// Converts one or more consecutive occurrences of the delimiters into a single space +// and removes such occurrences from the beginning and end of string // NOTE: make sure the string is not const!! char* normalize_name(char* str,const char* delims) { @@ -358,18 +358,18 @@ int config_switch(const char* str) { return (int)strtol(str, NULL, 0); } -/// strncpy that always nul-terminates the string +/// strncpy that always null-terminates the string char* safestrncpy(char* dst, const char* src, size_t n) { if( n > 0 ) { char* d = dst; const char* s = src; - d[--n] = '\0';/* nul-terminate string */ + d[--n] = '\0';/* null-terminate string */ for( ; n > 0; --n ) { if( (*d++ = *s++) == '\0' ) - {/* nul-pad remaining bytes */ + {/* null-pad remaining bytes */ while( --n > 0 ) *d++ = '\0'; break; @@ -385,12 +385,12 @@ size_t safestrnlen(const char* string, size_t maxlen) return ( string != NULL ) ? strnlen(string, maxlen) : 0; } -/// Works like snprintf, but always nul-terminates the buffer. -/// Returns the size of the string (without nul-terminator) +/// Works like snprintf, but always null-terminates the buffer. +/// Returns the size of the string (without null-terminator) /// or -1 if the buffer is too small. /// /// @param buf Target buffer -/// @param sz Size of the buffer (including nul-terminator) +/// @param sz Size of the buffer (including null-terminator) /// @param fmt Format string /// @param ... Format arguments /// @return The size of the string or -1 if the buffer is too small @@ -404,7 +404,7 @@ int safesnprintf(char* buf, size_t sz, const char* fmt, ...) va_end(ap); if( ret < 0 || (size_t)ret >= sz ) {// overflow - buf[sz-1] = '\0';// always nul-terminate + buf[sz-1] = '\0';// always null-terminate return -1; } return ret; @@ -631,8 +631,8 @@ int sv_parse_next(struct s_svstate* svstate) /// @param delim Field delimiter /// @param out_pos Array of resulting positions /// @param npos Size of the pos array -/// @param opt Options that determine the parsing behaviour -/// @return Number of fields found in the string or -1 if an error occured +/// @param opt Options that determine the parsing behavior +/// @return Number of fields found in the string or -1 if an error occurred int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, int npos, enum e_svopt opt) { struct s_svstate svstate; int count; @@ -666,11 +666,11 @@ int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, i /// WARNING: this function modifies the input string /// Starts splitting at startoff and fills the out_fields array. /// out_fields[0] is the start of the next line. -/// Other entries are the start of fields (nul-teminated). +/// Other entries are the start of fields (null-terminated). /// Returns the number of fields found or -1 if an error occurs. /// /// out_fields can be NULL. -/// Fields that don't fit in out_fields are not nul-terminated. +/// Fields that don't fit in out_fields are not null-terminated. /// Extra entries in out_fields are filled with the end of the last field (empty string). /// /// @param str String to parse @@ -679,8 +679,8 @@ int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, i /// @param delim Field delimiter /// @param out_fields Array of resulting fields /// @param nfields Size of the field array -/// @param opt Options that determine the parsing behaviour -/// @return Number of fields found in the string or -1 if an error occured +/// @param opt Options that determine the parsing behavior +/// @return Number of fields found in the string or -1 if an error occurred int sv_split(char* str, int len, int startoff, char delim, char** out_fields, int nfields, enum e_svopt opt) { int pos[1024]; int i; diff --git a/src/common/strlib.h b/src/common/strlib.h index f93d8ad67..f39f27789 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -16,7 +16,7 @@ char *_strtok_r(char* s1, const char* s2, char** lasts); #endif -/// Bitfield determining the behaviour of sv_parse and sv_split. +/// Bitfield determining the behavior of sv_parse and sv_split. typedef enum e_svopt { // default: no escapes and no line terminator SV_NOESCAPE_NOTERMINATE = 0, @@ -73,14 +73,14 @@ struct strlib_interface { int (*e_mail_check) (char* email); int (*config_switch) (const char* str); - /// strncpy that always nul-terminates the string + /// strncpy that always null-terminates the string char *(*safestrncpy) (char* dst, const char* src, size_t n); /// doesn't crash on null pointer size_t (*safestrnlen) (const char* string, size_t maxlen); - /// Works like snprintf, but always nul-terminates the buffer. - /// Returns the size of the string (without nul-terminator) + /// Works like snprintf, but always null-terminates the buffer. + /// Returns the size of the string (without null-terminator) /// or -1 if the buffer is too small. int (*safesnprintf) (char* buf, size_t sz, const char* fmt, ...); @@ -131,7 +131,7 @@ struct sv_interface { /// WARNING: this function modifies the input string /// Starts splitting at startoff and fills the out_fields array. /// out_fields[0] is the start of the next line. - /// Other entries are the start of fields (nul-teminated). + /// Other entries are the start of fields (null-terminated). /// Returns the number of fields found or -1 if an error occurs. int (*split) (char* str, int len, int startoff, char delim, char** out_fields, int nfields, enum e_svopt opt); diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 3fdfadb41..40ef6cfc0 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -226,7 +226,7 @@ bool sysinfo_svn_get_revision(char **out) { // - since it's a cache column, the data might not even exist if ((fp = fopen(".svn"PATHSEP_STR"wc.db", "rb")) != NULL || (fp = fopen(".."PATHSEP_STR".svn"PATHSEP_STR"wc.db", "rb")) != NULL) { -#ifndef SVNNODEPATH //not sure how to handle branches, so i'll leave this overridable define until a better solution comes up +#ifndef SVNNODEPATH //not sure how to handle branches, so I'll leave this overridable define until a better solution comes up #define SVNNODEPATH trunk #endif // SVNNODEPATH @@ -709,7 +709,7 @@ void sysinfo_vcsrevision_src_retrieve(void) { #endif // WIN32 /** - * Retrieevs the VCS type name. + * Retrieves the VCS type name. * * Once retrieved, the value is stored in sysinfo->p->vcstype_name. */ diff --git a/src/common/thread.c b/src/common/thread.c index 91360537f..4be37d576 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -68,7 +68,7 @@ void rathread_init(){ l_threads[i].myID = i; } - // now lets init thread id 0, which represnts the main thread + // now lets init thread id 0, which represents the main thread #ifdef HAS_TLS g_rathread_ID = 0; #endif @@ -83,7 +83,7 @@ void rathread_final(){ register unsigned int i; // Unterminated Threads Left? - // Should'nt happen .. + // Shouldn't happen .. // Kill 'em all! // for(i = 1; i < RA_THREADS_MAX; i++){ @@ -121,9 +121,9 @@ static void *_raThreadMainRedirector( void *p ){ #ifndef WIN32 // When using posix threads - // the threads inherits the Signal mask from the thread which's spawned + // the threads inherits the Signal mask from the thread which spawned // this thread - // so we've to block everything we dont care about. + // so we've to block everything we don't care about. sigemptyset(&set); sigaddset(&set, SIGINT); sigaddset(&set, SIGTERM); @@ -222,10 +222,10 @@ void rathread_destroy ( rAthread handle ){ #else if( pthread_cancel( handle->hThread ) == 0){ - // We have to join it, otherwise pthread wont re-cycle its internal ressources assoc. with this thread. + // We have to join it, otherwise pthread wont re-cycle its internal resources assoc. with this thread. pthread_join( handle->hThread, NULL ); - // Tell our manager to release ressources ;) + // Tell our manager to release resources ;) rat_thread_terminated(handle); } #endif @@ -265,7 +265,7 @@ int rathread_get_tid(){ #ifdef HAS_TLS return g_rathread_ID; #else - // todo + // TODO #ifdef WIN32 return (int)GetCurrentThreadId(); #else diff --git a/src/common/thread.h b/src/common/thread.h index 7ad326509..992e3e6c8 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -20,7 +20,7 @@ typedef enum RATHREAD_PRIO { * Creates a new Thread * * @param entyPoint - entryProc, - * @param param - general purpose parameter, would be given as parameter to the thread's entrypoint. + * @param param - general purpose parameter, would be given as parameter to the thread's entry point. * * @return not NULL if success */ @@ -31,7 +31,7 @@ rAthread rathread_create( rAthreadProc entryPoint, void *param ); * Creates a new Thread (with more creation options) * * @param entyPoint - entryProc, - * @param param - general purpose parameter, would be given as parameter to the thread's entrypoint + * @param param - general purpose parameter, would be given as parameter to the thread's entry point * @param szStack - stack Size in bytes * @param prio - Priority of the Thread @ OS Scheduler.. * @@ -41,9 +41,9 @@ rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szSta /** - * Destroys the given Thread immediatly + * Destroys the given Thread immediately * - * @note The Handle gets invalid after call! dont use it afterwards. + * @note The Handle gets invalid after call! don't use it afterwards. * * @param handle - thread to destroy. */ @@ -53,7 +53,7 @@ void rathread_destroy ( rAthread handle ); /** * Returns the thread handle of the thread calling this function * - * @note this wont work @ programms main thread + * @note this wont work @ programs main thread * @note the underlying implementation might not perform very well, cache the value received! * * @return not NULL if success @@ -62,10 +62,10 @@ rAthread rathread_self( ); /** - * Returns own thrad id (TID) + * Returns own thread id (TID) * * @note this is an unique identifier for the calling thread, and - * depends on platfrom / compiler, and may not be the systems Thread ID! + * depends on platform/ compiler, and may not be the systems Thread ID! * * @return -1 when fails, otherwise >= 0 */ @@ -93,7 +93,7 @@ void rathread_prio_set( rAthread handle, RATHREAD_PRIO prio ); /** - * Gets the current Prio of the given trhead + * Gets the current Prio of the given thread * * @param handle - the thread to get the prio for. */ diff --git a/src/common/timer.c b/src/common/timer.c index 5240ec202..ab0471d51 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -170,14 +170,14 @@ static int64 sys_tick(void) { } if (pGetTickCount64) return (int64)pGetTickCount64(); - // 32-bit fallback. Note: This will wrap around every ~49 days since system startup!!! + // 32-bit fall back. Note: This will wrap around every ~49 days since system startup!!! return (int64)GetTickCount(); #elif defined(ENABLE_RDTSC) // RDTSC: Returns the number of CPU cycles since reset. Unreliable if // the CPU frequency is variable. return (int64)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK); #elif defined(HAVE_MONOTONIC_CLOCK) - // Monotinic clock: Implementation-defined. + // Monotonic clock: Implementation-defined. // Clock that cannot be set and represents monotonic time since some // unspecified starting point. This clock is not affected by // discontinuous jumps in the system time (e.g., if the system @@ -188,7 +188,7 @@ static int64 sys_tick(void) { // int64 cast to avoid overflows on platforms where time_t is 32 bit return (int64)tval.tv_sec * 1000 + tval.tv_nsec / 1000000; #else - // Fallback, regular clock: Number of milliseconds since epoch. + // Fall back, regular clock: Number of milliseconds since epoch. // The time returned by gettimeofday() is affected by discontinuous // jumps in the system time (e.g., if the system administrator // manually changes the system time). If you need a monotonically diff --git a/src/common/utils.c b/src/common/utils.c index 80954f848..4e6cb49c2 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -200,7 +200,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*)) sprintf(tmppath,"%s%c%s",path, PATHSEP, entry->d_name); - // check if the pattern matchs. + // check if the pattern matches. if (entry->d_name && strstr(entry->d_name, pattern)) { func( tmppath ); } @@ -211,7 +211,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*)) } // is this a directory? if (S_ISDIR(dir_stat.st_mode)) { - // decent recursivly + // decent recursively findfile(tmppath, pat, func); } }//end while @@ -326,7 +326,7 @@ unsigned int get_percentage(const unsigned int A, const unsigned int B) if( B == 0 ) { - ShowError("get_percentage(): divison by zero! (A=%u,B=%u)\n", A, B); + ShowError("get_percentage(): division by zero! (A=%u,B=%u)\n", A, B); return ~0U; } diff --git a/src/config/core.h b/src/config/core.h index 157d94b2f..24e9de710 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -27,7 +27,7 @@ /// CONSOLE_INPUT allows you to type commands into the server's console, /// Disabling it saves one thread. #define CONSOLE_INPUT -/// Maximum number of caracters 'CONSOLE_INPUT' will support per line. +/// Maximum number of characters 'CONSOLE_INPUT' will support per line. #define MAX_CONSOLE_INPUT 150 /// Uncomment to disable Hercules' anonymous stat report @@ -43,7 +43,7 @@ /// By default, all range checks in Aegis are of Square shapes, so a weapon range /// - of 10 allows you to attack from anywhere within a 21x21 area. /// Enabling this changes such checks to circular checks, which is more realistic, -/// - but is not the official behaviour. +/// - but is not the official behavior. //#define CIRCULAR_AREA //This is the distance at which @autoloot works, diff --git a/src/config/secure.h b/src/config/secure.h index e5e3662d1..1a89e36cf 100644 --- a/src/config/secure.h +++ b/src/config/secure.h @@ -49,7 +49,7 @@ /** * Uncomment to disable - * while enabled, movement of invisible (cloaking, hide, etca [not chase walk]) units is not informed to nearby foes, + * while enabled, movement of invisible (cloaking, hide, etc [not chase walk]) units is not informed to nearby foes, * rendering any client-side cheat, that would otherwise make these units visible, to not function. * - "Why is this a setting?" because theres a cost, while enabled if a hidden character uses a skill with cast time, * - for example "cloaking -> walk a bit -> soul break another player" the character display will be momentarily abrupted diff --git a/src/login/account.h b/src/login/account.h index 329ae31c8..a14595519 100644 --- a/src/login/account.h +++ b/src/login/account.h @@ -25,7 +25,7 @@ struct mmo_account char email[40]; // e-mail (by default: a@a.com) int group_id; // player group id uint8 char_slots; // this accounts maximum character slots (maximum is limited to MAX_CHARS define in char server) - unsigned int state; // packet 0x006a value + 1 (0: compte OK) + unsigned int state; // packet 0x006a value + 1 (0: complete OK) time_t unban_time; // (timestamp): ban time limit of the account (0 = no ban) time_t expiration_time; // (timestamp): validity limit of the account (0 = unlimited) unsigned int logincount; // number of successful auth attempts diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 2e4ed7ab9..51e499369 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -454,7 +454,7 @@ static bool account_db_sql_load_str(AccountDB* self, struct mmo_account* acc, co } if( SQL->NumRows(sql_handle) > 1 ) - {// serious problem - duplicit account + {// serious problem - duplicate account ShowError("account_db_sql_load_str: multiple accounts found when retrieving data for account '%s'!\n", userid); SQL->FreeResult(sql_handle); return false; diff --git a/src/login/login.c b/src/login/login.c index 43883c6ce..c3f2f6000 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -287,7 +287,7 @@ int lan_subnetcheck(uint32 ip) } //---------------------------------- -// Reading Lan Support configuration +// Reading LAN Support configuration //---------------------------------- int login_lan_config_read(const char *lancfgName) { @@ -724,13 +724,13 @@ int parse_fromchar(int fd) RFIFOSKIP(fd,6); if( !accounts->load_num(accounts, &acc, account_id) ) - ShowNotice("Char-server '%s': Error of UnBan request (account: %d not found, ip: %s).\n", server[id].name, account_id, ip); + ShowNotice("Char-server '%s': Error of Unban request (account: %d not found, ip: %s).\n", server[id].name, account_id, ip); else if( acc.unban_time == 0 ) - ShowNotice("Char-server '%s': Error of UnBan request (account: %d, no change for unban date, ip: %s).\n", server[id].name, account_id, ip); + ShowNotice("Char-server '%s': Error of Unban request (account: %d, no change for unban date, ip: %s).\n", server[id].name, account_id, ip); else { - ShowNotice("Char-server '%s': UnBan request (account: %d, ip: %s).\n", server[id].name, account_id, ip); + ShowNotice("Char-server '%s': Unban request (account: %d, ip: %s).\n", server[id].name, account_id, ip); acc.unban_time = 0; accounts->save(accounts, &acc); } @@ -912,7 +912,7 @@ int mmo_auth_new(const char* userid, const char* pass, const char sex, const cha // check if the account doesn't exist already if( accounts->load_str(accounts, &acc, userid) ) { - ShowNotice("Attempt of creation of an already existant account (account: %s_%c, pass: %s, received pass: %s)\n", userid, sex, acc.pass, pass); + ShowNotice("Attempt of creation of an already existing account (account: %s_%c, pass: %s, received pass: %s)\n", userid, sex, acc.pass, pass); return 1; // 1 = Incorrect Password } @@ -1104,7 +1104,7 @@ void login_auth_ok(struct login_session_data* sd) WFIFOSET(fd,3); return; } else if( login_config.min_group_id_to_connect >= 0 && login_config.group_id_to_connect == -1 && sd->group_id < login_config.min_group_id_to_connect ) { - ShowStatus("Connection refused: the minium group id required for connection is %d (account: %s, group: %d).\n", login_config.min_group_id_to_connect, sd->userid, sd->group_id); + ShowStatus("Connection refused: the minimum group id required for connection is %d (account: %s, group: %d).\n", login_config.min_group_id_to_connect, sd->userid, sd->group_id); WFIFOHEAD(fd,3); WFIFOW(fd,0) = 0x81; WFIFOB(fd,2) = 1; // 01 = Server closed @@ -1309,7 +1309,7 @@ int parse_login(int fd) // Perform ip-ban check if( login_config.ipban && ipban_check(ipl) ) { - ShowStatus("Connection refused: IP isn't authorised (deny/allow, ip: %s).\n", ip); + ShowStatus("Connection refused: IP isn't authorized (deny/allow, ip: %s).\n", ip); login_log(ipl, "unknown", -3, "ip banned"); WFIFOHEAD(fd,23); WFIFOW(fd,0) = 0x6a; @@ -1772,7 +1772,7 @@ int do_init(int argc, char** argv) { int i; - // intialize engine (to accept config settings) + // initialize engine (to accept config settings) account_engine[0].db = account_engine[0].constructor(); // read login-server configuration diff --git a/src/login/login.h b/src/login/login.h index e77b96a0e..447301ea4 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -72,7 +72,7 @@ struct Login_Config { unsigned int ip_sync_interval; // interval (in minutes) to execute a DNS/IP update (for dynamic IPs) bool log_login; // whether to log login server actions or not char date_format[32]; // date format used in messages - bool new_account_flag,new_acc_length_limit; // autoregistration via _M/_F ? / if yes minimum length is 4? + bool new_account_flag,new_acc_length_limit; // auto-registration via _M/_F ? / if yes minimum length is 4? int start_limited_time; // new account expiration time (-1: unlimited) bool use_md5_passwds; // work with password hashes instead of plaintext passwords? int group_id_to_connect; // required group id to connect diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 2cbc02c93..2c0b1cc03 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -35,7 +35,7 @@ static Sql* sql_handle = NULL; static bool enabled = false; -// Returns the number of failed login attemps by the ip in the last minutes. +// Returns the number of failed login attempts by the ip in the last minutes. unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes) { unsigned long failures = 0; diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a7e4cef39..2acea5872 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -947,7 +947,7 @@ ACMD(jobchange) { } } - // High Jobs, Babys and Third + // High Jobs, Babies and Third for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){ if (strncmpi(message, pc->job_name(i), 16) == 0) { job = i; @@ -1329,7 +1329,7 @@ ACMD(baselevelup) clif->message(fd, msg_txt(47)); // Base level can't go any higher. return false; } // End Addition - if ((unsigned int)level > pc->maxbaselv(sd) || (unsigned int)level > pc->maxbaselv(sd) - sd->status.base_level) // fix positiv overflow + if ((unsigned int)level > pc->maxbaselv(sd) || (unsigned int)level > pc->maxbaselv(sd) - sd->status.base_level) // fix positive overflow level = pc->maxbaselv(sd) - sd->status.base_level; for (i = 0; i < level; i++) status_point += pc->gets_status_point(sd->status.base_level + i); @@ -1389,7 +1389,7 @@ ACMD(joblevelup) clif->message(fd, msg_txt(23)); // Job level can't go any higher. return false; } - if ((unsigned int)level > pc->maxjoblv(sd) || (unsigned int)level > pc->maxjoblv(sd) - sd->status.job_level) // fix positiv overflow + if ((unsigned int)level > pc->maxjoblv(sd) || (unsigned int)level > pc->maxjoblv(sd) - sd->status.job_level) // fix positive overflow level = pc->maxjoblv(sd) - sd->status.job_level; sd->status.job_level += (unsigned int)level; sd->status.skill_point += level; @@ -1401,11 +1401,11 @@ ACMD(joblevelup) return false; } level *=-1; - if ((unsigned int)level >= sd->status.job_level) // fix negativ overflow + if ((unsigned int)level >= sd->status.job_level) // fix negative overflow level = sd->status.job_level-1; sd->status.job_level -= (unsigned int)level; if (sd->status.skill_point < level) - pc->resetskill(sd,0); //Reset skills since we need to substract more points. + pc->resetskill(sd,0); //Reset skills since we need to subtract more points. if (sd->status.skill_point < level) sd->status.skill_point = 0; else @@ -1631,7 +1631,7 @@ ACMD(model) pc->changelook(sd, LOOK_HAIR, hair_style); pc->changelook(sd, LOOK_HAIR_COLOR, hair_color); pc->changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_txt(36)); // Appearance changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. return false; @@ -1657,7 +1657,7 @@ ACMD(dye) if (cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) { pc->changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_txt(36)); // Appearance changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. return false; @@ -1683,7 +1683,7 @@ ACMD(hair_style) if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) { pc->changelook(sd, LOOK_HAIR, hair_style); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_txt(36)); // Appearance changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. return false; @@ -1709,7 +1709,7 @@ ACMD(hair_color) if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) { pc->changelook(sd, LOOK_HAIR_COLOR, hair_color); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_txt(36)); // Appearance changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. return false; @@ -1896,7 +1896,7 @@ ACMD(monster) return false; } - if ((mob_id = mob->db_searchname(monster)) == 0) // check name first (to avoid possible name begining by a number) + if ((mob_id = mob->db_searchname(monster)) == 0) // check name first (to avoid possible name beginning by a number) mob_id = mob->db_checkid(atoi(monster)); if (mob_id == 0) { @@ -2711,7 +2711,7 @@ ACMD(char_block) * mn: minute * s: second * @ban +1m-2mn1s-6y test_player - * this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time. + * this example adds 1 month and 1 second, and subtracts 2 minutes and 6 years at the same time. *------------------------------------------*/ ACMD(char_ban) { @@ -2879,12 +2879,12 @@ ACMD(doom) { status_kill(&pl_sd->bl); clif->specialeffect(&pl_sd->bl,450,AREA); - clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement. + clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgment. } } mapit->free(iter); - clif->message(fd, msg_txt(62)); // Judgement was made. + clif->message(fd, msg_txt(62)); // Judgment was made. return true; } @@ -2904,12 +2904,12 @@ ACMD(doommap) { status_kill(&pl_sd->bl); clif->specialeffect(&pl_sd->bl,450,AREA); - clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement. + clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgment. } } mapit->free(iter); - clif->message(fd, msg_txt(62)); // Judgement was made. + clif->message(fd, msg_txt(62)); // Judgment was made. return true; } @@ -2984,7 +2984,7 @@ ACMD(kick) if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -3287,7 +3287,7 @@ ACMD(mapexit) { } /*========================================== - * idsearch : revrited by [Yor] + * idsearch : rewrite by [Yor] *------------------------------------------*/ ACMD(idsearch) { @@ -3333,7 +3333,7 @@ ACMD(recallall) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. + clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map. return false; } @@ -3385,7 +3385,7 @@ ACMD(guildrecall) } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. + clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map. return false; } @@ -3442,7 +3442,7 @@ ACMD(partyrecall) } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map. + clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map. return false; } @@ -4089,7 +4089,7 @@ ACMD(nuke) { skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, timer->gettick(), 0); clif->message(fd, msg_txt(109)); // Player has been nuked! } else { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } } else { @@ -4286,7 +4286,7 @@ ACMD(servertime) { const struct TimerData * timer_data2 = timer->get(pc->day_timer_tid); if (map->night_flag == 0) { - sprintf(temp, msg_txt(235), // Game time: The game is actualy in daylight for %s. + sprintf(temp, msg_txt(235), // Game time: The game is actually in daylight for %s. txt_time((unsigned int)(DIFF_TICK(timer_data->tick,timer->gettick())/1000))); clif->message(fd, temp); if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0) @@ -4297,7 +4297,7 @@ ACMD(servertime) { txt_time((unsigned int)(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000))); clif->message(fd, temp); } else { - sprintf(temp, msg_txt(233), // Game time: The game is actualy in night for %s. + sprintf(temp, msg_txt(233), // Game time: The game is actually in night for %s. txt_time((unsigned int)(DIFF_TICK(timer_data2->tick,timer->gettick()) / 1000))); clif->message(fd, temp); if (DIFF_TICK(timer_data2->tick,timer_data->tick) > 0) @@ -4371,7 +4371,7 @@ ACMD(jail) { if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -4422,7 +4422,7 @@ ACMD(unjail) { if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -4499,7 +4499,7 @@ ACMD(jailfor) { } if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -5245,7 +5245,7 @@ ACMD(useskill) { if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorized you to do this action on this player. return false; } @@ -5460,7 +5460,7 @@ ACMD(autotrade) { status->change_start(NULL,&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0); } - /* currently standalones are not supporting buyingstores, so we rely on the previous method */ + /* currently standalone is not supporting buyingstores, so we rely on the previous method */ if( sd->state.buyingstore ) { clif->authfail_fd(fd, 15); return true; @@ -6385,7 +6385,7 @@ ACMD(changesex) int i; pc->resetskill(sd,4); - // to avoid any problem with equipment and invalid sex, equipment is unequiped. + // to avoid any problem with equipment and invalid sex, equipment is unequipped. for( i=0; iequip_index[i] >= 0 ) pc->unequipitem(sd, sd->equip_index[i], 3); chrif->changesex(sd); @@ -6411,7 +6411,7 @@ ACMD(mute) { if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { - clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player. + clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return false; } @@ -7700,7 +7700,7 @@ ACMD(accept) { } if(sd->duel_invite <= 0) { - // "Duel: @accept without invititation." + // "Duel: @accept without invitation." clif->message(fd, msg_txt(360)); return false; } @@ -7720,7 +7720,7 @@ ACMD(accept) { ACMD(reject) { if(sd->duel_invite <= 0) { - // "Duel: @reject without invititation." + // "Duel: @reject without invitation." clif->message(fd, msg_txt(362)); return false; } @@ -8632,7 +8632,7 @@ ACMD(join) { if( hChSys.local && strcmpi(name + 1, hChSys.local_name) == 0 ) { if( !map->list[sd->bl.m].channel ) { clif->chsys_mjoin(sd); - if( map->list[sd->bl.m].channel ) /* mjoin might have refused, map has chatting capabilities disabled */ + if( map->list[sd->bl.m].channel ) /* join might have refused, map has chatting capabilities disabled */ return true; } else channel = map->list[sd->bl.m].channel; diff --git a/src/map/battle.c b/src/map/battle.c index 57302166e..810bebae9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -58,7 +58,7 @@ int battle_getcurrentskill(struct block_list *bl) { //Returns the current/last s } /*========================================== - * Get random targetting enemy + * Get random targeting enemy *------------------------------------------*/ int battle_gettargeted_sub(struct block_list *bl, va_list ap) { struct block_list **bl_list; @@ -102,7 +102,7 @@ struct block_list* battle_gettargeted(struct block_list *target) { } -//Returns the id of the current targetted character of the passed bl. [Skotlex] +//Returns the id of the current targeted character of the passed bl. [Skotlex] int battle_gettarget(struct block_list* bl) { switch (bl->type) { @@ -262,7 +262,7 @@ int battle_delay_damage(int64 tick, int amotion, struct block_list *src, struct if ( !battle_config.delay_battle_damage || amotion <= 1 ) { map->freeblock_lock(); - status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope] + status_fix_damage(src, target, damage, ddelay); // We have to separate here between reflect damage and others [icescope] if( attack_type && !status->isdead(target) && additional_effects ) skill->additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, timer->gettick()); if( dmg_lv > ATK_BLOCK && attack_type ) @@ -358,7 +358,7 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d } } } - if( tsc && tsc->count ) { //since an atk can only have one type let's optimise this a bit + if( tsc && tsc->count ) { //since an atk can only have one type let's optimize this a bit switch(atk_elem){ case ELE_FIRE: if( tsc->data[SC_SPIDERWEB]) { @@ -463,7 +463,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u damage = battle->calc_elefix(src, bl, skill_id, skill_lv, damage + eatk, nk, n_ele, s_ele, s_ele_, type == EQI_HAND_L, flag); /** - * In RE Shield Bommerang takes weapon element only for damage calculation, + * In RE Shield Boomerang takes weapon element only for damage calculation, * - resist calculation is always against neutral **/ if ( skill_id == CR_SHIELDBOOMERANG ) @@ -482,7 +482,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u } /*========================================== * Calculates the standard damage of a normal attack assuming it hits, - * it calculates nothing extra fancy, is needed for magnum break's WATK_ELEMENT bonus. [Skotlex] + * it calculates nothing extra fancy, is needed for magnum breaks WATK_ELEMENT bonus. [Skotlex] *------------------------------------------ * Pass damage2 as NULL to not calc it. * Flag values: @@ -567,7 +567,7 @@ int64 battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, st else damage += st->batk; - //rodatazone says that Overrefine bonuses are part of baseatk + //rodatazone says that Overrefined bonuses are part of baseatk //Here we also apply the weapon_atk_rate bonus so it is correctly applied on left/right hands. if(sd) { if (type == EQI_HAND_L) { @@ -604,7 +604,7 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in nullpo_ret(sd); if((skill_lv = pc->checkskill(sd,AL_DEMONBANE)) > 0 && - target->type == BL_MOB && //This bonus doesnt work against players. + target->type == BL_MOB && //This bonus doesn't work against players. (battle->check_undead(st->race,st->def_ele) || st->race==RC_DEMON) ) damage += (int)(skill_lv*(3+sd->status.base_level/20.0)); //damage += (skill_lv * 3); @@ -676,7 +676,7 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in case W_FIST: if((skill_lv = pc->checkskill(sd,TK_RUN)) > 0) damage += (skill_lv * 10); - // No break, fallthrough to Knuckles + // No break, fall through to Knuckles case W_KNUCKLE: if((skill_lv = pc->checkskill(sd,MO_IRONHAND)) > 0) damage += (skill_lv * 3); @@ -1272,9 +1272,9 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_ #else vit_def = def2; #endif - if((battle->check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesnt work vs players + if((battle->check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesn't work vs players src->type == BL_MOB && (i=pc->checkskill(tsd,AL_DP)) > 0) - vit_def += i*(int)(3 +(tsd->status.base_level+1)*0.04); // submitted by orn + vit_def += i*(int)(3 +(tsd->status.base_level+1)*0.04); // [orn] if( src->type == BL_MOB && (i=pc->checkskill(tsd,RA_RANGERMAIN))>0 && (sstatus->race == RC_BRUTE || sstatus->race == RC_FISH || sstatus->race == RC_PLANT) ) vit_def += i*5; @@ -1296,7 +1296,7 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_ #ifdef RENEWAL /** * RE DEF Reduction - * Pierce defence gains 1 atk per def/2 + * Pierce defense gains 1 atk per def/2 **/ if( def1 < -399 ) // it stops at -399 @@ -1384,7 +1384,7 @@ int battle_calc_chorusbonus(struct map_session_data *sd) { if (members < 3) return 0; // Bonus remains 0 unless 3 or more Minstrel's/Wanderer's are in the party. if (members > 7) - return 5; // Maximum effect possiable from 7 or more Minstrel's/Wanderer's + return 5; // Maximum effect possible from 7 or more Minstrel's/Wanderer's return members - 2; // Effect bonus from additional Minstrel's/Wanderer's if not above the max possible } @@ -2005,7 +2005,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block skillratio += 50 * skill_lv; break; case GS_BULLSEYE: - //Only works well against brute/demihumans non bosses. + //Only works well against brute/demi-humans non bosses. if((tst->race == RC_BRUTE || tst->race == RC_DEMIHUMAN) && !(tst->mode&MD_BOSS)) skillratio += 400; @@ -2117,7 +2117,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block RE_LVL_DMOD(150); break; /** - * GC Guilotine Cross + * GC Guillotine Cross **/ case GC_CROSSIMPACT: skillratio += 900 + 100 * skill_lv; @@ -2401,7 +2401,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block { int chorusbonus = battle->calc_chorusbonus(sd); skillratio += 300 + 200 * skill_lv; - //Chorus bonus dont count the first 2 Minstrel's/Wanderer's and only increases when their's 3 or more. [Rytech] + //Chorus bonus don't count the first 2 Minstrel's/Wanderer's and only increases when their's 3 or more. [Rytech] if (chorusbonus >= 1 && chorusbonus <= 5) skillratio += 100<<(chorusbonus-1); // 1->100; 2->200; 3->400; 4->800; 5->1600 RE_LVL_DMOD(100); @@ -2454,7 +2454,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block if( sc && sc->data[SC_BLAST_OPTION] ) skillratio += (sd ? sd->status.job_level * 5 : 0); break; - // Physical Elemantal Spirits Attack Skills + // Physical Elemental Spirits Attack Skills case EL_CIRCLE_OF_FIRE: case EL_FIRE_BOMB_ATK: case EL_STONE_RAIN: @@ -2557,8 +2557,8 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block return skillratio; } /*========================================== - * Check dammage trough status. - * ATK may be MISS, BLOCKED FAIL, reduc, increase, end status... + * Check damage trough status. + * ATK may be MISS, BLOCKED FAIL, reduce, increase, end status... * After this we apply bg/gvg reduction *------------------------------------------*/ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv) { @@ -2715,7 +2715,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam clif->skill_nodamage(bl, bl, RK_MILLENNIUMSHIELD, 1, 1); sce->val3 -= (int)cap_value(damage,INT_MIN,INT_MAX); // absorb damage d->dmg_lv = ATK_BLOCK; - sc_start(src,bl,SC_STUN,15,0,skill->get_time2(RK_MILLENNIUMSHIELD,sce->val1)); // There is a chance to be stuned when one shield is broken. + sc_start(src,bl,SC_STUN,15,0,skill->get_time2(RK_MILLENNIUMSHIELD,sce->val1)); // There is a chance to be stunned when one shield is broken. if( sce->val3 <= 0 ) { // Shield Down sce->val2--; if( sce->val2 > 0 ) { @@ -3029,7 +3029,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam short rate = 100; struct status_data *tstatus = status->get_status_data(bl); if ( !(flag&BF_SKILL) && (flag&BF_WEAPON) && damage > 0 && rnd()%100 < tsc->data[SC_POISONINGWEAPON]->val3 ) { - if ( tsc->data[SC_POISONINGWEAPON]->val1 == 9 ) // Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech] + if ( tsc->data[SC_POISONINGWEAPON]->val1 == 9 ) // Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech] rate = 100 - tstatus->int_ * 4 / 5; sc_start(src,bl,tsc->data[SC_POISONINGWEAPON]->val2,rate,tsc->data[SC_POISONINGWEAPON]->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000); } @@ -3046,7 +3046,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam /* no data claims these settings affect anything other than players */ if( damage && sd && bl->type == BL_PC ) { switch( skill_id ) { - //case PA_PRESSURE: /* pressure also belongs to this list but it doesn't reach this area -- so dont worry about it */ + //case PA_PRESSURE: /* pressure also belongs to this list but it doesn't reach this area -- so don't worry about it */ case HW_GRAVITATION: case NJ_ZENYNAGE: case KO_MUCHANAGE: @@ -3254,7 +3254,7 @@ int battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { int i; if (!sd->skillblown[0].id) return 0; - //Apply the bonus blewcount. [Skotlex] + //Apply the bonus blow count. [Skotlex] for (i = 0; i < ARRAYLENGTH(sd->skillblown) && sd->skillblown[i].id; i++) { if (sd->skillblown[i].id == skill_id) return sd->skillblown[i].val; @@ -3335,7 +3335,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list ad.flag |= battle->range_type(src, target, skill_id, skill_lv); flag.infdef=(tstatus->mode&MD_PLANT?1:0); if( !flag.infdef && target->type == BL_SKILL && ((TBL_SKILL*)target)->group->unit_id == UNT_REVERBERATION ) - flag.infdef = 1; // Reberberation takes 1 damage + flag.infdef = 1; // Reverberation takes 1 damage switch(skill_id) { case MG_FIREWALL: @@ -3600,7 +3600,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list } /*========================================== - * Calculate Misc dammage for skill_id + * Calculate Misc damage for skill_id *------------------------------------------*/ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag) { int temp; @@ -3908,7 +3908,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * { if (battle_config.agi_penalty_type == 1) flee = (flee * (100 - (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100; - else //asume type 2: absolute reduction + else // assume type 2: absolute reduction flee -= (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num; if(flee < 1) flee = 1; } @@ -4046,7 +4046,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list unsigned lh : 1; //Attack considers left hand (wd.damage2) unsigned weapon : 1; //It's a weapon attack (consider VVS, and all that) #ifdef RENEWAL - unsigned tdef : 1; //Total defence reduction + unsigned tdef : 1; //Total defense reduction #endif } flag; @@ -4065,7 +4065,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list #endif ?1:0); if( !flag.infdef && target->type == BL_SKILL && ((TBL_SKILL*)target)->group->unit_id == UNT_REVERBERATION ) - flag.infdef = 1; // Reberberation takes 1 damage + flag.infdef = 1; // Reverberation takes 1 damage //Initial Values wd.type=0; //Normal attack @@ -5694,7 +5694,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t /** * We need to calculate the DMG before the hp reduction, because it can kill the source. - * For futher information: bugreport:4950 + * For further information: bugreport:4950 **/ ret_val = (damage_lv)skill->attack(BF_WEAPON,src,src,target,PA_SACRIFICE,skill_lv,tick,0); @@ -6058,7 +6058,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if(((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres (((TBL_MOB*)target)->special_state.ai == 3 && battle_config.summon_flora&1)) && //Floras s_bl->type == BL_PC && src->type != BL_MOB) || (((TBL_MOB*)target)->special_state.ai == 4 && t_bl->id != s_bl->id)) //Zanzoe - { //Targettable by players + { //Targetable by players state |= BCT_ENEMY; strip_enemy = 0; } @@ -6137,7 +6137,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f sd = BL_CAST(BL_PC, t_bl); if( sd->state.monster_ignore && flag&BCT_ENEMY ) - return 0; // Global inminuty only to Attacks + return 0; // Global immunity only to Attacks if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sd->state.killable ) { @@ -6231,7 +6231,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f break; } default: - //Need some sort of default behaviour for unhandled types. + //Need some sort of default behavior for unhandled types. if (t_bl->type != s_bl->type) state |= BCT_ENEMY; break; @@ -6351,7 +6351,7 @@ bool battle_check_range(struct block_list *src, struct block_list *bl, int range return true; // No need for path checking. if( d > AREA_SIZE ) - return false; // Avoid targetting objects beyond your range of sight. + return false; // Avoid targeting objects beyond your range of sight. return path->search_long(NULL,src->m,src->x,src->y,bl->x,bl->y,CELL_CHKWALL); } diff --git a/src/map/battle.h b/src/map/battle.h index 433dca95f..fc916597d 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -79,7 +79,7 @@ enum e_battle_check_target { //New definitions [Skotlex] * Structures **/ -// dammage structure +// damage structure struct Damage { int64 damage,damage2; //right, left dmg int type,div_; //chk clif_damage for type @TODO add an enum ? ; nb of hit @@ -489,7 +489,7 @@ enum e_battle_config_idletime { BCIDLE_ATCOMMAND = 0x200, }; -// Dammage delayed info +// Damage delayed info struct delay_damage { int src_id; int target_id; @@ -571,7 +571,7 @@ struct battle_interface { int (*check_target) (struct block_list *src, struct block_list *target,int flag); /* is src and bl within range? */ bool (*check_range) (struct block_list *src,struct block_list *bl,int range); - /* consume amo for this skill and lv */ + /* consume ammo for this skill and lv */ void (*consume_ammo) (struct map_session_data* sd, int skill_id, int lv); int (*get_targeted_sub) (struct block_list *bl, va_list ap); int (*get_enemy_sub) (struct block_list *bl, va_list ap); diff --git a/src/map/battleground.c b/src/map/battleground.c index 4558f32c3..f7131513d 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -541,7 +541,7 @@ void bg_match_over(struct bg_arena *arena, bool canceled) { bg->queue_pc_cleanup(sd); } if( canceled ) - clif->colormes(sd->fd,COLOR_RED,"BG Match Cancelled: not enough players"); + clif->colormes(sd->fd,COLOR_RED,"BG Match Canceled: not enough players"); else { pc_setglobalreg(sd, script->add_str(arena->delay_var), (unsigned int)time(NULL)); } @@ -579,7 +579,7 @@ void bg_begin(struct bg_arena *arena) { if( bg->afk_timer_id == INVALID_TIMER && bg->mafksec > 0 ) bg->afk_timer_id = timer->add(timer->gettick()+10000,bg->afk_timer,0,0); - /* TODO: make this a arena-independant var? or just .@? */ + /* TODO: make this a arena-independent var? or just .@? */ mapreg->setreg(script->add_str("$@bg_queue_id"),arena->queue_id); mapreg->setregstr(script->add_str("$@bg_delay_var$"),bg->gdelay_var); diff --git a/src/map/chat.c b/src/map/chat.c index 40a9d2348..cd7b5f811 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -32,7 +32,7 @@ struct chat_data* chat_createchat(struct block_list* bl, const char* title, cons struct chat_data* cd; nullpo_retr(NULL, bl); - /* Given the overhead and the numerous instances (npc allocatted or otherwise) wouldn't it be benefitial to have it use ERS? [Ind] */ + /* Given the overhead and the numerous instances (npc allocated or otherwise) wouldn't it be beneficial to have it use ERS? [Ind] */ cd = (struct chat_data *) aMalloc(sizeof(struct chat_data)); safestrncpy(cd->title, title, sizeof(cd->title)); diff --git a/src/map/chrif.c b/src/map/chrif.c index a69cca573..54cc139f4 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -55,7 +55,7 @@ struct chrif_interface chrif_s; //2b03: Incoming, clif_charselectok -> '' (i think its the packet after enterworld?) (not sure) //2b04: Incoming, chrif_recvmap -> 'getting maps from charserver of other mapserver's' //2b05: Outgoing, chrif_changemapserver -> 'Tell the charserver the mapchange / quest for ok...' -//2b06: Incoming, chrif_changemapserverack -> 'awnser of 2b05, ok/fail, data: dunno^^' +//2b06: Incoming, chrif_changemapserverack -> 'answer of 2b05, ok/fail, data: dunno^^' //2b07: Outgoing, chrif_removefriend -> 'Tell charserver to remove friend_id from char_id friend list' //2b08: Outgoing, chrif_searchcharid -> '...' //2b09: Incoming, map_addchariddb -> 'Adds a name to the nick db' @@ -79,7 +79,7 @@ struct chrif_interface chrif_s; //2b1b: Incoming, chrif_recvfamelist -> 'Receive fame ranking lists' //2b1c: Outgoing, chrif_save_scdata -> 'Send sc_data of player for saving.' //2b1d: Incoming, chrif_load_scdata -> 'received sc_data of player for loading.' -//2b1e: Incoming, chrif_update_ip -> 'Reqest forwarded from char-server for interserver IP sync.' [Lance] +//2b1e: Incoming, chrif_update_ip -> 'Request forwarded from char-server for interserver IP sync.' [Lance] //2b1f: Incoming, chrif_disconnectplayer -> 'disconnects a player (aid X) with the message XY ... 0x81 ..' [Sirius] //2b20: Incoming, chrif_removemap -> 'remove maps of a server (sample: its going offline)' [Sirius] //2b21: Incoming, chrif_save_ack. Returned after a character has been "final saved" on the char-server. [Skotlex] @@ -393,7 +393,7 @@ bool chrif_changemapserver(struct map_session_data* sd, uint32 ip, uint16 port) return true; } -/// map-server change request acknowledgement (positive or negative) +/// map-server change request acknowledgment (positive or negative) /// R 2b06 .L .L .L .L .W .W .W .L .W bool chrif_changemapserverack(int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port) { struct auth_node *node; @@ -853,9 +853,9 @@ void chrif_changedsex(int fd) { // Path to activate this response: // Map(start) (0x2b0e) -> Char(0x2727) -> Login // Login(0x2723) [ALL] -> Char (0x2b0d)[ALL] -> Map (HERE) - // Char will usually be "logged in" despite being forced to log-out in the begining + // Char will usually be "logged in" despite being forced to log-out in the beginning // of this process, but there's no need to perform map-server specific response - // as everything should've been changed through char-server [Panikon] + // as everything should been changed through char-server [Panikon] } /*========================================== * Request Char Server to Divorce Players @@ -944,14 +944,14 @@ void chrif_idbanned(int fd) { } sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters - if (RFIFOB(fd,6) == 0) { // 0: change of statut + if (RFIFOB(fd,6) == 0) { // 0: change of status int ret_status = RFIFOL(fd,7); // status or final date of a banishment if(0message(sd->fd, msg_txt(411+ret_status)); // Message IDs (for search convenience): 412, 413, 414, 415, 416, 417, 418, 419, 420 else if(ret_status==100) clif->message(sd->fd, msg_txt(421)); else - clif->message(sd->fd, msg_txt(420)); //"Your account has not more authorised." + clif->message(sd->fd, msg_txt(420)); //"Your account has not more authorized." } else if (RFIFOB(fd,6) == 1) { // 1: ban time_t timestamp; char tmpstr[2048]; @@ -1206,7 +1206,7 @@ bool chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { /*========================================= - * Tell char-server charcter disconnected [Wizputer] + * Tell char-server character disconnected [Wizputer] *-----------------------------------------*/ bool chrif_char_offline_nsd(int account_id, int char_id) { chrif_check(false); @@ -1247,7 +1247,7 @@ bool chrif_char_reset_offline(void) { } /*========================================= - * Tell char-server charcter is online [Wizputer] + * Tell char-server character is online [Wizputer] *-----------------------------------------*/ bool chrif_char_online(struct map_session_data *sd) { chrif_check(false); @@ -1533,7 +1533,7 @@ void chrif_send_report(char* buf, int len) { } /** - * Sends a single scdata for saving into char server, meant to ensure integrity of durationless conditions + * Sends a single scdata for saving into char server, meant to ensure integrity of duration-less conditions **/ void chrif_save_scdata_single(int account_id, int char_id, short type, struct status_change_entry *sce) { @@ -1555,7 +1555,7 @@ void chrif_save_scdata_single(int account_id, int char_id, short type, struct st } /** - * Sends a single scdata deletion request into char server, meant to ensure integrity of durationless conditions + * Sends a single scdata deletion request into char server, meant to ensure integrity of duration-less conditions **/ void chrif_del_scdata_single(int account_id, int char_id, short type) { diff --git a/src/map/chrif.h b/src/map/chrif.h index 661ba8f84..51ab0e9b9 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -53,7 +53,7 @@ struct chrif_interface { int other_mapserver_count; //Holds count of how many other map servers are online (apart of this instance) [Skotlex] /* */ - struct eri *auth_db_ers; //For reutilizing player login structures. + struct eri *auth_db_ers; //For re-utilizing player login structures. DBMap* auth_db; // int id -> struct auth_node* /* */ int packet_len_table[CHRIF_PACKET_LEN_TABLE_SIZE]; diff --git a/src/map/clif.c b/src/map/clif.c index d1ae2eb07..d8714dda0 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2588,7 +2588,7 @@ void clif_cartlist(struct map_session_data *sd) { /// Removes cart (ZC_CARTOFF). /// 012b -/// Client behaviour: +/// Client behavior: /// Closes the cart storage and removes all it's items from memory. /// The Num & Weight values of the cart are left untouched and the cart is NOT removed. void clif_clearcart(int fd) @@ -5047,7 +5047,7 @@ void clif_skillcastcancel(struct block_list* bl) /// 4 = "no party" MsgStringTable[163] /// 5 = "no shout" MsgStringTable[164] /// 6 = "no PKing" MsgStringTable[165] -/// 7 = "no alligning" MsgStringTable[383] +/// 7 = "no aligning" MsgStringTable[383] /// ? = ignored /// cause: /// 0 = "not enough skill level" MsgStringTable[214] (AL_WARP) @@ -5425,7 +5425,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst) { } -/// Presents a textual list of producable items (ZC_MAKABLEITEMLIST). +/// Presents a textual list of producible items (ZC_MAKABLEITEMLIST). /// 018d .W { .W { .W }*3 }* /// material id: /// unused by the client @@ -5467,7 +5467,7 @@ void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int } -/// Present a list of producable items (ZC_MAKINGITEM_LIST). +/// Present a list of producible items (ZC_MAKINGITEM_LIST). /// 025a .W .W { .W }* /// mk type: /// 1 = cooking @@ -5603,7 +5603,7 @@ void clif_displaymessage(const int fd, const char* mes) { if ( ( len = strnlen(mes, 255) ) > 0 ) { // don't send a void message (it's not displaying on the client chat). @help can send void line. WFIFOHEAD(fd, 5 + len); WFIFOW(fd,0) = 0x8e; - WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate + WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate safestrncpy((char *)WFIFOP(fd,4), mes, len + 1); WFIFOSET(fd, 5 + len); } @@ -5632,7 +5632,7 @@ void clif_displaymessage2(const int fd, const char* mes) { } else { WFIFOHEAD(fd, 5 + len); WFIFOW(fd,0) = 0x8e; - WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate + WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate safestrncpy((char *)WFIFOP(fd,4), line, len + 1); WFIFOSET(fd, 5 + len); } @@ -5669,7 +5669,7 @@ void clif_displaymessage_sprintf(const int fd, const char* mes, ...) { /* */ WFIFOW(fd,0) = 0x8e; - WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate + WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate WFIFOSET(fd, 5 + len); } @@ -5924,8 +5924,8 @@ void clif_wis_message(int fd, const char* nick, const char* mes, size_t mes_len) /// Inform the player about the result of his whisper action (ZC_ACK_WHISPER). /// 0098 .B /// result: -/// 0 = success to send wisper -/// 1 = target character is not loged in +/// 0 = success to send whisper +/// 1 = target character is not logged in /// 2 = ignored by target /// 3 = everyone ignored by target void clif_wis_end(int fd, int flag) { @@ -6191,7 +6191,7 @@ void clif_item_refine_list(struct map_session_data *sd) /// Notification of an auto-casted skill (ZC_AUTORUN_SKILL). -/// 0147 .W .L .W .W .W .24B .B +/// 0147 .W .L .W .W .W .24B .B void clif_item_skill(struct map_session_data *sd,uint16 skill_id,uint16 skill_lv) { int fd; @@ -7276,7 +7276,7 @@ void clif_mvp_noitem(struct map_session_data* sd) /// 0 = "Guild has been created." /// 1 = "You are already in a Guild." /// 2 = "That Guild Name already exists." -/// 3 = "You need the neccessary item to create a Guild." +/// 3 = "You need the necessary item to create a Guild." void clif_guild_created(struct map_session_data *sd,int flag) { int fd; @@ -7669,7 +7669,7 @@ void clif_guild_emblem_area(struct block_list* bl) /// Sends guild skills (ZC_GUILD_SKILLINFO). -/// 0162 .W .W { .W .L .W .W .W .24B .B }* +/// 0162 .W .W { .W .L .W .W .W .24B .B }* void clif_guild_skillinfo(struct map_session_data* sd) { int fd; @@ -8186,7 +8186,7 @@ void clif_manner_message(struct map_session_data* sd, uint32 type) } -/// Followup to 0x14a type 3/5, informs who did the manner adjustment action (ZC_NOTIFY_MANNER_POINT_GIVEN). +/// Follow-up to 0x14a type 3/5, informs who did the manner adjustment action (ZC_NOTIFY_MANNER_POINT_GIVEN). /// 014b .B .24B /// type: /// 0 = positive (unmute) @@ -8277,7 +8277,7 @@ void clif_playBGM(struct map_session_data* sd, const char* name) /// term: /// unknown purpose, only relevant to act = 1 /// npc id: -/// The accustic direction of the sound is determined by the +/// The acoustic direction of the sound is determined by the /// relative position of the NPC to the player (3D sound). void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const char* name, int type) { @@ -8643,7 +8643,7 @@ void clif_charnameack (int fd, struct block_list *bl) return; } - // if no receipient specified just update nearby clients + // if no recipient specified just update nearby clients if (fd == 0) clif->send(buf, packet_len(cmd), bl, AREA); else { @@ -8738,7 +8738,7 @@ void clif_slide(struct block_list *bl, int x, int y) /// 008d .W .L .?B void clif_disp_overhead(struct block_list *bl, const char* mes) { - unsigned char buf[256]; //This should be more than sufficient, the theorical max is CHAT_SIZE + 8 (pads and extra inserted crap) + unsigned char buf[256]; //This should be more than sufficient, the theoretical max is CHAT_SIZE + 8 (pads and extra inserted crap) size_t len_mes = strlen(mes)+1; //Account for \0 if (len_mes > sizeof(buf)-8) { @@ -8846,7 +8846,7 @@ void clif_starskill(struct map_session_data* sd, const char* mapname, int monste } /*========================================== - * Info about Star Glaldiator save map [Komurka] + * Info about Star Gladiator save map [Komurka] * type: 1: Information, 0: Map registered *------------------------------------------*/ void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsigned char type) @@ -8858,7 +8858,7 @@ void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsig } /*========================================== - * Info about Star Glaldiator hate mob [Komurka] + * Info about Star Gladiator hate mob [Komurka] * type: 1: Register mob, 0: Information. *------------------------------------------*/ void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type) @@ -9052,7 +9052,7 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_, if( strncmp(name, sd->status.name, namelen) || // the text must start with the speaker's name name[namelen] != ' ' || name[namelen+1] != ':' || name[namelen+2] != ' ' ) // followed by ' : ' { - //Hacked message, or infamous "client desynch" issue where they pick one char while loading another. + //Hacked message, or infamous "client desynchronize" issue where they pick one char while loading another. ShowWarning("clif_process_message: Player '%s' sent a message using an incorrect name! Forcing a relog...\n", sd->status.name); set_eof(fd); // Just kick them out to correct it. return false; @@ -10323,7 +10323,7 @@ void clif_hercules_chsys_quit(struct map_session_data *sd) { /// 1 = pick up item /// 2 = sit down /// 3 = stand up -/// 7 = continous attack +/// 7 = continuous attack /// 12 = (touch skill?) /// There are various variants of this packet, some of them have padding between fields. void clif_parse_ActionRequest(int fd, struct map_session_data *sd) @@ -11037,7 +11037,7 @@ void clif_parse_ChatLeave(int fd, struct map_session_data* sd) } -//Handles notifying asker and rejecter of what has just ocurred. +//Handles notifying asker and rejecter of what has just occurred. //Type is used to determine the correct msg_txt to use: //0: void clif_noask_sub(struct map_session_data *src, struct map_session_data *target, int type) { @@ -12239,7 +12239,7 @@ void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) { /// Party Booking in KRO [Spiria] /// -/// Request to register a party booking advertisment (CZ_PARTY_BOOKING_REQ_REGISTER). +/// Request to register a party booking advertisement (CZ_PARTY_BOOKING_REQ_REGISTER). /// 0802 .W .W { .W }*6 void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) { @@ -12259,7 +12259,7 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd) } -/// Result of request to register a party booking advertisment (ZC_PARTY_BOOKING_ACK_REGISTER). +/// Result of request to register a party booking advertisement (ZC_PARTY_BOOKING_ACK_REGISTER). /// 0803 .W /// result: /// 0 = success @@ -12280,7 +12280,7 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) } -/// Request to search for party booking advertisments (CZ_PARTY_BOOKING_REQ_SEARCH). +/// Request to search for party booking advertisement (CZ_PARTY_BOOKING_REQ_SEARCH). /// 0804 .W .W .W .L .W void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd) { @@ -12331,7 +12331,7 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, } -/// Request to delete own party booking advertisment (CZ_PARTY_BOOKING_REQ_DELETE). +/// Request to delete own party booking advertisement (CZ_PARTY_BOOKING_REQ_DELETE). /// 0806 void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) { @@ -12344,7 +12344,7 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd) } -/// Result of request to delete own party booking advertisment (ZC_PARTY_BOOKING_ACK_DELETE). +/// Result of request to delete own party booking advertisement (ZC_PARTY_BOOKING_ACK_DELETE). /// 0807 .W /// result: /// 0 = success @@ -12366,7 +12366,7 @@ void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag) } -/// Request to update party booking advertisment (CZ_PARTY_BOOKING_REQ_UPDATE). +/// Request to update party booking advertisement (CZ_PARTY_BOOKING_REQ_UPDATE). /// 0808 { .W }*6 void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) { @@ -12384,7 +12384,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) } -/// Notification about new party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_INSERT). +/// Notification about new party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_INSERT). /// 0809 .L .24B .L .W .W { .W }*6 void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { @@ -12410,7 +12410,7 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo } -/// Notification about updated party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_UPDATE). +/// Notification about updated party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_UPDATE). /// 080a .L { .W }*6 void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { @@ -12431,7 +12431,7 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo } -/// Notification about deleted party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_DELETE). +/// Notification about deleted party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_DELETE). /// 080b .L void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index) { @@ -12450,7 +12450,7 @@ void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index) /// Modified version of Party Booking System for 2012-04-10 or 2012-04-18 (RagexeRE). /// Code written by mkbu95, Spiria, Yommy and Ind -/// Request to register a party booking advertisment (CZ_PARTY_RECRUIT_REQ_REGISTER). +/// Request to register a party booking advertisement (CZ_PARTY_RECRUIT_REQ_REGISTER). /// 08e5 .W .37B void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data* sd) { @@ -12497,7 +12497,7 @@ void clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info** results, #endif } -/// Result of request to register a party booking advertisment (ZC_PARTY_RECRUIT_ACK_REGISTER). +/// Result of request to register a party booking advertisement (ZC_PARTY_RECRUIT_ACK_REGISTER). /// 08e6 .W /// result: /// 0 = success @@ -12517,7 +12517,7 @@ void clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) #endif } -/// Request to search for party booking advertisments (CZ_PARTY_RECRUIT_REQ_SEARCH). +/// Request to search for party booking advertisement (CZ_PARTY_RECRUIT_REQ_SEARCH). /// 08e7 .W .W .L .W void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd) { @@ -12533,7 +12533,7 @@ void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd) #endif } -/// Request to delete own party booking advertisment (CZ_PARTY_RECRUIT_REQ_DELETE). +/// Request to delete own party booking advertisement (CZ_PARTY_RECRUIT_REQ_DELETE). /// 08e9 void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd) { @@ -12545,7 +12545,7 @@ void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd) #endif } -/// Result of request to delete own party booking advertisment (ZC_PARTY_RECRUIT_ACK_DELETE). +/// Result of request to delete own party booking advertisement (ZC_PARTY_RECRUIT_ACK_DELETE). /// 08ea .W /// result: /// 0 = success @@ -12566,7 +12566,7 @@ void clif_PartyRecruitDeleteAck(struct map_session_data* sd, int flag) #endif } -/// Request to update party booking advertisment (CZ_PARTY_RECRUIT_REQ_UPDATE). +/// Request to update party booking advertisement (CZ_PARTY_RECRUIT_REQ_UPDATE). /// 08eb .37B void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd) { @@ -12581,7 +12581,7 @@ void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd) #endif } -/// Notification about new party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_INSERT). +/// Notification about new party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_INSERT). /// 08ec .L .L .24B .W .37B void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad) { @@ -12603,7 +12603,7 @@ void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_boo #endif } -/// Notification about updated party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_UPDATE). +/// Notification about updated party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_UPDATE). /// 08ed .L .37B void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info* pb_ad) { @@ -12620,7 +12620,7 @@ void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_boo #endif } -/// Notification about deleted party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_DELETE). +/// Notification about deleted party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_DELETE). /// 08ee .L void clif_PartyRecruitDeleteNotify(struct map_session_data* sd, int index) { @@ -13172,7 +13172,7 @@ void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd) if(!sd->state.gmaster_flag) return; - // compensate for some client defects when using multilanguage mode + // compensate for some client defects when using multilingual mode if (msg1[0] == '|' && msg1[3] == '|') msg1+= 3; // skip duplicate marker if (msg2[0] == '|' && msg2[3] == '|') msg2+= 3; // skip duplicate marker if (msg2[0] == '|') msg2[strnlen(msg2, MAX_GUILDMES2)-1] = '\0'; // delete extra space at the end of string @@ -13612,7 +13612,7 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd) { /// Request to execute GM commands. /// usage: /// /item n - summon n monster or acquire n item/s -/// /item money - grants 2147483647 zenies +/// /item money - grants 2147483647 Zeny /// /item whereisboss - locate boss mob in current map.(not yet implemented) /// /item regenboss_n t - regenerate n boss monster by t millisecond.(not yet implemented) /// /item onekillmonster - toggle an ability to kill mobs in one hit.(not yet implemented) @@ -13993,7 +13993,7 @@ void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int cha } -//Subfunction called from clif_foreachclient to toggle friends on/off [Skotlex] +//Sub-function called from clif_foreachclient to toggle friends on/off [Skotlex] int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap) { int account_id, char_id, online; @@ -14342,7 +14342,7 @@ void clif_parse_ranklist(int fd, struct map_session_data *sd) { case RANKTYPE_BLACKSMITH: case RANKTYPE_ALCHEMIST: case RANKTYPE_TAEKWON: - clif->ranklist(sd, type); // pk_list unsuported atm + clif->ranklist(sd, type); // pk_list unsupported atm break; } } @@ -14672,7 +14672,7 @@ void clif_check(int fd, struct map_session_data* pl_sd) { WFIFOW(fd,34) = pl_sd->battle_status.flee2/10; WFIFOW(fd,36) = pl_sd->battle_status.cri/10; WFIFOW(fd,38) = (2000-pl_sd->battle_status.amotion)/10; // aspd - WFIFOW(fd,40) = 0; // FIXME: What is 'plusASPD' supposed to be? Maybe adelay? + WFIFOW(fd,40) = 0; // FIXME: What is 'plusASPD' supposed to be? Maybe a delay? WFIFOSET(fd,packet_len(0x214)); } @@ -14737,7 +14737,7 @@ void clif_Mail_getattachment(int fd, uint8 flag) /// 0249 .B /// result: /// 0 = success -/// 1 = recipinent does not exist +/// 1 = recipient does not exist void clif_Mail_send(int fd, bool fail) { WFIFOHEAD(fd,packet_len(0x249)); @@ -16068,7 +16068,7 @@ void clif_mercenary_info(struct map_session_data *sd) { /// Mercenary skill tree (ZC_MER_SKILLINFO_LIST). -/// 029d .W { .W .L .W .W .W .24B .B }* +/// 029d .W { .W .L .W .W .W .24B .B }* void clif_mercenary_skillblock(struct map_session_data *sd) { struct mercenary_data *md; @@ -17142,7 +17142,7 @@ void clif_parse_debug(int fd,struct map_session_data *sd) { } /*========================================== * Server tells client to display a window similar to Magnifier (item) one - * Server populates the window with avilable elemental converter options according to player's inventory + * Server populates the window with available elemental converter options according to player's inventory *------------------------------------------*/ int clif_elementalconverter_list(struct map_session_data *sd) { int i,c,view,fd; @@ -17587,7 +17587,7 @@ void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) { } void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) { unsigned short limit = RFIFOW(fd, 4), i, j; - unsigned int kafra_pay = RFIFOL(fd, 6);// [Ryuuzaki] - These are free cash points (strangely #CASH = main cash curreny for us, confusing) + unsigned int kafra_pay = RFIFOL(fd, 6);// [Ryuuzaki] - These are free cash points (strangely #CASH = main cash currently for us, confusing) if( map->list[sd->bl.m].flag.nocashshop ) { clif->colormes(fd,COLOR_RED,msg_txt(1489)); //Cash Shop is disabled in this map diff --git a/src/map/clif.h b/src/map/clif.h index 7b27e1fe6..e1af44881 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -66,7 +66,7 @@ typedef enum send_target { AREA, // area AREA_WOS, // area, without self AREA_WOC, // area, without chatrooms - AREA_WOSC, // area, without own chatroom + AREA_WOSC, // area, without own chatrooms AREA_CHAT_WOC, // hearable area, without chatrooms CHAT, // current chatroom CHAT_WOS, // current chatroom, without self diff --git a/src/map/elemental.c b/src/map/elemental.c index b414d5b9f..7ffeea410 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -505,7 +505,7 @@ int elemental_change_mode_ack(struct elemental_data *ed, int mode) { else unit->skilluse_id(&ed->bl,bl->id,skill_id,skill_lv); - ed->target_id = 0; // Reset target after casting the skill to avoid continious attack. + ed->target_id = 0; // Reset target after casting the skill to avoid continuous attack. return 1; } @@ -529,7 +529,7 @@ int elemental_change_mode(struct elemental_data *ed, int mode) { else if( mode == EL_MODE_ASSIST ) mode = EL_SKILLMODE_ASSIST; // Assist spirit mode -> Assist spirit skill. else mode = EL_SKILLMODE_PASIVE; // Passive spirit mode -> Passive spirit skill. - // Use a skill inmediately after every change mode. + // Use a skill immediately after every change mode. if( mode != EL_SKILLMODE_AGGRESSIVE ) elemental->change_mode_ack(ed,mode); return 1; diff --git a/src/map/guild.c b/src/map/guild.c index 4bf9c9da0..209f29103 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -61,7 +61,7 @@ int guild_skill_get_max (int id) { return guild->skill_tree[id-GD_SKILLBASE].max; } -// Retrive skill_lv learned by guild +// Retrieve skill_lv learned by guild int guild_checkskill(struct guild *g, int id) { int idx = id - GD_SKILLBASE; if (idx < 0 || idx >= MAX_GUILDSKILL) @@ -764,7 +764,7 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag) { return 0; if(sd==NULL || sd->guild_invite==0){ - // cancel if player not present or invalide guild_id invitation + // cancel if player not present or invalid guild_id invitation if (flag == 0) { ShowError("guild: member added error %d is not online\n",account_id); intif->guild_leave(guild_id,account_id,char_id,0,"** Data Error **"); @@ -882,7 +882,7 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c online_member_sd = guild->getavailablesd(g); if(online_member_sd == NULL) - return 0; // noone online to inform + return 0; // no one online to inform #ifdef GP_BOUND_ITEMS //Guild bound item check @@ -2373,7 +2373,7 @@ void guild_defaults(void) { guild->agit_end = guild_agit_end; guild->agit2_start = guild_agit2_start; guild->agit2_end = guild_agit2_end; - /* guild flag cachin */ + /* guild flag caching */ guild->flag_add = guild_flag_add; guild->flag_remove = guild_flag_remove; guild->flags_clear = guild_flags_clear; diff --git a/src/map/homunculus.c b/src/map/homunculus.c index b6a83d1cb..8c47226db 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -809,7 +809,7 @@ bool homunculus_call(struct map_session_data *sd) { return true; } -// Recv homunculus data from char server +// Receive homunculus data from char server bool homunculus_recv_data(int account_id, struct s_homunculus *sh, int flag) { struct map_session_data *sd; struct homun_data *hd; @@ -1157,7 +1157,7 @@ bool homunculus_read_skill_db_sub(char* split[], int columns, int current) { classid = atoi(split[0]) - HM_CLASS_BASE; if ( classid >= MAX_HOMUNCULUS_CLASS ) { - ShowWarning("homunculus_read_skill_db_sub: Invalud homunculus class %d.\n", atoi(split[0])); + ShowWarning("homunculus_read_skill_db_sub: Invalid homunculus class %d.\n", atoi(split[0])); return false; } diff --git a/src/map/intif.c b/src/map/intif.c index 042896f4f..4dd0fa448 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -238,7 +238,7 @@ int intif_wis_replay(int id, int flag) WFIFOHEAD(inter_fd,7); WFIFOW(inter_fd,0) = 0x3002; WFIFOL(inter_fd,2) = id; - WFIFOB(inter_fd,6) = flag; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + WFIFOB(inter_fd,6) = flag; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target WFIFOSET(inter_fd,7); if (battle_config.etc_log) @@ -387,7 +387,7 @@ int intif_request_registry(struct map_session_data *sd, int flag) { nullpo_ret(sd); - /* if char server aint online it doesn't load, shouldn't we kill the session then? */ + /* if char server ain't online it doesn't load, shouldn't we kill the session then? */ if (intif->CheckForCharServer()) return 0; @@ -931,7 +931,7 @@ void intif_parse_WisMessage(int fd) { } //Success to send whisper. clif->wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56); - intif_wis_replay(id,0); // succes + intif_wis_replay(id,0); // success } // Wisp/page transmission result reception @@ -939,7 +939,7 @@ void intif_parse_WisEnd(int fd) { struct map_session_data* sd; if (battle_config.etc_log) - ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target + ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target sd = (struct map_session_data *)map->nick2sd((char *) RFIFOP(fd,2)); if (sd != NULL) clif->wis_end(sd->fd, RFIFOB(fd,26)); @@ -1366,7 +1366,7 @@ void intif_parse_DeletePetOk(int fd) { ShowError("pet data delete failure\n"); } -// ACK changing name resquest, players,pets,hommon +// ACK changing name request, players,pets,homun void intif_parse_ChangeNameOk(int fd) { struct map_session_data *sd = NULL; diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 9bc352276..320c64402 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1123,7 +1123,7 @@ void itemdb_read_packages(void) { for( r = 0; r < itemdb->packages[count].random_qty; r++ ) { if( itemdb->packages[count].random_groups[r].random_qty == 1 ) { - //item packages dont stop looping until something comes out of them, so if you have only one item in it the drop is guaranteed. + //item packages don't stop looping until something comes out of them, so if you have only one item in it the drop is guaranteed. ShowWarning("itemdb_read_packages: in '%s' 'Random: %d' group has only 1 random option, drop rate will be 100%!\n",itemdb_name(itemdb->packages[count].id),r+1); itemdb->packages[count].random_groups[r].random_list[0].rate = 10000; } diff --git a/src/map/map.c b/src/map/map.c index e37e902f6..a89478cb1 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -254,7 +254,7 @@ int map_delblock(struct block_list* bl) // blocklist (2ways chainlist) if (bl->prev == NULL) { if (bl->next != NULL) { - // can't delete block (already at the begining of the chain) + // can't delete block (already at the beginning of the chain) ShowError("map_delblock error : bl->next!=NULL\n"); } return 0; @@ -468,7 +468,7 @@ static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount, map->freeblock_lock(); for (i = blockcount; i < map->bl_list_count && returnCount < max; i++) { - if (map->bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasnt queued for deletion. + if (map->bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasn't queued for deletion. va_list argscopy; va_copy(argscopy, args); returnCount += func(map->bl_list[i], argscopy); @@ -2037,7 +2037,7 @@ void map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...) { } /// Applies func to everything in the db. -/// Stops iteratin gif func returns -1. +/// Stops iterating gif func returns -1. void map_vforeachregen(int (*func)(struct block_list* bl, va_list args), va_list args) { DBIterator* iter; struct block_list* bl; @@ -2057,7 +2057,7 @@ void map_vforeachregen(int (*func)(struct block_list* bl, va_list args), va_list } /// Applies func to everything in the db. -/// Stops iteratin gif func returns -1. +/// Stops iterating gif func returns -1. /// @see map_vforeachregen void map_foreachregen(int (*func)(struct block_list* bl, va_list args), ...) { va_list args; @@ -4402,7 +4402,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { } if( modifier[0] == '\0' || !( skill_id = skill->name2id(skill_name) ) || !skill->get_unit_id( skill->name2id(skill_name), 0) || atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) { - ;/* we dont mind it, the server will take care of it next. */ + ;/* we don't mind it, the server will take care of it next. */ } else { int idx = map->list[m].unit_count; @@ -4435,7 +4435,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { } if( modifier[0] == '\0' || !( skill_id = skill->name2id(skill_name) ) || atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) { - ;/* we dont mind it, the server will take care of it next. */ + ;/* we don't mind it, the server will take care of it next. */ } else { int idx = map->list[m].skill_count; @@ -4792,7 +4792,7 @@ void read_map_zone_db(void) { --h; continue; } - if( !map->zone_bl_type(libconfig->setting_get_string_elem(skills,h),&subtype) )/* we dont remove it from the three due to inheritance */ + if( !map->zone_bl_type(libconfig->setting_get_string_elem(skills,h),&subtype) )/* we don't remove it from the three due to inheritance */ --disabled_skills_count; } /* all ok, process */ @@ -4830,7 +4830,7 @@ void read_map_zone_db(void) { --h; continue; } - if( !libconfig->setting_get_bool(item) )/* we dont remove it from the three due to inheritance */ + if( !libconfig->setting_get_bool(item) )/* we don't remove it from the three due to inheritance */ --disabled_items_count; } /* all ok, process */ @@ -4875,7 +4875,7 @@ void read_map_zone_db(void) { --h; continue; } - if( !libconfig->setting_get_int(command) )/* we dont remove it from the three due to inheritance */ + if( !libconfig->setting_get_int(command) )/* we don't remove it from the three due to inheritance */ --disabled_commands_count; } /* all ok, process */ @@ -4911,7 +4911,7 @@ void read_map_zone_db(void) { --h; continue; } - if( !map->zone_bl_type(libconfig->setting_get_string_elem(cap,1),&subtype) )/* we dont remove it from the three due to inheritance */ + if( !map->zone_bl_type(libconfig->setting_get_string_elem(cap,1),&subtype) )/* we don't remove it from the three due to inheritance */ --capped_skills_count; } /* all ok, process */ @@ -5712,7 +5712,7 @@ int do_init(int argc, char *argv[]) char ip_str[16]; ip2str(sockt->addr_[0], ip_str); - ShowWarning("Not all IP addresses in /conf/map-server.conf configured, autodetecting...\n"); + ShowWarning("Not all IP addresses in /conf/map-server.conf configured, auto-detecting...\n"); if (sockt->naddr_ == 0) ShowError("Unable to determine your IP address...\n"); @@ -5736,7 +5736,7 @@ int do_init(int argc, char *argv[]) map->id_db = idb_alloc(DB_OPT_BASE); map->pc_db = idb_alloc(DB_OPT_BASE); //Added for reliable map->id2sd() use. [Skotlex] - map->mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob ai. [Skotlex] + map->mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob AI. [Skotlex] map->bossid_db = idb_alloc(DB_OPT_BASE); // Used for Convex Mirror quick MVP search map->map_db = uidb_alloc(DB_OPT_BASE); map->nick_db = idb_alloc(DB_OPT_BASE); @@ -5795,7 +5795,7 @@ int do_init(int argc, char *argv[]) itemdb->init(minimal); skill->init(minimal); if (!minimal) - map->read_zone_db();/* read after item and skill initalization */ + map->read_zone_db();/* read after item and skill initialization */ mob->init(minimal); pc->init(minimal); status->init(minimal); diff --git a/src/map/map.h b/src/map/map.h index 3ce59a804..38167597a 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -324,7 +324,7 @@ struct spawn_data { unsigned int level; struct { unsigned int size : 2; //Holds if mob has to be tiny/large - unsigned int ai : 4; //Special ai for summoned monsters. + unsigned int ai : 4; //Special AI for summoned monsters. //0: Normal mob | 1: Standard summon, attacks mobs //2: Alchemist Marine Sphere | 3: Alchemist Summon Flora | 4: Summon Zanzou unsigned int dynamic : 1; //Whether this data is indexed by a map's dynamic mob list @@ -659,8 +659,8 @@ struct map_data { int nocommand; //Blocks @/# commands for non-gms. [Skotlex] /** * Ice wall reference counter for bugreport:3574 - * - since there are a thounsand mobs out there in a lot of maps checking on, - * - every targetting for icewall on attack path would just be a waste, so, + * - since there are a thousand mobs out there in a lot of maps checking on, + * - every targeting for icewall on attack path would just be a waste, so, * - this counter allows icewall checking be only run when there is a actual ice wall on the map **/ int icewall_num; @@ -732,7 +732,7 @@ struct map_data_other_server { /// Bitfield of flags for the iterator. enum e_mapitflags { MAPIT_NORMAL = 0, - // MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold auth'ed, active players. + // MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold authed, active players. }; struct s_mapiterator; diff --git a/src/map/mob.c b/src/map/mob.c index ef47d6b70..552724de0 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -356,7 +356,7 @@ bool mob_ksprotected(struct block_list *src, struct block_list *target) { return false; // KS Protection Disabled if( !(md = BL_CAST(BL_MOB,target)) ) - return false; // Tarjet is not MOB + return false; // Target is not MOB if( (s_bl = battle->get_master(src)) == NULL ) s_bl = src; @@ -1073,7 +1073,7 @@ int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) default: if (battle_config.hom_setting&0x4 && (*target) && (*target)->type == BL_HOM && bl->type != BL_HOM) - return 0; //For some reason Homun targets are never overriden. + return 0; //For some reason Homun targets are never overridden. dist = distance_bl(&md->bl, bl); if( @@ -1443,7 +1443,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { //Unlock current target. if (mob->warpchase(md, tbl)) return true; //Chasing this target. - mob->unlocktarget(md, tick-(battle_config.mob_ai&0x8?3000:0)); //Imediately do random walk. + mob->unlocktarget(md, tick-(battle_config.mob_ai&0x8?3000:0)); //Immediately do random walk. tbl = NULL; } } @@ -2084,7 +2084,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { unsigned int base_exp,job_exp; } pt[DAMAGELOG_SIZE]; int i, temp, count, m = md->bl.m, pnum = 0; - int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are elligible for exp distribution + int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are eligible for exp distribution unsigned int mvp_damage; int64 tick = timer->gettick(); bool rebirth, homkillonly; @@ -2302,7 +2302,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { int drop_modifier = mvp_sd ? pc->level_penalty_mod( md->level - mvp_sd->status.base_level, md->status.race, md->status.mode, 2) : second_sd ? pc->level_penalty_mod( md->level - second_sd->status.base_level, md->status.race, md->status.mode, 2): third_sd ? pc->level_penalty_mod( md->level - third_sd->status.base_level, md->status.race, md->status.mode, 2) : - 100;/* no player was attached, we dont use any modifier (100 = rates are not touched) */ + 100;/* no player was attached, we don't use any modifier (100 = rates are not touched) */ #endif dlist->m = md->bl.m; dlist->x = md->bl.x; @@ -2613,7 +2613,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if( !rebirth ) { if( pcdb_checkid(md->vd->class_) ) {//Player mobs are not removed automatically by the client. - /* first we set them dead, then we delay the outsight effect */ + /* first we set them dead, then we delay the out sight effect */ clif->clearunit_area(&md->bl,CLR_DEAD); clif->clearunit_delayed(&md->bl, CLR_OUTSIGHT,tick+3000); } else @@ -2842,7 +2842,7 @@ int mob_warpslave(struct block_list *bl, int range) { } /*========================================== - * Counts slave sub, curently checking if mob master is the given ID. + * Counts slave sub, currently checking if mob master is the given ID. *------------------------------------------*/ int mob_countslave_sub(struct block_list *bl,va_list ap) { @@ -3231,7 +3231,7 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { continue; } } else { - //Targetted skill + //Targeted skill switch (skill_target) { case MST_RANDOM: //Pick a random enemy within skill range. bl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md), @@ -3335,7 +3335,7 @@ int mob_is_clone(int class_) } //Flag values: -//&1: Set special ai (fight mobs, not players) +//&1: Set special AI (fight mobs, not players) //If mode is not passed, a default aggressive mode is used. //If master_id is passed, clone is attached to him. //Returns: ID of newly crafted copy. @@ -3621,7 +3621,7 @@ unsigned int mob_drop_adjust(int baserate, int rate_adjust, unsigned short rate_ } /** - * Check if global item drop rate is overriden for given item + * Check if global item drop rate is overridden for given item * in db/mob_item_ratio.txt * @param nameid ID of the item * @param mob_id ID of the monster @@ -3773,7 +3773,7 @@ bool mob_parse_dbrow(char** str) { status->calc_misc(&data.bl, mstatus, db->lv); // MVP EXP Bonus: MEXP - // Some new MVP's MEXP multipled by high exp-rate cause overflow. [LuzZza] + // Some new MVP's MEXP multiple by high exp-rate cause overflow. [LuzZza] exp = (double)atoi(str[30]) * (double)battle_config.mvp_exp_rate / 100.; db->mexp = (unsigned int)cap_value(exp, 0, UINT_MAX); @@ -3835,7 +3835,7 @@ bool mob_parse_dbrow(char** str) { ratemax = battle_config.item_drop_treasure_max; } else switch (type) - { // Added suport to restrict normal drops of MVP's [Reddozen] + { // Added support to restrict normal drops of MVP's [Reddozen] case IT_HEALING: rate_adjust = (mstatus->mode&MD_BOSS) ? battle_config.item_rate_heal_boss : battle_config.item_rate_heal; ratemin = battle_config.item_drop_heal_min; diff --git a/src/map/mob.h b/src/map/mob.h index d07f78c77..7e222fa74 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -13,7 +13,7 @@ #define MAX_RANDOMMONSTER 5 -// Change this to increase the table size in your mob_db to accomodate a larger mob database. +// Change this to increase the table size in your mob_db to accommodate a larger mob database. // Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes. // Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000 #define MAX_MOB_DB 4000 @@ -35,7 +35,7 @@ #define MOB_CLONE_START (MAX_MOB_DB-999) #define MOB_CLONE_END MAX_MOB_DB -//Used to determine default enemy type of mobs (for use in eachinrange calls) +//Used to determine default enemy type of mobs (for use in each in range calls) #define DEFAULT_ENEMY_TYPE(md) ((md)->special_state.ai?BL_CHAR:BL_MOB|BL_PC|BL_HOM|BL_MER) #define MAX_MOB_CHAT 250 //Max Skill's messages @@ -127,7 +127,7 @@ struct mob_data { char name[NAME_LENGTH]; struct { unsigned int size : 2; //Small/Big monsters. - unsigned int ai : 4; //Special ai for summoned monsters. + unsigned int ai : 4; //Special AI for summoned monsters. //0: Normal mob. //1: Standard summon, attacks mobs. //2: Alchemist Marine Sphere diff --git a/src/map/npc.c b/src/map/npc.c index 0817313e2..81615022a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -666,7 +666,7 @@ void npc_timerevent_quit(struct map_session_data* sd) struct npc_data* nd; struct timer_event_data *ted; - // Check timer existance + // Check timer existence if( sd->npc_timer_id == INVALID_TIMER ) return; if( !(td = timer->get(sd->npc_timer_id)) ) @@ -1340,7 +1340,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns return ERROR_TYPE_ITEM_ID; if( !itemdb->isstackable(nameid) && amount > 1 ) { - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = item_list[i*2+0] = 1; } @@ -1667,7 +1667,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po return ERROR_TYPE_ITEM_ID; if(!itemdb->isstackable(nameid) && amount > 1) { - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = 1; } @@ -1775,7 +1775,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) { if( !itemdb->isstackable(nameid) && amount > 1 ) { //Exploit? You can't buy more than 1 of equipment types o.O - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = item_list[i*2+0] = 1; } @@ -1898,7 +1898,7 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st if( !itemdb->isstackable(nameid) && amount > 1 ) { //Exploit? You can't buy more than 1 of equipment types o.O - ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = p->list[i].qty = 1; } diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 2182e1da2..8bc246819 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -80,7 +80,7 @@ struct pcre_interface libpcre_s; /** - * delete everythign associated with a entry + * delete everything associated with a entry * * This does NOT do the list management */ @@ -245,7 +245,7 @@ void delete_pcreset(struct npc_data* nd, int setid) while (pcreset->head) { struct pcrematch_entry* n = pcreset->head->next; npc_chat->finalize_pcrematch_entry(pcreset->head); - aFree(pcreset->head); // Cleanin' the last ones.. [Lance] + aFree(pcreset->head); // Cleaning the last ones.. [Lance] pcreset->head = n; } @@ -301,7 +301,7 @@ void npc_chat_def_pattern(struct npc_data* nd, int setid, const char* pattern, c * Delete everything associated with a NPC concerning the pattern * matching code * - * this could be more efficent but.. how often do you do this? + * this could be more efficient but.. how often do you do this? */ void npc_chat_finalize(struct npc_data* nd) { @@ -344,10 +344,10 @@ int npc_chat_sub(struct block_list* bl, va_list ap) // iterate across all active sets for (pcreset = npcParse->active; pcreset != NULL; pcreset = pcreset->next) { - // interate across all patterns in that set + // n across all patterns in that set for (e = pcreset->head; e != NULL; e = e->next) { - int offsets[2*10 + 10]; // 1/3 reserved for temp space requred by pcre_exec + int offsets[2*10 + 10]; // 1/3 reserved for temp space required by pcre_exec // perform pattern match int r = libpcre->exec(e->pcre_, e->pcre_extra_, msg, len, 0, 0, offsets, ARRAYLENGTH(offsets)); @@ -380,7 +380,7 @@ int npc_chat_sub(struct block_list* bl, va_list ap) return 0; } -// Various script builtins used to support these functions +// Various script built-ins used to support these functions BUILDIN(defpattern) { int setid = script_getnum(st,2); const char* pattern = script_getstr(st,3); diff --git a/src/map/party.c b/src/map/party.c index 678b2cd54..7cf340edb 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -213,7 +213,7 @@ void party_check_state(struct party_data *p) { int i; memset(&p->state, 0, sizeof(p->state)); for (i = 0; i < MAX_PARTY; i ++) { - if (!p->party.member[i].online) continue; //Those not online shouldn't aport to skill usage and all that. + if (!p->party.member[i].online) continue; //Those not online shouldn't apart to skill usage and all that. switch (p->party.member[i].class_) { case JOB_MONK: case JOB_BABY_MONK: @@ -1132,7 +1132,7 @@ int party_sub_count_chorus(struct block_list *bl, va_list ap) { * @param func Function to execute * @param sd Reference character for party, map, area center * @param range Area size (0 = whole map) - * @param ... Adidtional parameters to pass to func() + * @param ... Additional parameters to pass to func() * @return Sum of the return values from func() */ int party_foreachsamemap(int (*func)(struct block_list*,va_list), struct map_session_data *sd, int range, ...) { diff --git a/src/map/script.c b/src/map/script.c index 95cf48a16..6ccbf8eaa 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2765,7 +2765,7 @@ void script_array_add_member(struct script_array *sa, unsigned int idx) { } /** * Obtains the source of the array database for this type and scenario - * Initializes such database when not yet initialised. + * Initializes such database when not yet initialized. **/ struct reg_db *script_array_src(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { struct reg_db *src = NULL; diff --git a/src/map/skill.c b/src/map/skill.c index 383720361..cb0f4786f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -852,7 +852,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 #ifdef RENEWAL sc_start(src,bl,SC_FREEZE,65-(5*skill_lv),skill_lv,skill->get_time2(skill_id,skill_lv)); #else - //Tharis pointed out that this is normal freeze chance with a base of 300% + // [Tharis] pointed out that this is normal freeze chance with a base of 300% if(tsc->sg_counter >= 3 && sc_start(src,bl,SC_FREEZE,300,skill_lv,skill->get_time2(skill_id,skill_lv))) tsc->sg_counter = 0; @@ -993,7 +993,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 break; case NPC_MENTALBREAKER: { - //Based on observations by Tharis, Mental Breaker should do SP damage + //Based on observations by [Tharis], Mental Breaker should do SP damage //equal to Matk*skLevel. rate = status->get_matk(src, 2); rate*=skill_lv; @@ -1032,7 +1032,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 sc_start(src,bl,SC_BLIND,100,skill_lv,skill->get_time2(skill_id,skill_lv)); break; - case LK_HEADCRUSH: //Headcrush has chance of causing Bleeding status, except on demon and undead element + case LK_HEADCRUSH: // Headcrush has chance of causing Bleeding status, except on demon and undead element if (!(battle->check_undead(tstatus->race, tstatus->def_ele) || tstatus->race == RC_DEMON)) sc_start2(src, bl, SC_BLOODING,50, skill_lv, src->id, skill->get_time2(skill_id,skill_lv)); break; @@ -1296,11 +1296,11 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 sc_start(src, bl, SC_BLOODING, 100, skill_lv, 10000); break; case ITEMID_MELON_BOMB: - sc_start(src, bl, SC_MELON_BOMB, 100, skill_lv, 60000); // Reduces ASPD and moviment speed + sc_start(src, bl, SC_MELON_BOMB, 100, skill_lv, 60000); // Reduces ASPD and movement speed break; case ITEMID_BANANA_BOMB: sc_start(src, bl, SC_BANANA_BOMB, 100, skill_lv, 60000); // Reduces LUK? Needed confirm it, may be it's bugged in kRORE? - sc_start(src, bl, SC_BANANA_BOMB_SITDOWN_POSTDELAY, (sd? sd->status.job_level:0) + sstatus->dex / 6 + tstatus->agi / 4 - tstatus->luk / 5 - status->get_lv(bl) + status->get_lv(src), skill_lv, 1000); // Sitdown for 3 seconds. + sc_start(src, bl, SC_BANANA_BOMB_SITDOWN_POSTDELAY, (sd? sd->status.job_level:0) + sstatus->dex / 6 + tstatus->agi / 4 - tstatus->luk / 5 - status->get_lv(bl) + status->get_lv(src), skill_lv, 1000); // Sit down for 3 seconds. break; } sd->itemid = -1; @@ -1657,7 +1657,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint1 return 1; } -/* Splitted off from skill->additional_effect, which is never called when the +/* Split off from skill->additional_effect, which is never called when the * attack skill kills the enemy. Place in this function counter status effects * when using skills (eg: Asura's sp regen penalty, or counter-status effects * from cards) that will take effect on the source, not the target. [Skotlex] @@ -1673,7 +1673,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b nullpo_ret(src); nullpo_ret(bl); - if(skill_id > 0 && !skill_lv) return 0; // don't forget auto attacks! - celest + if(skill_id > 0 && !skill_lv) return 0; // don't forget auto attacks! [celest] sd = BL_CAST(BL_PC, src); dstsd = BL_CAST(BL_PC, bl); @@ -1712,7 +1712,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b case GS_FULLBUSTER: sc_start(src,src,SC_BLIND,2*skill_lv,skill_lv,skill->get_time2(skill_id,skill_lv)); break; - case HFLI_SBR44: //[orn] + case HFLI_SBR44: // [orn] case HVAN_EXPLOSION: if(src->type == BL_HOM){ TBL_HOM *hd = (TBL_HOM*)src; @@ -1728,15 +1728,15 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b } if( sd && (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR - && rnd()%10000 < battle_config.sg_miracle_skill_ratio) //SG_MIRACLE [Komurka] + && rnd()%10000 < battle_config.sg_miracle_skill_ratio) // SG_MIRACLE [Komurka] sc_start(src,src,SC_MIRACLE,100,1,battle_config.sg_miracle_skill_duration); if( sd && skill_id && attack_type&BF_MAGIC && status->isdead(bl) && !(skill->get_inf(skill_id)&(INF_GROUND_SKILL|INF_SELF_SKILL)) && (rate=pc->checkskill(sd,HW_SOULDRAIN)) > 0 ) { - //Soul Drain should only work on targetted spells [Skotlex] - if( pc_issit(sd) ) pc->setstand(sd); //Character stuck in attacking animation while 'sitting' fix. [Skotlex] + // Soul Drain should only work on targeted spells [Skotlex] + if( pc_issit(sd) ) pc->setstand(sd); // Character stuck in attacking animation while 'sitting' fix. [Skotlex] if( skill->get_nk(skill_id)&NK_SPLASH && skill->area_temp[1] != bl->id ) ; else { @@ -1756,7 +1756,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b if( attack_type&BF_MAGIC ) { sp += sd->bonus.magic_sp_gain_value; hp += sd->bonus.magic_hp_gain_value; - if( skill_id == WZ_WATERBALL ) {//(bugreport:5303) + if( skill_id == WZ_WATERBALL ) {// (bugreport:5303) struct status_change *sc = NULL; if( ( sc = status->get_sc(src) ) ) { if( sc->data[SC_SOULLINK] @@ -1851,7 +1851,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b break; } dstsd->state.autocast = 0; - //Set canact delay. [Skotlex] + // Set canact delay. [Skotlex] ud = unit->bl2ud(bl); if (ud) { rate = skill->delay_fix(bl, auto_skill_id, auto_skill_lv); @@ -1989,7 +1989,7 @@ int skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int return 0; sc = status->get_sc(bl); - if (!sc || sc->option&OPTION_MADOGEAR ) //Mado Gear cannot be divested [Ind] + if (!sc || sc->option&OPTION_MADOGEAR ) // Mado Gear cannot be divested [Ind] return 0; for (i = 0; i < ARRAYLENGTH(pos); i++) { @@ -2018,16 +2018,16 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in nullpo_ret(src); if (src != target && map->list[src->m].flag.noknockback) - return 0; //No knocking + return 0; // No knocking if (count == 0) - return 0; //Actual knockback distance is 0. + return 0; // Actual knockback distance is 0. switch (target->type) { case BL_MOB: { struct mob_data* md = BL_CAST(BL_MOB, target); if( md->class_ == MOBID_EMPERIUM ) return 0; - if(src != target && is_boss(target)) //Bosses can't be knocked-back + if(src != target && is_boss(target)) // Bosses can't be knocked-back return 0; } break; @@ -2059,11 +2059,13 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in } -// Checks if 'bl' should reflect back a spell cast by 'src'. -// type is the type of magic attack: 0: indirect (aoe), 1: direct (targetted) -// In case of success returns type of reflection, otherwise 0 -// 1 - Regular reflection (Maya) -// 2 - SL_KAITE reflection +/* + Checks if 'bl' should reflect back a spell cast by 'src'. + type is the type of magic attack: 0: indirect (aoe), 1: direct (targeted) + In case of success returns type of reflection, otherwise 0 + 1 - Regular reflection (Maya) + 2 - SL_KAITE reflection +*/ int skill_magic_reflect(struct block_list* src, struct block_list* bl, int type) { struct status_change *sc = status->get_sc(bl); struct map_session_data* sd = BL_CAST(BL_PC, bl); @@ -2122,8 +2124,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr if(skill_id > 0 && !skill_lv) return 0; - nullpo_ret(src); //Source is the master behind the attack (player/mob/pet) - nullpo_ret(dsrc); //dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src. + nullpo_ret(src); // Source is the master behind the attack (player/mob/pet) + nullpo_ret(dsrc); // dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src. nullpo_ret(bl); //Target to be attacked. if (src != dsrc) { @@ -2131,7 +2133,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr if (!status->check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skill_id, 2)) return 0; } else if ((flag&SD_ANIMATION) && skill->get_nk(skill_id)&NK_SPLASH) { - //Note that splash attacks often only check versus the targetted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex] + //Note that splash attacks often only check versus the targeted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex] if (!status->check_skilluse(src, bl, skill_id, 2)) return 0; } @@ -2185,7 +2187,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr sc = NULL; //Don't need it. /* bugreport:2564 flag&2 disables double casting trigger */ flag |= 2; - /* bugreport:7859 magical reflect'd zeroes blewcount */ + /* bugreport:7859 magical reflected zeroes blow count */ dmg.blewcount = 0; //Spirit of Wizard blocks Kaite's reflection if( type == 2 && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_WIZARD ) @@ -2207,11 +2209,11 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr #if MAGIC_REFLECTION_TYPE #ifdef RENEWAL - if( dmg.dmg_lv != ATK_MISS ) //Wiz SL cancelled and consumed fragment + if( dmg.dmg_lv != ATK_MISS ) // Wiz SL canceled and consumed fragment #else // issue:6415 in pre-renewal Kaite reflected the entire damage received - // regardless of caster's equipament (Aegis 11.1) - if( dmg.dmg_lv != ATK_MISS && type == 1 ) //Wiz SL cancelled and consumed fragment + // regardless of caster's equipment (Aegis 11.1) + if( dmg.dmg_lv != ATK_MISS && type == 1 ) //Wiz SL canceled and consumed fragment #endif { short s_ele = skill->get_ele(skill_id, skill_lv); @@ -2503,7 +2505,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr { //Updated to not be able to copy skills if the blow will kill you. [Skotlex] int copy_skill = skill_id, cidx = 0; /** - * Copy Referal: dummy skills should point to their source upon copying + * Copy Referral: dummy skills should point to their source upon copying **/ switch( skill_id ) { case AB_DUPLELIGHT_MELEE: @@ -2740,7 +2742,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr struct status_change *ssc = status->get_sc(src); if( ssc && ssc->data[SC_POISONINGWEAPON] && rnd()%100 < 70 + 5*skill_lv ) { short rate = 100; - if ( ssc->data[SC_POISONINGWEAPON]->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech] + if ( ssc->data[SC_POISONINGWEAPON]->val1 == 9 )// Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech] rate = 100 - tstatus->int_ * 4 / 5; sc_start(src, bl,ssc->data[SC_POISONINGWEAPON]->val2,rate,ssc->data[SC_POISONINGWEAPON]->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000); status_change_end(src,SC_POISONINGWEAPON,-1); @@ -2775,8 +2777,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr } /*========================================== - * sub fonction for recursive skill call. - * Checking bl battle flag and display dammage + * sub function for recursive skill call. + * Checking bl battle flag and display damage * then call func with source,target,skill_id,skill_lv,tick,flag *------------------------------------------*/ int skill_area_sub(struct block_list *bl, va_list ap) { @@ -2967,7 +2969,7 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, if( (idx = skill->get_index(skill_id)) == 0 ) return 0; - // Requeriments + // Requirements for( i = 0; i < ARRAYLENGTH(itemid); i++ ) { itemid[i] = skill->db[idx].itemid[i]; @@ -2989,7 +2991,7 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, else sp += (st->max_sp * (-sp_rate)) / 100; - if( bl->type == BL_HOM ) { // Intimacy Requeriments + if( bl->type == BL_HOM ) { // Intimacy Requirements struct homun_data *hd = BL_CAST(BL_HOM, bl); switch( skill_id ) { case HFLI_SBR44: @@ -3414,7 +3416,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 return 1; if (skill_id && skill->get_type(skill_id) == BF_MAGIC && status->isimmune(bl) == 100) { - //GTB makes all targetted magic display miss with a single bolt. + //GTB makes all targeted magic display miss with a single bolt. sc_type sct = status->skill2sc(skill_id); if(sct != SC_NONE) status_change_end(bl, sct, INVALID_TIMER); @@ -4054,7 +4056,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag); break; - // Celest + // [Celest] case PF_SOULBURN: if (rnd()%100 < (skill_lv < 5 ? 30 + skill_lv * 10 : 70)) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); @@ -4139,7 +4141,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 if( unit->movepos(src, bl->x+x, bl->y+y, 1, 1) ) { clif->slide(src,bl->x+x,bl->y+y); - clif->fixpos(src); // the official server send these two packts. + clif->fixpos(src); // the official server send these two packets. skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); if( rnd()%100 < 4 * skill_lv ) skill->castend_damage_id(src,bl,GC_CROSSIMPACT,skill_lv,tick,flag); @@ -4562,7 +4564,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 } break; - //recursive homon skill + // Recursive homun skill case MH_MAGMA_FLOW: case MH_HEILIGE_STANGE: if(flag & 1) @@ -4791,7 +4793,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) { && (sc = status->get_sc(target)) && sc->data[SC_FOGWALL] && rnd() % 100 < 75 ) { - //Fogwall makes all offensive-type targetted skills fail at 75% + // Fogwall makes all offensive-type targeted skills fail at 75% if (sd) clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_LEVEL, 0); break; } @@ -4842,8 +4844,8 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) { unit->stop_walking(src,1); if( !sd || sd->skillitem != ud->skill_id || skill->get_delay(ud->skill_id,ud->skill_lv) ) - ud->canact_tick = tick + skill->delay_fix(src, ud->skill_id, ud->skill_lv); //Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish] - if (sd) { //Cooldown application + ud->canact_tick = tick + skill->delay_fix(src, ud->skill_id, ud->skill_lv); // Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish] + if (sd) { // Cooldown application int i, cooldown = skill->get_cooldown(ud->skill_id, ud->skill_lv); for (i = 0; i < ARRAYLENGTH(sd->skillcooldown) && sd->skillcooldown[i].id; i++) { // Increases/Decreases cooldown of a skill by item/card bonuses. if (sd->skillcooldown[i].id == ud->skill_id){ @@ -4886,7 +4888,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) { // SC_MAGICPOWER needs to switch states before any damage is actually dealt skill->toggle_magicpower(src, ud->skill_id); - /* On aegis damage skills are also increase by camouflage. Need confirmation on kRo. + /* On aegis damage skills are also increase by camouflage. Need confirmation on kRO. if( ud->skill_id != RA_CAMOUFLAGE ) // only normal attack and auto cast skills benefit from its bonuses status_change_end(src,SC_CAMOUFLAGE, INVALID_TIMER); */ @@ -4983,7 +4985,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin int element = 0; enum sc_type type; - if(skill_id > 0 && !skill_lv) return 0; // celest + if(skill_id > 0 && !skill_lv) return 0; // [Celest] nullpo_retr(1, src); nullpo_retr(1, bl); @@ -5024,7 +5026,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin //Check for undead skills that convert a no-damage skill into a damage one. [Skotlex] switch (skill_id) { - case HLIF_HEAL: //[orn] + case HLIF_HEAL: // [orn] if (bl->type != BL_HOM) { if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0) ; break ; @@ -5095,7 +5097,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin struct block_list *s_src = battle->get_master(src); short ret = 0; if(!skill->check_unit_range(src, src->x, src->y, skill_id, skill_lv)) //prevent reiteration - ret = skill->castend_pos2(src,src->x,src->y,skill_id,skill_lv,tick,flag); //cast on homon + ret = skill->castend_pos2(src,src->x,src->y,skill_id,skill_lv,tick,flag); //cast on homun if(s_src && !skill->check_unit_range(s_src, s_src->x, s_src->y, skill_id, skill_lv)) ret |= skill->castend_pos2(s_src,s_src->x,s_src->y,skill_id,skill_lv,tick,flag); //cast on master if (hd) @@ -5138,7 +5140,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin map->freeblock_lock(); switch(skill_id) { - case HLIF_HEAL: //[orn] + case HLIF_HEAL: // [orn] case AL_HEAL: /** * Arch Bishop @@ -5494,7 +5496,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (dstsd) { if(dstsd->status.weapon == W_FIST || (dstsd->sc.count && !dstsd->sc.data[type] && - ( //Allow re-enchanting to lenghten time. [Skotlex] + ( //Allow re-enchanting to lengthen time. [Skotlex] dstsd->sc.data[SC_PROPERTYFIRE] || dstsd->sc.data[SC_PROPERTYWATER] || dstsd->sc.data[SC_PROPERTYWIND] || @@ -5716,7 +5718,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin { int duration = skill->get_time(skill_id,skill_lv); clif->skill_nodamage(bl,bl,skill_id,skill_lv,sc_start(src,bl,type,100,skill_lv,duration)); // Master - clif->skill_nodamage(src,src,skill_id,skill_lv,sc_start(src,src,type,100,skill_lv,duration)); // Homunc + clif->skill_nodamage(src,src,skill_id,skill_lv,sc_start(src,src,type,100,skill_lv,duration)); // Homun } break; case NJ_BUNSINJYUTSU: @@ -6050,7 +6052,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin BF_MAGIC, src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY); break; - case HVAN_EXPLOSION: //[orn] + case HVAN_EXPLOSION: // [orn] case NPC_SELFDESTRUCTION: { //Self Destruction hits everyone in range (allies+enemies) @@ -6183,7 +6185,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin return 0; } clif->skill_nodamage(src,bl,skill_id,skill_lv,sc_start4(src,bl,type,100,skill_lv,unit->getdir(bl),0,0,0)); - if (sd) // If the client receives a skill-use packet inmediately before a walkok packet, it will discard the walk packet! [Skotlex] + if (sd) // If the client receives a skill-use packet immediately before a walkok packet, it will discard the walk packet! [Skotlex] clif->walkok(sd); // So aegis has to resend the walk ok. break; case AS_CLOAKING: @@ -6419,7 +6421,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case MC_IDENTIFY: if(sd) { clif->item_identify_list(sd); - if( sd->menuskill_id != MC_IDENTIFY ) {/* failed, dont consume anything, return */ + if( sd->menuskill_id != MC_IDENTIFY ) {/* failed, don't consume anything, return */ map->freeblock_unlock(); return 1; } @@ -6761,7 +6763,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } clif->skill_nodamage(src,bl,skill_id,skill_lv,1); if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) - || (tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_ROGUE) //Rogue's spirit defends againt dispel. + || (tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_ROGUE) //Rogue's spirit defends against dispel. || (dstsd && pc_ismadogear(dstsd)) || rnd()%100 >= 50+10*skill_lv ) { @@ -7071,7 +7073,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin unit->stop_attack(src); //Run skillv tiles overriding the can-move check. if (unit->walktoxy(src, src->x + skill_lv * mask[dir][0], src->y + skill_lv * mask[dir][1], 2) && md) - md->state.skillstate = MSS_WALK; //Otherwise it isn't updated in the ai. + md->state.skillstate = MSS_WALK; //Otherwise it isn't updated in the AI. } break; @@ -7137,14 +7139,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case WE_MALE: { int hp_rate = (!skill_lv)? 0:skill->db[skill_id].hp_rate[skill_lv-1]; - int gain_hp = tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it costed the caster. [Skotlex] + int gain_hp = tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it cost the caster. [Skotlex] clif->skill_nodamage(src,bl,skill_id,status->heal(bl, gain_hp, 0, 0),1); } break; case WE_FEMALE: { int sp_rate = (!skill_lv)? 0:skill->db[skill_id].sp_rate[skill_lv-1]; - int gain_sp = tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex] + int gain_sp = tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it cost the caster. [Skotlex] clif->skill_nodamage(src,bl,skill_id,status->heal(bl, 0, gain_sp, 0),1); } break; @@ -7248,7 +7250,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin // if it is already trapping something don't spring it, // remove trap should be used instead break; - // otherwise fallthrough to below + // otherwise fall through to below case UNT_BLASTMINE: case UNT_SKIDTRAP: case UNT_LANDMINE: @@ -7481,7 +7483,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (count == -1) count = 3; else - count++; //Should not retrigger this one. + count++; //Should not re-trigger this one. break; case 7: // stop freeze or stoned { @@ -7696,7 +7698,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } break; - case AM_CALLHOMUN: //[orn] + case AM_CALLHOMUN: // [orn] if( sd ) { if (homun->call(sd)) clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); @@ -7714,7 +7716,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } break; - case HAMI_CASTLE: //[orn] + case HAMI_CASTLE: // [orn] if(rnd()%100 < 20*skill_lv && src != bl) { int x,y; @@ -7724,7 +7726,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin skill->blockhomun_start(hd, skill_id, skill->get_time2(skill_id,skill_lv)); if (unit->movepos(src,bl->x,bl->y,0,0)) { - clif->skill_nodamage(src,src,skill_id,skill_lv,1); // Homunc + clif->skill_nodamage(src,src,skill_id,skill_lv,1); // Homun clif->slide(src,bl->x,bl->y) ; if (unit->movepos(bl,x,y,0,0)) { @@ -7743,7 +7745,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin else if (sd) clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0); break; - case HVAN_CHAOTIC: //[orn] + case HVAN_CHAOTIC: // [orn] { static const int per[5][2]={{20,50},{50,60},{25,75},{60,64},{34,67}}; int r = rnd()%100; @@ -7764,7 +7766,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin status->heal(bl, hp, 0, 0); } break; - //Homun single-target support skills [orn] + // Homun single-target support skills [orn] case HAMI_BLOODLUST: case HFLI_FLEET: case HFLI_SPEED: @@ -8016,7 +8018,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin { // Every time the skill is casted the status change is reseted adding a counter. count += (short)tsc->data[SC_ROLLINGCUTTER]->val1; if( count > 10 ) - count = 10; // Max coounter + count = 10; // Max counter status_change_end(bl, SC_ROLLINGCUTTER, INVALID_TIMER); } sc_start(src,bl,SC_ROLLINGCUTTER,100,count,skill->get_time(skill_id,skill_lv)); @@ -8548,7 +8550,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } if ( tsc && tsc->data[SC__UNLUCKY] && skill_id == SC_UNLUCKY) { //If the target was successfully inflected with the Unlucky status, give 1 of 3 random status's. - switch(rnd()%3) {//Targets in the Unlucky status will be affected by one of the 3 random status's reguardless of resistance. + switch(rnd()%3) {//Targets in the Unlucky status will be affected by one of the 3 random status's regardless of resistance. case 0: status->change_start(src,bl,SC_POISON,10000,skill_lv,0,0,0,skill->get_time(skill_id,skill_lv),10); break; @@ -8732,7 +8734,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } else { int count = 0; clif->skill_damage(src, bl, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); - count = map->forcountinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv), (sd)?sd->spiritball_old:15, // Assume 15 spiritballs in non-charactors + count = map->forcountinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv), (sd)?sd->spiritball_old:15, // Assume 15 spiritballs in non-characters BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); if( sd ) pc->delspiritball(sd, count, 0); clif->skill_nodamage(src, src, skill_id, skill_lv, @@ -8921,7 +8923,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin sc_start(src, bl, type, 100, skill_lv,skill->get_time(skill_id, skill_lv)); if ( madnesscheck >= 8 )//The god of madness deals 9999 fixed unreduceable damage when 8 or more enemy players are affected. status_fix_damage(src, bl, 9999, clif->damage(src, bl, 0, 0, 9999, 0, 0, 0)); - //skill->attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);//To renable when I can confirm it deals damage like this. Data shows its dealed as reflected damage which I dont have it coded like that yet. [Rytech] + //skill->attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);//To renable when I can confirm it deals damage like this. Data shows its dealt as reflected damage which I don't have it coded like that yet. [Rytech] } else if( sd ) { int rate = sstatus->int_ / 6 + (sd? sd->status.job_level:0) / 5 + skill_lv * 4; if ( rnd()%100 < rate ) { @@ -9047,7 +9049,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if( sd ) { int elemental_class = skill->get_elemental_type(skill_id,skill_lv); - // Remove previous elemental fisrt. + // Remove previous elemental first. if( sd->ed ) elemental->delete(sd->ed,0); @@ -9070,7 +9072,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin elemental->delete(sd->ed, 0); break; } - switch( skill_lv ) {// Select mode bassed on skill level used. + switch( skill_lv ) {// Select mode based on skill level used. case 2: mode = EL_MODE_ASSIST; break; case 3: mode = EL_MODE_AGGRESSIVE; break; } @@ -9847,7 +9849,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui int r; //if(skill_lv <= 0) return 0; - if(skill_id > 0 && !skill_lv) return 0; // celest + if(skill_id > 0 && !skill_lv) return 0; // [Celest] nullpo_ret(src); @@ -10153,7 +10155,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui int class_ = skill_id==AM_SPHEREMINE?1142:summons[skill_lv-1]; struct mob_data *md; - // Correct info, don't change any of this! [celest] + // Correct info, don't change any of this! [Celest] md = mob->once_spawn_sub(src, src->m, x, y, status->get_name(src), class_, "", SZ_MEDIUM, AI_NONE); if (md) { md->master_id = src->id; @@ -10293,7 +10295,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui sc_start(src,src,type,100,skill_lv,skill->get_time2(skill_id,skill_lv)); break; - case AM_RESURRECTHOMUN: //[orn] + case AM_RESURRECTHOMUN: // [orn] if (sd) { if (!homun->ressurect(sd, 20*skill_lv, x, y)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); @@ -11871,7 +11873,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 case UNT_POISONSMOKE: if( battle->check_target(ss,bl,BCT_ENEMY) > 0 && !(tsc && tsc->data[sg->val2]) && rnd()%100 < 50 ) { short rate = 100; - if ( sg->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech] + if ( sg->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech] rate = 100 - tstatus->int_ * 4 / 5 ; sc_start(ss,bl,sg->val2,rate,sg->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000); } @@ -11906,7 +11908,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 case UNT_STEALTHFIELD: if( bl->id == sg->src_id ) - break; // Dont work on Self (video shows that) + break; // Don't work on Self (video shows that) case UNT_NEUTRALBARRIER: sc_start(ss,bl,type,100,sg->skill_lv,sg->interval + 100); break; @@ -12188,8 +12190,8 @@ int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { //We don't check for SC_LONGING because someone could always have knocked you back and out of the song/dance. //FIXME: This code is not perfect, it doesn't checks for the real ensemble's owner, //it only checks if you are doing the same ensemble. So if there's two chars doing an ensemble - //which overlaps, by stepping outside of the other parther's ensemble will cause you to cancel - //your own. Let's pray that scenario is pretty unlikely and noone will complain too much about it. + //which overlaps, by stepping outside of the other partner's ensemble will cause you to cancel + //your own. Let's pray that scenario is pretty unlikely and none will complain too much about it. status_change_end(bl, SC_DANCING, INVALID_TIMER); } case MH_STEINWAND: @@ -12235,7 +12237,7 @@ int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { if (sce) { status_change_end(bl, type, INVALID_TIMER); if ((sce=sc->data[SC_BLIND])) { - if (bl->type == BL_PC) //Players get blind ended inmediately, others have it still for 30 secs. [Skotlex] + if (bl->type == BL_PC) //Players get blind ended immediately, others have it still for 30 secs. [Skotlex] status_change_end(bl, SC_BLIND, INVALID_TIMER); else { timer->delete(sce->timer, status->change_timer); @@ -12683,7 +12685,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id case BS_GREED: clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR,0); return 0; - default: //Only Mechanic exlcusive skill can be used. + default: //Only Mechanic exclusive skill can be used. break; } } @@ -12996,7 +12998,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id return 0; } break; - case AM_REST: //Can't vapo homun if you don't have an active homunc or it's hp is < 80% + case AM_REST: //Can't vapo homun if you don't have an active homun or it's hp is < 80% if (!homun_alive(sd->hd) || sd->hd->battle_status.hp < (sd->hd->battle_status.max_hp*80/100)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); @@ -13433,7 +13435,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id // There's no need to check if the skill is part of a combo if it's // already been checked before, see unit_skilluse_id2 [Panikon] - // Note that if this check is readded part of issue:8047 will reapear! + // Note that if this check is read part of issue:8047 will reappear! //if( sd->sc.data[SC_COMBOATTACK] && !skill->is_combo(skill_id ) ) // return 0; @@ -13681,7 +13683,7 @@ int skill_consume_requirement( struct map_session_data *sd, uint16 skill_id, uin continue; if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_WIZARD ) - continue; //Gemstones are checked, but not substracted from inventory. + continue; //Gemstones are checked, but not subtracted from inventory. switch( skill_id ){ case SA_SEISMICWEAPON: @@ -13876,7 +13878,7 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN ) { if( sd->special_state.no_gemstone ) - { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica + { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card [helvetica] if( skill_id != SA_ABRACADABRA ) req.itemid[i] = req.amount[i] = 0; else if( --req.amount[i] < 1 ) @@ -15033,7 +15035,7 @@ int skill_cell_overlap(struct block_list *bl, va_list ap) { if( su == NULL || su->group == NULL || (*alive) == 0 ) return 0; - if( su->group->state.guildaura ) /* guild auras are not cancelled! */ + if( su->group->state.guildaura ) /* guild auras are not canceled! */ return 0; switch (skill_id) { @@ -15484,7 +15486,7 @@ int skill_delunit (struct skill_unit* su) { } break; case SC_MANHOLE: // Note : Removing the unit don't remove the status (official info) - if( group->val2 ) { // Someone Traped + if( group->val2 ) { // Someone Trapped struct status_change *tsc = status->get_sc(map->id2bl(group->val2)); if( tsc && tsc->data[SC__MANHOLE] ) tsc->data[SC__MANHOLE]->val4 = 0; // Remove the Unit ID @@ -15631,7 +15633,7 @@ int skill_delunitgroup(struct skill_unit_group *group, const char* file, int lin struct status_change* sc = status->get_sc(src); if (sc && sc->data[SC_DANCING]) { - sc->data[SC_DANCING]->val2 = 0 ; //This prevents status_change_end attempting to redelete the group. [Skotlex] + sc->data[SC_DANCING]->val2 = 0 ; //This prevents status_change_end attempting to re-delete the group. [Skotlex] status_change_end(src, SC_DANCING, INVALID_TIMER); } } @@ -16013,7 +16015,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { return 0; } /*========================================== - * Executes on all skill units every SKILLUNITTIMER_INTERVAL miliseconds. + * Executes on all skill units every SKILLUNITTIMER_INTERVAL milliseconds. *------------------------------------------*/ int skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { map->freeblock_lock(); @@ -16420,7 +16422,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, make_per = 100000; // Star Crumbs are 100% success crafting rate? (made 1000% so it succeeds even after penalties) [Skotlex] break; default: // Enchanted Stones - make_per += 1000+i*500; // Enchantedstone Craft bonus: +15/+20/+25/+30/+35 + make_per += 1000+i*500; // Enchanted stone Craft bonus: +15/+20/+25/+30/+35 break; } break; @@ -16468,7 +16470,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, case ITEMID_COATING_BOTTLE: make_per -= (1+rnd()%100)*10; break; - //Common items, recieve no bonus or penalty, listed just because they are commonly produced + //Common items, receive no bonus or penalty, listed just because they are commonly produced case ITEMID_BLUE_POTION: case ITEMID_RED_SLIM_POTION: case ITEMID_ANODYNE: @@ -17371,7 +17373,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick) return 0; } -int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { //[orn] +int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { // [orn] struct homun_data *hd = (TBL_HOM*)map->id2bl(id); if (data <= 0 || data >= MAX_SKILL) return 0; @@ -17380,7 +17382,7 @@ int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { //[orn] return 1; } -int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { //[orn] +int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { // [orn] uint16 idx = skill->get_index(skill_id); nullpo_retr (-1, hd); @@ -17396,7 +17398,7 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { / return timer->add(timer->gettick() + tick, skill->blockhomun_end, hd->bl.id, idx); } -int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {//[orn] +int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {// [orn] struct mercenary_data *md = (TBL_MER*)map->id2bl(id); if( data <= 0 || data >= MAX_SKILL ) return 0; @@ -17984,7 +17986,7 @@ bool skill_parse_row_requiredb(char* split[], int columns, int current) { skill->split_atoi(split[5],skill->db[idx].sp_rate); skill->split_atoi(split[6],skill->db[idx].zeny); - //Wich weapon type are required, see doc/item_db for types + //Which weapon type are required, see doc/item_db for types p = split[7]; for( j = 0; j < 32; j++ ) { int l = atoi(p); @@ -18481,7 +18483,7 @@ void skill_defaults(void) { memset(&skill->area_temp,0,sizeof(skill->area_temp)); memset(&skill->unit_temp,0,sizeof(skill->unit_temp)); skill->unit_group_newid = 0; - /* accesssors */ + /* accessors */ skill->get_index = skill_get_index; skill->get_type = skill_get_type; skill->get_hit = skill_get_hit; diff --git a/src/map/status.c b/src/map/status.c index a716b8913..d05341683 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1121,8 +1121,8 @@ int status_charge(struct block_list* bl, int64 hp, int64 sp) { } //Inflicts damage on the target with the according walkdelay. -//If flag&1, damage is passive and does not triggers cancelling status changes. -//If flag&2, fail if target does not has enough to substract. +//If flag&1, damage is passive and does not triggers canceling status changes. +//If flag&2, fail if target does not has enough to subtract. //If flag&4, if killed, mob must not give exp/loot. //flag will be set to &8 when damaging sp of a dead character int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, int64 in_sp, int walkdelay, int flag) { @@ -1269,7 +1269,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, st->hp = 1; //To let the dead function cast skills and all that. //NOTE: These dead functions should return: [Skotlex] - //0: Death cancelled, auto-revived. + //0: Death canceled, auto-revived. //Non-zero: Standard death. Clear status, cancel move/attack, etc //&2: Also remove object from map. //&4: Also delete object from memory. @@ -1284,7 +1284,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, break; } - if(!flag) //Death cancelled. + if(!flag) //Death canceled. return (int)(hp+sp); //Normal death @@ -1429,7 +1429,7 @@ int status_heal(struct block_list *bl,int64 in_hp,int64 in_sp, int flag) { //If rates are > 0, percent is of current HP/SP //If rates are < 0, percent is of max HP/SP //If !flag, this is heal, otherwise it is damage. -//Furthermore, if flag==2, then the target must not die from the substraction. +//Furthermore, if flag==2, then the target must not die from the subtraction. int status_percent_change(struct block_list *src,struct block_list *target,signed char hp_rate, signed char sp_rate, int flag) { struct status_data *st; unsigned int hp = 0, sp = 0; @@ -1633,11 +1633,11 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin if( sc && sc->count ) { - if (skill_id != RK_REFRESH && sc->opt1 >0 && !(sc->opt1 == OPT1_CRYSTALIZE && src->type == BL_MOB) && sc->opt1 != OPT1_BURNING && skill_id != SR_GENTLETOUCH_CURE) { //Stuned/Frozen/etc + if (skill_id != RK_REFRESH && sc->opt1 >0 && !(sc->opt1 == OPT1_CRYSTALIZE && src->type == BL_MOB) && sc->opt1 != OPT1_BURNING && skill_id != SR_GENTLETOUCH_CURE) { //Stunned/Frozen/etc if (flag != 1) //Can't cast, casted stuff can't damage. return 0; if (!(skill->get_inf(skill_id)&INF_GROUND_SKILL)) - return 0; //Targetted spells can't come off. + return 0; //Targeted spells can't come off. } if ( @@ -1782,7 +1782,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin if( ( tsc->data[SC_STEALTHFIELD] || tsc->data[SC_CAMOUFLAGE] ) && !(st->mode&(MD_BOSS|MD_DETECTOR)) && flag == 4 ) return 0; } - //If targetting, cloak+hide protect you, otherwise only hiding does. + //If targeting, cloak+hide protect you, otherwise only hiding does. hide_flag = flag?OPTION_HIDE:(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK); //You cannot hide from ground skills. @@ -1815,7 +1815,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin } } break; - case BL_ITEM: //Allow targetting of items to pick'em up (or in the case of mobs, to loot them). + case BL_ITEM: //Allow targeting of items to pick'em up (or in the case of mobs, to loot them). //TODO: Would be nice if this could be used to judge whether the player can or not pick up the item it targets. [Skotlex] if (st->mode&MD_LOOTER) return 1; @@ -1891,7 +1891,7 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) #ifdef RENEWAL_ASPD short mod = -1; - switch( sd->weapontype2 ){ // adjustment for dual weilding + switch( sd->weapontype2 ){ // adjustment for dual wielding case W_DAGGER: mod = 0; break; // 0, 1, 1 case W_1HSWORD: case W_1HAXE: mod = 1; @@ -2555,7 +2555,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { return 1; } - // sanitize the refine level in case someone decreased the value inbetween + // sanitize the refine level in case someone decreased the value in between if (sd->status.inventory[index].refine > MAX_REFINE) sd->status.inventory[index].refine = MAX_REFINE; @@ -2583,7 +2583,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { wa->matk += status->refine_info[wlv].bonus[r-1] / 100; #endif - //Overrefine bonus. + //Overrefined bonus. if (r) wd->overrefine = status->refine_info[wlv].randombonus_max[r-1] / 100; diff --git a/src/map/status.h b/src/map/status.h index 32bef4df8..b08aa2a04 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -21,7 +21,7 @@ struct pet_data; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] //Also add 100% checks since those are the most used cases where we don't -//want aproximation errors. +//want approximation errors. #define APPLY_RATE(value, rate) ( \ (rate) == 100 ? \ (value) \ diff --git a/src/map/storage.c b/src/map/storage.c index 2db5fff3d..fad23d770 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -544,7 +544,7 @@ int storage_guild_storageadd(struct map_session_data* sd, int index, int amount) * @index : storage idx * return * 0 : fail -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storageget(struct map_session_data* sd, int index, int amount) { @@ -585,7 +585,7 @@ int storage_guild_storageget(struct map_session_data* sd, int index, int amount) * @index : cart inventory idx * return * 0 : fail -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int amount) { @@ -617,7 +617,7 @@ int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int * @index : storage idx * return * 0 : fail -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int amount) { @@ -648,7 +648,7 @@ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int a * Request to save guild storage * return * 0 : fail (no storage) -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storagesave(int account_id, int guild_id, int flag) { @@ -669,7 +669,7 @@ int storage_guild_storagesave(int account_id, int guild_id, int flag) * ACK save of guild storage * return * 0 : fail (no storage) -* 1 : succes +* 1 : success *------------------------------------------*/ int storage_guild_storagesaved(int guild_id) { diff --git a/src/map/trade.c b/src/map/trade.c index 83426c407..8bb47e0cb 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -61,7 +61,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta if( previous_sd ){ previous_sd->trade_partner = 0; clif->tradecancelled(previous_sd); - } // Once cancelled then continue to the new one. + } // Once canceled then continue to the new one. sd->trade_partner = 0; clif->tradecancelled(sd); } @@ -169,7 +169,7 @@ void trade_tradeack(struct map_session_data *sd, int type) { /*========================================== * Check here hacker for duplicate item in trade * normal client refuse to have 2 same types of item (except equipment) in same trade window - * normal client authorise only no equiped item and only from inventory + * normal client authorize only no equipped item and only from inventory *------------------------------------------*/ int impossible_trade_check(struct map_session_data *sd) { @@ -187,9 +187,9 @@ int impossible_trade_check(struct map_session_data *sd) // get inventory of player memcpy(&inventory, &sd->status.inventory, sizeof(struct item) * MAX_INVENTORY); - // remove this part: arrows can be trade and equiped + // remove this part: arrows can be trade and equipped // re-added! [celest] - // remove equiped items (they can not be trade) + // remove equipped items (they can not be trade) for (i = 0; i < MAX_INVENTORY; i++) if (inventory[i].nameid > 0 && inventory[i].equip && !(inventory[i].equip & EQP_AMMO)) memset(&inventory[i], 0, sizeof(struct item)); @@ -457,7 +457,7 @@ void trade_tradeok(struct map_session_data *sd) { } /*========================================== - * 'Cancel' is pressed. (or trade was force-cancelled by the code) + * 'Cancel' is pressed. (or trade was force-canceled by the code) *------------------------------------------*/ void trade_tradecancel(struct map_session_data *sd) { struct map_session_data *target_sd; @@ -466,7 +466,7 @@ void trade_tradecancel(struct map_session_data *sd) { target_sd = map->id2sd(sd->trade_partner); if(!sd->state.trading) - { // Not trade acepted + { // Not trade accepted if( target_sd ) { target_sd->trade_partner = 0; clif->tradecancelled(target_sd); diff --git a/src/map/unit.c b/src/map/unit.c index e22d6f697..95feb2a1d 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -244,7 +244,7 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { { if (!(ud->skill_id == NPC_SELFDESTRUCTION && ud->skilltimer != INVALID_TIMER)) { //Skill used, abort walking - clif->fixpos(bl); //Fix position as walk has been cancelled. + clif->fixpos(bl); //Fix position as walk has been canceled. return 0; } //Resend walk packet for proper Self Destruction display. @@ -869,7 +869,7 @@ int unit_stop_walking(struct block_list *bl,int type) return 0; //NOTE: We are using timer data after deleting it because we know the //timer->delete function does not messes with it. If the function's - //behaviour changes in the future, this code could break! + //behavior changes in the future, this code could break! td = timer->get(ud->walktimer); timer->delete(ud->walktimer, unit->walktoxy_timer); ud->walktimer = INVALID_TIMER; @@ -892,7 +892,7 @@ int unit_stop_walking(struct block_list *bl,int type) if(bl->type == BL_PET && type&~0xff) ud->canmove_tick = timer->gettick() + (type>>8); - //Readded, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin] + //Read, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin] if (ud->state.running) { status_change_end(bl, SC_RUN, INVALID_TIMER); status_change_end(bl, SC_WUGDASH, INVALID_TIMER); @@ -1250,7 +1250,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui if (!temp) //Stop attack on non-combo skills [Skotlex] unit->stop_attack(src); - else if(ud->attacktimer != INVALID_TIMER) //Elsewise, delay current attack sequence + else if(ud->attacktimer != INVALID_TIMER) //Else-wise, delay current attack sequence ud->attackabletime = tick + status_get_adelay(src); ud->state.skillcastcancel = castcancel; @@ -1366,7 +1366,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui } if(!ud->state.running) //need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026 - unit->stop_walking(src,1);// eventhough this is not how official works but this will do the trick. bugreport:6829 + unit->stop_walking(src,1);// even though this is not how official works but this will do the trick. bugreport:6829 // in official this is triggered even if no cast time. clif->skillcasting(src, src->id, target_id, 0,0, skill_id, skill->get_ele(skill_id, skill_lv), casttime); @@ -1375,7 +1375,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui if (sd && target->type == BL_MOB) { TBL_MOB *md = (TBL_MOB*)target; - mob->skill_event(md, src, tick, -1); //Cast targetted skill event. + mob->skill_event(md, src, tick, -1); //Cast targeted skill event. if (tstatus->mode&(MD_CASTSENSOR_IDLE|MD_CASTSENSOR_CHASE) && battle->check_target(target, src, BCT_ENEMY) > 0) { @@ -1470,7 +1470,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui if( skill->not_ok(skill_id, sd) || !skill->check_condition_castbegin(sd, skill_id, skill_lv) ) return 0; /** - * "WHY IS IT HEREE": pneuma cannot be cancelled past this point, the client displays the animation even, + * "WHY IS IT HEREE": pneuma cannot be canceled past this point, the client displays the animation even, * if we cancel it from nodamage_id, so it has to be here for it to not display the animation. **/ if( skill_id == AL_PNEUMA && map->getcell(src->m, skill_x, skill_y, CELL_CHKLANDPROTECTOR) ) { @@ -1648,7 +1648,7 @@ int unit_attack(struct block_list *src,int target_id,int continuous) { ud->state.attack_continue = continuous; unit->set_target(ud, target_id); - if (continuous) //If you're to attack continously, set to auto-case character + if (continuous) //If you're to attack continuously, set to auto-case character ud->chaserange = status_get_range(src); //Just change target/type. [Skotlex] @@ -1938,7 +1938,7 @@ int unit_attack_timer(int tid, int64 tick, int id, intptr_t data) { /*========================================== * Cancels an ongoing skill cast. * flag&1: Cast-Cancel invoked. - * flag&2: Cancel only if skill is cancellable. + * flag&2: Cancel only if skill is can be cancel. *------------------------------------------*/ int unit_skillcastcancel(struct block_list *bl,int type) { @@ -1954,7 +1954,7 @@ int unit_skillcastcancel(struct block_list *bl,int type) sd = BL_CAST(BL_PC, bl); if (type&2) { - //See if it can be cancelled. + //See if it can be canceled. if (!ud->state.skillcastcancel) return 0; @@ -2057,7 +2057,7 @@ int unit_changeviewsize(struct block_list *bl,short size) /*========================================== * Removes a bl/ud from the map. * Returns 1 on success. 0 if it couldn't be removed or the bl was free'd - * if clrtype is 1 (death), appropiate cleanup is performed. + * if clrtype is 1 (death), appropriate cleanup is performed. * Otherwise it is assumed bl is being warped. * On-Kill specific stuff is not performed here, look at status->damage for that. *------------------------------------------*/ diff --git a/src/map/vending.h b/src/map/vending.h index a70726374..b65e888e3 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -13,8 +13,8 @@ struct s_search_store_search; struct s_vending { short index; //cart index (return item data) - short amount; //amout of the item for vending - unsigned int value; //at wich price + short amount; //amount of the item for vending + unsigned int value; //at which price }; struct vending_interface { -- cgit v1.2.3-70-g09d2